MemPalace/mempalace
Local-first RAG memory for retrieving verbatim project and conversation history
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
MemPalace is a Python 3.10+ memory and retrieval layer for project files and conversation transcripts. Its mining pipeline indexes verbatim content rather than replacing it with generated summaries. Wings group projects or people, rooms organize topics, and drawers hold source content. The hierarchy lets agents narrow a query to relevant material instead of searching an undifferentiated corpus.
The storage contract in mempalace/backends/base.py separates mining and retrieval from the vector store. ChromaDB is the embedded default. sqlite_exact performs exact vector search with NumPy; rust_exact opens the same SQLite file and falls back to Python for cases such as complex filters. The Rust workspace contains a core crate, PyO3 bindings, and a native CLI. A separate SQLite graph stores temporal entity relationships, while agents access palace operations through the CLI or MCP over stdio.
Key Capabilities & Differentiators
Use mempalace mine to index project files or --mode convos to ingest conversation history, then use search for targeted retrieval or wake-up to load context into a new session. Auto-save hooks cover Claude Code, Codex CLI, and Cursor; sweep provides resumable, idempotent per-message indexing. The broader MCP surface covers reads and writes, graph operations, agent diaries, logstream events, and artifact handoffs. Embedding options include multilingual EmbeddingGemma, English MiniLM, opt-in EmbeddingGemma 2 with image, audio, and video search, and OpenAI-compatible embedding endpoints.
On LongMemEval, raw semantic retrieval reaches 96.6% R@5 across 500 questions without an LLM. Hybrid v4 adds keyword and temporal boosts plus preference-pattern extraction, reaching 98.4% R@5 on 450 held-out questions after tuning on 50 development questions. The ≥99% result uses LLM reranking on the full 500. That result has a different evaluation split and runtime requirement; none of these retrieval scores measures generated-answer accuracy.
Trade-offs & Limitations
Compared with building directly on a vector database, MemPalace supplies conversation ingestion, project scoping, and agent-facing interfaces out of the box, but also brings its own hierarchy and ingestion lifecycle. Against Mem0, Hindsight, or Zep, the useful comparison is whether agents recover the original passages they need, how well results are scoped, and what it takes to operate the integrations. The published benchmark figures do not establish a head-to-head ranking.
Embedded ChromaDB avoids a separate database service; opting into Milvus, Qdrant, or pgvector brings namespace support and more infrastructure to operate. Benchmark an exact-search backend at your expected corpus size rather than assuming native code guarantees lower latency. Local embeddings keep the core path independent of an API, but retaining verbatim data makes the palace and its backups sensitive. Model changes require re-embedding, and session retention still depends on configuring hooks or ingesting transcripts before they expire.
Hardware & Deployment Guide
For a workstation, install the Python CLI in an isolated environment with uv tool install mempalace or pipx install mempalace, then initialize and mine the source paths. The amd64 and arm64 Docker image persists the palace, configuration, and model cache under /data. Run the Compose MCP service interactively with docker compose run --rm mcp, not as a detached HTTP service: JSON-RPC travels over stdin and stdout without a TTY. The first embedding operation needs network access to fetch weights if they are not cached; subsequent local embedding does not require an API key.
For shared use, deploy/docker-compose.server.yml provides a team-server deployment; an OpenAI-compatible embedder can also run on the host or LAN. The GPU image must be built locally. Version 3.10 introduced a three-tool MCP option and optional native exact search; 3.11 added guided audit and repair and records which embedding model built each palace. Version 3.12 improves source text and byte preservation and recovery from interrupted re-mining. Check the existing palace's model and plan any necessary index rebuild before switching.
Developers and teams that want coding agents to recall prior decisions and conversations from verbatim sources through MCP, with local embeddings and a choice of storage backends.
You need a managed memory service, cannot retain raw transcripts, or primarily want generated summaries rather than retrievable source passages.
Quick Start & Installation
npx skills add MemPalace/mempalaceComparison vs. Top RAG, Data & Memory Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| mempalace ★ | 60.8k | +120 | Python | MIT | Local-first RAG memory for retrieving verbatim project and conversation history |
| Scrapling | 107.9k | +1.8k | Python | BSD-3-Clause | Python HTTP and browser crawlers that turn websites into RAG-ready Markdown |
| mem0 | 70k | +498 | Python | Apache-2.0 | A vector-backed memory layer for AI agents that need to recall past conversation |
| hindsight | 64.7k | +884 | Python | MIT | A bank-based memory service that turns agent interactions into durable knowledge |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/MemPalace/mempalace.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about mempalace
How do I connect a coding agent to a containerized palace?
docker run -i, do not allocate a TTY, and persist /data in a named volume. If the container needs to mine host transcripts, bind-mount only the required directories read-only using absolute host paths, then use the container paths in mining commands. On Linux, UID 1000 must be able to read those mounts.Do I need a GPU, and how should I size the host?
Can we self-host it commercially and keep sensitive data in-house?
How should we compare it with other agent-memory systems?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy