Mempalace

The best-benchmarked open-source AI memory system. And it's free.

Last verified:

Visit Mempalace

What is Mempalace?

MemPalace is a local-first AI memory system that stores conversation history as verbatim text and retrieves it using semantic search. Instead of summarizing or extracting facts like other memory tools, it preserves every word of your conversations and organizes them into a structured hierarchy inspired by the ancient memory palace mnemonic technique.

The system organizes information into wings (people or projects), halls (memory types like facts/events/preferences), rooms (specific topics), closets (compressed summaries), and drawers (original content). This spatial hierarchy allows AI agents to scope searches rather than querying a flat corpus, dramatically improving retrieval accuracy. The retrieval layer is pluggable with ChromaDB as the default backend, and alternative backends can be added without modifying the rest of the system.

MemPalace is built for AI developers, engineers, and anyone using AI agents who needs persistent long-term memory across sessions. It integrates with Claude Code, Gemini CLI, Cursor, and any MCP-compatible tool through 29 available MCP tools. The system includes a temporal entity-relationship knowledge graph with validity windows, auto-save hooks for Claude Code, and support for specialist agents with individual diaries.

Key features include 96.6% R@5 raw retrieval recall on LongMemEval (500 questions) with zero API calls, no cloud dependency, and completely free open-source licensing under MIT. The system requires Python 3.9+, uses ~300 MB disk for the embedding model, and preserves full conversational nuance that typically gets lost in summarization-based memory systems.

Mempalace pricing

Pricing model: Freemium

MemPalace is 100% free and open source under MIT license. No API key required, no cloud services, no subscription fees. The free tier gives you unlimited usage - all features are included. Competitors charge: Mem0 charges $19-$249/month, Zep charges $25/month, but both use AI to decide what to remember and lose information. MemPalace stores everything locally on your machine at zero cost. The only cost is your own hardware for running Python 3.9+ and ChromaDB.

Mempalace pros

  • 96.6% R@5 raw retrieval recall on LongMemEval benchmark
  • Zero API calls required - runs entirely locally
  • No cloud dependency or subscription fees
  • Verbatim storage preserves full conversation nuance
  • Structured palace hierarchy (wings→ halls→rooms→drawers) improves search accuracy by 34%
  • Pluggable backend architecture with ChromaDB default
  • MIT-licensed open source with 52.5k GitHub stars
  • 29 MCP tools for Claude Code, Gemini CLI, Cursor integration
  • Temporal knowledge graph with entity relationships and validity windows
  • Auto-save hooks prevent 30-day Claude Code session expiration
  • No telemetry - built for privacy-conscious users
  • Supports specialist agents with individual wings and diaries
  • Hybrid v4 achieves 98.4% recall on held-out questions without LLM
  • ≥99% recall with optional LLM rerank using any capable model
  • 170-token startup cost vs 2K-5K tokens for competitors
  • AES-256 encryption not needed since data stays local
  • Contradiction detection across facts in knowledge graph
  • Three mining modes: projects, conversations, and general classification
  • Reproducible benchmarks with full per-question result files
  • Works with Python 3.9+ and only requires ~300 MB disk space

Mempalace cons

  • Requires Python 3.9+ installation and setup knowledge
  • Installation tutorial can be complicated for Mac Agent integration
  • No built-in AES-256 encryption for data at rest
  • Lacks manual maintenance transparency compared to file-based Obsidian Vault
  • Memory structure is less human-readable than markdown files
  • 100% LongMemEval claim disputed due to post-hoc tuning on 3 missed questions
  • LoCoMo score inflated by using top_k=50 retrieval window larger than candidate pool
  • Focus shifted from Antigravity CLI to Gemini CLI causing tutorial confusion
  • No official Windows/macOS installer - command line setup required
  • Requires manual wiring of auto-save hooks for Claude Code sessions

Frequently asked questions about Mempalace

What is MemPalace?

MemPalace is an open-source AI agent long-term memory system created by Milla Jovovich. It organizes AI conversation memories into a spatial hierarchy (Wings → Halls → Rooms → Closets → Drawers), achieving 96.6% recall with only 170 tokens at startup. It runs entirely locally with zero API costs and stores every word verbatim instead of summarizing.

How does MemPalace compare to Mem0 and Zep?

MemPalace achieves higher recall (96.6% vs ~80-85%) with lower startup cost (170 tokens vs 2K-5K). It runs fully locally with no API dependency, while Mem0 and Zep require external services. MemPalace uses a spatial metaphor for organization making retrieval more intuitive. Mem0 charges $19-$249/month and Zep charges $25/month, while MemPalace is completely free.

What is the Memory Palace technique?

The Memory Palace, or Method of Loci, is a 2,500-year-old mnemonic technique where you mentally place items to remember in specific locations within an imagined building. By mentally walking through the building, you can recall items in order. It's used by memory champions worldwide. MemPalace applies this to AI by organizing conversations into wings, halls, rooms, and drawers.

Can I integrate MemPalace with any AI agent framework?

Yes. MemPalace is MIT-licensed and designed to integrate with any AI agent framework. Install via pip (pip install mempalace), initialize with a few lines of code, and your agent gets persistent long-term memory across conversations. It has 29 MCP tools specifically for Claude Code, Gemini CLI, Cursor, and other MCP-compatible tools.

How do I install MemPalace?

We recommend uv: run 'uv tool install mempalace' then 'mempalace init ~/projects/myapp'. If you prefer pip, 'pip install mempalace' still works. Requirements are Python 3.9+ and a vector-store backend (ChromaDB by default). For Claude Code integration, you need to wire auto-save hooks to prevent 30-day session expiration.

Does MemPalace send data to the cloud?

No. Nothing leaves your machine unless you opt in. MemPalace is local-first with zero telemetry. The system uses your local ChromaDB instance and SQLite for the knowledge graph. This is why it requires no API key and costs nothing - all processing happens on your hardware.

What benchmark scores does MemPalace achieve?

LongMemEval: 96.6% R@5 raw (no LLM), 98.4% hybrid v4 on held-out 450 questions, ≥99% with LLM rerank. LoCoMo: 60.3% R@10 session, 88.9% with hybrid v5. ConvoMem: 92.9% avg recall across 250 items. MemBench: 80.3% R@5 on 8,500 items. All numbers are reproducible from the GitHub repository with commands in benchmarks/BENCHMARKS.md.

How does MemPalace handle contradictions in memory?

MemPalace includes contradiction detection across facts in its temporal entity-relationship knowledge graph. The knowledge graph has validity windows that allow you to add, query, invalidate, and track timelines of entities. This is backed by local SQLite and helps the AI understand when information has been updated or superseded.

What are the auto-save hooks for Claude Code?

Two Claude Code hooks save periodically and before context compression to prevent the 30-day session expiration. The hooks are documented at mempalaceofficial.com/guide/hooks. For per-message recall on top of file-level chunks, run 'mempalace sweep <transcript-dir>' periodically - it stores one verbatim drawer per user/assistant message and is idempotent and resume-safe.

Is mempalaceofficial.com the official website?

Yes, mempalaceofficial.com is the official docs site along with the GitHub repository and PyPI package. Scam alert: Any other domain including mempalace.tech is an impostor that may distribute malware. The official sources are this GitHub repository, the PyPI package, and the docs site at mempalaceofficial.com.

Use cases

Browse all AI tools on NeedAnAI