totalreclaw-memory
End-to-end encrypted memory backend for Rust. Native Memory trait implementation that powers ZeroClaw and any other Rust agent or app that wants the TotalReclaw memory model.
v2.0.0 ships Memory Taxonomy v1 — every memory is typed (claim / preference / directive / commitment / episode / summary) and tagged with source, scope, and volatility. Retrieval uses source-weighted reranking via the shared totalreclaw-core crate. See the memory types guide.
Features
- Memory trait — implements the canonical async
store/recall/forget/export/status/debriefcontract. - Memory Taxonomy v1 — new
store_v1()method +V1StoreInputstruct with type / source / scope / volatility / reasoning. - Native ERC-4337 — UserOp construction via
alloy-primitives/alloy-sol-types, verified byte-for-byte against viem. - Batching — up to 15 facts per UserOp via
executeBatch(). - Cosine + fingerprint dedup — near-duplicate prevention at store time (via shared core).
- Contradiction detection + pin semantics — via shared core.
- Hot cache — 30-entry local query cache with cosine similarity matching.
- Billing cache — 2-hour TTL with quota warnings (>80%) and 403 invalidation.
- Chain ID auto-detect — free tier on Base Sepolia, Pro on Gnosis. No env var.
- Protobuf v4 outer wrapper — inner blob is v1 JSON.
Quick Start
[]
= "2.0"
use ;
async
Cross-client parity
All encryption, fingerprinting, LSH, reranking, and v1 taxonomy validation is handled by the shared totalreclaw-core crate — the same Rust core compiled to WASM for the TypeScript clients and PyO3 for the Python client. Memories written by this crate are byte-equivalent to memories written by @totalreclaw/client, totalreclaw (Python), or @totalreclaw/mcp-server.
Environment Variables
| Variable | Description | Default |
|---|---|---|
TOTALRECLAW_RECOVERY_PHRASE |
12-word recovery phrase | Required |
TOTALRECLAW_SERVER_URL |
Relay URL | https://api.totalreclaw.xyz |
TOTALRECLAW_SELF_HOSTED |
Use self-hosted server | false |
See the env vars reference for the canonical list (5 user-facing vars after the v1 cleanup).
Learn More
License
MIT