Mem0 Paper (2026): Scalable Long-Term Memory and LoCoMo

11 min read

Mem0 paper (arXiv 2504.19413): Mem0 scored 66.88% and Mem0g 68.44% on LoCoMo, vs 72.90% for full context, with 91% lower p95 latency. Authors' numbers.

“Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memory” is the 2025 paper from the Mem0 team that describes how Mem0 extracts, updates and retrieves memories from conversations. It introduces two systems, Mem0 and a graph-based variant called Mem0g, and reports that both beat other memory systems on the LoCoMo benchmark while using far fewer tokens than full-context prompting.

The paper is arXiv 2504.19413, by Prateek Chhikara, Dev Khant, Saket Aryan, Taranjeet Singh and Deshraj Yadav, submitted on 28 April 2025. Everything below comes from that paper unless another source is linked. All results in it are the authors’ own.

What does the Mem0 paper propose?

The Mem0 paper proposes a memory pipeline for LLM agents with two phases: an extraction phase that turns each new message pair into candidate facts, and an update phase where an LLM compares each fact with similar stored memories and decides whether to add, update, delete or ignore it. Mem0g adds a knowledge graph of entities and relationships on top.

The motivation is the usual one. Context windows are finite, and long ones don’t fix the problem. The authors give the example of a user who says they’re vegetarian, then spends hours on unrelated coding questions. A full-context approach has to find that preference buried under thousands of tokens. A memory layer can store it once and pull it up when food comes up again. For why large windows still degrade, see context window limits in LLMs.

How Mem0 works in the paper

Extraction phase

Processing starts when a new message pair arrives: typically the user’s message and the assistant’s reply. The extractor builds a prompt from three parts:

  1. A conversation summary stored in the database, refreshed by an asynchronous job so it doesn’t slow the main path.
  2. The last m messages of the conversation (m = 10 in the experiments).
  3. The new message pair itself.

An LLM reads that prompt and outputs a set of candidate facts, the “salient” information worth remembering.

Update phase

For each candidate fact, the system retrieves the top s most similar memories by embedding (s = 10). It then hands the fact and those memories to the LLM through a function call, and the LLM picks one of four operations:

OperationWhen the LLM picks it
ADDNo equivalent memory exists
UPDATEAn existing memory can be extended with the new detail
DELETENew information contradicts an existing memory
NOOPNothing needs to change

There’s no separate classifier; the LLM’s own judgment drives the choice. All LLM calls in the experiments used GPT-4o-mini, and the store was a vector database with dense embeddings.

Mem0g: the graph variant

Mem0g stores memory as a directed labeled graph. Nodes are entities with a type (Person, Location, Event), an embedding and a creation timestamp. Edges are relationship triplets such as (Alice, lives_in, San_Francisco).

Writing works in two LLM stages: an entity extractor, then a relationship generator. When a new triplet conflicts with an existing one, an LLM-based resolver marks the old relationship invalid instead of deleting it, so temporal questions can still see it. Retrieval combines an entity-centric search (find matching nodes, expand their edges) with a semantic search over triplet text. The implementation used Neo4j.

Mem0 paper results on LoCoMo

The evaluation used LoCoMo: 10 long conversations of about 600 dialogue turns and 26,000 tokens each, with roughly 200 questions per conversation. The authors dropped LoCoMo’s adversarial category because it has no ground-truth answers.

The main metric is LLM-as-a-Judge (J), averaged over 10 runs, because F1 and BLEU reward word overlap even when the key fact is wrong. Baselines included LoCoMo, ReadAgent, MemoryBank, MemGPT, A-Mem, LangMem, Zep, OpenAI’s ChatGPT memory, RAG at many chunk sizes, and full context.

Overall accuracy, latency and tokens

MethodOverall J scoreTotal latency p95Memory tokens per query
Full context72.90%17.12 s~26,000
Mem0g68.44%2.59 s~3,600
Mem066.88%1.44 s~1,800
Zep65.99%2.93 s~3,900
Best RAG (k=2, 256-token chunks)60.97%1.91 sn/a
LangMem58.10%60.40 s~130
OpenAI memory52.90%0.89 s~4,400
A-Mem48.38%4.37 s~2,500

Source: Table 2 of the paper. Two points stand out. Full context still had the highest accuracy. The paper’s argument is cost, not quality: Mem0 got within about 6 points at a 91% lower p95 latency and over 90% fewer tokens. And the graph variant cost more latency for about 1.5 points of accuracy.

