We read the code and every benchmark file behind the local-first agent memory system. LoCoMo shows a real edge; the headline LongMemEval number is from the easy split.
SnackOnAI Engineering | Senior AI Systems Researcher | Technical Deep Dive | October 28, 2026
The promise: by the end of this issue you will know how TrueMemory captures and retrieves memories for coding agents, which of its published scores reflect real gains over simple baselines, and what its benchmarks do not test.
The fence: we cover the TrueMemory repository (latest commit on main August 29, 2026; PyPI 0.7.6.2), its README, the benchmark scripts and result files in benchmarks/, the Storage Is Not Memory paper, and the LongMemEval and LoCoMo benchmarks. We did not rerun the benchmarks; they need Modal plus paid OpenRouter calls. Our numbers come from the project's own result files and source code.
What It Actually Does
TrueMemory, from Sauron Labs, gives coding agents persistent memory across sessions. It installs lifecycle hooks into Claude Code, Cursor, Codex CLI and Gemini CLI, captures what you said, and injects relevant memories at the start of the next session. Everything is stored in one SQLite file, ~/.truememory/memories.db.
Property | Value |
|---|---|
Storage | One SQLite file: messages, FTS5 full text index, sqlite-vec embeddings |
Retrieval | Hybrid keyword + vector search fused with RRF, temporal and salience layers, cross-encoder reranking |
Integration | Lifecycle hooks plus 11 MCP tools; Python |
Tiers | Edge (8M embedder, 22M reranker, CPU), Base (600M embedder, 149M reranker), Pro (Base + HyDE query expansion via an LLM) |
Reported scores | LoCoMo 93.0%, LongMemEval 92.0%, BEAM-1M 76.6% (Pro) |
Footprint | ~1.5 GB of models; Base and Pro need 4 GB+ RAM |
License | AGPL-3.0; commercial use needs a separate license |
Adoption | ~383 stars per SourcePulse; 444 commits |
The research thesis, from the companion paper: storage is not memory. Systems that extract and discard information at write time lose facts that a later question needs, so TrueMemory keeps raw events and does the hard work at query time.
The Architecture, Unpacked

Caption: Two different write paths feed one retrieval engine. The benchmarks load raw messages straight into the database; your daily sessions go through the LLM extractor and encoding gate.
Four design decisions do the work.
One: SQLite is the whole stack. Keyword search (FTS5), vectors (sqlite-vec) and metadata live in one file. No server, no vector database, nothing to operate.
Two: fuse, don't choose. Keyword and vector results merge with Reciprocal Rank Fusion, which scores each memory by its rank in each list. A memory found by both retrievers almost always outranks one found by either alone.
Three: layers that degrade gracefully. Temporal filtering, contradiction timelines, a salience guard and a reranker each wrap in try/except, so a failing layer drops out instead of failing the search.
Four: tiers trade models, not architecture. All three tiers run the same pipeline. Edge swaps in an 8M parameter embedder and 22M parameter reranker that run on any CPU; Pro adds HyDE, which asks an LLM to draft a hypothetical answer and searches with that.
The Code, Annotated
First, the fusion step, verbatim from truememory/hybrid.py.
def reciprocal_rank_fusion(result_lists, k=60):
scores = defaultdict(float)
best_doc = {}
for result_list in non_empty:
for rank_0, doc in enumerate(result_list):
key = str(doc_id) # str keys so id=0 is never collapsed
rank_1 = rank_0 + 1 # RRF uses 1-based ranks
scores[key] += 1.0 / (k + rank_1) # ← THIS is the trick: rank, not raw score
if key not in best_doc or len(doc) > len(best_doc[key]):
best_doc[key] = doc # keep the richest copy of the row
...
fused.sort(key=lambda d: (-d["rrf_score"], str(d.get("id", "")))) # deterministic ties
Caption: RRF ignores BM25 and cosine score scales entirely. That is why a keyword index and a tiny embedding model combine well without tuning.
Second, the encoding gate, from truememory/ingest/encoding_gate.py, which decides what the auto-capture path keeps.
novelty = self._compute_novelty(fact) # gzip compression cost vs stored memories
salience = self._compute_salience(fact, category) # numbers, dates, life events, category weight
pred_error = self._compute_prediction_error(fact) # does it contradict the nearest memory?
raw = (novelty * self.w_novelty # 0.25
+ salience * self.w_salience # 0.20
+ pred_error * self.w_prediction_error) # 0.30
score = max(0.0, min(1.0, raw / self._norm)) # ← _norm = 0.75, so "≥ 0.30" means raw ≥ 0.225
if not self._pe_available:
should_encode = True # fail OPEN: never silently drop memories
elif is_contradiction:
should_encode = True # corrections always pass
Caption: The module's docstring states raw ≥ 0.30; the normalization makes the effective raw threshold 0.225, and categories like corrections lower it further. Small, but it shows how tunable "what the agent remembers" is.
Third, our read of the project's own result files.
# LoCoMo (1,540 questions): TM Pro 93.0 vs RAG (ChromaDB) 86.2 -> +6.8 pts, ~6 sigma
# LongMemEval strict (_s, 500 q): TM Pro 87.8 vs RAG 87.0 -> +0.8 pts, ~0.4 sigma
# LongMemEval oracle (500 q): TM Pro 92.0 vs RAG 91.8 -> +0.2 pts, ~0.1 sigma
# LongMemEval strict run spread: 86.6 to 88.6 = 2.0 pts (> the 0.8 pt gap to RAG)
# LoCoMo errors: RAG 213 wrong, Pro 108 wrong -> Pro removes 49% of RAG's errors
# LoCoMo Edge vs Pro: -3.4 pts at 1.01 s vs 2.23 s per question (2.2x faster)
Caption: The LoCoMo gain is large and statistically solid. The LongMemEval gain over a plain vector database is smaller than TrueMemory's own run to run variation.
It In Action
Input: in a Claude Code session you say, "We use FastAPI with Pydantic v2, and auth middleware lives in src/auth/." You close the session.
Step one, capture. The SessionEnd hook spawns background ingestion. The transcript is split into chunks of up to 20,000 characters (at most 20 chunks) and sent to an LLM extractor: local Ollama if it is running, otherwise the claude CLI, otherwise an OpenRouter, Anthropic or Groq key. It returns up to 50 atomic facts.
Step two, gate. Each fact is scored. An illustrative new fact with novelty 0.6, salience 0.4 and prediction error 0.1 gives raw 0.26, normalized 0.35: stored. A repeat of something already known, novelty 0.1, salience 0.3, prediction error 0.05, gives 0.13: skipped. Corrections ("we moved auth to src/security/") always pass.
Step three, store. Survivors are deduplicated and written to SQLite with an FTS5 entry and a 256 dimension vector.
Step four, recall. Next morning, SessionStart searches for context and injects the top memories as additional context. Your agent opens already knowing the stack.
Output: no repeated "what framework are we using?" questions. On the benchmark harness, retrieval plus answering averaged 1.01 s per question on Edge and 2.23 s on Pro, most of it the answer model's API call.
Tier | LoCoMo | Models | Per question (harness) | Needs |
|---|---|---|---|---|
Edge | 89.6% | 8M embedder + 22M reranker | 1.01 s | CPU, 512 MB RAM |
Base | 92.0% | 600M embedder + 149M reranker | n/a | 4 GB RAM, T4 recommended |
Pro | 93.0% | Base + HyDE (LLM call per query) | 2.23 s | 4 GB RAM + API key |
RAG (ChromaDB) | 86.2% | default embeddings | 0.66 s | baseline |
BM25 | 80.5% | none | 0.73 s | baseline |
Caption: Edge, with 30M parameters of models, sits 3.4 points behind Pro. The pipeline, not model size, carries most of the gain over BM25.
Why This Design Works, and What It Trades Away
Why it works. Conversational memory questions are mostly retrieval questions: find the two or three turns that hold the answer, then let the answer model reason. Keyword search catches names, file paths and numbers; vectors catch paraphrase; RRF merges them without score tuning; a cross-encoder reorders the top 100. Resolving relative dates ("last Tuesday") to absolute ones at ingestion, a preprocessing step in the LoCoMo config, helps temporal questions. And because it all lives in SQLite, there is no service to run.
What it trades away.
Event ordering. On BEAM-1M the Pro tier scores 19.5% on event ordering and 64.8% on temporal reasoning; at 10M tokens, 5% and 30%. Retrieval finds facts, not sequences.
Local only, conditionally. Search on Edge and Base makes no external calls. Auto-capture needs an LLM; without Ollama running, transcript chunks go to the
claudeCLI or an API provider. Telemetry is on by default (opt out withTRUEMEMORY_TELEMETRY=off).Write-time filtering. The auto-capture path keeps at most 50 facts per transcript and gates them, exactly the kind of ingestion filtering the paper warns against.
License. AGPL-3.0 with a commercial license for business use, which rules out many internal deployments.
Momentum. The latest commits are dependency bumps from late August, and SourcePulse shows no star growth in the past 30 days.
Technical Moats
A reproducible harness. Eight memory systems run through the same answer model (GPT-4.1-mini), judge (GPT-4o-mini, three vote majority) and scoring pipeline, with scripts and result JSONs in the repo. That transparency is rare in agent memory.
Multi-agent integration. Adapters for Claude Code, Cursor, Codex CLI, Gemini CLI, Kimi, Hermes and OpenClaw, each with install, verify and uninstall. Distribution beats algorithms in this category.
Careful failure handling. Fail-open gating, contradiction bypass, chunked extraction that warns how much it dropped, and layer-level fallbacks reflect real bug reports, not demos.
Tiering that fits hardware. A CPU-only tier at 89.6% LoCoMo lowers the bar to trying it on any laptop.
Insights
Insight One: the headline LongMemEval score is from the easy split, and there the gain over plain RAG is noise. The README advertises 92.0% on LongMemEval. The project's own benchmark notes say that is the oracle variant, where each question comes with only the relevant sessions, and that the paper reports the strict variant: 87.8%. On strict, plain ChromaDB RAG scores 87.0%, a 0.8 point gap with a one sigma uncertainty of about 2 points and a three run spread of 2 points. The README comparison table also omits RAG, BM25 and EverMemOS (94.5% on the same LoCoMo harness) while listing figures for MemOS and ReadAgent from outside it, despite the results doc noting its lenient rubric makes scores "not directly comparable to published LoCoMo baselines." TrueMemory's real, well supported win is LoCoMo: +6.8 points over RAG and half of RAG's errors removed.
Insight Two: the benchmarks measure a different system than the one you install. Every benchmark script calls engine.ingest() on raw conversation messages, the retrieval-first design the paper argues for. The hooks you actually install run the other path: an LLM extracts at most 50 facts per transcript, a weighted gate decides what to keep, and duplicates are dropped. No published number scores that path. If storage is not memory, the auto-capture pipeline's write-time filtering deserves its own benchmark.
Surprising Takeaway
On LoCoMo, BM25 alone scores 80.5% and TrueMemory Edge, with an 8M parameter embedder and a 22M parameter reranker on CPU, scores 89.6%, just 3.4 points below the Pro tier at less than half the per-question time. For agent memory, careful retrieval engineering over a single SQLite file buys most of the accuracy; bigger models and LLM query expansion buy the last few points.
TL;DR For Engineers
TrueMemory is a local SQLite memory layer for coding agents: FTS5 + vectors fused with RRF, temporal and salience layers, cross-encoder reranking, lifecycle hooks and 11 MCP tools.
Solid result: LoCoMo 93.0% vs 86.2% for plain ChromaDB RAG on the same harness. Weak result: LongMemEval strict 87.8% vs 87.0%, within noise.
The README's 92.0% LongMemEval is the oracle split; quote 87.8% for the strict split.
Benchmarks ingest raw messages; the installed auto-capture path uses an LLM extractor and an encoding gate that no benchmark covers.
Start with Edge on CPU; run Ollama if "local" must mean nothing leaves the machine; check AGPL before using it at work.
Explain It Like I'm New
Every time you open a new chat with an AI coding assistant, it has forgotten everything: your project, your preferences, the decision you made yesterday. You end up repeating yourself, like working with a brilliant colleague who has amnesia every morning.
TrueMemory gives the assistant a notebook. When a session ends, it writes down the important facts. When the next session begins, it looks up what is relevant and hands it to the assistant before you say anything. The notebook lives in one file on your own computer.
The clever part is not the notebook; it is the librarian. Finding the right two sentences among thousands of old messages is hard. TrueMemory searches by exact words and by meaning at the same time, then asks a small ranking model which results truly answer the question.
How well does it work? On one well known memory test it clearly beats simpler approaches. On another, it does about as well as a basic search tool. That tells us something about this whole field: much of what we call "AI memory" is really good search, and measuring it carefully matters as much as building it.
See It In Action
TrueMemory terminal demo, Sauron Labs on GitHub. Repository README. The animated terminal demo shows install, tier selection and automatic recall at session start.
LoCoMo benchmark report, TrueMemory. BENCHMARK_RESULTS.md. Per-category accuracy, latency and cost for eight memory systems on one harness.
LongMemEval results, TrueMemory. LongMemEval README. Oracle versus strict variants side by side, with every run listed.
LoCoMo dataset and code, Snap Research. snap-research/locomo. The original very long term conversation benchmark behind most agent memory claims.
Community Conversation
Modelwire, summary of Storage Is Not Memory. Frames the paper against systems that learn what to store, and argues the field is converging on "premature summarization is a liability" (AI-generated analysis, not peer review).
SourcePulse, TrueMemory project page. Lists ~383 stars and flat recent star growth, and flags the AGPL obligations and 1.5 GB model download as adoption hurdles.
MCP Market, TrueMemory server listing. Positions it among MCP memory servers for Claude Desktop and Claude Code users.
BEAM authors, Beyond a Million Tokens. The benchmark where TrueMemory reports 76.6%, above Hindsight's published 73.9%, and where event ordering remains largely unsolved for retrieval-based memory.
Agent Memory Is a Retrieval Problem With a Measurement Problem
TrueMemory gets the architecture right: one SQLite file, hybrid search, rank fusion, a reranker, and hooks that make memory automatic. Its LoCoMo results show that careful retrieval beats both naive RAG and LLM-extraction memory systems like Mem0 by wide margins. But its marketing outruns its data. The headline LongMemEval number uses the easy split, where it ties plain RAG, and the auto-capture path you install is the one part no benchmark measures. Use TrueMemory for what it is: a well engineered local retrieval layer. Before trusting any memory system's leaderboard, ask which split, which baseline, and which ingestion path.
References
Storage Is Not Memory: A Retrieval-Centered Architecture for Agent Recall, Sauron Labs. The retrieval-first thesis and the TrueMemory architecture.
LongMemEval: Benchmarking Chat Assistants on Long-Term Interactive Memory, Wu et al. Information extraction, multi-session and temporal reasoning, knowledge updates and abstention across oracle and haystack settings.
Evaluating Very Long-Term Conversational Memory of LLM Agents, Maharana et al. LoCoMo, the benchmark where TrueMemory's gains are clearest.
Beyond a Million Tokens: Benchmarking and Enhancing Long-Term Memory in LLMs, Tavakoli et al. BEAM, testing memory at 1M and 10M token scales.
Precise Zero-Shot Dense Retrieval without Relevance Labels, Gao et al. HyDE, the query expansion behind the Pro tier.
TrueMemory is an AGPL-licensed, local-first memory layer for coding agents built on one SQLite file, hybrid FTS5 and vector search fused with RRF, and cross-encoder reranking. Its LoCoMo gains over plain RAG are large and solid, but its headline LongMemEval score comes from the oracle split, where it ties RAG, and its benchmarks skip the LLM-based auto-capture path users actually run.
Sponsored Ad If you enjoy practical AI insights, check out SnackOnAI and support the newsletter by subscribing, sharing, and exploring our sponsored ad—it helps us keep building and delivering value 🚀
The AI notetaker that gets the hard words right
Your AI is only as good as what you feed it. Feed it a transcript with your product names, acronyms, and numbers spelled wrong, and you spend the afternoon hand-fixing the output.
Wispr Flow Notetaker uses your dictionary and calendar, so product names, acronyms, numbers, and uncommon names come out spelled right. It pops up when your meeting starts and captures Zoom, Google Meet, Teams, and Slack huddles with one click, no bot joining the call.
Then your meetings show up inside Claude or ChatGPT through the built-in connector. No copy paste. Try Notetaker free on Mac and Windows.


