DEV Community

Jason Lee
Jason Lee

Posted on

Mem0, Zep, and Letta All Promise Perfect Recall. None of Them Agree on What to Forget.

AI agent memory architecture

Every agent framework thread eventually arrives at the same complaint: the agent forgot something it was told three turns ago, or worse, it "remembered" something that's no longer true. Context windows solved the short-term version of this problem and created a new one — stuffing an ever-growing transcript into every call is slow, expensive, and eventually just wrong, because old facts get contradicted by new ones and nothing tells the model which to trust.

That's the gap a new category of infrastructure is racing to fill: the agent memory layer. In 2026 the four names that keep coming up in the same breath are Mem0, Zep, Letta (the commercial continuation of the MemGPT research project), and LangMem. They get pitched as interchangeable — "memory for your agent" — and benchmarked against each other on recall accuracy as if they're four flavors of the same product. They aren't. They disagree, architecturally, on a much more consequential question: who decides what the agent forgets, and where does that decision get made?

That framing isn't mine alone — a 2026 systems paper, "Control-Plane Placement Shapes Forgetting", studied thirteen agent-memory configurations specifically to isolate this variable. Retrieval accuracy benchmarks get all the marketing attention because they produce a clean leaderboard number. Forgetting policy is the part vendors don't put on a slide, and it's the part that determines whether your agent is still coherent after ten thousand turns.

Why this is a live decision right now

Three things converged to make this an actual engineering decision instead of a research curiosity. First, agents stopped being single-session chat wrappers — coding agents, support agents, and personal assistants are now expected to persist state across days or weeks, which vector-store-plus-summary hacks handle badly. Second, AWS picked Mem0 as the exclusive memory provider for its Agent SDK, which is the kind of enterprise-distribution signal that forces teams to at least evaluate it even if they'd never heard of it a year ago. Third, the funding is real and recent enough that these aren't side projects anymore: Mem0 closed a $24M Series A in October 2025 (Basis Set Ventures leading, with Peak XV Partners, GitHub Fund, and Y Combinator participating), and Letta raised a $10M seed led by Felicis Ventures at a $70M post-money valuation, with Jeff Dean and Hugging Face's Clem Delangue as backers. Money and distribution deals are why this is a "pick one this quarter" problem rather than a "watch the space" one.

What each one actually is

Mem0: a memory library you bolt onto whatever you already have

Mem0 is the most portable option on this list by design. It doesn't ask you to adopt a runtime or a graph database — it's a memory layer that sits alongside your existing agent stack (LangChain, LlamaIndex, CrewAI, a raw OpenAI/Anthropic call, whatever) and exposes an API to add, search, and update memories. Internally it organizes memory by scope — conversation-level, session-level, user-level, and organization-level — and promotes facts upward between those layers as they're confirmed across interactions. That promotion step is the interesting part: instead of storing every message, Mem0 tries to extract the durable fact ("user prefers dark mode," "user's team uses Postgres") and discard the rest.

It's the framework with the largest community footprint — reported GitHub star counts range from roughly 48,000 up into the 50-60K range depending on when a given source pulled the number, which is itself a signal of how fast the repo is moving. Pricing starts free at 10,000 memories, then steps up through $19, $79, and $249-per-month tiers as memory volume and features (multi-tenant isolation, graph memory add-ons) scale.

Mechanically, the promotion step is doing the heavy lifting and it's also where the risk lives. Turning a raw exchange into a stored "fact" means running an LLM extraction pass over the conversation, embedding the result, and deciding — again, usually via another model call — whether it updates, contradicts, or duplicates something already in the store. That's an extra inference cost on every write, and it means the fidelity of what gets remembered is bounded by how good the extraction prompt is, not just how good the retrieval is at query time. If the extraction step drops nuance (a caveat, a conditional, a "only on Tuesdays"), that nuance is gone from the store even if it was in the original transcript — every write has an extraction-model cost that doesn't show up on the headline pricing.

Zep: memory as a temporal knowledge graph

Zep takes the opposite bet: facts aren't just true or false, they're true during a period of time, and an agent that doesn't track when something changed will confidently repeat stale information forever. Zep's core engine, Graphiti (open source, with reported star counts as high as ~27,000), stores memory as a temporal knowledge graph — subject-predicate-object triples annotated with both "valid time" (when the fact was true in the world) and "transaction time" (when the system learned it). That distinction matters for anything where facts get superseded: a user's job title, a support ticket's status, a deal stage in a CRM-fed agent.

