Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

totalreclaw

End-to-end encrypted memory + knowledge graph for AI agents.

Store, search, and recall memories across any AI agent with zero-knowledge encryption. Your data is encrypted on-device before it leaves -- the server never sees plaintext.

As of 2.4.6, the client uses Memory Taxonomy v1 (6 canonical types: claim | preference | directive | commitment | episode | summary) and Retrieval v2 Tier 1 source-weighted reranking (user-sourced facts rank higher than assistant-sourced facts on tied BM25 + cosine scores). See the memory types guide. Existing pre-v1 vault entries decrypt transparently.

Features

  • End-to-end encrypted -- XChaCha20-Poly1305 encryption, HKDF key derivation from a BIP-39 recovery phrase
  • Portable -- Same recovery phrase works across Hermes, OpenClaw, Claude Desktop, IronClaw, ZeroClaw
  • Memory Taxonomy v1 -- 6 speech-act types + required provenance (user | user-inferred | assistant | external | derived) and 8 life-domain scopes. v1 is the only write path (no env-var gating).
  • Retrieval v2 Tier 1 -- source-weighted reranking via totalreclaw-core@2.5.5 PyO3 bindings (user-sourced facts rank higher on tied scores)
  • G-pipeline extraction -- merged-topic prompt, provenance filter (lax), comparative rescoring, volatility heuristic
  • Local embeddings -- Harrier-OSS-v1-270M runs on-device (no API calls)
  • Hybrid search -- BM25 + cosine similarity + RRF reranking
  • LSH bucketing -- Locality-sensitive hashing for encrypted search
  • On-chain storage -- Managed service stores on Gnosis mainnet (single chain, all tiers) via ERC-4337; outer protobuf v4

Quick Start

pip install totalreclaw
import asyncio
from totalreclaw import TotalReclaw

async def main():
    client = TotalReclaw(
        recovery_phrase="your twelve word recovery phrase here",
        server_url="https://api.totalreclaw.xyz",  # default, can be omitted
    )

    # REQUIRED: resolve Smart Account address and register with relay
    await client.resolve_address()
    await client.register()

    # Store a memory — v1 taxonomy defaults: type="claim", source="user", scope="unspecified".
    # Importance is 1-10 (int) or 0-1 (float, auto-normalized).
    # v1 types: claim | preference | directive | commitment | episode | summary
    # scope, volatility, reasoning also accepted.
    fact_id = await client.remember(
        "Pedro prefers dark mode for all editors",
        fact_type="preference",
        scope="personal",
        importance=8,
    )

    # Search memories
    results = await client.recall("What does Pedro prefer?")
    for r in results:
        print(f"  [{r.rrf_score:.3f}] {r.text}")

    # Delete a memory
    await client.forget(fact_id)

    # Export all memories
    facts = await client.export_all()

    # Check billing
    status = await client.status()
    print(f"Tier: {status.tier}, Used: {status.free_writes_used}/{status.free_writes_limit}")

    await client.close()

asyncio.run(main())

Important: You must call resolve_address() and register() before any operations. resolve_address() derives the CREATE2 Smart Account address via an RPC call, and register() authenticates with the relay.

For semantic search, install with embedding support:

pip install totalreclaw
from totalreclaw import TotalReclaw
from totalreclaw.embedding import get_embedding

client = TotalReclaw(recovery_phrase="...")

# Store with embedding for semantic search
text = "Pedro prefers dark mode"
embedding = get_embedding(text)
await client.remember(text, embedding=embedding)

# Search with embedding
query = "What are Pedro's UI preferences?"
query_emb = get_embedding(query)
results = await client.recall(query, query_embedding=query_emb)

The embedding model (~600 MB) downloads automatically on first use.

Hermes Agent Plugin

The Hermes plugin ships in this package (there is no hermes extra). Install it into the Hermes environment's own Python, verify that the Hermes interpreter imports the new version, enable the plugin and restart the gateway, then set up the account by pairing. Follow the install and verify steps in the Hermes setup guide; a plain pip install totalreclaw can land where Hermes never looks.

Architecture

Plaintext → XChaCha20-Poly1305 encrypt → Blind indices (SHA-256) → LSH buckets → On-chain via relay
                                                                              ↓
Query → Blind trapdoors → GraphQL search → Decrypt candidates → BM25+Cosine+RRF rerank → Top 8

All encryption happens client-side. The relay server and on-chain storage never see plaintext.

Cross-Language Parity

This Python client produces byte-for-byte identical outputs to the TypeScript implementation (@totalreclaw/mcp-server):

  • Key derivation (HKDF-SHA256)
  • XChaCha20-Poly1305 wire format (nonce || tag || ciphertext)
  • Blind indices (SHA-256 + Porter stemming)
  • Content fingerprints (HMAC-SHA256)
  • LSH bucket hashes (32-bit x 20 tables)

Memories stored by the Python client can be recalled by the MCP server, and vice versa.

Learn More

Changelog

The latest changes live in CHANGELOG-public.md — kept current there rather than duplicated in this README.

License

MIT

Metadata

Release files for totalreclaw 2.7.0rc2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for totalreclaw 2.7.0rc2
File Size Uploaded Provenance Actions
totalreclaw-2.7.0rc2.tar.gz 1.2 MB Without provenance Details for totalreclaw-2.7.0rc2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for totalreclaw 2.7.0rc2
File Interpreter ABI Platform Actions
totalreclaw-2.7.0rc2-py3-none-any.whl Python 3 none any Details for totalreclaw-2.7.0rc2-py3-none-any.whl

Total release size: 1.8 MB

Release files / totalreclaw-2.7.0rc2.tar.gz

Download URL totalreclaw-2.7.0rc2.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
3c9c287bd7902fe280232b4ca4fdd3468f400dcbc5acad0ec08194603a262ea4
BLAKE2b-256 checksum
How to use checksums
5f938fe7ce9ac49bd09d9d6fb1c55a299ee63f7a762b9a43a9490859c41a3f65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / totalreclaw-2.7.0rc2-py3-none-any.whl

Download URL totalreclaw-2.7.0rc2-py3-none-any.whl
Size 641.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d37b7613e8d89930bd64356dbe3c61052ecc6bbec3ecbd4955e951e5137a5987
BLAKE2b-256 checksum
How to use checksums
e6a042b1453de6d9592bc7db37db752ef09da78904992d9b6af05d9a95dd3f2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Security for totalreclaw 2.7.0rc2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page