A memory layer your agent already speaks.

SAIHM is sovereign, encrypted, persistent memory for AI agents — drop-in over the Model Context Protocol. One store you own grounds every model and every framework, with erasure you can prove. Pay-as-you-go per call, or a flat monthly subscription — current rates on pricing.

Run a demo Join SAIHM

Try it in a minute — offline, no account

Every demo runs offline against an included blind sandbox — no key, no account — or grounds a live answer with your own model key. The memory is identical across all of them; that is the point.

git clone https://github.com/citw2/demo-cross-model-memory
cd demo-cross-model-memory
npm install
node demo.mjs            # offline sandbox: seals 3 facts, grounds two models, proves erasure

Prefer your editor? demo-claude-code runs SAIHM as an MCP server for Claude Code, Cursor, and any MCP host. All fourteen demos live at citw2.github.io/saihm-demos.

Why adopt SAIHM

  • One protocol, every agent. If your agent already speaks MCP, integrating SAIHM is a config change, not a rewrite.
  • Measured token savings. Recalling a small working set instead of re-sending the whole history cuts context tokens ~80% on long multi-session runs (measured 62.8%–85.9%) — reproduce the numbers yourself with the open token benchmark.
  • Memory layer, not a model. SAIHM does not compete with your agent. It complements any of them — commercial, open-source, or your own.
  • Cryptographic right-to-erasure. forget destroys the wrapped key; the ciphertext becomes unrecoverable noise. Compliance teams ask for this, and you get it by adopting SAIHM.
  • Stable billing surface. USDC.e on COTI V2 (no premium), direct or gasless via signed authorisation. Predictable to forecast against.
  • Open licence (Apache 2.0). No proprietary client SDK lock-in. No surprise re-licence.
  • Public-protocol commitments. Build artefacts are committed on a public, dated ledger, so independent verification of what is running is always possible.

Runnable demos — one per model, plus cross-model and frameworks

Each is a single small repo. Clone, npm install, run — offline by default, or live with your own key.

DemoWhat it shows
demo-claudeGround Claude (Anthropic) in a memory you own.
demo-openaiA memory layer GPT can read — keys held by you, not your OpenAI account.
demo-deepseekSeal facts client-side, ground DeepSeek, then prove you can erase one.
demo-qwenGive Qwen a memory that is not locked to one vendor account.
demo-kimiWire Moonshot Kimi to a portable, provably erasable store.
demo-glmGround Zhipu GLM in one memory, then carry it to any model.
demo-cross-model-memoryTwo models grounded from the same store at once — then provable erasure across both.
demo-claude-codeSAIHM as an MCP server for Claude Code, Cursor, and any MCP host.
saihm-langchainLangChain and LlamaIndex adapters for Python (below).
saihm-crewaiRoute a CrewAI crew's memory through a SAIHM StorageBackend you own (below).
saihm-autogenAn autogen_core.memory.Memory for AutoGen agents, backed by SAIHM (below).
saihm-langgraphA LangGraph BaseStore for long-term, cross-thread memory (below).
saihm-ragA LlamaIndex BaseRetriever for RAG over a knowledge base you own (below).
saihm-erasure-receiptA runnable proof of cryptographic erasure (GDPR Art. 17): seal a record, destroy its key, emit a verifiable receipt.

Drop into your framework (Python)

SAIHM ships drop-in adapters for LangChain (BaseChatMessageHistory), LlamaIndex (BaseMemory chat and BaseRetriever for RAG), CrewAI (StorageBackend), AutoGen (autogen_core.memory.Memory), and LangGraph (BaseStore, long-term memory). The same store opens from all of them — and from the core client — sealed client-side by a small bundled Node sidecar, so Python never holds a key. One forget removes a memory from every consumer at once. Sources: saihm-langchain, saihm-crewai, saihm-autogen, saihm-langgraph, saihm-rag.

LangChain — drop-in for RunnableWithMessageHistory

from saihm_memory import SaihmChatMessageHistory

history = SaihmChatMessageHistory()           # local blind sandbox by default
history.add_user_message("My name is Dana.")
history.messages                              # -> [HumanMessage("My name is Dana.")]
history.clear()                               # crypto-shreds the messages this history added

LlamaIndex — drop-in for chat engines / agents (memory=…)

from saihm_memory import SaihmMemory
from llama_index.core.llms import ChatMessage, MessageRole

memory = SaihmMemory.from_defaults()
memory.put(ChatMessage(role=MessageRole.USER, content="My name is Dana."))
memory.get_all()                             # -> [ChatMessage(USER, "My name is Dana.")]
memory.reset()                               # crypto-shreds the messages this memory added

CrewAI — a StorageBackend you register once

from crewai.memory.storage.factory import set_memory_storage_factory
from saihm_memory import SaihmStorageBackend

# Route CrewAI's memory through SAIHM; return None for specs you do not handle.
set_memory_storage_factory(lambda spec: SaihmStorageBackend() if spec == "saihm" else None)

Source: citw2/saihm-crewai. SAIHM is a blind store, so retrieval ranks client-side; delete / reset crypto-shred.

AutoGen — an autogen_core.memory.Memory

from autogen_agentchat.agents import AssistantAgent
from saihm_memory import SaihmMemory

agent = AssistantAgent("assistant", model_client=..., memory=[SaihmMemory()])

Source: citw2/saihm-autogen. Async-native; the bundled sidecar seals every cell, so Python never holds a key.

LangGraph — a BaseStore for long-term memory

from saihm_memory import SaihmStore

