Governed memory for AI agents
Heartwood is agent memory you can check: it signs every memory and re-checks the signature each time it is recalled, and erasing a subject destroys that subject's key and can issue a signed receipt you verify offline. It runs as an embedded Python library or a local MCP server beside the systems you already have.
Agent memory isn’t simply governed or ungoverned. There are three postures.
Governance is a spectrum, and most tools sit at one of three points. Knowing which one you are on tells you what you can show a reviewer.
| Dimension | No rules | Access rules and logs | Evidence on every record (Heartwood) |
|---|---|---|---|
| Examples | Local Markdown or SQLite files an agent writes directly | Managed and open-source memory services | Heartwood Memory |
| Where rules live | In your application code, if at all | At the account, project or dataset level; some add rules by class of data | On each memory record |
| Provenance | Whatever your code records | Source tracking varies by vendor | Every record Ed25519-signed and re-checked at recall; opt-in strict modes drop or refuse failures |
| Recall policy | Whatever you filter in app code | Access controls; some apply them before ranking | Records the caller may not use are removed before ranking |
| Audit | Logs, if you wrote them | Activity logs; some add a hash-chained ledger | Append-only, hash-chained log of writes, recalls and erasures |
| Erasure | Delete the row; anything derived from it is up to you | Record, user or dataset deletion; varies by vendor | Destroys the per-subject key and purges the subject's records; erasure event kept on the audit chain |
| Proof | Depends on your code | Varies by vendor | Signed key-destruction receipt when signing custody and an audit anchor are set up; a public trust suite you can run |
Cognee says it governs at the dataset level, with per-fact provenance and an opt-in hash-chained ledger of writes, and it leads on graph and ontology modeling and adoption. Heartwood puts evidence on each record: a signature re-checked at every recall, and a key-destruction receipt when a subject is erased. Different layer, different job. If you need graph-native reasoning today, Cognee is further along.
See the full comparison →On erasure, Heartwood records the erasure and, when durable signing custody and an audit anchor are configured, returns a signed per-subject key-destruction receipt — reporting key destruction and purge counts, not instant or whole-content deletion. Full key destruction completes within ≤72h on dedicated-vault plans, or up to 90 days on shared-vault plans.
What is long-term memory for AI agents?
Long-term memory is what an agent keeps between sessions: facts, decisions and preferences it can recall later, instead of starting every conversation empty. It is stored outside the model, in files, a database or a memory service, and pulled back into context when it is relevant. Governed long-term memory adds rules to each stored record: who wrote it, who may recall it, and how it is erased.
Memory for LLM apps: what persists?
In most LLM apps the context window lasts one session. What persists is what you write to a store: the facts, decisions and summaries you choose to keep. In Heartwood, each kept memory is a signed record in one local SQLite file, with its author, its source IDs and a content hash. Nothing is kept unless you, an agent or an integration writes it.
Give the store an absolute file path. With no path set, Heartwood’s MCP server keeps memory in RAM, and it is gone when the server stops.
Which memory layer fits my agent?
Pick by what you need to keep and what you must show. Client memory files suit one developer’s notes in one tool. Framework memory tools suit agents built on that framework. Graph or temporal memory suits reasoning over how facts connect and change. A governed record store suits teams that must show where a memory came from, who could recall it, and that an erasure happened.
Compare eight agent-memory toolsHow do old facts stop being recalled?
In Heartwood, from version 0.2.10, you name the memory a new write replaces, and default recall stops returning the old text, including after a restart. Edits and deletes through the Heartwood memory tool retire earlier versions the same way. Heartwood does not detect replacements on its own: two plain writes both stay current. History stays reachable when you ask for it.
How replacing a memory worksMemory layer vs governed memory
A memory layer stores and retrieves what an agent remembers. Governed memory adds rules and evidence to each record: access rules applied before results are ranked, a hash-chained log of writes, recalls and erasures, a signature checked at every recall, and erasure that destroys the subject’s key. Several memory tools now document some of these controls; the comparison pages show which.
See the comparisonChoose by what you need
| Approach | What persists | Clients | Where it runs | When facts change | Governance evidence |
|---|---|---|---|---|---|
| Client memory files | Notes and instructions the client keeps for you | That one client | Your machine or the vendor’s service, depending on the client | You or the client edits the file | Varies by client; see its documentation |
| Framework memory toolsLangMem, Letta | Memories the framework extracts or the agent edits | Agents built on that framework | Inside your app or the framework’s platform | The framework updates or consolidates memories | Varies by framework and the store you choose |
| Graph or temporal memoryZep, Cognee | Facts and the relationships between them | SDKs, APIs and MCP servers | Managed service, self-hosted engine, or both | The graph tracks when facts change or are superseded | Access controls and logs; some add per-fact provenance or a hash-chained ledger |
| Memory services and SDKsMem0, Supermemory, Hindsight | Memories extracted from conversations and documents | SDKs, APIs, MCP servers and plugins | Managed cloud, self-hosted, or both | Varies: some update or forget facts automatically | Varies by vendor; see each comparison |
| Governed record store (Heartwood) | Signed records in one local SQLite file you name | Embedded Python library or local MCP server: Claude Code, Codex, GitHub Copilot in VS Code (read-only plugin), Hermes Agent (tested provider plugin) | Your machine; hosted recall on Team and Professional | You name the memory a write replaces (from 0.2.10); no automatic detection | Signature re-checked at recall, policy before ranking, hash-chained audit, key-destruction receipt when custody and an audit anchor are set up. Source-available under BSL 1.1; the public trust suite tests Heartwood only |
What “cryptographic” actually means here
- Every memory write is signed with Ed25519 (when available) and recorded in a hash-chained audit log.
- A memory can’t claim a trust level its producer didn’t sign for — provenance is the memory-poisoning defense.
- Policy filters the candidate set before ranking — denied records are not returned and, from version 0.2.9, not scored by the vector search; neither the results nor the signed receipt carries a count of them. Response time still varies with how many records exist.
- Erasure destroys the per-subject key and purges the subject's records — the erasure event stays in the audit log.
- Generated memory fails closed unless faithfulness and egress checks pass; an explicit opt-in stores it only as a downweighted needs-review proposal.
Embeddable, single-file, on-device
Heartwood runs where your agent runs. It's an embedded library with a single-file store — on-device, zero-egress by default. Nothing about governing your memory requires shipping it to us. On hosted plans, an organization can opt in to an outside judge; see the Jev integration page.
Start where your agent already is
Governed memory for Codex — via MCP
Heartwood works with Codex-style agents the same way it works with any MCP client: over the Model Context Protocol. Point the agent at Heartwood's MCP server and it gets governed memory verbs — remember, recall (policy-enforced, returns provenance), explain_recall, forget (crypto-shred), evaluate_egress, and assess_faithfulness — instead of an ungoverned local store.
Today: local-stdio MCP. Heartwood's MCP server runs locally and binds to 127.0.0.1 by default — your data stays in your environment.
Roadmap: hosted / remote MCP. We're not there yet, and this page won't pretend we are.
Hosted plans: an opt-in Jev judge for recall ranking is available to organizations that opt in. The self-hosted core stays zero-egress.
Codex via MCP — questions
Can I use Heartwood as the memory backend for a Codex-style agent?
You can use Heartwood as a governed memory backend for any MCP-capable agent, including Codex-style agents, over the Model Context Protocol. The agent calls Heartwood’s MCP memory verbs — recall is policy-enforced and returns provenance, and forget performs a crypto-shred erasure. This works today over local-stdio MCP.
Is Heartwood an official Codex memory backend?
No. Heartwood is a governed memory store you connect to via MCP — the open Model Context Protocol contract — not an official or verified Codex integration. You choose to point your agent at it; it runs in your environment.
Questions
What is governed agent memory?
Governed agent memory is agent memory with enforceable rules attached to each record: verifiable provenance (who wrote it), policy-gated recall (who can retrieve it), tamper-evident audit (what happened to it), and per-subject key destruction on erasure. It is the difference between storing what an agent remembers and being able to check and control it.
What makes Heartwood Memory different from other agent memory tools?
Heartwood's difference is evidence on each record: a signature re-checked at every recall, and a key-destruction receipt when a subject is erased. Recall also removes records the caller may not use before ranking, and the audit log is hash-chained; several other tools now document similar controls of their own. Heartwood is newer and narrower than graph-first memory tools, and you can check its claims yourself with the public trust-receipts benchmark.
How is Heartwood different from Cognee?
Cognee says it governs at the dataset level, with per-fact provenance and an opt-in hash-chained ledger of writes, and it leads on graph and ontology modeling and adoption. Heartwood puts evidence on each record: a signature re-checked at every recall, and a key-destruction receipt when a subject is erased. They work at different layers: Cognee for graph-native reasoning, Heartwood for records you can check.
Does Heartwood encrypt my data end-to-end?
No — Heartwood is a managed-key governance layer, not an end-to-end-encrypted vault. Erasure works by crypto-shredding per-subject keys, and the server processes recall under policy. Heartwood’s value is source-auditable governance — provenance, audit, policy, and per-subject key destruction, with a signed receipt you can verify when durable signing custody and an audit anchor are configured — not secrecy from the server.
Where does my data live?
Self-hosted, in your environment: Heartwood runs embedded beside your systems of record and makes no outside calls. On hosted Team and Professional plans, your memory is stored in the tenant we run for you, and it reaches an outside model only if your organization opts in to the Jev judge.