Get started
Governed memory in a few lines.
Self-host the source-available core today. Pick your surface — the library, a containerized MCP server, or an MCP client config — and you’re running with provenance and policy on by default.
The embedded library. Remember and recall in a few lines, governed by default.
shell
python -m pip install "heartwood-memory[recall,mcp]"python
from heartwood import Heartwood, Principal
hw = Heartwood(path="./heartwood.db", tenant="tenant:acme")
hw.remember(
"Refunds over $500 require finance approval.",
subject="policy:refunds",
created_by="agent:support",
)
principal = Principal(
id="agent:support",
tenant="tenant:acme",
clearance="internal",
)
results = hw.recall("what is our refund policy?",
principal=principal)1
Install
Add the embedded library with one pip command, or start the local MCP server.
2
Remember
Store one policy or fact with its subject, source, and access rules. Heartwood signs it and records the write.
3
Recall and verify
Ask one question, then inspect the returned source IDs, signature status, and recall explanation.