DEV Community

Mem0 vs Letta vs Zep for Coding Agents: An Honest Comparison, Plus the Coding-Specific Option They Leave Out

If you're asking "Mem0 vs Letta vs Zep: which memory layer is best for coding agents?", the short answer depends on what you're building. Pick Mem0 if you're building your own agent and want an SDK with a hosted API. Pick Letta if you want the agent itself to run as a long-lived, stateful service. Pick Zep if you need a hosted graph that tracks how facts change over time. If what you want is one shared memory across Claude Code, Cursor and Codex, none of the three does that out of the box. That's the case Open Agentic Brain & Memory (OpenAB) is built for.

An agent memory layer is the software that decides what an AI agent should keep from past work, where it's stored, and which parts go back into the model's context next time. The context window is short-term memory. The memory layer is everything the model would otherwise forget when the session closes.

The short answer, in one paragraph per tool

Mem0 is a memory SDK and hosted API you call from your own code. It pulls facts out of conversations and stores them in a vector store, with an optional graph. Its local option, OpenMemory MCP, exposes that store to MCP clients. Letta grew out of the MemGPT research paper (Packer et al., UC Berkeley, 2023), which treated the context window like an operating system's RAM. Today it's a framework and server for agents that edit their own memory blocks. Zep is a hosted context service built on Graphiti, its open-source temporal knowledge graph.

All three are serious tools. They just answer a different question from the one most developers using coding agents are asking.

What a coding agent's memory has to do

A support chatbot needs to remember that a customer lives in Lisbon and prefers email. A coding agent needs something else. Coding memory has four requirements:

  1. Recall decisions and their reasons, not user facts. "We dropped Redis for SQLite because the queue never went above 200 jobs" is worth more than "user likes Python." The reason is what keeps the next agent from adding Redis back.

  2. Attach to tools you don't control. You can't add an SDK call inside Claude Code or Cursor. Memory has to arrive through MCP, through session hooks, or through files the tools already read, such as CLAUDE.md, AGENTS.md and GEMINI.md.

  3. Keep the session-start briefing small. Every token injected up front is spent on every session, in every tool. A bloated briefing brings your usage limits closer and pushes the actual task further down the window.

  4. Handle stale decisions and per-project scope. "Always use pnpm" might apply to one repo and not another. A decision from March may have been reversed in June. Memory that can't scope by project, or that you can't edit, gets worse over time.

Keep these four in mind as you read the comparison below.

Mem0 vs Letta vs Zep, side by side

We checked this against each vendor's public docs, READMEs and papers in late October 2026. Pricing and features change quickly, so confirm anything important on the vendor's own pages before you rely on it.

Architecture

  • Mem0: LLM-based fact extraction into a vector store, with optional graph memory.

  • Letta: self-editing memory blocks inside the agent's context, plus archival storage the agent can search.

  • Zep: Graphiti, a bi-temporal knowledge graph. Each fact records when it was true and when the system learned it, as described in Zep's January 2025 paper, "Zep: A Temporal Knowledge Graph Architecture for Agent Memory."

  • OpenAB: local SQLite with hybrid search (keywords plus meaning), outcome scores, and a project map written into the global CLAUDE.md, AGENTS.md and GEMINI.md files.

How it connects to Claude Code, Cursor and Codex

  • Mem0: through the OpenMemory MCP server. The tools can call it, but nothing captures your sessions automatically.

  • Letta: built to host its own agents (Letta Code is its own terminal coding agent). It isn't designed to act as the memory for someone else's agent.

  • Zep: through the Graphiti MCP server, which Zep's docs call experimental, or through Zep's hosted MCP offering.

  • OpenAB: session hooks capture and inject context automatically. MCP tools (brain_recall, brain_remember, brain_context, load-my-brain) handle recall on demand.

Self-hosting, data location and license

  • Mem0: the open-source library is Apache-2.0 and can run on your own infrastructure. The hosted platform keeps data on Mem0's servers.

  • Letta: Apache-2.0 and self-hostable with Docker. Letta Cloud is the hosted option. The main repo had about 23,400 GitHub stars in June 2026, according to Star History.

  • Zep: Graphiti is Apache-2.0 and needs a graph database such as Neo4j. Zep's README says Zep Community Edition is no longer supported, so full Zep means Zep Cloud.

  • OpenAB: Apache-2.0, no account, no vendor server. Memory lives in local SQLite. Sync is an age-encrypted blob stored as a Release asset in your own private GitHub repo, and the key stays only in your OS Keychain.

Pricing model

  • Mem0: as of mid-2026, third-party pricing trackers list a free Hobby tier, Starter at $19/month and Pro at $249/month, with graph memory in Pro. The trackers also report that the Growth tier was dropped in July 2026. Check Mem0's pricing page before you rely on these figures.

  • Letta: free to self-host, with paid plans for Letta Cloud.

  • Zep: credit-based cloud plans that trackers report were reworked in Q2 2026. Graphiti itself is free, but you pay for the database and the LLM calls.

  • OpenAB: free. The only costs are your own machine and your GitHub account.

Published benchmarks, and the caveat

Mem0's April 2025 paper reports a 26% relative improvement over OpenAI's memory on LoCoMo. Zep's paper reports up to 18.5% higher accuracy on LongMemEval. Both numbers are self-reported, both rely on an LLM judge, and both benchmarks test long personal conversations, not codebases. Our own numbers are self-reported too. On LoCoMo, OpenAB keeps 97% of the full-conversation score while reading 18% of the tokens. Treat every one of these figures as a vendor claim until you reproduce it. That's why OpenAB ships brain eval, so you can score recall on your own history.

