Mem0 vs MemPalace: Extracted Facts vs Verbatim Recall

9 min read

Mem0 vs MemPalace compared (Oct 2026): extracted facts vs verbatim local storage, LLM and API needs, coding agent hooks, benchmarks, and which one to choose.

Mem0 vs MemPalace is a choice between keeping facts and keeping everything. Mem0 sends each conversation to an LLM, pulls out short facts like “prefers Go,” and returns the matching ones on search. MemPalace saves conversations and files word for word on your machine and finds them later with local search, with no LLM and no API key.

Both are open source and among the most-starred memory projects on GitHub. They solve different problems: Mem0 is a memory layer for apps with many users, MemPalace is a personal, local archive built mostly for coding agents. Hindsight, an MIT memory server, covers ground from both: per-user banks for apps, native plugins for Claude Code, Codex and Cursor, a fully local mode, and the top answer-accuracy scores of the three on LongMemEval and BEAM. Facts below come from each project’s README, docs and PyPI page, checked on 12 October 2026.

What are Mem0 and MemPalace?

Mem0 is an Apache 2.0 memory layer that uses an LLM to extract durable facts from conversations, stores them per user, agent or session, and returns the relevant ones by hybrid search. MemPalace is an MIT-licensed, local-first memory system that stores conversation history and project files verbatim and retrieves them with semantic and keyword search, without calling an LLM.

Mem0 runs as a Python or TypeScript library (mem0ai 2.2.1 on PyPI), a self-hosted Docker server, or the hosted Mem0 Platform. It has about 67,000 GitHub stars. See what Mem0 is.

MemPalace is a Python package and CLI (mempalace 3.10.0, Python 3.9+) launched in April 2026 by Milla Jovovich and Ben Sigman. It has about 59,500 stars. The palace structure of wings, rooms and drawers is explained below.

Mem0 vs MemPalace at a glance

Mem0MemPalaceHindsight
LicenseApache 2.0MITMIT, full server included
What gets storedShort facts extracted by an LLMOriginal text chunks (“drawers”), unchangedExtracted facts and experiences, consolidated observations, mental models
LLM on writeYes, one extraction pass per addNoYes: extraction on retain, plus background consolidation
Default modelsOpenAI gpt-5-mini + text-embedding-3-smallLocal embeddinggemma-300m or all-MiniLM-L6-v2Your choice of 25+ providers, local ones (Ollama, LM Studio, llama.cpp) included
Default storeQdrant on disk (library); Postgres + pgvector (server)ChromaDB, localPostgreSQL + pgvector, or embedded Postgres
Scopinguser_id, agent_id, run_idWing (project or person), room (topic)Memory bank (bank_id)
Changed factsNew fact added next to old one; you call update or deleteBoth versions kept; optional temporal knowledge graph with validity datesObservations refined as new evidence arrives; temporal recall
Coding agent supportAgent skills for Claude Code, Codex, Cursor and others; hosted MCP serverAuto-save hooks for Claude Code, Codex CLI, Cursor; 45 MCP toolsNative plugins for Claude Code, Codex, Cursor, Copilot; MCP server per bank
Hosted serviceMem0 Platform: Free (own LLM key after 30 days) and CustomNone; self-hosted team server via Docker ComposeHindsight Cloud: usage-based, free credits
Typical userAn app serving many end usersOne developer, or a small teamApps with many users, or one developer’s coding agents

How each one stores memory

Mem0 decides what to remember. Your code passes messages to add. An LLM reads them and writes short facts, each embedded and linked to the entities it mentions. Since Mem0’s April 2026 algorithm, extraction only adds; an older fact stays until you update or delete it, and retrieval is meant to rank the current one first. On search, Mem0 fuses semantic similarity, BM25 keywords and entity matches. You get back a handful of compact facts.

MemPalace remembers everything. Its README says it “does not summarize, extract, or paraphrase.” The mine command chunks project files or exported agent sessions into drawers, files them under a wing and room, and indexes them with a local embedding model. Search is hybrid too (BM25 plus vectors) and can be limited to one wing or room. You get back original passages, which the model then has to read.

The tradeoff is the classic one between extraction and retrieval over raw history, covered in RAG vs agent memory. Mem0’s facts are small and cheap to put in a prompt, but the LLM can drop or distort details. MemPalace never loses the original wording, but its results are longer, and contradictions stay in the text for the model to sort out.

Code: the same task in each

Mem0, with the open-source library (needs OPENAI_API_KEY by default):

1from mem0 import Memory
2
3memory = Memory()
4memory.add("We switched the API from REST to GraphQL to cut over-fetching.", user_id="dana")
5
6hits = memory.search("why did we switch to GraphQL?", filters={"user_id": "dana"}, top_k=5)
7for h in hits["results"]:
8    print(h["memory"], h["score"])

MemPalace, after indexing a project with mempalace mine ~/projects/myapp (no API key):

 1from mempalace.config import MempalaceConfig
 2from mempalace.searcher import search_memories
 3
 4results = search_memories(
 5    query="why did we switch to GraphQL?",
 6    palace_path=MempalaceConfig().palace_path,
 7    wing="myapp",
 8    n_results=5,
 9)
10for hit in results["results"]:
11    print(hit["similarity"], hit["source_file"], hit["text"][:80])

Mem0 prints one rewritten fact. MemPalace prints the passages where the decision was discussed, with the file each one came from.

Coding agents and local use

