Overview
MemPalace is an open-source, local-first memory system for AI agents and assistants. It stores your conversation history as verbatim text and retrieves it with semantic search — it deliberately does not summarise, extract or paraphrase, so nothing is lost to a lossy compression step before you ever search for it. Nothing leaves your machine unless you opt in, and the default retrieval path needs no API key and no LLM at any stage.
The index is structured rather than a flat corpus, using a memory-palace metaphor: people and projects become *wings*, topics become *rooms*, and the original content lives in *drawers*. That lets a search be scoped to a project or a person instead of running against everything you have ever said. On top of that, MemPalace ships a temporal entity-relationship knowledge graph with validity windows — add, query, invalidate, timeline — backed by local SQLite.
The retrieval layer is pluggable behind a documented backend contract. ChromaDB is the bundled default and needs no configuration; `sqlite_exact` is also bundled, and Milvus, Qdrant and pgvector are opt-in extras selected with `--backend`, an environment variable or `config.json`. MemPalace is distributed as a Python CLI (via `uv tool install` or `pipx`), as a multi-arch Docker image, and as an MCP server exposing 44 tools covering palace reads and writes, knowledge-graph operations, drawer management and agent coordination — so MCP clients such as Claude Code or Gemini CLI can use it directly.
What it does
- Verbatim storage: conversations are kept as written, with no summarisation or extraction step to lose detail
- Structured palace index — wings (people/projects), rooms (topics) and drawers (content) — so searches can be scoped instead of flat
- Local-first and offline by default: the raw semantic-search path requires no API key, no cloud and no LLM
- Pluggable retrieval backends behind one contract: ChromaDB (default) and sqlite_exact bundled, Milvus, Qdrant and pgvector opt-in
- Temporal entity-relationship knowledge graph with validity windows, backed by local SQLite
- MCP server with 44 tools, plus a CLI and a multi-arch (amd64 + arm64) Docker image
- Published, reproducible benchmarks — the repo commits per-question result files and the commands to re-run them
Getting started
MemPalace ships a CLI, so the project recommends installing it into an isolated environment — `uv tool install` puts the `mempalace` command on your PATH without colliding with your global site-packages (and avoids PEP 668 errors on Debian/Ubuntu/Homebrew Pythons).
Install the CLI and initialise a palace
uv is the recommended installer; pipx works the same way.
uv tool install mempalace
mempalace init ~/projects/myappMine content into the palace
Point it at project files, or at your agent transcripts to capture past sessions. Scope conversation mining per project with --wing.
mempalace mine ~/projects/myapp # project files
mempalace mine ~/.claude/projects/ --mode convos # Claude Code sessionsSearch and load context
Search runs against the verbatim store; wake-up loads relevant context for a new session.
mempalace search "why did we switch to GraphQL"
mempalace wake-upRun it as an MCP server instead
A multi-arch container image is published for running the MCP server or CLI without a local Python toolchain. Everything persists under /data, so mount a volume there and reuse it across runs. The -i flag matters: MCP over stdio needs stdin.
docker pull ghcr.io/mempalace/mempalace:latest
docker run -i --rm -v mempalace-data:/data ghcr.io/mempalace/mempalacePick a different storage backend (optional)
ChromaDB is the default and needs no configuration. Select another with --backend, MEMPALACE_BACKEND, or "backend" in config.json; Milvus and pgvector need their extra installed first.
mempalace search "graphql" --backend qdrantCommands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Give a coding agent persistent recall across sessions without shipping your transcripts to a third-party service
- Search months of past conversations for the exact wording of a decision, rather than a model's summary of it
- Keep memory scoped per project or per person so a query does not drag in unrelated context
- Wire memory into any MCP-compatible client (Claude Code, Gemini CLI and others) through the bundled MCP server
How MemPalace compares
MemPalace alongside other open-source agent memory tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| Claude-Mem | ★ 93.6k | Persistent memory layer for coding agents: it captures what an agent does during a session, compresses it into semantic summaries, and injects the relevant parts back into later sessions. |
| Mem0 | ★ 65.1k | A memory layer that you add to existing LLM agents to extract, store, and recall user facts and preferences across sessions using vector, graph, and key-value backends. |
| MemPalace | ★ 59k | Local-first agent memory that stores conversations verbatim and never summarises them |
| OpenViking | ★ 36.5k | A context database that stores an agent's memories, resources, and skills as one browsable viking:// filesystem with three-tier (abstract/overview/details) on-demand loading. |
| Graphiti | ★ 30.8k | A library that builds a temporal knowledge graph from an agent's conversations and data so facts can be tracked and queried as they change over time. |
| Cognee | ★ 30.6k | A graph-native memory engine that turns raw documents and conversations into a queryable knowledge graph for agents that need to build lasting knowledge. |
| Supermemory | ★ 29.6k | A memory and context engine that ingests information across tools and sessions and can run fully locally, acting as a second brain for AI applications. |
| agentmemory | ★ 28.3k | Local memory server for coding agents that captures tool use through lifecycle hooks, consolidates it into four memory tiers, and serves it back over MCP with hybrid BM25, vector, and knowledge-graph search. |