Skip to content

A minimal Rust client for the memory ops: set, get, search and delete #619

Closed

Description

@zlareb1

Component

Rust SDK (new; the form lists no SDK beyond Python and TypeScript)

Use case

Rust code that wants agent memory has to hand-roll POST /v1/<op> calls today. #52 tracks a full Rust SDK with types generated from the op registry; that is weeks of work. This issue is the first, self-contained step: a small hand-written client that saves, reads, searches and deletes memories, which the full SDK can grow from.

Describe the solution you'd like

Goal. A minimal Rust client under sdk/rust/ (a crate named clickhouse-loom) that calls four ops over HTTP and maps Loom's errors, with tests that need no running server.

Files to start from

  • docs/reference/http-api.md: every op is POST /v1/<op> with a JSON body and Authorization: Bearer <token>.
  • docs/reference/errors.md: the error envelope (detail.code, detail.category, detail.retryable, retry_after_s).
  • docs/reference/operations/memory.md: the inputs and outputs of memory.set, memory.get, memory.search and memory.delete.
  • sdk/typescript/src/client.ts and sdk/typescript/src/errors.ts: the TypeScript SDK's request and error handling, the shape to mirror.

Acceptance criteria

  • A client built from a base URL and an optional token, or from LOOM_BASE_URL / LOOM_API_KEY, with org, namespace and agent bound once.
  • set, get, search and delete for memories, sending the bodies the operations reference names and returning typed results for the fields a caller reads (memory_id, version, value, the search hits).
  • A non-2xx answer becomes an error that carries code, category, retryable and the HTTP status, so a caller can match NOT_FOUND or RATE_LIMITED without parsing text.
  • Dependencies: reqwest (or ureq) and serde; an async or blocking client, your choice.
  • A README.md with a five-line example against a local server (http://localhost:7777, no token).

How to test

  • Unit tests against a local fake HTTP server or a stubbed transport: the request path, headers and body for each call, and one error answer per category. Run them with cargo test in sdk/rust.
  • By hand against a local Loom: make server from a checkout (or the one-line installer), then run the README example.

Size: M (a day or two). CI wiring for the new language is not part of this issue; say in the PR how you ran the tests.

Describe alternatives you've considered

The full generated SDK in #52. This issue does not replace it; it gives that work a tested starting point and a package layout.

Where the need comes from

The need is mine, an AI tool helped shape the proposal

Additional context

Related: #52

A good first issue: it touches no server code. Read CONTRIBUTING.md first (signed-off commits), and comment here to say you are working on it.

Activity

  1. added
    enhancement
    good first issue
    help wanted
    on Nov 13, 2026
  2. yorkhellen commented on Nov 17, 2026

    @yorkhellen
    Contributor

    I'd like to take this issue. I plan to add an async clickhouse-loom crate under sdk/rust/ using reqwest and serde, with identity bound on the client, explicit or environment configuration, typed results for set/get/search/delete, and errors that preserve the server's code, category, retryable flag and HTTP status.

    I'll test the requests and errors against a local HTTP server and run the example against a local Loom instance. The async API will provide a foundation for extending the SDK.

  3. added
    up-for-grabs
    on Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementgood first issuehelp wantedup-for-grabs

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions