10 min read
Comparing shared memory tools for agents
Seven memory tools for AI agents compared on what a team needs, with benchmark results on search, scale and changed facts.
What shared memory for agents is
An AI agent such as Claude Code works on a task in a session. Each session starts with an empty context. Claude Code's docs say: "Each Claude Code session begins with a fresh context window."
Agent memory is what agents learn while working, saved so a later session can find it. Examples are an undocumented vendor behaviour, a test that fails at random, or an internal API that returns 200 with an error in the body.
Shared memory is one store for every agent and person in a team, so a fact saved by one agent is available to the others. Without it, a colleague's agent can hit the same problem the next day and start from scratch.
Existing tools cover parts of this:
- Context windows hold what one session saw, not what another session learned.
- RAG retrieves documents people wrote. Most of what an agent learns never becomes a document.
- AGENTS.md and CLAUDE.md are written by hand, one repo at a time.
This post compares seven tools that give agents memory, and summarises benchmark results for four of them.1
What to expect from an agentic memory system
A memory system for agents, used by a team, should do five things:
- Let agents write memories during the task. People do not have time to record what many agents learn each day.
- Keep one store across people, repos and tools. A memory on one machine does not help a colleague.
- Use a standard protocol. In practice MCP, so any agent harness can read and write.
- Handle changed facts. A new value should replace the old one, not sit next to it.
- Record who wrote what. Who wrote a memory, when, with which model, and who confirmed it.
The seven tools
Each row comes from the project's own docs and README, read on 30 November 2026.
| Tool | Scope | Search | On a write |
|---|---|---|---|
| Big Agentic Brain | Whole team | SQLite full-text | Returns a similar memory |
| Claude Code auto memory | One user, one machine | Loaded at start | Claude writes notes |
| mem0 | Per user, agent or run | Vector, keyword, entity | LLM extracts facts |
| MemPalace | Local, or shared hub | Semantic, graph | Stores text verbatim |
| Graphiti, Zep | Self-built or managed | Semantic, keyword, graph | LLM extracts facts |
| Letta | Per agent, shared blocks | Blocks in context | Agent edits its blocks |
| mcp-memory-service | Shared across agents | Vector, BM25, graph | Refuses duplicates |
Big Agentic Brain (BAB) is a shared memory for an organisation's agents and people, over MCP. It uses one SQLite file and full-text search, with no LLM or embedding model.23 A save that resembles an existing memory returns that memory, and colleagues can confirm, flag or correct entries.4
Good for: a shared memory across many people's agents and repos, self-hosted.
Claude Code auto memory is a set of notes Claude Code writes for itself, stored as markdown per repo on one machine. The start of the index loads into each session.
Good for: one developer on one machine, with no setup.
mem0 is a memory layer scoped by user, agent or run. An LLM extracts and deduplicates facts, and the managed platform combines vector, keyword, entity and time signals.
Good for: per-user memory inside your own product, managed or self-hosted.
MemPalace stores text verbatim with semantic search and adds a temporal knowledge graph. It runs locally, as a private store or a shared hub.
Good for: verbatim memory on your own machine.
Graphiti builds a temporal graph of entities and facts with an LLM, with validity windows and links to the source. Zep is the managed service built on it.
Good for: documents and conversation history as a graph that tracks what was true when.
Letta gives agents memory blocks that stay in context and that the agent edits itself. Blocks can be shared between agents.
Good for: long-running agents that manage their own memory.
mcp-memory-service is an MCP memory server with vector and BM25 search, a knowledge graph and team sync. It deduplicates on store and can mark contradicted memories as superseded.
Good for: semantic recall shared across agents on your own hardware.
Benchmark results
The benchmarks run BAB, mem0, MemPalace and mcp-memory-service on the same data with one scorer, plus a bug-fixing study on Claude models.5
Search at 640 memories
The test used 640 memories from 10 public repos and 1,005 questions written by a second model. All four stores had the right memory in the top 5 for 96 to 100% of questions.6 For the right memory in first place, BAB was 1 to 4 points behind the other three. Median search times were 25 ms for BAB, 37 ms for mem0, 66 ms for mcp-memory-service and 137 ms for MemPalace.
Search at 50,000 memories
With 50,000 memories, top-5 recall was 89.3% for BAB, 86.2% for mem0, 82.6% for MemPalace and 78.6% for mcp-memory-service.7 Median search took 52 ms for BAB, 106 ms for MemPalace, 316 ms for mcp-memory-service and about 2.5 seconds for mem0.
Changed facts
The test took 72 real changes from the same repos' git histories, such as a raised limit or a renamed command. Claude Sonnet 5.5 saved each new fact through each product's own tools.8
- BAB, 98%: the save returned the existing match, and the agent retired the old memory 66 times.
- mcp-memory-service, 74%: the store refused near-duplicates and named the entry; the agent updated the old one in 42 of 44 cases.
- mem0, 44%, and MemPalace, 36%: the store replied "saved", and the agent never searched for the old version.9
The agent and the data were the same for every store. The difference was the response to the save call.10
Bugs that need a colleague's fact
Each task needed a fact that was not in the repo, only in shared memory.11 Without memory, Claude Sonnet 5.5 fixed 12% of runs, and Opus 5.5 also fixed 12%. With shared memory, Sonnet fixed 79%, and 100% with one prompt line telling it to search first.12
With only outdated memories in the store, success was 12%, the same as no memory.
In BAB, agents correct facts that fail when used, and a person is asked to confirm facts that never fail visibly. The diagram shows this process.
Key takeaways
- Search quality alone does not separate the tools. At 640 memories, all four stores had the right memory in the top 5 for 96 to 100% of questions.
- Store size matters. At 50,000 memories, top-5 recall ranged from 78.6% to 89.3%, so test with a store close to the size you expect.
- The save step matters most when facts change. The new fact came first in 36% to 98% of cases, and highest where the save returned a similar existing memory.
- Shared memory helps most with knowledge that is not in the repo. On those bugs, Claude Sonnet 5.5 went from 12% without memory to 79% with it.
- Memory has to be kept current. With only outdated facts in the store, success was 12%, the same as no memory.
Which tool fits which situation
Shared memory is useful when agents learn the same fact more than once, across sessions, people or repos. If that does not happen, instruction files are enough.
- One developer, one machine: Claude Code auto memory and CLAUDE.md.
- Per-user memory inside your own product: mem0, or Zep for a managed service.
- Documents and history as a temporal graph: Graphiti.
- Shared memory across many people's agents, self-hosted, without an LLM: BAB.
- Agents that manage their own memory: Letta.
- Verbatim local memory: MemPalace.
- Semantic recall shared across agents, self-hosted: mcp-memory-service.
From the benchmarks, for any tool:
- Tell agents to search before they work. A one-line prompt to search first raised success for Haiku, Sonnet and Opus.
- Use a store whose save call returns a similar existing memory.
- Decide who checks facts that never throw an error.
References
- Rhys Sullivan, post on X listing "the biggest missing products in the agent space", 29 November 2026: x.com/RhysSullivan/status/2127156547675636001
- Rasmus Lehmann, LinkedIn post asking "Who is building your AI Operating System / Agent Knowledge Layer / Company Brain?", with a diagram titled "Company Brain: a shared, governed knowledge layer for humans and AI agents", 30 November 2026.
Footnotes
-
Disclosure: the author contributes to Big Agentic Brain. The three diagrams come from its repository, under Apache-2.0. ↩
-
Claude Code's auto memory is plain markdown files. Letta, mem0 and Graphiti use an LLM, and MemPalace and mcp-memory-service use an embedding model. ↩
-
BAB runs as a single instance on SQLite, so a restart means a short outage. Postgres and multi-replica support are on its roadmap. ↩
-
Every memory is readable by anyone who can reach the server, so confidential data does not belong in it. Messages and reminders have narrower visibility. ↩
-
BAB's maintainers built the datasets, wrote the scripts and ran them, so these are the maintainers' own measurements, not an independent benchmark. The datasets, scripts and scored tables are public in the repository's evals/comparison folder, and the bug-fixing tasks are in evals. ↩
-
BAB matches words, not meaning. On an earlier benchmark with short one-line memories and reworded questions, it found 20% of the reworded ones against 56 to 84% for the vector stores. Tags and alternative wordings added at save time narrow the gap. ↩
-
Every store ran with its default settings. The three others used the all-MiniLM-L6-v2 embedding model and no reranker. BAB's duplicate check stored 41,561 of the 50,000 memories, and mcp-memory-service stored 44,242. ↩
-
mem0 ran without its default LLM extraction step, in this and every other test here. ↩
-
MemPalace's temporal knowledge graph, which can invalidate old facts, was not used in this test. ↩
-
One agent model, Claude Sonnet 5.5, in one pass over 72 changes. ↩
-
The bug-fixing study compared BAB with no memory. The other stores were not part of it. ↩
-
The tasks were built so that the needed fact existed only in memory: 8 tasks, 3 trials each. They show that the memory channel works, not how often a team meets that case. ↩