Zep's own published benchmarks — from the paper "Zep: A Temporal Knowledge Graph Architecture for Agent Memory" — report 94.8% on the Deep Memory Retrieval benchmark versus 93.4% for MemGPT, and an 18.5% accuracy improvement on LongMemEval with a 90% latency reduction versus baseline implementations. Worth flagging plainly: those are the vendor's own numbers from the vendor's own paper, which doesn't make them false, but it does mean they're not independently reproduced in the way a third-party leaderboard would be. Pricing sits at the higher end of this group — Zep's Flex plan was listed at $125/month as of July 2026 — reflecting that you're paying for managed graph infrastructure, not just an API wrapper around a vector store.

The mechanics matter for query design, too: retrieving from Zep isn't a single nearest-neighbor lookup, it's a graph query that can traverse relationships between entities ("who reports to whom," "which ticket followed which ticket"), which is exactly what a flat vector store can't express. That expressiveness is also the cost center — every write has to resolve entities against the existing graph (is "the deal" the same deal mentioned three weeks ago, or a new one?) before it can be inserted, and entity resolution is a harder, noisier problem than appending a row to a vector index. Teams evaluating Zep should specifically test entity-resolution accuracy on their own data, not just retrieval accuracy on Zep's benchmark set.

Letta: memory as a first-class primitive inside an agent runtime, not a library you call

Letta is the odd one out, and it's odd on purpose. Where Mem0 and Zep are services you query from an agent you still control, Letta is the agent runtime — descended directly from the MemGPT research project out of UC Berkeley, built around what it calls an "LLM-as-operating-system" model. The agent manages its own memory through three tiers modeled on computer architecture: core memory (a small block that lives directly in the context window, like RAM, that the agent reads and edits itself), recall memory (searchable conversation history outside the context window, like a disk cache), and archival memory (long-term storage the agent queries explicitly via tool calls, like cold storage).

The practical consequence: adopting Letta means adopting its agent loop, not just its storage layer. In exchange you get agents that survive indefinitely as a long-lived service, editing their own core memory over time rather than relying on an external process to decide what to promote or discard. Letta's 2026 trajectory has moved further in this "agent runtime" direction rather than staying a memory add-on — Letta Code (a coding-agent product) scored 42.5% on Terminal-Bench, reportedly the top model-agnostic open-source agent on that benchmark, a desktop app shipped in April 2026, and a "Channels" feature replaced an earlier chat product called LettaBot in May 2026. Reported GitHub stars vary a lot by source — from roughly 13,000 to as high as 24,000 — which is a smaller and less consistent footprint than Mem0's, and worth independently checking rather than trusting a single number. Letta is free to self-host; a Pro plan is $20/month for up to 20 stateful agents plus a pay-as-you-go model-usage quota.

The core-memory tier is the part that's genuinely unusual: the agent doesn't just read that block, it calls a tool to edit it mid-conversation, the way a program would write to a variable. That means memory management shows up in your token bill and your latency budget as ordinary tool calls, not as an invisible background job — an agent that's actively reorganizing its own memory is spending part of every turn's context and inference time on that housekeeping, which is a real tradeoff against a design where memory updates happen asynchronously, off the critical path, as they do in Mem0 and LangMem's background-manager mode.

LangMem: the free, LangGraph-native option that's still finding its shape

LangMem is LangChain's own answer, and it's the only one of the four that's fully open source with no hosted tier to upsell into. It gives LangGraph agents three categories of long-term memory — semantic (facts), episodic (past experiences/examples), and procedural (learned behaviors, expressed as prompt updates) — through two integration patterns: "hot-path" tools the agent calls mid-conversation, and background memory managers that extract memories asynchronously after the fact. Its most distinctive feature is prompt optimization from memory: rather than only retrieving facts, LangMem can use accumulated experience to rewrite the agent's own system prompt over time, which is a lighter-weight version of what Letta does by letting the agent edit its own core memory.

Adoption is real — around 746,000 monthly PyPI downloads and 5 million-plus lifetime downloads as of June 2026 — but the project is still pre-1.0. The most recent tagged release was 0.0.30 in October 2025, even though commits to the repo continued actively into mid-2026. That combination (heavy usage, no stable 1.0, API still moving) is exactly the profile of a tool you should pin tightly and test on upgrade, not one to build a critical path on without a fallback plan.

Architecturally, LangMem is closer to a toolkit than a managed pipeline: it doesn't ship its own storage backend, it operates over whatever BaseStore you've already wired into LangGraph (in-memory for a prototype, Postgres or Redis in production), and its "memory manager" is just a scheduled or triggered LangGraph node that reads recent state and writes extracted memories back to that store. That's the tradeoff for being free and open source — you own the store, the indexing, and the ops, LangMem only owns the extraction and retrieval logic layered on top.

