Skip to main content
📖 The AI Tool Bible
MemPalace preview image
MemPalace logo

MemPalace

Open-source, local-first AI memory system for LLM agents

Free· Free and open-source under the MIT license. No paid tiers; self-hosted with zero API costs once installed.AgentsEmbedding backends: embedding-gemma-300m (multilingual) or all-MiniLM-L6-v2 (English). No LLM required for retrieval.
Visit website →

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.

Best for

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.

Skip if

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.

Editor's take

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

Persistent memory for Claude Code and Cursor sessionsPer-agent memory isolation in multi-agent systemsMCP-exposed knowledge store for custom LLM toolsLocal RAG over long conversation historiesTemporal knowledge graph for entity-relationship trackingPrivacy-sensitive conversation logging without cloud APIsCodex CLI auto-save memory hooksResearch assistant diaries with scoped retrieval

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
LA

LangGraph

Featured
Agents · BYO (Claude / GPT / open)
8.8

Stateful, graph-based agent orchestration from LangChain.

Freemium· Developer: $0 / seat · Plus: $39 / seat · Enterprise: Custom pricingstateful agentshuman-in-loop
CR

CrewAI

Featured
Agents · BYO (Claude / GPT / open)
8.4

Python framework for multi-agent orchestration.

Freemium· Basic: Free · Enterprise: Custommulti-agentorchestration
EB

Ernie Bot

Agents · Baidu ERNIE 4.0 / ERNIE X1 / ERNIE Turbo (in-house)
8.7

Baidu's Mandarin-first ChatGPT rival, powered by the ERNIE model family

Freemium· Free tier for Ernie 3.5 access; Ernie 4.0 and premium features require a paid subscription (approximately CNY 59.9/month for individual plans); enterprise API pricing via Baidu AI Cloud Qianfan platform is metered per 1K tokens.Mandarin content writing and marketing copyChinese-language document Q&A and summarisation
MO

Moveworks

Agents · Orchestrates multiple enterprise-ready LLMs (undisclosed mix, historically including OpenAI GPT and in-house models via its Reasoning Engine)
8.7

The enterprise AI assistant that searches, answers, and takes action across your business systems

Enterprise· Enterprise-only pricing; no public tiers. Quoted per organization based on employee count, integrations, and agent scope. Contact sales for a quote.IT service desk ticket deflectionHR policy Q&A and self-service
AB

AWS Bedrock

Agents · Multi-model: Anthropic Claude, Meta Llama, Mistral, Cohere, AI21, Amazon Nova/Titan, DeepSeek, Stability, OpenAI GPT
8.6

Build and scale generative AI applications with foundation models

Paid· Standard: Contact sales · Flex: Contact sales · Priority: Contact sales · Reserved: Contact salesEnterprise RAG chatbot over private documentsMulti-step tool-using agents via AgentCore
CA

Claude Agent SDK

Agents · Claude Opus / Sonnet
8.6

Anthropic's official SDK for building autonomous Claude agents.

Free· Free SDK; API usage billed at Claude ratesClaude agentstool use