Results by question type

  • Single-hop: Mem0 led with J = 67.13. Adding the graph slightly lowered the score.
  • Multi-hop: Mem0 led with J = 51.15. The authors note the graph “does not provide performance gains here.”
  • Temporal: Mem0g led with J = 58.13, the clearest case for the graph. OpenAI’s memory scored 21.71, which the authors trace to missing timestamps in its stored memories.
  • Open-domain: Zep scored highest (J = 76.60), ahead of Mem0g (75.71) and Mem0 (72.93).

The abstract’s headline “26% relative improvement over OpenAI” compares Mem0’s 66.88 with OpenAI’s 52.90.

Memory footprint

Mem0 stored about 7,000 tokens of memory per conversation and Mem0g about 14,000. The authors measured Zep’s graph at over 600,000 tokens, and reported that Zep’s answers improved when searches were re-run hours after ingestion, which they attribute to background graph processing.

The Zep dispute over the paper’s numbers

Zep publicly rejected the paper’s evaluation of its product. In a May 2025 post, “Lies, Damn Lies, & Statistics: Is Mem0 Really SOTA in Agent Memory?”, Zep argued that the Mem0 team:

  • put both LoCoMo speakers in one user graph with the user role, so Zep treated two people as one;
  • appended timestamps to message text instead of using Zep’s created_at field, which breaks its temporal handling;
  • ran searches one after another instead of in parallel, inflating latency.

Zep reported its own corrected score as 75.14% ± 0.17, above Mem0g’s 68.44%. That post was itself revised after Zep found a miscalculation in an earlier figure. Zep’s post also criticizes LoCoMo: conversations are short enough to fit in modern context windows, there are no knowledge-update questions, and some questions have wrong speaker labels or more than one defensible answer.

Letta added another angle in August 2025. Its filesystem benchmark gave a Letta agent plain file tools (grep, search, open, close) over the conversation and reported 74.0% on LoCoMo with GPT-4o-mini, above Mem0’s best reported 68.5%. Letta read this as a sign that LoCoMo says more about how an agent manages context than about the memory store.

The fair reading: every number in this debate comes from a vendor running its own or a rival’s system. For how memory benchmarks work and where they break, see LLM memory evaluation.

How Mem0 has changed since the paper

The production Mem0 of October 2026 differs from the paper in three ways, per the Mem0 README and its v2-to-v3 migration guide:

  1. No more UPDATE and DELETE during extraction. The April 2026 algorithm is single-pass and ADD-only. New facts sit next to old ones, and time-aware retrieval is meant to rank the current one first. Corrections are explicit API calls.
  2. Graph memory left the open-source SDK. The Neo4j-style graph from Mem0g is gone from OSS. The hosted Platform has a built-in graph that links memories through shared entities and feeds ranking.
  3. Retrieval is multi-signal. Semantic, BM25 keyword and entity scores are fused, not semantic search alone.

Mem0 now reports 92.5 on LoCoMo and 94.4 on LongMemEval for the new algorithm, measured on its managed platform. Those figures aren’t comparable with the paper’s 66.88, since the judge setup, retrieval budget and models differ. On the same comparison pages, Mem0 lists Hindsight, an MIT-licensed memory server, level on LongMemEval and LoCoMo but ahead on the long-history BEAM test (73.9 vs 64.1 at 1M tokens), while returning several times more tokens per retrieval. Our what is Mem0 guide covers the current system.

How today’s Mem0 did in an outside test

The paper’s cost argument got an independent check in October 2026. MemoryTax (Zedong Peng, Shanghai Jiao Tong University, not a memory vendor) ran Mem0 OSS 2.1.0 with default extraction and retrieval (top 200 facts, no reranking) on one LoCoMo conversation: 419 turns, 152 questions. The same model wrote the memories and answered.

ModelFull contextMem0 OSS 2.1.0Mem0 build costFull-context cost, whole run
GPT-4o-mini74%78%$0.56$0.43
GPT-6 Luna92%80%$0.45$0.29
Claude Opus 5.595%95%$25.88$17.84

Three results bear on the paper’s claims:

  • Accuracy is close to full context, as the paper found. Mem0 beat full context with GPT-4o-mini (78% vs 74%), tied with Claude Opus 5.5 (95%) and trailed with GPT-6 Luna (80% vs 92%), in MemoryTax’s Table 2.
  • Answers are cheaper, but building memory costs more than it saves on a short history. Each Mem0 answer cost less than a full-context answer ($0.074 vs $0.117 per question with Opus 5.5), but in MemoryTax, building the memory alone cost more than the whole full-context run with every model. The paper’s 90% token saving is real at answer time; on one conversation that fits in the window, the write cost eats it.
  • The writer model sets the ceiling. Memories GPT-4o-mini wrote capped even Claude Opus 5.5 at 84%; memories Opus wrote let GPT-4o-mini reach 89%. The paper used GPT-4o-mini for every call, so its scores reflect a cheap writer.

