8000 Rust SDK · Issue #52 · ClickHouse/loom · GitHub
[go: up one dir, main page]

Skip to content

Rust SDK #52

Open
Open

Description

@zlareb1

We'd like a Rust client for Loom. Agent runtimes and tooling in Rust are growing: rig, MCP servers, CLI agents, edge/WASM targets. Today, using Loom from Rust means raw HTTP plus JSON shapes copied out of docs/reference/http-api.md.

Scope for a loom crate:

  • Request/response types (serde structs) generated from the op registry, checked in CI the same way the TS generated/ops.ts is
  • An async client on reqwest + tokio, with an optional blocking feature for callers who don't want a runtime
  • A config builder that falls back to LOOM_BASE_URL / LOOM_API_KEY, and never prints the key in Debug
  • Identity tuple (org, namespace, agent, user_id, session_id) set once on the client
  • Automatic Idempotency-Key on idempotent ops, and backoff that reads Retry-After / X-RateLimit-*
  • An error enum that carries the server code, so callers can match on PinnedConflict, Blacklisted, RateLimited and so on
  • rustls by default, so no OpenSSL dependency

Open questions:

  • Option<T> fields everywhere, or generated builders per input type? With this many ops, builders are nicer to use but mean a lot more generated code.
  • The crates.io name. clickhouse-loom would match the Python package.

Plan: start with memory, context.pack and knowledge, then grow coverage from there.

Activity

  1. zlareb1 commented on Nov 20, 2026

    @zlareb1
    MemberAuthor
  2. yorkhellen commented on Nov 20, 2026

    @yorkhellen
    Contributor

    @zlareb1 I can work through the capabilities listed here in separate PRs, starting with memory, context.pack, and knowledge.

    For inputs, I suggest a hybrid approach: constructors take required arguments, while optional fields use Option<T> internally and expose chainable setters.

    The crate is already named clickhouse-loom, so I’d keep that name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    0