What actually changed to make this a category

None of the underlying ideas here are new — RAG-over-conversation-history and knowledge graphs both predate 2026 by years. What changed is that the default failure mode of agent memory shifted. Early agent memory was "shove the last N messages plus a vector-search hit into the prompt," which works until an agent runs long enough that stale and current facts coexist in the same retrieved set with no way to tell them apart. All four tools here exist specifically to solve that problem, but they solve it at different layers: Mem0 solves it by deciding what's durable enough to keep (extraction/promotion), Zep solves it by keeping everything but time-stamping it (temporal graph), Letta solves it by making forgetting the agent's own explicit, tool-mediated decision, and LangMem solves it by folding memory updates into prompt optimization rather than treating storage and behavior as separate concerns.

The counter-argument to the extraction-heavy approach (Mem0 and, to a lesser extent, Zep's fact triples) showed up in the same wave of 2026 research: a controlled ablation study titled "Verbatim Chunks Beat Extracted Artifacts" argues, as its title states plainly, that storing raw conversation chunks can outperform extracted memory artifacts for long LLM conversations. That's a direct challenge to the core design choice underneath the most popular tool in this comparison, and it's worth reading before you assume "extracted facts" is obviously the right default for your use case.

Why developers should actually care about the differences

Cost. These aren't equivalent line items. Mem0's free tier (10,000 memories) and $19/mo entry point make it the cheapest way to try the category. Zep's $125/mo Flex plan reflects managed graph infrastructure and is priced for teams that have already decided temporal accuracy is worth paying for. Letta is free to self-host, which shifts cost from subscription to your own ops burden — you're running the runtime, not just calling an API.

Latency. Zep's own benchmark claims a 90% latency reduction on LongMemEval versus baseline RAG, which is a meaningful claim if it holds in your workload — but it's self-reported, so validate it against your actual query patterns before treating it as a given. Graph traversal and fact-extraction pipelines both add processing steps a plain vector lookup doesn't have; that's the price of the accuracy they're chasing.

DX and lock-in. This is the sharpest divide in the group. Mem0 and LangMem are libraries — you keep your agent loop, your framework choice, your deployment model, and swap them out later without rearchitecting. Letta is a runtime — you're not adding memory to your agent, you're building your agent inside Letta's agent loop, which is a much bigger commitment to reverse if it doesn't work out. Zep sits in between: it's a service you call, but the temporal graph model is enough of a mental-model shift that migrating off it later means re-deriving whatever your app assumed about "when did we learn this."

Security and data retention. All four of these are, functionally, long-term stores of user conversation data — facts about real people, sometimes indefinitely. None of the marketing pages foreground how "right to be forgotten" deletion actually propagates through an extracted-fact store (does deleting a source conversation also delete facts already promoted into user-level memory in Mem0?) or through a graph where a fact might have downstream edges (Zep/Graphiti). If you're building something subject to GDPR-style deletion requirements, this is a question to ask each vendor directly rather than assume from the docs — it wasn't clearly answered in any of the material reviewed for this piece.

Maintainability. LangMem's pre-1.0 status is the most concrete maintainability risk here: an actively-downloaded library with no stable release is a library you should pin and monitor, not one you bolt on and forget. Letta's runtime commitment means memory bugs are agent-loop bugs — harder to isolate than a library call that returned a bad result. Mem0's promotion heuristics (deciding what gets promoted from session to user-level memory) are a source of silent correctness bugs if the wrong fact gets promoted and nothing flags it.

Practical use cases per option

  • Mem0: A support bot that needs to remember a user's plan tier and past complaints across sessions without your team standing up new infrastructure; a personalization layer bolted onto an existing multi-tenant SaaS chatbot; any team that wants to try agent memory without picking a framework religion first, and whose fit is reinforced by the AWS Agent SDK default.
  • Zep: An agent reasoning over a CRM or ticketing system where facts genuinely change over time (deal stage, ticket status, org chart) and getting the current state right — not just a state — is the product requirement; enterprise knowledge assistants where "when did this become true" is itself a query users ask.
  • Letta: Long-running autonomous agents — coding agents, ops agents, personal assistants — that are expected to operate for weeks without a human resetting their context, where you're willing to adopt an agent runtime in exchange for the agent managing its own memory budget.
  • LangMem: Teams already committed to LangGraph who want memory as a first-class LangGraph concept (not a bolted-on external call), are comfortable pinning a pre-1.0 dependency, and want the prompt-optimization angle — an agent that adjusts its own instructions from experience, not just its facts.

Comparison table

Dimension Mem0 Zep Letta LangMem
Category Memory library/API Managed temporal knowledge graph Stateful agent runtime Open-source LangGraph memory SDK
Core mechanism Scoped memory + fact promotion Graphiti: time-stamped fact triples Core/recall/archival memory tiers, agent-managed Semantic/episodic/procedural memory + prompt optimization
Integration model Library, framework-agnostic Service you call You build inside its runtime Library, LangGraph-native
Lock-in Low Medium High Low-medium (LangGraph-coupled)
Entry pricing Free (10K memories), then $19/mo+ Flex plan ~$125/mo Free self-host; Pro $20/mo Free, open source
Headline benchmark claim AWS Agent SDK's default provider 94.8% DMR, +18.5% LongMemEval, -90% latency (self-reported) #1 model-agnostic agent on Terminal-Bench (Letta Code) ~5M+ lifetime PyPI downloads
GitHub stars (reported range) ~48K-60K Graphiti OSS ~20K-27K ~13K-24K (source-dependent) N/A (SDK, not standalone repo star draw)
Maturity signal $24M Series A, Oct 2025 Managed platform + OSS engine split $10M seed, $70M post-money Pre-1.0 (last tag 0.0.30, Oct 2025)
Best fit Fast bolt-on personalization, multi-framework Time-evolving enterprise facts Long-running autonomous agents LangGraph-committed teams, free/open-source priority

An independent read

Strip away the vendor pages and the actual disagreement here is philosophical, not just technical: should an agent's memory be curated for it (Mem0's promotion pipeline, Zep's temporal graph — both external processes deciding what's durable) or should the agent curate its own (Letta's core-memory editing, LangMem's prompt optimization)? There's no benchmark that settles this, because it's not a retrieval-accuracy question — it's a question about how much you trust the model to manage its own state versus how much you want a deterministic, inspectable pipeline doing it for you. Teams that want auditability and predictable costs should lean toward the external-curation tools (Mem0, Zep). Teams building genuinely autonomous, long-horizon agents — where part of the point is the agent adapting its own behavior — have a real reason to pay Letta's higher lock-in cost, because that self-management is the feature, not a side effect.

