MemPalace - Milla Jovovich's AI Memory System
Milla Jovovich (the Resident Evil actress) built an open-source AI memory system together with developer Ben Sigman. It runs with zero LLM calls, no servers, and no API keys. This guide will show you how to install and use MemPalace.
What you'll learn
- What MemPalace is and why it differs from other AI memory systems
- How to install and run your first scan on a project or conversations
- The Wing, Room, Hall, Drawer hierarchy and how layered loading works
- How to connect MemPalace to Claude Code via MCP
- Tips for mining conversations from Claude Code, ChatGPT, and Slack
Contents
What is MemPalace
MemPalace is an open-source project built by Milla Jovovich (the actress from Resident Evil) and developer Ben Sigman. The project has earned over 7,000 stars on GitHub and achieved a perfect score in AI memory benchmarks.
The idea is based on the "memory palace" - an ancient Greek technique where you imagine a building with rooms, and each room contains different memories. MemPalace takes this concept and implements it digitally: every project is a Wing, every category is a Room, and every specific memory sits in a Drawer.
Why does this matter? Regular memory systems (mem0, Zep) send every query to an LLM, charge money, and require servers. MemPalace runs entirely locally, for free, with no external dependencies.
Why it's special
The core insight of MemPalace is that it does not use an LLM at all for the memory layer. Zero calls. Everything runs on regex and keyword matching.
- 900 tokens instead of 200,000: the memory layer loads only what is relevant, in a compact format
- Only two dependencies:
ChromaDBfor vector search andPyYAMLfor file format - No servers: everything runs locally on your machine. No cloud, no API keys, no cost
- Zero LLM calls: search, matching, and loading all happen without a language model. Pure regex
The result: instant response time, zero cost, and full privacy. Your memories stay on your machine and are never sent anywhere.
How to install
Installation is straightforward. You need Python 3.10 or higher.
Install:
pip install mempalaceInitialize a palace for your project:
mempalace init ~/projects/myappMine source code:
mempalace mine ~/projects/myappMine conversations:
mempalace mine ~/chats/ --mode convosSearch your memories:
mempalace search "why did we switch to GraphQL"The mine command scans files, extracts decisions, preferences, and milestones, and automatically organizes them into the palace structure.
How it works
MemPalace organizes memories in a 4-level hierarchy, like a real building:
Represents a whole project or topic. For example: "my app", "personal preferences".
A category within the wing. For example: "architecture", "debugging", "design decisions".
The type of memory. For example: "preferences", "milestones", "bugs and solutions".
A single memory item. For example: "we decided to switch to GraphQL because the REST API was too slow".
Layered loading: MemPalace does not load everything at once. There are 4 loading layers:
- L0 - Identity: ~100 tokens. Who you are, what the project is, basic preferences. Always loaded
- L1 - Core narrative: ~800 tokens. Key decisions, milestones, important context. Always loaded
- L2 - On demand: loaded only when the conversation touches a relevant topic
- L3 - Deep search: loaded only when asking a specific question. Vector search via ChromaDB
Tunnels - automatic connections: MemPalace creates tunnels between different wings. If a personal preference is relevant to a project, the tunnel connects them automatically. This way a memory from one wing can load when it is relevant to another.
MCP connection
MemPalace exposes 24 tools via MCP (Model Context Protocol). This means any AI tool that supports MCP can use the memory - Claude Code, ChatGPT, Cursor, and more.
Claude Code setup: add the following block to your MCP configuration:
{
"mcpServers": {
"mempalace": {
"command": "python3",
"args": ["-m", "mempalace.mcp_server"]
}
}
}After connecting, Claude will be able to search memories, save new ones, and check the palace status - all through dedicated tools.
Examples of exposed tools: search memory, add new memory, check status, update existing memory, manage tunnels between wings, and scan new conversations.
Usage tips
- 01
Mine Claude Code conversations. The files live at
~/.claude/history.jsonl. Runmempalace mine ~/.claude/ --mode convosto extract decisions, preferences, and insights from your sessions. - 02
Export ChatGPT conversations. Go to Settings > Data controls > Export data. You will get a ZIP with all conversations in JSON. Run
mempalace mine ~/Downloads/chatgpt-export/ --mode convos. - 03
Use general extraction. Beyond code and conversations, MemPalace can scan any kind of text - notes, documents, Slack exports. In general extraction it pulls out decisions, preferences, and milestones.
- 04
Check status regularly. Run
mempalace statusto see how many memories you have, how many wings, and where there are gaps. A tidy palace means better AI performance. - 05
Do not scan everything at once. Start with one project and your recent conversations. Let MemPalace build the palace gradually. That way you will understand the structure and be able to steer it.
Get started
Copy these commands to install and start:
# Install
pip install mempalace
# Init a palace for your project
mempalace init ~/projects/myapp
# Mine your codebase
mempalace mine ~/projects/myapp
# Mine your Claude Code conversations
mempalace mine ~/.claude/ --mode convos
# Search your memories
mempalace search "why did we switch to GraphQL"MCP configuration for Claude Code:
{
"mcpServers": {
"mempalace": {
"command": "python3",
"args": ["-m", "mempalace.mcp_server"]
}
}
}Want more guides like this?
All my guides on Claude Code, agents, and building SaaS with AI.
All guides