MemPalace: AI Memory That Never Forgets
Every conversation you have with an AI disappears the moment the session ends. Weeks of context, decisions, and preferences — gone. MemPalace, an open-source project launched today by Ben Sigman and actress-turned-technologist Milla Jovovich, aims to fix that by giving AI agents a structured, persistent memory that runs entirely on your local machine.
The Problem with AI Memory
Current AI assistants operate with amnesia. Each session starts from scratch unless you manually paste context back in. Some solutions exist — vector databases, summarization layers, cloud memory services — but they all share common weaknesses: they lose details through summarization, require cloud APIs, or treat memory as a flat searchable blob.
MemPalace takes a fundamentally different approach inspired by a technique that memory champions have used for millennia.
Method of Loci Meets Machine Learning
The Method of Loci (memory palace technique) dates back to ancient Greece. Orators would mentally walk through a familiar building, placing information in specific rooms to recall it later. MemPalace applies this same spatial metaphor to AI memory with a hierarchical structure:
- Wings — Top-level domains representing people, projects, or life areas
- Rooms — Specific topics within a wing (e.g., "authentication," "billing," "deployment")
- Halls — Types of memory connecting related rooms: facts, events, discoveries, preferences, advice
- Tunnels — Cross-references linking identical concepts across different wings
- Closets — Compressed summaries that point back to original content
- Drawers — Raw, verbatim data that is never summarized
This structure alone improves retrieval by 34% compared to flat search, tested across 22,000+ real conversation memories.
Benchmark Results That Broke Records
MemPalace achieved scores that no other memory system — free or paid — has matched:
- 96.6% recall on LongMemEval R@5 with zero API calls
- 100% recall when using Claude Haiku for reranking
- 100% on LoCoMo, including complex multi-hop and temporal reasoning
- 92.9% on ConvoMem
The improvement comes from structured navigation rather than brute-force search. Filtering by wing alone adds 12% accuracy. Adding room-level filtering pushes the gain to 34%.
AAAK: 30x Compression Without Losing a Single Detail
One of MemPalace's most innovative features is AAAK, a lossless shorthand dialect designed specifically for AI consumption. It compresses natural language by roughly 30x while preserving every detail.
A team description that takes approximately 1,000 tokens in English compresses to around 120 tokens in AAAK format. The key insight: AI models do not need human-readable prose to understand information. AAAK strips away grammatical overhead while keeping all semantic content intact.
Any text-reading LLM can interpret AAAK without fine-tuning or a special decoder.
Getting Started in Five Minutes
Installation is straightforward:
pip install mempalace
mempalace init ~/projects/myappMine your existing data:
mempalace mine ~/projects/myapp # code and docs
mempalace mine ~/chats/ --mode convos # conversation exports
mempalace search "authentication flow" # query your memoryFor Claude Code users, integration is a single command:
claude mcp add mempalace -- python -m mempalace.mcp_serverThis exposes 19 MCP tools for searching, navigating, and updating memories directly from your AI assistant.
Memory Layers: Load Only What You Need
MemPalace uses a tiered loading system to minimize token usage:
- L0 — Identity info, always loaded (around 50 tokens)
- L1 — Critical facts about team, projects, preferences in AAAK (around 120 tokens)
- L2 — Room recall for recent sessions, loaded on demand
- L3 — Deep semantic search across all closets, loaded on demand
The result is dramatic cost savings. Six months of daily AI use (19.5 million tokens of raw conversation) costs roughly $0.70 per year with MemPalace wake-up context, compared to over $500 per year using LLM-based summarization.
Local-First, Model-Agnostic
MemPalace runs entirely on your machine. No cloud APIs required. The knowledge graph uses SQLite — no Neo4j server, no cloud database. It works with Claude, GPT, Gemini, Llama, Mistral, and any other text-reading LLM.
For teams concerned about data privacy, this is significant. Your conversation history, project context, and personal preferences never leave your device.
Who Should Use MemPalace
- Developers using AI coding assistants who want persistent project context across sessions
- Researchers managing long-running investigations with complex, evolving knowledge
- Teams building AI agents that need domain expertise without bloated system prompts
- Anyone tired of re-explaining context to their AI assistant every session
The Bigger Picture
MemPalace represents a shift in how we think about AI memory. Instead of treating memory as a search problem (find the right chunk in a vector database), it treats memory as a navigation problem (walk to the right room in a structured building). The benchmark results suggest this architectural choice matters more than the underlying retrieval algorithm.
With MIT licensing, zero cloud dependencies, and support for every major LLM, MemPalace lowers the barrier to giving AI agents genuine long-term memory. Whether you are building autonomous agents or simply want your coding assistant to remember your preferences, this is worth exploring.
Check out the project on GitHub to get started.
Discuss Your Project with Us
We're here to help with your web development needs. Schedule a call to discuss your project and how we can assist you.
Let's find the best solutions for your needs.