Limits, as the author states them: one conversation, one run per setup, a lenient GPT-4o-mini judge, defaults only, and a history short enough to fit every model’s context window, which is the case where full context is strongest. The study’s own conclusion is blunt: memory is “a costly patch for a weak model”. Mem0’s managed Platform wasn’t tested, and neither was Hindsight. Zep’s open-source engine was, and did worse; see what Zep memory is.

Mem0 as a baseline in Stanford’s Memorilla paper

A second outside run of the paper-era Mem0 came from Memorilla: Latent Semantic Memory for LLMs (Fallahpour, Idehpour, Kothapalli, Mounier, Wu, Pardis and Leskovec; Stanford, Penn, Toronto, MIT; arXiv 15 October 2026, revised 3 November). Memorilla is a research system that compresses a document collection into 16 learned “memory tokens” for a frozen LLM. Mem0 is one of its baselines, so the numbers say something about Mem0 even though the paper isn’t about it.

The setup, from the paper’s Table 6: mem0ai 0.1.118 with its stock prompts and the ADD/UPDATE/DELETE/NONE loop this page describes, unmodified; a frozen Qwen3-4B-Instruct-2507 as the fact extractor; one add() per document, each fact reconciled against its 5 nearest memories; one Qdrant collection per user, story or question; retrieval depth swept over 10, 30 and 50 memories and the best reported. Every method answered with the same frozen Qwen3-8B and the same Qwen3-Embedding-4B retriever, so the only difference is what reached the decoder.

Benchmark (metric)RAG top-50Full contextMem0 0.1.118Memorilla (16 tokens)
PMv2 personalization (acc)26.7227.9227.4844.60
PV4 personalization (acc)65.7859.1265.0766.65
PubMedQA (acc)67.0067.0024.0059.00
NarrativeQA (ROUGE-L)17.2317.9913.8019.31
TriviaQA (EM)55.6052.6044.6057.00
FactKG (acc)78.3980.4372.7984.33
LaMP-4 news headlines (ROUGE-L)15.0914.2112.7018.15
LaMP-7 tweet paraphrase (ROUGE-L)43.7743.7143.6848.37

Source: Table 11 of the paper (v3). Across all benchmarks the paper reports averages of 38.02 for Mem0, 41.92 for xRAG, 40.75 for LLMLingua-2 and 49.68 for Memorilla. The point for Mem0 readers: with a small writer model, extracted facts lost to plain top-50 chunk retrieval on seven of eight benchmarks, and collapsed on PubMedQA (24 vs 67), where the answer sits in a few short abstracts that RAG hands over whole and fact extraction strips.

Read it with three caveats. The version is 0.1.118, the paper’s original algorithm, not the April 2026 single-pass extractor or the managed Platform. The benchmarks are document QA and personalization over text collections, not multi-session chat like LoCoMo, which is what Mem0 was built for. And the memory writer was a 4B model; MemoryTax above found the writer sets Mem0’s ceiling. Memorilla itself needs training per benchmark and isn’t something you can install today. Still, it is the second academic group in a month to find that Mem0’s extraction step, run on a cheap model, does not beat straightforward retrieval. It echoes the paper’s own finding that full context beat Mem0 on accuracy: the case for fact extraction is tokens and latency, and only holds if the extractor is good enough. Memory servers that keep more than one layer, like Hindsight, which stores world facts and experiences alongside the consolidated observations built from them and lets recall return either, hedge against a single extraction pass losing the detail an answer needs.

What the paper still teaches

Three ideas from the paper hold up regardless of the benchmark fight:

  • Store facts, not transcripts. Retrieving 1,800 tokens of distilled facts beat every RAG configuration over raw chunks in the paper’s own tests.
  • Graphs help with time, not with everything. Mem0g’s gains were concentrated in temporal and open-domain questions; for single- and multi-hop lookups, plain extracted facts did as well or better. That matches what temporal-graph systems like Zep and Graphiti optimize for; see temporal reasoning in AI memory.
  • Measure latency and tokens, not only accuracy. The paper reports p50 and p95 for search and total response time, which is how production teams actually choose.

For how this approach compares with other memory designs, see the LLM memory comparison and AI agent memory explained.