Write, govern, retrieve, prove
Memory OS is not a library you call for similar text. It is a system of record with a gate on the way in, a firewall on the way out, and a transaction boundary that keeps the derived stores honest.
- Postgres is the only canonical store
- Derived state only via the outbox
- 141 endpoints, 32 route families
The operating loop
Four movements, and the rule that makes them trustworthy: nothing derived is written outside the transaction that caused it.
On the way in, everything passes a gate
A write is not a row insert. Before anything lands, the text is
checked for a DO_NOT_STORE: directive — which answers
the request and writes nothing — and personal identifiers are
replaced with stable placeholders so the vault holds the mapping and
the embedding never sees the original.
The write itself is audit-logged into a hash chain, where each row
hashes the previous row's hash together with its own canonical JSON.
Tampering with history breaks the chain, and
audit_verify will say where.
Retried writes are safe: an Idempotency-Key is honoured
on chat, memory creation, fact override and billing operations, so a
network timeout does not become a duplicate memory.
Idempotency-Key: 6b1f…
{
"message": "DO_NOT_STORE: my card
ends 4471 — just check the balance"
}
// answered, nothing persisted
{
"reply": "…",
"notes": ["DO_NOT_STORE honored
(not written to memory)"]
}
{ "query": "…", "mode": "forensic" }
// four modes, four token budgets
cheap 1,800
balanced 3,500
deep 8,000
forensic 14,000 # + printed manifest
// the response carries its own receipts
plan · pack · source_manifest · cached
On the way out, everything shows its sources
A context request does not just return text. It returns the plan the router chose, the packed block, the identifiers of every memory and fact used, and a cache flag. In forensic mode it prints the manifest into the pack itself, so the model can cite what it was given.
The router is deterministic. A regex classifier picks the query type,
the retrieval mode, the token budget and which layers to activate,
with no model call and no cost. Ask it to explain itself with
/v1/context/plan and it returns the routing decision
without retrieving anything.
Then the firewall: every pack is prefixed with the rule that its contents are data and evidence, never instructions. That preamble is repeated by the chat system prompt and taught to connected agents through the MCP prompt.
A chat endpoint that remembers, and obeys governance
If you want the whole loop in one call, /v1/chat retrieves
memory, answers, and writes the turn back as episodic memory — with
token streaming on /v1/chat/stream.
DO_NOT_STORE:FORGET_PREVIEW:FORGET_CONFIRM:PIN: / UNPIN:What is actually running
No hidden managed services. Every dependency below is either in the compose file or explicitly optional.
Graph memory and knowledge-base injection into context are both supported
but off by default — ENABLE_GRAPH_MEMORY and
ENABLE_KB_RETRIEVAL are opt-in, so a default install does
not quietly start doing work you did not ask for.
Give your agents a memory you can audit
Run the whole system on your own hardware under the MIT licence, or ask us about hosted access. Both start from the same place.