graph = builder.compile(store=SaihmStore())   # nodes get the store injected

Source: citw2/saihm-langgraph. Durable cross-thread memory; delete crypto-shreds. (Distinct from saihm-langchain, which gives classic LangChain a chat history.)

LlamaIndex — a BaseRetriever for RAG over a corpus you own

from llama_index.core.schema import TextNode
from saihm_memory import SaihmRetriever

r = SaihmRetriever()                          # local blind sandbox by default
r.add_nodes([TextNode(text="Dana is allergic to penicillin.")])   # seal your document chunks
nodes = r.retrieve("what is the patient allergic to?")            # the RAG retrieval step

Source: citw2/saihm-rag. Retrieval over an owned corpus; the blind store ranks client-side and forget crypto-shreds a source document. (Distinct from saihm-langchain's LlamaIndex chat memory.)

Core client (any Python app)

from saihm_memory import SaihmMemoryClient

mem = SaihmMemoryClient()                     # local blind sandbox by default
cell = mem.remember("My name is Dana Okafor.")
mem.recall()                                  # -> [Memory(cell_id=..., text="My name is Dana Okafor.")]
mem.forget(cell)                              # crypto-shred (irreversible)

Run the adapter demo

git clone https://github.com/citw2/saihm-langchain
cd saihm-langchain
npm install                                   # the Node sidecar that seals every cell client-side
python3 -m venv .venv && . .venv/bin/activate
pip install -r requirements.txt
python demo.py                                # offline blind sandbox; no account

The adapters read your whole store, but clear() / reset() only crypto-shred the messages that instance added — a reset never wipes the rest of your memory by surprise.

Self-host the MCP server

npx @saihm/mcp-server

Go live against the hosted endpoint

The sandbox is an offline stand-in — it is not the SAIHM service and stores nothing beyond the running process. Going live requires a paid membership (no free tier). Onboard via POST /api/onboard to obtain a JWT, then point the same code at the blind endpoint:

export SAIHM_ENDPOINT_URL=https://saihm.coti.global/mcp
export SAIHM_AUTH_HEADER="Bearer <your-onboard-JWT>"
export SAIHM_MASTER_SECRET_HEX=<at least 64 hex chars, generated and held only by you>

Your master secret never leaves your machine; the endpoint only ever receives ciphertext.

MCP tools

ToolGroupTier
saihm_rememberMemoryAll
saihm_recallMemoryAll
saihm_forgetMemoryAll
saihm_statusMemoryAll
saihm_shareSharingPro Fast / Enterprise Fast, or PAYG
saihm_revoke_shareSharingPro Fast / Enterprise Fast, or PAYG
saihm_governance_proposeGovernancegSAIHM holders
saihm_governance_voteGovernancegSAIHM holders

All tools route through the protocol runtime and emit GC-14 audit receipts. See /.well-known/saihm.json for machine-readable surface metadata and /docs for the full identity model.

Endpoints

PathTypePurpose
/mcpHTTP+SSEMCP bridge fronting the stdio MCP server
/api/onboardPOST JSONHKDF-signed nonce + payment intent → JWT (24 h). See Billing & gasless.
/.well-known/saihm.jsonGET JSONProtocol descriptor
/.well-known/security.txtGET textRFC 9116. See /trust#disclosure for scope and process.
/llms.txtGET textLong-form summary for LLM consumers
/agents.txtGET textShort-form for agent crawlers

Billing & gasless onboarding

Ways to pay:

  • Fiat via Stripe (subscription tiers) — pay by card or another Stripe-supported method at Join; no crypto, gas, or bridging.
  • USDC.e (canonical, no premium) — broadcast the transfer to your tier address and pay COTI gas yourself.
  • Gasless via signed authorisation (no premium) — sign in your wallet and hold no COTI for gas; SAIHM settles your tier on-chain. How to start →
  • Only USDC.e settles a tier. Native COTI, USDT, DAI, or ETH sent to a tier address will not credit your account. See /pricing.

Rates: pay-as-you-go settles per call with no subscription and no card-on-file; monthly tiers add dedicated quotas, sharing contracts, and audit retention. Current per-call rates, full tiers, and the side-by-side decision matrix are on the pricing page.

Who adopts SAIHM

  • Indie agent builders. Add SAIHM over the existing MCP transport in a weekend; the agent remembers each repo’s conventions, the preferred test framework, the files the user keeps returning to. PAYG bills only the calls beta users actually generate.
  • OSS framework maintainers. Pre-integrate SAIHM as the default memory backend; downstream users get sovereignty, sharing, and erasure out of the box — no memory service to ship, no key-management ops to run.
  • Platform & compliance teams. Memory continuity decoupled from whichever model vendor procurement settles on next; user-held keys, provable crypto-erasure, and dated public build commitments give security something concrete to audit against.

Developer incentives

  • gSAIHM via paid use. Every qualifying paid write accrues governance utility (gSAIHM) to the agent identity that signed it — soulbound, earned not sold, a vote on protocol parameters proportional to your usage. Details on /governance.
  • Apache 2.0. Embed SAIHM in your product without a commercial-licence conversation.
  • No vendor SDK lock. The protocol is the contract. Anything that speaks MCP can speak SAIHM.
  • Public reproducibility. Build commitments are anchored on a public network; verify what is actually serving you against what is published.

Network

Chain
COTI V2 Helium mainnet
Chain ID
2632500
RPC
https://mainnet.coti.io/rpc
Explorer
mainnet.cotiscan.io

Join SAIHM