
Most memory systems answer one question: what does the agent remember? Memoir adds three more - who wrote this down, what did memory look like yesterday, and what changed in another branch. The difference seems small until you meet the consequences of its absence.
Simple approaches store the past as one shared pile of facts: a MEMORY.md file, an overgrown CLAUDE.md, a database table, or a collection of vectors. That works while memory is small and static. After that, three troubles begin.
The first is context contamination. You switched from main to an experimental code branch, but the agent's memory stayed shared: it remembers the experiment's conclusions and starts applying them to an urgent production fix. The second is that old knowledge cannot be debugged. Today the agent "knows" the API uses JWT - but where did that fact come from, who wrote it, when, and what was there before? Ordinary vector memory simply has no answers. The third is that memory turns into a global variable: any session changes it for all future ones, and a single failed experiment can poison the long-term context.
Memoir proposes treating memory like code: if code deserves Git, then an agent's history of knowledge does too. Below is how that looks in practice.
What Memoir is
Memoir is an open-source semantic memory system for AI agents. Its key difference is that memory is stored neither as an opaque list of identifiers nor as a vector index alone, but in a hierarchy of meaningful paths that also carries a Git-like history of changes.
A path looks like this:
The package is more than a library: a CLI, a Python API, an MCP server, a web UI, a terminal UI, plugins for Claude Code, Codex and Hermes, plus a bulk file ingestion system. There is an OpenClaw plugin too, but it lives in a separate repository - OpenClaw's own mechanism for installing plugins from git requires it. That plugin holds no Memoir code in-process and reaches the CLI through a subprocess.