Repository navigation
Description
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 isPOST /v1/<op>with a JSON body andAuthorization: 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 ofmemory.set,memory.get,memory.searchandmemory.delete.sdk/typescript/src/client.tsandsdk/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, withorg,namespaceandagentbound once. set,get,searchanddeletefor 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,retryableand the HTTP status, so a caller can matchNOT_FOUNDorRATE_LIMITEDwithout parsing text. - Dependencies:
reqwest(orureq) andserde; an async or blocking client, your choice. - A
README.mdwith 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 withcargo testinsdk/rust. - By hand against a local Loom:
make serverfrom 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
yorkhellen commentedon Nov 17, 2026
I'd like to take this issue. I plan to add an async
clickhouse-loomcrate undersdk/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.