Windows support

Mem0, Letta and Graphiti all run on Windows through Python or Docker. OpenAB does not run on Windows yet. It supports macOS and Linux only.

Which memory layer is best for coding agents? Each tool in turn

Mem0: pick it if you're building your own agent product

If you're shipping an assistant to your own users and want managed personalization behind one API call, Mem0 is the easiest fit. Its weak spot for coding is requirement 2. Claude Code and Cursor can query OpenMemory, but nothing captures what happened in your sessions unless you wire it up yourself.

Letta: pick it if the agent itself should be a long-lived service

Letta works best when you want an agent that lives on a server, keeps its own state for months and rewrites its own memory blocks. That's a different product shape from "make the tools I already use remember things." If you'd rather adopt Letta Code as your coding agent, it makes sense. If you plan to keep Claude Code and Cursor, it doesn't solve your problem.

Zep and Graphiti: pick them if facts change and history matters

Graphiti's bi-temporal model handles requirement 4 better than anything else here. It can say "this was true until June" instead of overwriting the old fact. That's useful at enterprise scale, where many agents share many facts that change. For one developer's repos, a Neo4j instance plus LLM extraction on every write is a lot of machinery.

Open Agentic Brain & Memory: pick it for one shared memory across your coding tools

At Open Agentic Brain & Memory (OpenAB), we built for the four coding requirements and nothing else. Claude Code, Codex, Cursor, Antigravity CLI and Kilo Code all read the same memory. Tell one tool and every tool knows. If you decide on pnpm in Claude Code on Monday, Cursor already knows on Tuesday. Memories are tagged by project, found by walking up to the nearest .git folder, so opening a repo gives you that repo's history first. Recall can still search one project or all of them.

The session-start briefing is capped at 2,000 tokens and is ready in 84 ms (p50). Recall over 10,000 memories takes 28 ms (p50). Loading context for that 10,000-memory store costs 1,325 tokens, compared with 1,131,367 tokens to read it all. These are our own measurements, published on the Open Agentic Brain & Memory site, and you can check recall quality on your own data with brain eval. A local control panel lets you read, edit, pin or delete every memory.

The limits are real. OpenAB runs on macOS and Linux only, needs Node 22+ and a GitHub account, and Kilo Code support is in beta. Claude Desktop and ChatGPT desktop can search memory over MCP, but their sessions aren't captured. The brand is also younger, with a smaller community than Mem0 or Letta.

A decision guide

Solo developer using several tools

Use OpenAB. This is the case it was built for. Install it, choose whether to start from past AI sessions or start fresh, then open a repo in two different tools and compare the briefings.

Team building an agent SaaS

Use Mem0. You need an SDK inside your own product, not memory for your editor. Start with pip install mem0ai and the free tier, and move to self-hosting once you know your data volume.

Regulated or air-gapped environment

If you have network access but strict data rules, OpenAB fits: memory stays local, and the sync blob is encrypted with a key only you hold. If you lose that key, nobody can recover your memory. If you're truly air-gapped, OpenAB's GitHub sync won't work. In that case, self-host Letta or Graphiti with a local model, starting from their Docker setups.

You just want Claude Code to remember between sessions

Use OpenAB. It works even if you never add a second tool, because the hooks capture decisions automatically and you don't have to maintain CLAUDE.md by hand. Install it, run one session, and check what it captured in the control panel.

Install Open Agentic Brain & Memory (OpenAB)

FAQ

Can I use Mem0, Letta or Zep directly inside Claude Code or Cursor?

Partly. Mem0's OpenMemory and Zep's Graphiti both have MCP servers that Claude Code and Cursor can call, though Zep labels Graphiti's server experimental. Letta is built to run its own agents rather than to plug into yours. None of the three captures your coding sessions automatically.

Which memory layer for coding agents is fully free and self-hosted?

Mem0's open-source library, Letta and Graphiti are all Apache-2.0 and can be self-hosted, but you run the infrastructure: Letta and Graphiti need a database, and Mem0 and Graphiti need an LLM for extraction. OpenAB is also Apache-2.0, with no paid tier at all. It runs on local SQLite and syncs through your own private GitHub repo.

Do LoCoMo and LongMemEval scores predict how well memory works for coding?

Not very well. Both benchmarks test recall over long personal conversations, and the published scores are self-reported by each vendor, OpenAB included. Run an evaluation on your own coding history before you trust any score.

Is a knowledge graph like Zep's Graphiti worth it for a single codebase?

Usually not. Graphiti is the open-source graph engine, and Zep is the hosted service built on it. Its time-aware facts are impressive, but they come with a graph database and LLM calls on every write. For one codebase, scoped and editable memories with outcome scores cover most stale-decision problems.

How many tokens does each memory layer add at the start of a coding session?

Mem0, Letta and Zep don't set a fixed session-start budget. The number depends on how many results you retrieve, and in Letta's case on the size of the memory blocks. OpenAB caps its briefing at 2,000 tokens. For a 10,000-memory store it loads 1,325 tokens instead of 1,131,367.

Can one memory be shared across Claude Code, Codex and Cursor at the same time?

Yes, with OpenAB. All three read the same local store through hooks and MCP, and at start-up OpenAB merges in what your other machines learned, so the briefing is the same everywhere. With the other three tools, you'd have to build that sharing and capture yourself.

Top comments (0)