JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 512
  • Score
    100M100P100Q104188F
  • License MIT

TypeScript client library for TotalReclaw — E2EE encryption, LSH blind indexing, embedding search, and BM25+cosine reranking for AI agent memory

Package Exports

  • @totalreclaw/client
  • @totalreclaw/client/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@totalreclaw/client) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

TotalReclaw

@totalreclaw/client

TypeScript client library for TotalReclaw -- E2EE, LSH blind indexing, embeddings, and reranking

Website · npm · Repository

npm version License


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.

Requirements: Node.js 18+

Architecture

All cryptographic operations (AES-256-GCM, HKDF key derivation, LSH hashing, blind indices, content fingerprinting) are powered by @totalreclaw/core -- a unified Rust/WASM module that ensures byte-for-byte consistency across all TotalReclaw clients.

Installation

npm install @totalreclaw/client

Features

  • AES-256-GCM encryption -- All memories encrypted client-side
  • Blind index search -- LSH-based blind indices for searching encrypted data
  • Local embeddings -- Harrier-OSS-v1-270M for semantic similarity (no API keys)
  • 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 Harrier-OSS-v1-270M (640d) Local semantic similarity (no API calls)
Reranking BM25 + cosine + RRF Multi-signal result fusion

Development

npm install     # Install dependencies
npm test        # Run tests (217 tests)
npm run build   # Build

Learn More

License

MIT