Repository navigation
feat: A minimal Rust client for the memory ops: set, get, search and delete - #842
Merged
Merged
Conversation
Typed responses preserve search provenance and retrieval decisions so Rust applications can use Loom memory with the same search and retry defaults as the Python SDK. Signed-off-by: zhangxiaoyu.york <[email protected]>
List every request field so a missing-field error cannot mask removal of the struct's construction protection. Signed-off-by: zhangxiaoyu.york <[email protected]>
The memory example and its guide cover scoped save, read, search and delete calls. Signed-off-by: zhangxiaoyu.york <[email protected]>
Search responses include writer and governed-definition metadata. Signed-off-by: zhangxiaoyu.york <[email protected]>
Package metadata, guides and API comments describe the product and supported memory operations consistently. Signed-off-by: zhangxiaoyu.york <[email protected]>
Describe Loom consistently while using Rust-specific wording for the client and its configuration. Signed-off-by: zhangxiaoyu.york <[email protected]>
Signed-off-by: zhangxiaoyu.york <[email protected]>
Delegate UUID generation and error formatting to maintained crates while preserving request identity and error chains. Signed-off-by: zhangxiaoyu.york <[email protected]>
Make the Rust client guide discoverable alongside the other SDK and HTTP documentation. Signed-off-by: zhangxiaoyu.york <[email protected]>
Merge main to restore request context isolation and keep the Rust job behind the shared validation gate. Signed-off-by: zhangxiaoyu.york <[email protected]>
Bring in per-sample lane cost diagnostics so CI failures retain completion and error evidence. Signed-off-by: zhangxiaoyu.york <[email protected]>
zlareb1
approved these changes
Nov 18, 2026
zlareb1
left a comment
Member
There was a problem hiding this comment.
No findings in the four memory operations, response models, identity binding, retry/idempotency behavior, credential redaction or CI job. All 53 Rust tests, formatting, Clippy, documentation and package/license checks pass locally on Rust 1.93.1. CI must validate Rust 1.84.1 before merge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes: #619
Changelog category
Changelog entry
Adds Rust SDK for saving, reading, searching and deleting memories. The client provides typed responses, explicit or environment configuration, classified API errors and retries with write idempotency keys.
Why
Rust applications currently need to construct HTTP requests and decode Loom responses themselves. A client for four memory operations gives callers a typed API and a tested foundation for broader SDK coverage.
Scope and risk
Adds the
clickhouse-loomcrate undersdk/rust/, usage documentation, a runnable memory example and tests against a local fake HTTP server. The repository README links to the Rust SDK guide.CI checks the SDK on Rust 1.84.1 and stable, including formatting, tests, Clippy, documentation, crate packaging and license verification.
The client binds org, namespace and agent once. Search reads across agents by default and accepts explicit filters, matching the Python high-level SDK. Write retries reuse one idempotency key per call; clones share connections and rate-limit state.
The main risks are request serialization, error decoding and retries after an ambiguous transport failure. Tests cover these paths, cancellation and concurrent calls. Server operations, storage, authorization, plugins and the dashboard are unchanged.
Compatibility, rollout and rollback
memory.set,memory.get,memory.searchandmemory.deleteoperations. No server fields or defaults change. Public Rust types are non-exhaustive, and response decoding accepts unknown fields.clickhouse-loomto crates.io is a follow-up release step after merge. Once published, the installation guide will includecargo add clickhouse-loom.Tests
cargo test --lockedpassed all 53 unit, HTTP contract, response-model and documentation tests.cargo fmt --checkandcargo clippy --locked --all-targets -- -D warningspassed.RUSTDOCFLAGS="-D warnings" cargo doc --locked --no-depspassed.cargo package --lockedand packaged-license verification passed.The server integration suite was not run for this client-only change; server behaviour is unchanged.
AI assistance in the code
AI-generated using GPT 6.1 Sol. The author designed the solution and established the code structure. AI generated the implementation within that structure, and the author reviews the generated code.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
make format-check,make lint,make typecheckandmake test-unitpass; the integration suite passes if server behaviour changed. Full unit-suite validation remains pending.docs/reference/configuration.mdand thedocs/reference/tables (python scripts/codegen/docs_reference.py), the reach manifest,schemas/schema.sql(make schema-dump) and the Codex plugin copies (python3 scripts/codegen/agent_plugin_sync.py). N/A: no generated artifacts changed; generator checks passed.main; no merged migration is edited. N/A: no migrations changed.hooks/,lib/,bin/,skills/,.mcp.json, the Codexplugin-defaults.json) bumps both plugin manifests' version, and no other open PR uses that version. N/A: no plugin files changed.npm --prefix frontend run build) and its tests pass, iffrontend/changed. N/A: no frontend files changed.docs/describe the system as it now is, and this description names any operator steps and wire changes.tests/unit/test_public_copy.py).git commit -s), as CONTRIBUTING.md asks.