This is where MemPalace is strongest. It ships auto-save hooks for Claude Code, Codex CLI and Cursor that save sessions periodically and before context compaction, plus 45 MCP tools and a wake-up command that loads a short identity and project summary at the start of a session. Everything, including embeddings, runs on your machine.

Mem0 also targets coding agents, but through different means: installable agent skills for Claude Code, Codex, Cursor, Windsurf, OpenCode and OpenClaw, and a hosted MCP server at mcp.mem0.ai. That server runs on Mem0’s side, so memories leave your machine. You can run Mem0 fully locally with the library and a local LLM and embedder, but it takes configuration MemPalace doesn’t need. For the wider picture, see AI coding agent memory and how to give a local LLM memory.

Benchmarks: different metrics

Mem0MemPalaceHindsight
LongMemEval94.4 (answer accuracy)96.6% recall@5 raw; 98.4% hybrid, held-out 450 questions94.6 (answer accuracy)
LoCoMo92.5 (answer accuracy)88.9% recall@10 (hybrid v5)92 (answer accuracy)
BEAM 1M / 10M64.1 / 48.6Not reported73.9 / 64.1
OtherNot reportedConvoMem 92.9% avg recall; MemBench 80.3% R@5PersonaMem 32K 86.6; LifeBench EN 71.5

These two columns measure different things. Recall@5 asks whether the right session is among the top five search results. Answer accuracy asks whether a model, given the retrieved memory, produced the correct answer as graded by an LLM judge. Retrieval recall is the easier bar. MemPalace’s README says it “deliberately” does not include a side-by-side comparison against Mem0, Zep, Hindsight and others for this reason.

Two more facts about MemPalace’s numbers, both checked on 2026-11-14:

  • The headline is not a 100% score. The README says it does not headline 100%, because “the last 0.6% was reached by inspecting specific wrong answers.” Its held-out figure, 98.4%, is the one it calls the honest generalisable number.
  • The palace features scored lower. A user’s reproduction on an M2 Ultra Mac (GitHub issue #39, closed 2026-04-07) got the raw mode’s 96.6% recall@5 again. Room-based retrieval scored 89.4% and AAAK mode 84.2% on the same data. The top number came from plain ChromaDB search over verbatim text, not from the palace structure.

Mem0’s numbers come from its README and measure its managed Platform; the README says open-source users should expect “directionally similar gains but not identical numbers.” MemPalace’s come from its README. Hindsight’s come from its benchmark site, and Mem0’s Hindsight comparison lists the same LongMemEval, LoCoMo and BEAM scores. All three are self-reported; Hindsight’s README says research collaborators at Virginia Tech and The Washington Post reproduced its results. LLM memory evaluation explains how these benchmarks work and where they mislead.

Cost and hosting

Mem0 open source costs your LLM, embedder and vector store. Since 26 October 2026 the hosted Platform has a Free plan (10,000 adds and 1,000 retrievals a month for 30 days, then 50,000 and 10,000 with your own LLM key paying for extraction) and sales-led Custom plans, the only ones with graph memory (Mem0 pricing).

MemPalace has no paid service. It costs disk space (about 300 MB for the embedding model) and the machine it runs on. For shared use, the repo includes a Docker Compose team server and opt-in Qdrant, pgvector or Milvus backends, but multi-tenant hosting with per-user isolation and API keys is not its focus.

Where Hindsight fits

Hindsight is an extraction-based system like Mem0, with the coding-agent focus and local option that draw people to MemPalace. It’s the strongest of the three when:

  • You want answers, not passages, over long histories. It posts the best answer-accuracy scores here on LongMemEval (94.6) and BEAM (73.9 at 1M tokens, 64.1 at 10M, against Mem0’s 64.1 and 48.6). MemPalace reports retrieval recall, a different and easier metric.
  • Your coding agent should learn, not just search its past. Native plugins for Claude Code, Codex, Cursor and Copilot retain sessions; background consolidation turns them into observations (evidence-backed beliefs refined over time), and reflect reasons over the bank.
  • You want local but also multi-user. It runs fully local with Ollama, LM Studio or llama.cpp, and keeps strict per-bank isolation for apps with many users.
  • You want everything open. Graph, temporal recall, consolidation and mental models are all in the MIT release; Mem0 keeps graph and temporal features on its paid Platform.

Its limits for this reader: unlike MemPalace, it calls an LLM on every write and again for consolidation, so it costs more to run and needs a model, local or hosted. It doesn’t keep a verbatim archive as its main output. And it returns more context per retrieval than Mem0, about 4x by Mem0’s numbers (set max_tokens lower). More in Mem0 vs Hindsight.

Mem0, MemPalace or Hindsight: how to choose

If you…Pick
Build an app where each end user needs their own memoryMem0 or Hindsight
Want compact facts that are cheap to add to every promptMem0
Want a managed service with SOC 2 and an SLAMem0
Want your own Claude Code, Codex or Cursor history searchableMemPalace
Need everything local, with no API key or LLM callsMemPalace
Need the exact original wording, not a summaryMemPalace
Want a coding agent that builds lessons from past sessionsHindsight
Have long histories and need correct answers, not just retrieved passagesHindsight
Want graph, temporal recall and consolidation self-hosted, freeHindsight

They can also sit side by side: MemPalace as a personal archive of your coding sessions, Mem0 or Hindsight as the user memory inside the product you ship. Zep and Graphiti track how facts change over time. See Mem0 alternatives and the open-source memory systems comparison.