Documentation

Reference for the SAIHM protocol: tool surface, identity model, sealed-core architecture, endpoints, and version metadata. Source under Apache 2.0; see /about for license and reproducibility chain.

Version

Protocol revision
v1
Architecture
MCP-first; every tool routes through the protocol runtime
Sealed-core
COTI V2 Helium garbled circuits
Identity
HKDF chain MPS-PQC-KEY-GEN-v1MPS-AGENT-IDENTITY-v1
Cell persistence
Tiered persistence, selected at write time

MCP tools

SAIHM exposes its whole protocol surface through the Model Context Protocol, so any MCP-capable host attaches it without a SAIHM-specific SDK.

Eight tools deployed: four memory, two sharing, two governance. All route through the protocol runtime and emit a signed audit receipt.

ToolGroupTierEffect
saihm_rememberMemoryAll Encrypts content under a per-cell DEK; persists ciphertext to the GC-5 storage tier; emits a GC-14 audit receipt.
saihm_recallMemoryAll Retrieves and decrypts cells the caller’s identity is authorized to read (own + grantee). Optional keyword filter.
saihm_forgetMemoryAll GDPR Art. 17 cryptographic erasure. Destroys the DEK (GC-3 destroyDek), writes a GC-4 tombstone, blacklists the storage CID, audits via GC-14.
saihm_statusMemoryAll Session status: agent identity, tier, custody mode, PRS and BFSI scores, active shard and sharing counts, as far as the operator reports them. A non-custodial operator cannot see stored-byte totals, so those fields are absent rather than zero.
saihm_shareSharingPro Fast / Enterprise Fast, or PAYG Grants a named grantee read access to a cell under a TEMPORARY, PERMANENT, or SYNDICATE contract.
saihm_revoke_shareSharingPro Fast / Enterprise Fast, or PAYG Revokes a previously granted sharing contract.
saihm_governance_proposeGovernanceNot enabled yet Opens a proposal on a protocol parameter or upgrade.
saihm_governance_voteGovernanceNot enabled yet Casts a vote on an open proposal.

The two governance tools are held back until separately ratified. They are present so the tool surface stays stable across releases, and do not open or record a vote today; see /governance for what protocol governance covers and what it does not.

Identity model

  • Each agent derives its identity from a master secret only its operator holds. On the free tier the client generates that secret on your own machine at join and writes it mode-600 to ~/.saihm/free-identity.key; where a wallet is used instead, the identity is wallet-derived via the canonical HKDF chain MPS-PQC-KEY-GEN-v1MPS-AGENT-IDENTITY-v1.
  • The DEK for each cell is derived from the agent identity plus per-cell salt; only the holder, or grantees enrolled via saihm_share, can decrypt.
  • SAIHM never has custody of that secret. If it is lost — the key file deleted, the seed forgotten — the memory it opens cannot be reconstructed by anyone, SAIHM included. Back up the key file the client names when it creates it. This is a privacy guarantee, not a limitation.
  • All operations are signed with the agent’s ML-DSA key derived from that same secret. The runtime verifies signatures before metering.

Endpoints

PathTypePurpose
/mcpHTTP+SSEMCP bridge fronting the stdio MCP server.
/api/onboardPOST JSONHKDF-signed nonce + payment intent → JWT (24 h).
/api/free-onboard/startPOST JSONBegins free-tier activation from the command line; returns a device code and a link to approve.
/api/free-onboard/claimPOST JSONCompletes that command-line activation once the device code is approved.
/api/free/configGET JSONSign-in providers offered for browser activation of the free tier.
/api/free/claimPOST JSONCompletes browser activation of the free tier.
/.well-known/saihm.jsonGET JSONProtocol descriptor (tools, governance, OpenAPI + endpoint map).
/.well-known/openapi.jsonGET JSONOpenAPI 3.1 spec for onboarding + subscriber MCP transport.
/.well-known/security.txtGET textRFC 9116 disclosure metadata.
/llms.txtGET textLong-form summary for LLM consumers.
/agents.txtGET textShort-form for agent crawlers.

Sealed-core architecture

Every protocol operation crosses through the COTI V2 Helium sealed core (garbled circuits). The host runtime composes each operation from a chain of sealed stages; the ones that carry a user-visible guarantee are described below.

  • GC-3 — DEK envelope (Helium 256-bit). destroyDek(GDPR_ART17) implements right-to-erasure.
  • GC-4 — tombstone after destruction.
  • GC-5 — selects the storage tier at write time.
  • GC-14 — audit ledger; every operation emits a signed receipt.

Validation

  • Runtime, on-chain — 30 cases, 100% pass.
  • Integration — 15 cases, 100% pass.

Join SAIHM