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.

A 38-second animated film with no sound. One agent works through a problem alone. Twelve agents work through the same problem again. One agent's answer goes into a shared memory and the other agents use it. The memory holds memories, messages, reminders, files and tasks. Two bars show 12% of bugs fixed without shared memory and 79% with it.

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.

Animated diagram. Four colleagues, Ana, Dana, Ben and Chen, each with an agent, connect to one shared memory. One agent fixes an error and saves the answer, other agents search first and reuse it, agents leave each other messages, and rules and reminders show up in each session.

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.

ToolScopeSearchOn a write
Big Agentic BrainWhole teamSQLite full-textReturns a similar memory
Claude Code auto memoryOne user, one machineLoaded at startClaude writes notes
mem0Per user, agent or runVector, keyword, entityLLM extracts facts
MemPalaceLocal, or shared hubSemantic, graphStores text verbatim
Graphiti, ZepSelf-built or managedSemantic, keyword, graphLLM extracts facts
LettaPer agent, shared blocksBlocks in contextAgent edits its blocks
mcp-memory-serviceShared across agentsVector, BM25, graphRefuses 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.

Bar chart. In a store of 50,000 memories, the right memory was in the top 5 for 89.3% of questions with BAB, 86.2% with mem0, 82.6% with MemPalace and 78.6% with mcp-memory-service.

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

Bar chart. 72 changed facts saved by Claude Sonnet 5.5. A search returned the new fact first in 98% of cases with BAB, 74% with mcp-memory-service, 44% with mem0 and 36% with MemPalace.
  • 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

Bar chart. Claude Sonnet 5.5 fixed 12% of runs with no memory, 79% with shared memory, 100% with shared memory and a search-first prompt line, and 12% when the store held only outdated memories.

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.

Animated diagram of self-healing memory. Many agents share one memory. When a stored fact fails, an agent corrects or flags it. For a business fact that never throws an error, a person is asked whether it is still true.

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

  1. Disclosure: the author contributes to Big Agentic Brain. The three diagrams come from its repository, under Apache-2.0. ↩

  2. 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. ↩

  3. BAB runs as a single instance on SQLite, so a restart means a short outage. Postgres and multi-replica support are on its roadmap. ↩

  4. 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. ↩

  5. 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. ↩

  6. 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. ↩

  7. 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. ↩

  8. mem0 ran without its default LLM extraction step, in this and every other test here. ↩

  9. MemPalace's temporal knowledge graph, which can invalidate old facts, was not used in this test. ↩

  10. One agent model, Claude Sonnet 5.5, in one pass over 72 changes. ↩

  11. The bug-fixing study compared BAB with no memory. The other stores were not part of it. ↩

  12. 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. ↩