The benchmark numbers circulating for all of these (Zep's DMR/LongMemEval figures most visibly, but also the various GitHub-star and download counts) come predominantly from the vendors themselves or from their own papers, and they don't always agree with each other from source to source — a reminder to run your own eval on your own conversation traces before picking a default, rather than trusting a single comparison post (including this one) as ground truth.

How to actually evaluate these instead of trusting a leaderboard

None of the headline benchmarks above (Zep's DMR and LongMemEval numbers especially) were run on your data, your conversation lengths, or your definition of a "correct" memory. Before committing to one of these in production, it's worth running a small, cheap test that none of the vendor pages will do for you: take a real (anonymized) transcript from your own product that runs at least a few hundred turns, seed each candidate with it, then deliberately introduce a contradiction — a fact that changes partway through — and check two things separately: does the agent retrieve the updated fact rather than the stale one, and does it do so without the retrieval step adding noticeable latency to the turn. That single test surfaces the actual difference between "keeps everything and time-stamps it" (Zep) and "extracts and overwrites" (Mem0) faster than any published number will, because it's the exact scenario each architecture was built to handle differently.

Which reader profile should pick which option

If you're shipping a personalization feature this quarter and don't want to bet on a framework: Mem0, especially if you're already on or considering AWS's Agent SDK. If your agent's core value is reasoning about facts that change over time — CRM, support, anything with a "current status" — and you can absorb a higher price for accuracy: Zep. If you're building an agent meant to run autonomously for a long time and you're willing to adopt its runtime as your agent framework, not just its storage: Letta. If you're already on LangGraph, want zero licensing cost, and can tolerate a pre-1.0 dependency in exchange for tight framework integration and the prompt-optimization angle: LangMem. None of these is a universal default — the honest answer to "which agent memory tool should I use" is "it depends which failure mode you're more afraid of: forgetting the wrong thing, or never forgetting anything at all."

If your agent runs for months instead of minutes, which failure worries you more in practice — a stale fact the agent confidently repeats, or a bloated memory store the agent can no longer usefully search? Have you actually tested what happens to your own agent's behavior after a few thousand turns, or are you still assuming a longer context window postpones the problem?

Sources:

Top comments (0)