Blog · comparison
Mem0 vs Zep vs Letta: memory architectures compared
Three different answers to one question: when should an agent's memory be written, and who decides what goes in it?
Mem0 vs Zep usually gets framed as a benchmark fight, with Letta pulled in as the third option. That framing hides the useful part. The three projects make different architectural choices about when memory gets written and who decides what goes in it. Mem0 extracts facts from conversation turns when your app sends them. Zep ingests data into a temporal knowledge graph that tracks when each fact was true. Letta, which started life as MemGPT, gives the agent its own memory to edit. This page compares those choices using each project’s docs, repositories and papers.
Last verified: October 12, 2026. All three projects ship changes every month, so check the linked sources before you commit to one.
The short answer
- Mem0 is a memory layer you call from your app:
search()before a model call,add()after it. It suits per-user personalization. - Zep is a managed context platform built on a temporal knowledge graph. Its open-source engine, Graphiti, is the self-hosted path. It suits domains where facts change and you need to know which version is current.
- Letta is a stateful agent harness. The agent manages its own memory, both in its prompt and on disk. It suits teams that want a long-lived agent rather than a memory API.
They aren’t drop-in replacements for each other. Mem0 and Zep sit beside your agent. Letta is the agent runtime.
Mem0 vs Zep vs Letta at a glance
As of October 12, 2026, from each project’s own documentation and repositories:
| Mem0 | Zep / Graphiti | Letta | |
|---|---|---|---|
| What it is | Memory layer: library, self-hosted server, managed Platform | Managed context platform (Zep) plus an open-source graph framework (Graphiti) | Stateful agent harness (Letta Code), formerly MemGPT |
| Unit of memory | Extracted facts, with linked entities | Episodes, entities, and facts with validity windows | Memory blocks, stored as files in a git-backed memory filesystem |
| When memory is written | When your app calls add() with conversation turns |
When messages or business data are ingested as episodes | When the agent decides to edit memory, plus background “dreaming” |
| Who decides what to keep | An extraction LLM inside Mem0 | An extraction LLM inside Zep or Graphiti | The agent itself |
| Contradictions | Writes are additive. Corrections need explicit update or delete. The Platform’s Dream feature marks outdated facts as superseded |
Old facts get an end date (invalidated), not deleted | The agent rewrites its own memory. Every edit is a git commit |
| Retrieval | Semantic, keyword and entity signals. Temporal ranking on the Platform | Hybrid: semantic, BM25 full-text, graph traversal, then reranking | Root memory is always in context. The agent searches the rest with tools |
| Open source | Apache-2.0. Graph memory removed from the open-source SDK | Graphiti is Apache-2.0. Zep Community Edition unsupported since April 2025 | Apache-2.0 |
| Hosted | Mem0 Platform | Zep Cloud, fully managed or in your cloud | Letta Cloud |
| Latest release | mem0ai 2.2.1 (Sep 25, 2026) | graphiti-core 0.30.2 (Sep 8, 2026) | Letta Code 0.34.11 (Oct 12, 2026) |
| Paper | arXiv:2504.19413 (Apr 2025) | arXiv:2501.13956 (Jan 2025) | MemGPT, arXiv:2310.08560 (Oct 2023) |
How does Mem0 write and store memory?
Mem0 extracts memory on the request path. The Mem0 README shows the
loop: search for relevant memories before calling your model, then pass the new exchange to
memory.add(messages, user_id=...). An LLM inside Mem0 turns those messages into short facts. Per the
docs, it looks up related existing memories,
extracts facts, deduplicates and embeds them, and pulls out entities. By default it stores the extracted
facts, not the transcript.
The write path changed in April 2026. The 2025 paper described an update phase in which an LLM chose
ADD, UPDATE, DELETE or NOOP for each candidate fact. The current algorithm is “single-pass ADD-only
extraction”: one LLM call, no update or delete step, so memories accumulate instead of overwriting each
other. Corrections need explicit update or delete calls. On the managed Platform, a background
feature called Dream marks contradicted facts as superseded and merges duplicates without deleting
anything (our sleep-time compute post looks at that pattern).
Storage is a SQL database for facts and metadata, a vector store for embeddings, and an entity store. The open-source and hosted versions have drifted apart. The migration guide says graph memory was removed from the open-source SDK, with no open-source replacement, and is now built into the Platform. Temporal ranking and Dream are Platform features too. In the open-source SDK, retrieval quality depends on the vector store and optional reranker you configure.
How does Zep write and store memory?
Zep builds a temporal knowledge graph as data arrives. You add chat messages to a thread, or business data to a graph, and each input becomes an episode: the raw record that every derived fact traces back to. An LLM extracts entities and facts (edges) from each episode and resolves them against what’s already in the graph.
The distinctive part is time. The Zep paper describes a bi-temporal model with one timeline for when a fact was true in the world and another for when the system learned or retired it. When a new fact contradicts an old one, the old edge gets an end date instead of being deleted. You can ask what’s true now, or what was true last March.
Retrieval is hybrid: cosine similarity, BM25 full-text search and breadth-first graph traversal, followed
by rerankers. In Zep Cloud, thread.get_user_context() returns a Context Block, an assembled string of
facts, entities and summaries. By default it uses the four most recent messages in the thread as its
query, and Zep’s docs say it “prefers recall over
precision”.
Zep and Graphiti are now separate things. Graphiti is the Apache-2.0 framework at the core of Zep, and you bring your own graph database: Neo4j, FalkorDB or Amazon Neptune (Kuzu support is deprecated). Zep is the managed service, with a proprietary graph engine, built-in users and threads, and a dashboard. Zep’s older self-hostable server, Zep Community Edition, has been unsupported since Zep moved its open-source work to Graphiti in April 2025.
How does Letta write and store memory?
Letta descends from MemGPT, and the core idea hasn’t changed: the agent manages its own memory. No separate service extracts facts behind the scenes. The agent has tools to edit what it remembers, and it decides when to use them.
The unit is the memory block: a labelled piece of context such as “human” or “persona”, with a size limit, pinned into the agent’s prompt (Letta on memory blocks). In the current product, Letta Code, memory lives in MemFS, a git-backed memory filesystem. Per the MemFS docs, files at the memory root load into the system prompt on every turn, deeper directories stay out of context until needed, the agent edits memory with ordinary file tools, and every edit is a commit.
Letta also writes memory in the background. Its “dreaming” feature runs background subagents that review recent conversations and update memory, triggered after a set number of agent steps or when the context window is compacted (docs).
Retrieval is mostly the agent’s job. Root memory is always visible. Everything else, including deeper memory files and past messages, is found by the agent through search tools when it decides it needs them.
MemGPT vs Letta: what changed?
They’re the same lineage at different stages:
- October 2023. The MemGPT paper proposes “virtual context management”: treat the context window the way an operating system treats RAM, and let the model move information between it and slower memory tiers.
- September 2024. The team renames the project.
“MemGPT” now means the agent design pattern from the paper, an LLM with self-editing memory tools.
“Letta” means the framework and the company. The PyPI package becomes
letta. - Late 2025 to 2026. Letta builds Letta Code, a stateful agent harness with a CLI, a desktop app and a self-hostable App Server, and moves active development there. In August 2026 the original Letta server (the V1 API server) is archived. It’s kept on an archive branch of the letta repository for reproducibility.
So “MemGPT vs Letta” isn’t really a choice. If you’re reading an old MemGPT tutorial, the concepts carry over, but the APIs don’t.
Why do the benchmark numbers disagree?
All three vendors have published memory benchmark results, mostly on LoCoMo, a question-answering dataset built from long conversations. The numbers conflict, and every one of them was produced by an interested party:
| Date | Published by | Claim (LoCoMo) | Setup notes |
|---|---|---|---|
| Apr 2025 | Mem0 (paper) | Mem0 66.9%, Mem0 with graph 68.4%, Zep 66.0%, full-context baseline 72.9% | Mem0 ran every system, including Zep |
| May 2025 | Zep (blog) | Zep 75.1% (±0.17) | Zep’s own rerun, citing errors in how the Mem0 paper configured Zep’s users, timestamps and search |
| Aug 2025 | Letta (blog) | 74.0% from a plain filesystem agent | GPT-4o mini with file search tools and no dedicated memory layer |
| Dec 2025 | Zep (blog) | Zep 80.3% (±0.43) | GPT-4o mini as agent and grader, 30 facts plus 30 entity summaries per query |
| Apr 2026 | Mem0 (README, research page) | Mem0 92.5 | Mem0’s managed Platform, which includes “proprietary optimizations not available in the open-source SDK” |
These runs use different models, prompts, retrieval budgets and graders, so the rows can’t be ranked against each other. The critiques deserve as much attention as the scores. Zep pointed out that LoCoMo conversations fit inside a modern context window, that the dataset has no knowledge-update questions, and that the full-context baseline beat every memory system in Mem0’s own 2025 paper. Letta concluded that current memory benchmarks “may not be very meaningful” for comparing frameworks, because how well an agent uses retrieval matters more than the retrieval mechanism underneath.
We aren’t picking a winner from these numbers, and we’d suggest you don’t either. Run an evaluation on your own data. Our post on how to evaluate agent memory covers what to measure.
Mem0 vs Zep vs Letta: which should you pick?
Pick Mem0 when you’re building a chat product or agent and want per-user memory behind two calls, with a managed option and few changes to your agent loop. Check which features you need first: graph memory, temporal ranking and Dream are Platform features.
Pick Zep when facts change over time and you need to know which version is current and when it changed, as with customer records, account state or policies. You get a managed temporal graph with users, threads and a ready-made context block.
Pick Graphiti when you want Zep’s temporal graph model but need to self-host, and you’re comfortable running a graph database and building the user, thread and retrieval layer yourself. Our post on graph memory vs vector RAG covers when a graph earns its operational cost.
Pick Letta when you want the agent itself to be long-lived and to manage its own memory, and you’re willing to adopt Letta’s runtime instead of adding a library to yours. Memory kept as git-tracked files is also easy to inspect, diff and roll back.
Pick none of them yet when your conversations still fit in the context window. Start with full context, and add a memory layer once you’ve measured a problem it solves: histories that outgrow the window, token cost, or latency.
For LangMem, cognee and the wider field, see the best AI agent memory frameworks.
What we’re building (in development)
DawnLoop isn’t a memory framework, and nothing is shipped yet. The tools on this page are infrastructure for developers to build memory into their own agents. DawnLoop is designed as an end product, an AI pair programmer, that will keep its memory as a typed graph and consolidate it in a planned offline nightly pass, supervised by outcome labels such as test results, merges and reverts. More on that design in our guide to long-term memory for AI agents.