MemPalace is a local-first AI memory system that stores conversation history as verbatim text and retrieves it via semantic search without summarization or paraphrasing. It organizes content into a structured index: people and projects become wings, topics become rooms, and original content resides in drawers, enabling scoped searches. The retrieval layer is pluggable, defaulting to embedded ChromaDB with alternatives including sqlite_exact, rust_exact (native Rust engine using the same SQLite file), Milvus Lite, Qdrant, and pgvector, selectable via CLI flag, environment variable, or config.json. Installation uses uv tool, pipx, or pip in a virtualenv to avoid PEP 668 conflicts; a multi-arch Docker image (ghcr.io/mempalace/mempalace:latest) persists palace, config, and the ~80 MB MiniLM or ~300 MB embeddinggemma model under /data. The system exposes 47 MCP tools for palace reads/writes, a temporal entity-relationship graph with validity windows, agent wings/diaries, and logstream delegation. Benchmarks on LongMemEval (500 questions) show 96.6% R@5 raw retrieval with no LLM or API calls, 98.4% with hybrid v4 (keyword, temporal, and preference-pattern boosting) on a held-out set, and ≥99% with LLM reranking of top-20 candidates using models like Claude Haiku or minimax-m2.7 via Ollama. Additional results: LoCoMo 88.9% R@10 (hybrid v5), ConvoMem 92.9% average recall, MemBench 80.3% R@5. Auto-save hooks for Claude Code, Codex CLI, and Cursor IDE enable periodic persistence and pre-compaction snapshots; mempalace sweep adds per-message verbatim drawers. Embeddings can be offloaded to any OpenAI-compatible /v1/embeddings endpoint (LM Studio, vLLM, Ollama) via config, requiring index rebuild. Requires Python 3.10+; MIT licensed.

Read original