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. Facts below come from each project’s README, docs and PyPI page, checked on 11 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. Our MemPalace guide covers its wings, rooms and drawers and the story behind it.
Mem0 vs MemPalace at a glance
| Mem0 | MemPalace | |
|---|---|---|
| License | Apache 2.0 | MIT |
| What gets stored | Short facts extracted by an LLM | Original text chunks (“drawers”), unchanged |
| LLM on write | Yes, one extraction pass per add | No |
| Default models | OpenAI gpt-5-mini + text-embedding-3-small | Local embeddinggemma-300m or all-MiniLM-L6-v2 |
| Default store | Qdrant on disk (library); Postgres + pgvector (server) | ChromaDB, local |
| Scoping | user_id, agent_id, run_id | Wing (project or person), room (topic) |
| Changed facts | New fact added next to old one; you call update or delete | Both versions kept; optional temporal knowledge graph with validity dates |
| Coding agent support | Agent skills for Claude Code, Codex, Cursor and others; hosted MCP server | Auto-save hooks for Claude Code, Codex CLI, Cursor; 45 MCP tools |
| Hosted service | Mem0 Platform: free, $19/mo, $249/mo, Enterprise | None; self-hosted team server via Docker Compose |
| Typical user | An app serving many end users | One developer, or a small team |
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
| Mem0 | MemPalace | |
|---|---|---|
| LongMemEval | 94.4 (answer accuracy) | 96.6% recall@5 raw; 98.4% hybrid, held-out 450 questions |
| LoCoMo | 92.5 (answer accuracy) | 88.9% recall@10 (hybrid v5) |
| BEAM 1M / 10M | 64.1 / 48.6 | Not reported |
| Other | Not reported | ConvoMem 92.9% avg recall; MemBench 80.3% R@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.
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. Both are self-reported. 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. The hosted Platform has a free Hobby tier (10,000 adds and 1,000 retrievals a month), Starter at $19/month (50,000 adds, 5,000 retrievals), Pro at $249/month with graph memory, and Enterprise (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.
Mem0 or MemPalace: how to choose
| If you… | Pick |
|---|---|
| Build an app where each end user needs their own memory | Mem0 |
| Want compact facts that are cheap to add to every prompt | Mem0 |
| Want a managed service with SOC 2 and an SLA | Mem0 |
| Want your own Claude Code, Codex or Cursor history searchable | MemPalace |
| Need everything local, with no API key or LLM calls | MemPalace |
| Need the exact original wording, not a summary | MemPalace |
They can also sit side by side: MemPalace as a personal archive of your coding sessions, Mem0 as the user memory inside the product you ship. Other options sit between the two. Hindsight is an MIT-licensed memory server that extracts facts and entities, keeps time-aware recall, and has a reflect call that reasons over stored memories; Zep and Graphiti track how facts change over time. See Mem0 alternatives and the open-source memory systems comparison.