MemPalace is a local-first memory system for AI agents. It stores conversation history and project files as verbatim text and retrieves them with semantic search, without summarizing, extracting, or paraphrasing. Nothing leaves the machine unless you opt in.
The index is structured as a palace: people and projects become wings, topics become rooms, and original content sits in drawers, so a search can be scoped instead of running against a flat corpus. A temporal knowledge graph stored in local SQLite records entity relationships with validity windows. Each specialist agent gets its own wing and diary, discoverable at runtime rather than listed in the system prompt.
Retrieval runs on a pluggable backend contract. Chroma is the default, and opt-in backends include exact local search in SQLite (with a native Rust engine), Milvus, Qdrant, and pgvector. Embeddings are computed locally with EmbeddingGemma or MiniLM, or on any OpenAI-compatible embeddings server such as LM Studio, llama.cpp, vLLM, or Ollama.
Agents reach the palace through an MCP server with 45 tools covering reads and writes, knowledge-graph operations, drawer management, agent diaries, and agent coordination, and through three bundled skills for guided setup, recall, and task delegation. Auto-save hooks for Claude Code, Codex CLI, and Cursor save sessions periodically and before context compression. It runs as a private local palace, a shared team hub, or a client connected to a hub.
Published retrieval results, reproducible from scripts in the repository:
| Benchmark | Metric | Score |
|---|---|---|
| LongMemEval, raw semantic search (no LLM) | R@5 | 96.6% |
| LongMemEval, hybrid v4, held-out 450 questions | R@5 | 98.4% |
| LongMemEval, hybrid v4 + LLM rerank | R@5 | ≥99% |
| LoCoMo, hybrid v5, top-10 | R@10 | 88.9% |
| ConvoMem, 250 items | Avg recall | 92.9% |
| MemBench, 8,500 items | R@5 | 80.3% |
Features
- Verbatim storage: keeps original text instead of summaries or extracted facts
- Palace structure: wings, rooms, and drawers let searches be scoped by person, project, or topic
- Pluggable backends: Chroma by default, with SQLite exact search, a native Rust engine, Milvus, Qdrant, and pgvector
- Knowledge graph: temporal entity-relationship graph with validity windows and timelines in local SQLite
- MCP server: 45 tools for palace operations, graph queries, agent diaries, and agent coordination
- Auto-save hooks: saves Claude Code, Codex CLI, and Cursor sessions periodically and before context compression
- Hybrid retrieval: keyword, temporal-proximity, and preference-pattern boosting, with optional LLM reranking
- Local or remote embeddings: EmbeddingGemma or MiniLM on-device, or any OpenAI-compatible embeddings endpoint
- Agent skills: guided setup, search-before-answer recall, and logstream task delegation
- Shared hub mode: a team server lets several clients share one palace






