How I Discovered MemPalace
I was scrolling through Instagram — as one does in the evening — and a video stopped me in my tracks. A woman was talking about a problem I knew all too well: AI forgets everything after each session.
That woman was Milla Jovovich. Yes, that Milla Jovovich — Leeloo from The Fifth Element, Alice from Resident Evil.
In her Instagram video, she explained how she began working intensively with AI systems in late 2025 — Claude, ChatGPT, Gemini — conducting thousands of conversations. Business decisions, creative work, contract analysis, debugging. And every time she started a new conversation, everything was gone.
Her description nailed it: “A brilliant assistant with permanent short-term memory loss.”
What Is MemPalace?
MemPalace is a free, open-source AI memory system that gives large language models persistent memory. It stores conversations completely and verbatim — not summarized, not filtered, not decided by an AI what matters.
The name comes from the ancient Method of Loci (memory palace technique), used by Greek orators to memorize speeches by mentally placing ideas in rooms of an imaginary building.
The Palace Architecture
MemPalace organizes information hierarchically — like a real building:
Containers for people or projects — the grand wings of the palace
Topics within a wing — e.g., "auth-migration" or "ci-pipeline"
Memory types: facts, events, discoveries, preferences, advice
Compressed summaries pointing to original content
Verbatim, never-summarized original files — the heart of the system
Cross-wing connections for the same topic across different contexts
Technical Stack
The project runs entirely locally — no cloud, no subscriptions, no API costs for core functionality:
- Python 3.9+ as the foundation
- ChromaDB for semantic vector search
- SQLite for the temporal knowledge graph
- MCP protocol with 19 tools for seamless AI integration
- MIT License — fully free to use
The Origin Story
Milla Jovovich begins intensive AI work. Thousands of conversations lost after each session. Existing solutions like Mem0 and Zep use AI to summarize — losing nuance in the process.
Jovovich and engineer Ben Sigman begin development using Claude Code. Core principle: store everything verbatim, never let AI filter it.
MemPalace is published under Jovovich's personal GitHub account as an MIT-licensed open-source project.
7,000+ GitHub stars. Ben Sigman's launch tweet reading "Multipass" (a nod to The Fifth Element) goes viral.
One of the fastest-growing GitHub repos of the month. Around 3,000 forks. Active community with daily contributions.
Growth doubles within 24 hours. Over 5,100 forks. All 10 of my original PRs approved by reviewers. That same morning, I submitted 5 additional PRs after a systematic security and code quality audit.
Four more fixes land on `develop` via maintainer rollups (#862–#866) — MCP stdout protection, ChromaDB empty-result guard, gitignore auto-registration, and CLI docs clarification.
PR #928 (case-insensitive language code resolution) merged after a collaborative review exchange — I conceded the alternative approach proposed by another contributor while leaving the decision to the maintainer. Merge landed 53 minutes later. Totals: 33 PRs submitted, 8 merged directly (#569, #609, #610, #862, #864, #865, #866, #928), 24 integrated via maintainer rollups on `develop`, 1 open (#926 — diary sha256 diff).
Benchmark Results and the Controversy
MemPalace claims top scores on the LongMemEval benchmark:
- 96.6% in raw mode (without external API calls)
- 100% in hybrid mode (with Haiku reranking)
Why I Contribute
After watching the Instagram video, I cloned the repository immediately. While reading through the code, I spotted several improvement opportunities — typical things that happen with a young project experiencing rapid growth:
- Missing type annotations in core modules
- Outdated version references in documentation
- A missing CHANGELOG
- Minor bugs in the compression logic and search configuration
The project fascinated me, so I decided to contribute: I opened pull requests.
My 47 Pull Requests
First Round: Code Quality and Documentation (April 10)
Updated CONTRIBUTING.md — added missing directories, aligned test commands, removed stale references
Updated AGENTS.md with complete module listing and corrected coverage thresholds
Updated stale v3.0.0 references to v3.1.0 in README
Added return type hints and docstrings for knowledge_graph.py
Created CHANGELOG.md with complete v3.0.0 and v3.1.0 history
WAL file rotation at 10 MB to prevent unbounded SQLite log file growth
Renamed parameter from "object" to "obj" to avoid Python builtin shadowing
Corrected registry key in spellcheck entity lookup
Aligned dictionary keys in cmd_compress with actual compression_stats() return values
Defaulted collection to cosine distance and clamped similarity scores to 0-1
Second Round: Security Audit and Bug Hunting (April 11)
After a systematic audit of the entire codebase — covering security, bugs, and code quality — I identified further improvements and submitted 5 additional PRs:
Fixed token count in compress command — always displayed "1t → 1t" because count_tokens() was called on a whitespace-free string
Replaced float equality for file modification times with epsilon comparison — prevents unnecessary re-mining of unchanged files
Corrected query_entity default direction from "outgoing" to "both" to match MCP documentation
Added threading lock for knowledge graph write operations — prevents data corruption from concurrent MCP tool calls
Removed dead code: duplicate cache variable declarations and a no-op exception handler
Intermediate Round: MCP Server, Mining, and Knowledge Graph (April 12-14)
After an audit follow-up I focused on the MCP server, the mining pipeline, and Knowledge Graph consistency. All 8 PRs were closed by the maintainer — some absorbed into later rollups (#862-#866), others in favor of alternative solutions. Listed for transparency:
Implemented `ping` method in the MCP server — needed for client health-checks that validate the handshake before sending tools.
Log warnings on silent exceptions in navigation tools — errors were being swallowed without a trace.
Typo fix in the entity_detector interactive classification prompt — affected the human review flow.
Extracted `tool_use` and `tool_result` blocks during Claude Code JSONL mining — those structures were lost on ingestion.
Skip `tool_result` messages when counting human exchanges in hooks — the counter inflated with tool turns that were not actual user turns.
Tech-term stopwords + sentence-start filter in entity_detector — reduces false positives like "Python" or "API" matching as named entities.
Prevent KG edge duplication with partial UNIQUE index + atomic upsert — avoids bloating the graph with duplicates on re-ingestion.
Skip `is_pet_of` triple when owner is absent in seed_from_entity_facts — orphan relations were being created before.
Third Round: MCP Stability and Project Hygiene (April 15)
After the maintainers rebased my earlier work onto develop, I filed four more fixes targeting real runtime issues reported in the tracker. All four were merged as part of rollup PRs (#862–#866):
Docs fix: clarified that `mempalace init` requires a `<dir>` argument — the CLI help was misleading new users
Redirected stdout to stderr during module import to protect the MCP JSON-RPC channel — prevents protocol corruption when clients pipe stdio
Guard against empty ChromaDB query results in the searcher — fixed an IndexError on cold-start palaces
Auto-add per-project MemPalace files to `.gitignore` when running inside a git repo — prevents palace data from being accidentally committed
Fourth Round: Internationalization and Collaborative Reviews (April 16)
Made language code resolution in `_resolve_language()` case-insensitive — fixes #927 where users with `LC_ALL=de_DE.UTF-8` hit lookup failures because the map only matched lowercase keys.
Diary module: detects same-length edits via sha256 hash — pure rewrites without length change previously slipped through, because the diff check was character-count based.
Fifth Round: Security Hardening and Encoding Robustness (April 2026)
Two security fixes merged directly; seven further fixes under review:
Restricted tunnels.json file permissions to 0o600 — prevents other local users from reading cross-wing connection data on shared machines.
Normalized MEMPALACE_PALACE_PATH env var with abspath + expanduser — closed a path traversal risk when the variable contained relative components or an unresolved tilde.
Validates ISO-8601 date formats at the MCP boundary before persisting to the knowledge graph — rejects malformed dates early instead of silently corrupting temporal queries.
Backfills NULL metadata on duplicate add_triple calls in the knowledge graph — prevents null pointer errors in graph traversal after re-ingestion of the same conversation.
Preserves blank lines and indentation in AI responses during convo_miner ingestion — structure that was stripped is now retained verbatim in Drawers.
Replaces non-ASCII symbols (✓ ✗ →) in main CLI output — fixes garbled characters on GBK/CP1252 terminal environments (#1034).
Handles UTF-8 BOM in transcript files during the normalize step — prevents a silent parse failure that produced empty Drawers on BOM-encoded Windows exports.
Same non-ASCII encoding fix applied to closet_llm progress output (#1034).
Enforces the 100ms startup injection budget in the benchmark test suite — catches regressions in MCP server cold-start latency before they reach users.
What Fascinates Me About MemPalace
Three things convinced me to actively contribute:
1. Local-First, No Dependencies
No cloud subscriptions, no API costs for core functionality. ChromaDB and SQLite run on your machine. Your data stays with you.
2. Verbatim, Not Summarized
Other systems like Mem0 or Zep let an AI decide what to keep. MemPalace stores everything verbatim in “Drawers.” Summaries exist as “Closets,” but the original is always preserved.
3. The Method of Loci as Software Architecture
The memory palace metaphor is not just marketing — it shapes the entire database structure. Wings, Rooms, Halls, Tunnels — the mental model works intuitively because it is based on a 2,500-year-old mnemonic technique.
Looking Ahead
I will continue watching this project and contributing regularly. MemPalace is one of the few open-source projects where a prominent name is not just marketing — Milla Jovovich personally contributed over 25 commits and co-designed the architectural concept.
The project doubled from 19,500 to over 40,500 stars within a single week — the demand for AI memory systems is clearly enormous. Whether the benchmark controversy will harm the project long-term or rather generate attention remains to be seen. The technical foundations are solid, the community is growing rapidly, and the problem — AI amnesia — is real and unsolved.
Multipass.