mnem — "Git for AI agent knowledge": a versioned knowledge layer for agents, Apache-2.0, Rust, at github.com/Uranid/mnem. One binary; runs as a CLI, an HTTP server, an MCP server, a Python library, and in a browser via WebAssembly. Published to crates.io, PyPI and npm as mnem-cli.
The premise
Most agent memory graphs are built by asking a model to extract entities and relations from each document. That costs a model call per document and, more awkwardly, two runs over the same input can produce different graphs. A memory layer that is not reproducible cannot be reviewed, diffed, or trusted to be the same for two teammates.
mnem builds the graph with parsers instead. File types are detected and chunked structurally: Markdown at its headings, source code at function and class boundaries across many languages, PDFs by sliding window. No model call at ingest, so the same input always produces the same graph, and re-ingesting an unchanged file is a no-op.
The cost of that choice is real and should be stated: entities extracted by a parser are shallower than entities extracted by a model. You get the document's own structure, not an interpretation of it. Whether that is a loss depends on whether you wanted the structure or the interpretation.
Three design decisions worth copying
1. The memory lives in the repository. Skills, decisions and conventions are nodes with typed edges in a graph held in a .mnem/ directory, committed alongside the code. Every teammate's agent starts from the same baseline, and any write can be branched, diffed, merged or rolled back the way source is. This only works because ingest is deterministic — a non-reproducible graph produces a diff on every run and the version control becomes noise.
2. Forgetting is first-class. Revoke a fact and every retrieval path filters it out automatically, with the audit trail preserved. That is the right shape: a deletion loses the record of what was believed and when, while a revocation keeps it and stops it being retrieved. Any memory system that an organisation has to answer for needs this distinction, and most do not have it.
3. Retrieval reports its own spend. A query fuses vector, keyword and graph traversal in a single pass and returns how many tokens it spent and what it dropped at the budget — nothing is silently truncated. Optional multi-hop expansion stitches answers across linked documents. A retrieval layer that tells you what it discarded is debuggable; one that silently truncates teaches you nothing when an answer is missing its source.
The embedder is bundled and runs offline (a small ONNX sentence model by default), swappable in one line of configuration. No server, no external database, no required network.
The benchmark claims, and how to read them
The project claims best-or-tied recall on every public benchmark it tested, and a head-to-head against two named memory systems on six public datasets: ahead on five, tied on one. The headline numbers are published as images rather than text, so they are not quotable, but the methodology is written out, and it does not support a straight comparison — which the project says itself, in footnotes, rather than burying:
One competitor's scores are the authors' own reproduction under their harness, because that project publishes no recall-at-K headline figures for these datasets.
On one conversational dataset the two sides are scored differently: mnem takes the maximum over turn hits (lenient), the competitor aggregates per turn (stricter).
On the finance dataset the pipelines differ: mnem ran hybrid retrieval with query expansion, one competitor pure vector retrieval, and another applies model-based memory extraction before storage.
What is controlled is worth noting: the same embedder bytes for every system, dense-only retrieval with no sparse lane and no model-based reranking, stated sample counts per dataset, a reproduction script shipped in the repository and raw artefacts committed.
So the honest reading is: a self-run comparison with its caveats printed. That is better practice than most vendor benchmarks and still not evidence that the system wins. Nobody independent has reproduced it.
What to take from it
If you are building a memory layer, the transferable claims are not the scores. They are:
Determinism at ingest is what makes memory reviewable. Version control, diffs and team sharing all follow from it; none of them work on a graph that changes when you re-run it.
Revocation beats deletion when anyone will later ask what the system believed.
A retrieval call should report its token spend and its drops as part of the result, not in a log nobody reads.
Parser-depth versus model-depth is a real trade, not a free win. Decide which one your downstream queries actually need before paying for either.