
MemPalace
Open-source, local-first AI memory system for LLM agents
In short
MemPalace provides a local-first memory layer for LLM agents that stores conversation history verbatim to prevent fidelity loss. It organizes data into a structured palace layout for scoped semantic search and integrates with MCP clients like Claude Code and Cursor. It is best for engineers building persistent-memory agents who require privacy and zero API costs.
Engineers and AI researchers building agents that need persistent, high-fidelity memory without cloud dependencies or per-token API costs, especially teams already using MCP-compatible clients like Claude Code, Cursor, or Codex CLI.
Non-technical users who want a plug-and-play hosted chat-memory service, or teams that need a managed cloud SLA rather than a self-hosted Python package.
MemPalace is an open-source, local-first memory layer for LLM agents that stores conversation history verbatim and retrieves it through semantic search. Instead of summarizing or paraphrasing (a common failure mode for chat-memory systems that quietly lose fidelity over time), it keeps original content intact and organizes it into a metaphorical palace: people and projects become 'wings', topics become 'rooms', and the raw text lives in 'drawers'. That structure lets retrieval be scoped to a wing or room rather than run against a flat corpus, which is how it reports 96.6% R@5 raw on LongMemEval with zero API calls. Everything runs on your own machine with ChromaDB as the default vector store, and pluggable backends cover SQLite, Milvus, Qdrant, and pgvector for teams that already have infrastructure. On top of storage it ships an MCP server exposing 36 tools for palace operations, temporal knowledge-graph management (entity-relationship edges with validity windows), and per-agent diaries, plus auto-save hooks for Claude Code, Codex CLI, and Cursor so context accumulates in the background as you work. Specialised subagents get their own isolated wing and diary, which keeps a coding assistant's memory from bleeding into a research agent's. Embeddings use either embedding-gemma-300m for multilingual work or all-MiniLM-L6-v2 for a lightweight English-only footprint, and no LLM is required for the retrieval path itself. Install is via `uv tool install mempalace` or `pipx install mempalace`, with Docker images for CPU and GPU. Target audience is engineers building persistent-memory agents, MCP tool developers, and privacy-conscious teams who want conversation memory without cloud dependencies or per-token bills.
The verbatim-plus-scoped-retrieval design is the right call — most 'AI memory' products quietly summarize your history into uselessness, and MemPalace refuses to. Combined with MCP support and real backend choice, it's the memory layer I'd reach for when building serious local agents. The install path assumes you're comfortable with uv/pipx or Docker, so it's a developer tool first.
— The AI Tool Bible editorial team
Pros
- ✅ Local-first: nothing leaves your machine unless you opt in, so no API bills or data-egress questions
- ✅ Verbatim storage avoids the fidelity loss common in summarization-based memory systems
- ✅ Structured wings/rooms/drawers layout enables scoped search rather than flat semantic lookup
- ✅ MCP server ships 36 tools and integrates with Claude Code, Codex CLI, and Cursor out of the box
- ✅ Pluggable vector backends (ChromaDB, SQLite, Milvus, Qdrant, pgvector) fit into most existing stacks
- ✅ Temporal knowledge graph with validity windows handles facts that change over time
- ✅ Strong reported benchmark: 96.6% R@5 raw on LongMemEval without any API calls
Cons
- ⚠️ Requires a local Python 3.9+ toolchain to install cleanly (Docker mitigates this but adds its own overhead)
- ⚠️ Verbatim-only storage means no automatic compaction; long-running palaces will grow on disk
- ⚠️ Self-hosted only — no managed cloud option for teams that don't want to run infrastructure
- ⚠️ Small project with a narrow contributor base; support is community-driven via GitHub issues
- ⚠️ Non-technical users will find the MCP/CLI-first UX unfamiliar compared to hosted chat memory products
Use cases
Frequently asked
- How does MemPalace store and retrieve conversation history?
- It stores conversation history verbatim rather than summarizing it, organizing content into a metaphorical palace with wings, rooms, and drawers. Retrieval uses semantic search scoped to specific wings or rooms, reporting 96.6% R@5 raw on LongMemEval with zero API calls.
- What infrastructure and backends does MemPalace support?
- MemPalace runs locally using ChromaDB as the default vector store. It also supports pluggable backends including SQLite, Milvus, Qdrant, and pgvector for teams with existing infrastructure. Installation is available via uv, pipx, or Docker images for CPU and GPU.
- Which development tools and agents does MemPalace integrate with?
- It ships an MCP server with 36 tools and includes auto-save hooks for Claude Code, Codex CLI, and Cursor. Specialized subagents can have isolated wings and diaries to prevent memory bleeding between different agent types.
- Is MemPalace suitable for non-technical users or teams needing managed cloud services?
- No, it is not for non-technical users seeking plug-and-play hosted services or teams requiring managed cloud SLAs. It is a self-hosted Python package that requires a local toolchain and is designed for engineers and privacy-conscious teams.
Explore related
Compare with similar tools
All in Agents →LangGraph
FeaturedStateful, graph-based agent orchestration from LangChain.
CrewAI
FeaturedPython framework for multi-agent orchestration.
Ernie Bot
Baidu's Mandarin-first ChatGPT rival, powered by the ERNIE model family
Moveworks
The enterprise AI assistant that searches, answers, and takes action across your business systems
AWS Bedrock
Build and scale generative AI applications with foundation models
Claude Agent SDK
Anthropic's official SDK for building autonomous Claude agents.