Heartwood vs LangMem — a LangMem alternative with signed memory
TL;DR
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. LangMem is an MIT Python library from LangChain with memory tools an agent can call, a background memory manager that extracts, consolidates and updates agent knowledge, and prompt refinement; LangChain says its primitives work with any storage system and integrate natively with LangGraph’s long-term store. LangMem gives an agent memory tools; Heartwood is a governed store for the memories themselves.
New in 0.2.10Replace a memory. Name the memory a new write replaces, and default recall stops returning the old one, even after a restart. History stays reachable when you ask for it. Heartwood does not detect replacements by itself: two plain writes both stay current. How replacing a memory works
LangMem alternatives: where Heartwood fits
LangMem is a toolkit: it decides what to remember and how to update it, and leaves storage to the store you choose. Heartwood is that store, governed: every memory is signed and re-checked at recall, records the caller may not use are removed before ranking, and erasing a subject destroys its key. Other tools teams compare: Mem0 for a drop-in memory layer with broad integrations; Zep for managed temporal Context Graphs with enterprise controls; Cognee for graph and ontology memory pipelines; Letta for a full runtime for stateful agents; Supermemory for managed memory with data connectors; Hindsight for learning memory with reflection.
At-a-glance table
| Axis | Heartwood Memory | LangMem |
|---|---|---|
| Governance granularity | Per individual memory record | Hierarchical namespaces (for example organization, user, application); access control not evaluated in public docs |
| Signed memories, checked at recall | Every memory Ed25519-signed; signature re-checked on every recall and shown on each result (opt-in strict modes drop or refuse failures) | Not evaluated in public docs (memories grouped in hierarchical namespaces) |
| Tamper-evident audit | Hash-chained audit log | Not evaluated in public docs |
| Policy-before-ranking | Yes | Not evaluated in public docs |
| Erasure receipt | Destroys the subject's key and purges its records; signed key-destruction receipt when signing custody and an audit anchor are set up (not byte-level deletion proof) | Agents create, update and delete memories through the manage-memory tool; erasure depends on the store you choose (no cryptographic proof claimed) |
| Tenant isolation | Yes | Not evaluated in public docs (namespaces group memories by organization, user or application) |
| Interface | Python library + governed MCP server | Python API and agent tools (manage_memory, search_memory); MCP not evaluated in public docs |
| Deployment | Self-hosted, embedded | Python library inside your app, on LangGraph's store (in-memory or DB-backed); native in LangGraph Platform |
| License | Source-available (BSL 1.1); 0.1.x MIT | MIT |
| Pricing | Free / Team $349·mo / Pro $6,000·yr / Enterprise from $24,000·yr | Free, MIT-licensed library; your model and storage costs apply (read 2026-11-08) |
| Best-for | Evidence on each record you can check yourself | LangGraph teams that want memory extraction, background consolidation and prompt optimization in-process |
LangMem facts were read from LangMem's own documentation on 2026-11-08. “Not evaluated in public docs” means we did not find the capability in that documentation on that date; it does not mean the feature is absent. Each cell is a dated snapshot, not a continuing assurance.
Check it yourself: clone the public repository and run python bench/run_benchmark.py. The suite runs offline, tests these claims against Heartwood, and reports its own limits and any failures. It does not measure any competitor.
Comparison by dimension
Different layer
LangMem is a library of memory primitives: tools an agent uses to create, update, delete and search memories, a background manager that extracts and consolidates them, and prompt refinement. LangChain says the primitives work with any storage system and integrate natively with LangGraph’s long-term store. Heartwood is a store, with a signature on each record and a key-destruction receipt on erasure.
Persistence
LangMem's README says InMemoryStore keeps memories in process memory and loses them on restart, and points to a DB-backed store such as AsyncPostgresStore for production. Heartwood keeps its records in one local SQLite file you name, and Claude Code, Codex and other MCP clients can read the same file.
Using them together
A Heartwood adapter for LangMem or for LangGraph’s store has not been built or verified, so this page does not claim one. Today you would run Heartwood beside a LangGraph app as an embedded Python library or a local MCP server.
Who LangMem is best for
LangGraph teams that want memory extraction, background consolidation and prompt optimization inside their own app.
Who Heartwood is best for
Teams that need the stored memories themselves to be signed, policy-gated and erasable with a receipt, whatever framework writes them.
Can Heartwood run underneath LangMem?
Not today. No Heartwood adapter for LangMem or LangGraph’s store has been built or verified, so this page does not claim one. Heartwood runs beside it as an embedded Python library or a local MCP server.
See the governed-memory modelFAQ
When should I choose LangMem over Heartwood?
When you build on LangGraph and want memory tools, background consolidation and prompt refinement inside your app, on the store you already run. LangMem focuses on what an agent remembers and how it updates; Heartwood focuses on evidence for what is stored.
How is Heartwood different from LangMem?
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. LangMem is a toolkit that leaves storage to the store you choose; we did not find per-record signing or an erasure receipt in its public docs on 2026-11-08.
Can I move LangMem memories into Heartwood?
Yes, by export and import; there is no automatic importer or adapter. LangMem keeps memories in the store you configured, so read them out with that store, write the ones you keep to Markdown or JSONL, and load them with import-markdown or bulk-remember, which sign and audit each record.
Is LangMem open source?
Yes. The LangMem repository is MIT-licensed.
What does Heartwood's signature check cover?
Each memory is Ed25519-signed when it is written. The signature covers the content, source, author and trust class, not access labels. At recall, Heartwood re-checks the signature and content hash and shows the result on each answer. By default a failed check is shown, not dropped; the opt-in FILTER and ENFORCE modes drop failed records or refuse the recall.