@totalreclaw/client
v0.7.0
Published
TypeScript client library for TotalReclaw — E2EE encryption, LSH blind indexing, embedding search, and BM25+cosine reranking for AI agent memory
Maintainers
Readme
Build encrypted memory into any AI agent. All encryption happens client-side -- the server never sees plaintext.
This is the core cryptographic library used by @totalreclaw/totalreclaw (OpenClaw plugin) and @totalreclaw/mcp-server. Most users should install one of those packages instead.
Installation
npm install @totalreclaw/clientFeatures
- AES-256-GCM encryption -- All memories encrypted client-side
- Blind index search -- LSH-based blind indices for searching encrypted data
- Local embeddings -- Qwen3-Embedding-0.6B for semantic similarity (no API keys, 100+ languages)
- BM25 + cosine reranking -- Reciprocal rank fusion for high-quality retrieval
- Smart Account derivation -- BIP-39 mnemonic to ERC-4337 Smart Account address
- Memory decay -- Importance-based lifecycle management
Quick Start
import { TotalReclaw } from '@totalreclaw/client';
const client = new TotalReclaw({ serverUrl: 'https://api.totalreclaw.xyz' });
await client.init();
const userId = await client.register('your twelve word recovery phrase');
await client.remember('I prefer coffee over tea in the morning');
const results = await client.recall('what do I like to drink?');Crypto Primitives
| Operation | Algorithm | Purpose | |-----------|-----------|---------| | Key derivation | Argon2id + HKDF-SHA256 | Memory-hard password hashing + auth key derivation | | Encryption | AES-256-GCM | Authenticated encryption of memories and embeddings | | Blind indices | SHA-256 | Searchable encryption without exposing plaintext | | LSH | Random hyperplane | Approximate nearest neighbor search on encrypted data | | Embeddings | Qwen3-Embedding-0.6B (1024d) | Local semantic similarity (no API calls, 100+ languages) | | Reranking | BM25 + cosine + RRF | Multi-signal result fusion |
Development
npm install # Install dependencies
npm test # Run tests (217 tests)
npm run build # BuildLearn More
- Architecture Spec -- E2EE design with LSH + blind buckets
- totalreclaw.xyz
- Main Repository
License
MIT
