Architecture
Engram splits every memory into two layers: an onchain integrity record and an offchain content store. This combination gives you the verifiability of a blockchain without the gas cost or throughput limits of storing content onchain.
Onchain layer (Base)
Every time you call remember(), Engram computes a SHA-256 hash of the memory content, then writes that hash to a registry contract on Base. The transaction records: the hash, the agent ID, a timestamp, and the owner's address.
Offchain layer (provider network)
The actual memory content (text, embeddings, and metadata) is stored in a distributed network of storage providers. Providers stake $ENGRAM to participate and face slashing if they lose or corrupt data.
The SDK as coordinator
The SDK handles the coordination between both layers. When you call remember(), it simultaneously submits the hash to Base and writes the content to the provider network. When you call recall(), it queries the vector index offchain and optionally verifies the hash onchain.
Framework portability
Because the memory store is keyed to the agent ID (not to any framework session or API key), the same memories are accessible from any SDK instance with the same agentId and valid API key. LangGraph, CrewAI, and your own stack all see the same memory namespace.