What’s actually new in AI agent memory
If you have shipped an agent that runs longer than a single session, you already know where it breaks. Not the model, not the tool calls, not the framework — memory. Over the last month the three leading open-source memory layers, Mem0, Letta and Zep, all pushed major releases with directly contradictory benchmark claims, and AI agent memory has quietly turned into the most consequential architecture decision in the stack. Pick wrong and you spend Q3 rewriting your retrieval path instead of shipping features.
All three projects stopped pitching themselves as “vector store plus a system prompt” and started pitching themselves as infrastructure. Mem0 leaned hard into OpenMemory MCP, a local-first memory server that speaks the Model Context Protocol so Claude Desktop, Cursor, Windsurf and any other MCP client can read and write the same memory store on your machine. That is a different pitch from “add our SDK to your agent” — memory as a shared local daemon, portable across the tools you already use, with the data staying on disk rather than in a vendor’s cloud.
Letta (the team formerly behind MemGPT) went the opposite direction: memory as part of the agent runtime, not a service the agent calls. Letta runs a stateful agent server where the agent owns its own context window management — core memory blocks it can rewrite, archival memory it can search, and a recall layer over message history. Its headline addition is sleep-time compute: a background “sleeper” agent that reorganizes memory while the primary agent is idle, so consolidation cost never lands in the user-facing latency budget. Most memory systems do their thinking on the critical path; Letta moves it off.
Zep’s contribution is the one most people underrate. Zep is built on Graphiti, a temporally-aware knowledge graph, so facts carry validity intervals rather than just existing. When a user says “I moved to Denver,” Zep does not overwrite the old fact — it invalidates it with a timestamp and keeps the edge. Ask “where did they live last year” and the graph answers. Everyone now quotes LOCOMO benchmark numbers at each other: Mem0 published large accuracy gains and roughly 90% token savings versus full-context baselines, Zep published results claiming it beats Mem0 on the same benchmark, and Letta’s team argues publicly that LOCOMO is close to saturated and too easy to differentiate serious systems. All three can be technically accurate, because none of them ran identical harnesses.
Why it matters
- Full-context is not a strategy. Million-token windows made “just stuff the history in” feel viable. It is not — cost scales linearly, latency scales worse, and retrieval accuracy degrades in the middle of long contexts. A memory layer that returns 1–2k relevant tokens beats a 100k dump on both price and quality.
- The benchmark war means you must run your own evals. When vendors’ own numbers contradict each other on the same public dataset, the honest read is that LOCOMO measures multi-session conversational recall and little else. If your agent does support triage or codebase work, LOCOMO tells you almost nothing.
- Temporal correctness is a real failure mode. Naive semantic memory returns a stale fact and a current fact with equal confidence. Any agent touching pricing, entitlements, org charts or user preferences needs invalidation, not just similarity search.
- MCP changes the lock-in math. OpenMemory MCP and similar servers make the memory store a protocol endpoint rather than a library import. Swapping providers becomes a config change rather than a rewrite — the first genuinely portable thing to happen to long-term memory for LLM agents.
- Architecture dictates cost profile. Graph-based extraction runs an LLM pass on write; vector-based systems pay on read. If you are write-heavy (ingesting transcripts), that difference is your entire bill.
- Self-hosting is table stakes again. All three ship Apache-2.0-ish open cores with paid managed tiers. Start self-hosted, migrate to managed only when ops pain exceeds the invoice.
How to use an agent memory layer today
-
Start with Mem0 if you want a memory API in ten minutes. Install and write your first memories against local storage — no cloud key required for the OSS path.
pip install mem0ai # python from mem0 import Memory m = Memory() m.add( "I prefer terse answers and I'm migrating off Postgres to ClickHouse", user_id="joe", ) results = m.search("what database are they moving to?", user_id="joe") for r in results["results"]: print(r["memory"], r["score"]) -
Wire OpenMemory MCP into your editor or desktop client. This gives every MCP-aware tool a shared memory store. Add the server to your client config:
{ "mcpServers": { "openmemory": { "command": "npx", "args": ["-y", "@openmemory/mcp-server"], "env": { "OPENMEMORY_USER": "joe" } } } }Restart the client, then confirm the tools (
add_memories,search_memory,list_memories,delete_all_memories) appear in the tool list before you rely on them. -
Use Letta when the agent should manage its own memory. Letta runs as a server; agents are persistent objects with editable memory blocks rather than request-scoped objects you rehydrate.
pip install letta letta server --port 8283 # python from letta_client import Letta client = Letta(base_url="http://localhost:8283") agent = client.agents.create( model="anthropic/claude-sonnet-5", embedding="openai/text-embedding-3-small", memory_blocks=[ {"label": "human", "value": "Name: Joe. Ships fast, hates hedging."}, {"label": "persona", "value": "Blunt technical partner. No filler."}, ], ) client.agents.messages.create( agent_id=agent.id, messages=[{"role": "user", "content": "Remember I deploy on Fridays."}], )The agent rewrites its own
humanblock via tool calls. Read it back later withclient.agents.blocks.retrieve(agent_id=agent.id, block_label="human")to see what it chose to keep. -
Use Zep when facts change over time and you need to prove what was true when.
pip install zep-cloud # or run zep + graphiti via docker compose from zep_cloud.client import Zep client = Zep(api_key="...") client.thread.add_messages( thread_id="thread-1", messages=[{"role": "user", "name": "joe", "content": "We just switched our billing provider to Stripe."}], ) memory = client.thread.get_user_context(thread_id="thread-1") print(memory.context) # temporally-resolved facts, ready to paste into a system prompt -
Benchmark on your own data before you commit. Build a 50–100 item eval set from real transcripts with known-correct answers, then measure the three things that matter: recall accuracy, tokens injected per turn, and p95 added latency.
You are grading an agent memory system. GROUND TRUTH: {expected_fact} RETRIEVED CONTEXT: {retrieved} Score 1 if the retrieved context contains information sufficient to answer correctly, and contains no CONTRADICTED or SUPERSEDED fact presented as current. Score 0 otherwise. Return JSON: {"score": 0|1, "reason": "..."}Run it against all three with the same harness. That single afternoon is worth more than every vendor blog post combined.
-
Keep an escape hatch. Write a thin internal interface —
remember(user_id, text)andrecall(user_id, query) -> list[str]— and put the vendor SDK behind it. Every one of these projects will change its API before 2027.
How it compares: Mem0 vs Zep vs Letta
| Dimension | Mem0 | Letta | Zep |
|---|---|---|---|
| Core model | Extract-and-store memory API (vector + optional graph) | Stateful agent runtime; memory is part of the agent | Temporal knowledge graph (Graphiti) |
| Best fit | Bolt memory onto an existing agent fast | Building the agent from scratch, want self-editing memory | Facts that change; audit and time-travel queries |
| Standout feature | OpenMemory MCP local server | Sleep-time compute, editable memory blocks | Fact invalidation with validity intervals |
| Where LLM cost lands | Write-time extraction | Background/idle consolidation | Write-time graph construction (heaviest) |
| Framework coupling | Low — plain SDK, works anywhere | High — you adopt Letta’s agent model | Low — retrieval returns a context string |
| LOCOMO posture | Publishes strong accuracy and ~90% token-savings claims | Argues the benchmark is near-saturated | Publishes results claiming a lead over Mem0 |
| Self-host | Yes, OSS core | Yes, server is OSS | Yes, via Graphiti / community edition |
The honest summary of Mem0 vs Zep: Mem0 optimizes for integration speed and token economy, Zep optimizes for correctness over time. Letta agent memory is not really competing in the same category — it is an agent framework that happens to have the most sophisticated memory model, and you adopt it wholesale or not at all.
What’s next
Expect the benchmark fight to produce something better than LOCOMO. When three vendors publish mutually incompatible results on the same 10-conversation dataset, the dataset is the problem. Watch for longer-horizon, multi-domain evaluations that test invalidation, contradiction handling and cross-session procedural recall rather than conversational trivia — LOCOMO-style QA rewards retrieval, not memory management. Letta’s public skepticism previews that argument, and whoever ships the replacement harness sets the terms of the next year of marketing.
The second thing to watch is consolidation around MCP. Once every agent memory layer exposes the same four or five tools over the protocol, the differentiator stops being the SDK and becomes retrieval quality plus operational cost. That is good for builders and uncomfortable for vendors, which is exactly why some of them will resist it. Track whether Letta and Zep ship first-class MCP memory servers to match OpenMemory; if they do, swapping backends becomes an afternoon’s work.
Third, watch the cost curve on write-heavy ingestion. Graph construction currently means an LLM call per episode — fine for chat, brutal for pipelines processing thousands of documents a day. Cheaper small models doing extraction, batched consolidation, and Letta-style off-peak processing all attack the same problem. The team that makes graph memory cheap enough to run on the whole firehose — not just on conversations — wins the enterprise segment outright.
Frequently Asked Questions
Do I need a memory layer if my model has a million-token context window?
No, but you will want one. Large windows solve capacity, not selection. You still pay for every token, latency still climbs, and accuracy on facts buried mid-context still degrades. A memory layer is a compression and relevance strategy; the context window is just the pipe.
Which one should I pick if I only have a day to decide?
Mem0 if you have an existing agent and want memory this week. Zep if your domain has facts that expire — pricing, entitlements, staffing, health. Letta if you are greenfield and want the agent itself to manage its context. There is no wrong answer that a thin abstraction layer cannot fix later.
Can I trust the LOCOMO benchmark numbers?
Treat them as directional, not decisive. Each vendor ran its own harness with its own prompts, judge model and retrieval budget — enough variance to flip a leaderboard. Reproduce on your own data before letting a published score drive an architecture decision.
What is sleep-time compute, in plain terms?
A background process that reorganizes an agent’s memory while nobody is waiting on it — summarizing, deduplicating, promoting important facts into core memory. Consolidation work never adds latency to live turns. The cost is that it burns tokens on idle cycles, so watch your bill if you run many agents.
Is OpenMemory MCP production-ready?
It is production-ready for a local developer workflow — shared memory across Claude Desktop, Cursor and similar clients on one machine. For multi-user server deployments, treat MCP memory servers as early: audit the auth model, scope memories by user ID explicitly, and do not assume isolation you have not tested.
How do I stop the memory layer from storing garbage?
Filter at write time, not read time. Only call add on turns that contain a durable fact, preference or decision — not on every message. Put a cheap classifier or a one-line LLM gate in front of the write path, and schedule a periodic dedup pass. Every one of these systems degrades faster from over-writing than from under-writing.
Go deeper than this article
This article covers the essentials. Our premium eguide library gives you the full step-by-step playbooks — prompts, workflows, and copy-paste recipes you can put to work today.