What is MemPalace?
The open-source AI agent memory system that achieves 96.6% recall with just 170 tokens at startup. Created by Milla Jovovich, loved by 19,500+ developers.
Overview
MemPalace is an open-source long-term memory system for AI agents, released on April 5, 2026 by Milla Jovovich. Built on the ancient Memory Palace metaphor (Method of Loci), it organizes AI conversation memories into a spatial hierarchy that's both intuitive and extraordinarily efficient.
In just 48 hours after its GitHub release, MemPalace garnered over 7,000 stars. As of April 2026, it has surpassed 19,500 stars, making it one of the fastest-growing AI infrastructure projects of the year.
Key Features
- 96.6% Recall Rate — LongMemEval R@5 benchmark without any API calls. With optional Haiku rerank, achieves 100%.
- 170-Token Startup — Minimal context window usage at initialization. Compare to 2K-5K tokens for competitors.
- Fully Local — Runs entirely on your machine. No API costs, no data leaves your environment.
- MIT Licensed — Free to use, modify, and distribute in any project, commercial or otherwise.
The Palace Architecture
MemPalace organizes memories into a five-level spatial hierarchy, inspired by the rooms and halls of a grand palace:
- Wings— Top-level categories (e.g., “Work Projects”, “Personal Research”)
- Halls — Thematic groups within a wing
- Rooms — Individual conversation contexts
- Closets — Clustered memory storage units
- Drawers — Individual memory entries with metadata
This hierarchy enables fast, targeted retrieval. Instead of scanning all memories, MemPalace navigates directly to the relevant wing, hall, and room, dramatically reducing token usage and latency.
How It Works
When your AI agent receives a new message, MemPalace:
- Identifies the relevant Wing and Hall based on conversation context
- Retrieves memories from the appropriate Room using semantic similarity
- Optionally reranks results using a lightweight model (Haiku) for maximum precision
- Returns the most relevant memories as context, using as few tokens as possible
Quick Start
pip install mempalace
from mempalace import Palace
palace = Palace()
palace.store("The user prefers dark mode interfaces")
palace.store("Previous project used React with TypeScript")
# Later, in a new conversation:
memories = palace.recall("What does the user prefer for UI?")
# Returns: ["The user prefers dark mode interfaces"]Why MemPalace Matters
Current AI agents forget everything between sessions. Each conversation starts from zero. MemPalace gives your agents persistent memory that compounds over time, making them genuinely useful assistants rather than stateless chatbots.
The combination of high recall, low token cost, and local operation makes MemPalace the first memory system practical enough for production AI agents at scale.
Who Created MemPalace?
MemPalace was created by Milla Jovovich, known primarily as the star of the Resident Evil film franchise. Her transition into AI development has been one of the most surprising stories in tech in 2026, demonstrating that domain expertise in human cognition and spatial thinking can produce breakthrough AI infrastructure.