DEV Community

Cover image for Mem0 vs Zep vs Letta: Picking an AI Agent Memory Platform in 2026
Moksh Gupta
Moksh Gupta

Posted on Originally published at devtoollab.com

Mem0 vs Zep vs Letta: Picking an AI Agent Memory Platform in 2026

Every multi-turn agent runs into the same wall: the model has no memory between calls. You either replay the whole conversation into the context window every time, which gets expensive fast, or you summarize and truncate and quietly lose the one fact that mattered. That gap is why agent memory became its own product category instead of "just add a vector database."

I went deep on this in a longer comparison on DevToolLab, covering the three vendors developers actually shortlist plus the open-source projects worth self-hosting. Here's the condensed version.

Diagram of an agent memory pipeline: session events, fact extraction, vector and temporal graph storage, and a retrieved context block

Why this became a category

Three things pushed memory out of "build it yourself" territory. Long context windows didn't remove the need for it: the BEAM benchmark shows retrieval quality and cost both degrade as you stuff more raw history into a prompt, so every serious platform still extracts facts, stores them compactly, and retrieves a small block per turn. The real failure mode isn't recall, it's contradiction. Users change their minds, a deploy region moves from us-east-1 to us-west-2, and a naive vector store happily hands back both the stale fact and the new one with similar confidence. And Anthropic's own client-side memory tool (memory_20250818, Claude 4 and later) reset the baseline: a directory of markdown files under /memories is now the free alternative any paid platform has to beat.

Mem0: the fast path

Mem0 homepage showing drop-in memory infrastructure for AI agents

Mem0 is the default starting point, backed by 63,900+ stars on its Apache-2.0 repo and a $24M raise announced in October 2025. The SDK is genuinely about six lines to wire in: add messages, search with a user filter, get scored memories back.

The catch is the pricing shape. Graph memory and the new "Dream" background-consolidation feature (announced August 24, 2026) both sit behind the $249/month Pro tier, and Starter's quotas are lopsided: 50,000 add requests but only 5,000 retrievals a month, when a chat agent typically retrieves at least once per turn.

from mem0 import Memory

m = Memory()
m.add(
    [{"role": "user", "content": "I ship to Austin, TX and prefer Postgres over MySQL."}],
    user_id="u_1042",
)
hits = m.search("which database does this user prefer?", filters={"user_id": "u_1042"}, top_k=5)
Enter fullscreen mode Exit fullscreen mode

Note the filters={"user_id": ...} argument. Older tutorials pass user_id= directly to search, and that no longer matches the 2.x API.

Zep: graph-native, unmetered reads

Zep homepage showing agent memory at enterprise scale with a context graph dashboard

Zep is built on Graphiti, its Apache-2.0 temporal knowledge graph engine. Every fact becomes an edge with a validity window, so a superseded fact gets invalidated with its history intact instead of silently overwritten. That's the right model when your questions are relational or temporal ("who approved the last renewal," "what did they use before Postgres").

The billing model is the interesting part: retrieval, storage, threads and users are all unmetered, you pay only for ingested bytes (one credit per 350 bytes). The tradeoff is self-hosting. Zep's Community Edition was discontinued in April 2025, so running it yourself now means Graphiti plus your own graph database (Neo4j, FalkorDB or Kuzu), not a docker run away.

Letta: the agent itself, not an API

Letta comes from the Berkeley team behind MemGPT, and its model is different: instead of a memory API you call from your agent, Letta gives you the agent. Memory lives in editable blocks the model can rewrite with its own tools, and enable_sleeptime=True turns on a background agent that reorganizes those blocks between turns. It's the most architecturally interesting of the three, and the riskiest to depend on right now given its pivot toward "Letta Code," a model-agnostic runtime, with the Python client seeing no release since June 2026.

The open-source options worth running yourself

Cognee is the most complete self-hosted pick: Apache-2.0, 30,000+ stars, pluggable storage (Kuzu or Neo4j for the graph, LanceDB or Qdrant for vectors), and a four-verb API (remember, recall, forget, improve).

Hindsight documentation showing memory types and multi-strategy retrieval

Hindsight from Vectorize is the benchmark story of the year in this space: MIT licensed, runs fully locally, and posts 64.1% on the hardest BEAM tier at 10M tokens against 40.6% for Honcho. If retrieval quality at long horizons is what you're optimizing, it belongs on the shortlist on measured results alone. The full DevToolLab writeup also covers Memori and two more niche picks (Honcho, LangMem) plus a head-to-head table with license and self-hosting columns for all eight projects.

Memori targets the "no rip and replace" case: turning agent execution into structured state on top of databases you already run, which is the one to look at when the blocker is a security review, not a benchmark.

Cost math on a real workload

Take a support agent handling 2,000 conversations a month, twelve messages each: 24,000 messages at roughly 600 bytes, one retrieval per turn. On Zep, ingestion runs about 48,000 credits and all 24,000 retrievals are free, fitting inside the $125/month Flex tier. On Mem0, writes are cheap but 24,000 retrievals blow through Starter's 5,000-request limit and push you to the $249/month Pro tier regardless of how you batch the writes. The two vendors meter opposite things, so model your own read-to-write ratio before comparing sticker prices. I go deeper on the token-cost side, including how to sanity-check it with an AI token counter, in the full writeup.

Which one to pick

Prototype or side project: Mem0's free Hobby tier or Cognee running locally. Shipping a SaaS product with chat: Mem0 Starter until you need graph memory, then Pro. Relational or temporal questions, or an audit requirement: Zep. Data can't leave your infrastructure: Cognee or Memori. A stateful agent rather than a memory API: Letta, eyes open about the platform shift. Already all-in on Claude: try the built-in memory tool before adding a vendor at all.

References

Top comments (0)