MemPalace/mempalacePublic

The best-benchmarked open-source AI memory system. And it's free.

AI summary: A local-first AI memory system providing verbatim storage and semantic retrieval without relying on external API calls.

Stars
59.4K
+25 today
Forks
7.6K
Watchers
324
Open issues
358
Open PRs
413
Contributors
~160
Commits
2.1K
Branches
175

PythonMITCreated Apr 5, 2026Last push 1d agoLatest release v3.10.0+129 stars this week+571 this month

Quick answers

What is mempalace?
A local-first AI memory system providing verbatim storage and semantic retrieval without relying on external API calls.
What does mempalace do?
MemPalace functions as a local-first memory index specifically designed for AI agents that explicitly avoids summarizing or extracting data destructively. The software stores complete conversational histories as verbatim text locally, ensuring absolute privacy and highly precise recall. It intelligently retrieves historical context utilizing high-accuracy semantic search mechanisms structured around logical domains like specific projects, topics, and original content. This heavily structured local index actively prevents AI coding agents from losing crucial project context when short-term conversational memory windows inevitably expire.
Who is mempalace for?
Developers and AI engineers building autonomous agents requiring persistent, highly private conversational history. Users must be completely comfortable configuring local storage backends and Python execution environments.
How do I get started with mempalace?
https://github.com/MemPalace/mempalace
How popular is mempalace on GitHub?
MemPalace/mempalace has 59,402 stars and 7,561 forks on GitHub, and gained 129 stars in the last 7 days.
What license does mempalace use?
MemPalace/mempalace is released under the MIT license.

Star history

since Jul 28, 2026
020K40KJul 2026Aug 2026Sep 2026Oct 2026
59.4K stars as of Oct 4, 2026. Measured daily since Jul 28, 2026; GitHub no longer exposes earlier star timestamps.

Update history

1 recorded
  • Oct 4, 2026Previously tracked as milla-jovovich/mempalace; its 1 daily snapshot and 5 trending appearances were merged into this profile. Stars: 57,855 on 2026-07-29 under the old name, 59,402 on 2026-10-04 (+1,547).

Contribution activity

commits per day, last 52 weeks
OctNovDecJanFebMarAprMayJunJulAugSepMonWedFri2025-10-05: 0 commits2025-10-06: 0 commits2025-10-07: 0 commits2025-10-08: 0 commits2025-10-09: 0 commits2025-10-10: 0 commits2025-10-11: 0 commits2025-10-12: 0 commits2025-10-13: 0 commits2025-10-14: 0 commits2025-10-15: 0 commits2025-10-16: 0 commits2025-10-17: 0 commits2025-10-18: 0 commits2025-10-19: 0 commits2025-10-20: 0 commits2025-10-21: 0 commits2025-10-22: 0 commits2025-10-23: 0 commits2025-10-24: 0 commits2025-10-25: 0 commits2025-10-26: 0 commits2025-10-27: 0 commits2025-10-28: 0 commits2025-10-29: 0 commits2025-10-30: 0 commits2025-10-31: 0 commits2025-11-01: 0 commits2025-11-02: 0 commits2025-11-03: 0 commits2025-11-04: 0 commits2025-11-05: 0 commits2025-11-06: 0 commits2025-11-07: 0 commits2025-11-08: 0 commits2025-11-09: 0 commits2025-11-10: 0 commits2025-11-11: 0 commits2025-11-12: 0 commits2025-11-13: 0 commits2025-11-14: 0 commits2025-11-15: 0 commits2025-11-16: 0 commits2025-11-17: 0 commits2025-11-18: 0 commits2025-11-19: 0 commits2025-11-20: 0 commits2025-11-21: 0 commits2025-11-22: 0 commits2025-11-23: 0 commits2025-11-24: 0 commits2025-11-25: 0 commits2025-11-26: 0 commits2025-11-27: 0 commits2025-11-28: 0 commits2025-11-29: 0 commits2025-11-30: 0 commits2025-12-01: 0 commits2025-12-02: 0 commits2025-12-03: 0 commits2025-12-04: 0 commits2025-12-05: 0 commits2025-12-06: 0 commits2025-12-07: 0 commits2025-12-08: 0 commits2025-12-09: 0 commits2025-12-10: 0 commits2025-12-11: 0 commits2025-12-12: 0 commits2025-12-13: 0 commits2025-12-14: 0 commits2025-12-15: 0 commits2025-12-16: 0 commits2025-12-17: 0 commits2025-12-18: 0 commits2025-12-19: 0 commits2025-12-20: 0 commits2025-12-21: 0 commits2025-12-22: 0 commits2025-12-23: 0 commits2025-12-24: 0 commits2025-12-25: 0 commits2025-12-26: 0 commits2025-12-27: 0 commits2025-12-28: 0 commits2025-12-29: 0 commits2025-12-30: 0 commits2025-12-31: 0 commits2026-01-01: 0 commits2026-01-02: 0 commits2026-01-03: 0 commits2026-01-04: 0 commits2026-01-05: 0 commits2026-01-06: 0 commits2026-01-07: 0 commits2026-01-08: 0 commits2026-01-09: 0 commits2026-01-10: 0 commits2026-01-11: 0 commits2026-01-12: 0 commits2026-01-13: 0 commits2026-01-14: 0 commits2026-01-15: 0 commits2026-01-16: 0 commits2026-01-17: 0 commits2026-01-18: 0 commits2026-01-19: 0 commits2026-01-20: 0 commits2026-01-21: 0 commits2026-01-22: 0 commits2026-01-23: 0 commits2026-01-24: 0 commits2026-01-25: 0 commits2026-01-26: 0 commits2026-01-27: 0 commits2026-01-28: 0 commits2026-01-29: 0 commits2026-01-30: 0 commits2026-01-31: 0 commits2026-02-01: 0 commits2026-02-02: 0 commits2026-02-03: 0 commits2026-02-04: 0 commits2026-02-05: 0 commits2026-02-06: 0 commits2026-02-07: 0 commits2026-02-08: 0 commits2026-02-09: 0 commits2026-02-10: 0 commits2026-02-11: 0 commits2026-02-12: 0 commits2026-02-13: 0 commits2026-02-14: 0 commits2026-02-15: 0 commits2026-02-16: 0 commits2026-02-17: 0 commits2026-02-18: 0 commits2026-02-19: 0 commits2026-02-20: 0 commits2026-02-21: 0 commits2026-02-22: 0 commits2026-02-23: 0 commits2026-02-24: 0 commits2026-02-25: 0 commits2026-02-26: 0 commits2026-02-27: 0 commits2026-02-28: 0 commits2026-03-01: 0 commits2026-03-02: 0 commits2026-03-03: 0 commits2026-03-04: 0 commits2026-03-05: 0 commits2026-03-06: 0 commits2026-03-07: 0 commits2026-03-08: 0 commits2026-03-09: 0 commits2026-03-10: 0 commits2026-03-11: 0 commits2026-03-12: 0 commits2026-03-13: 0 commits2026-03-14: 0 commits2026-03-15: 0 commits2026-03-16: 0 commits2026-03-17: 0 commits2026-03-18: 0 commits2026-03-19: 0 commits2026-03-20: 0 commits2026-03-21: 0 commits2026-03-22: 0 commits2026-03-23: 0 commits2026-03-24: 0 commits2026-03-25: 0 commits2026-03-26: 0 commits2026-03-27: 0 commits2026-03-28: 0 commits2026-03-29: 0 commits2026-03-30: 0 commits2026-03-31: 0 commits2026-04-01: 0 commits2026-04-02: 0 commits2026-04-03: 0 commits2026-04-04: 3 commits2026-04-05: 3 commits2026-04-06: 1 commit2026-04-07: 43 commits2026-04-08: 55 commits2026-04-09: 28 commits2026-04-10: 16 commits2026-04-11: 13 commits2026-04-12: 40 commits2026-04-13: 55 commits2026-04-14: 23 commits2026-04-15: 26 commits2026-04-16: 28 commits2026-04-17: 15 commits2026-04-18: 40 commits2026-04-19: 10 commits2026-04-20: 0 commits2026-04-21: 3 commits2026-04-22: 7 commits2026-04-23: 13 commits2026-04-24: 47 commits2026-04-25: 12 commits2026-04-26: 18 commits2026-04-27: 17 commits2026-04-28: 7 commits2026-04-29: 6 commits2026-04-30: 12 commits2026-05-01: 7 commits2026-05-02: 18 commits2026-05-03: 11 commits2026-05-04: 2 commits2026-05-05: 4 commits2026-05-06: 18 commits2026-05-07: 15 commits2026-05-08: 15 commits2026-05-09: 18 commits2026-05-10: 18 commits2026-05-11: 19 commits2026-05-12: 13 commits2026-05-13: 2 commits2026-05-14: 8 commits2026-05-15: 6 commits2026-05-16: 3 commits2026-05-17: 8 commits2026-05-18: 10 commits2026-05-19: 4 commits2026-05-20: 13 commits2026-05-21: 4 commits2026-05-22: 11 commits2026-05-23: 1 commit2026-05-24: 13 commits2026-05-25: 5 commits2026-05-26: 1 commit2026-05-27: 7 commits2026-05-28: 0 commits2026-05-29: 2 commits2026-05-30: 4 commits2026-05-31: 1 commit2026-06-01: 5 commits2026-06-02: 6 commits2026-06-03: 4 commits2026-06-04: 1 commit2026-06-05: 11 commits2026-06-06: 16 commits2026-06-07: 4 commits2026-06-08: 12 commits2026-06-09: 0 commits2026-06-10: 5 commits2026-06-11: 9 commits2026-06-12: 8 commits2026-06-13: 2 commits2026-06-14: 16 commits2026-06-15: 6 commits2026-06-16: 0 commits2026-06-17: 0 commits2026-06-18: 11 commits2026-06-19: 12 commits2026-06-20: 12 commits2026-06-21: 7 commits2026-06-22: 9 commits2026-06-23: 2 commits2026-06-24: 2 commits2026-06-25: 1 commit2026-06-26: 6 commits2026-06-27: 0 commits2026-06-28: 10 commits2026-06-29: 15 commits2026-06-30: 5 commits2026-07-01: 4 commits2026-07-02: 27 commits2026-07-03: 4 commits2026-07-04: 2 commits2026-07-05: 4 commits2026-07-06: 6 commits2026-07-07: 9 commits2026-07-08: 3 commits2026-07-09: 1 commit2026-07-10: 2 commits2026-07-11: 1 commit2026-07-12: 1 commit2026-07-13: 1 commit2026-07-14: 14 commits2026-07-15: 5 commits2026-07-16: 2 commits2026-07-17: 2 commits2026-07-18: 0 commits2026-07-19: 0 commits2026-07-20: 3 commits2026-07-21: 1 commit2026-07-22: 1 commit2026-07-23: 2 commits2026-07-24: 0 commits2026-07-25: 0 commits2026-07-26: 1 commit2026-07-27: 1 commit2026-07-28: 11 commits2026-07-29: 4 commits2026-07-30: 2 commits2026-07-31: 2 commits2026-08-01: 2 commits2026-08-02: 9 commits2026-08-03: 4 commits2026-08-04: 1 commit2026-08-05: 6 commits2026-08-06: 7 commits2026-08-07: 4 commits2026-08-08: 16 commits2026-08-09: 6 commits2026-08-10: 6 commits2026-08-11: 12 commits2026-08-12: 2 commits2026-08-13: 2 commits2026-08-14: 0 commits2026-08-15: 1 commit2026-08-16: 4 commits2026-08-17: 1 commit2026-08-18: 4 commits2026-08-19: 15 commits2026-08-20: 14 commits2026-08-21: 2 commits2026-08-22: 1 commit2026-08-23: 6 commits2026-08-24: 8 commits2026-08-25: 6 commits2026-08-26: 1 commit2026-08-27: 5 commits2026-08-28: 20 commits2026-08-29: 4 commits2026-08-30: 0 commits2026-08-31: 4 commits2026-09-01: 9 commits2026-09-02: 0 commits2026-09-03: 0 commits2026-09-04: 1 commit2026-09-05: 1 commit2026-09-06: 0 commits2026-09-07: 7 commits2026-09-08: 2 commits2026-09-09: 1 commit2026-09-10: 0 commits2026-09-11: 5 commits2026-09-12: 24 commits2026-09-13: 19 commits2026-09-14: 0 commits2026-09-15: 15 commits2026-09-16: 3 commits2026-09-17: 0 commits2026-09-18: 2 commits2026-09-19: 0 commits2026-09-20: 1 commit2026-09-21: 0 commits2026-09-22: 7 commits2026-09-23: 0 commits2026-09-24: 3 commits2026-09-25: 0 commits2026-09-26: 0 commits2026-09-27: 0 commits2026-09-28: 0 commits2026-09-29: 7 commits2026-09-30: 0 commits2026-10-01: 0 commits2026-10-02: 0 commits2026-10-03: 0 commits
1,395 commits in the last yearLessMore

Signals and awards

derived from tracked data
  • Landmark project

    59,402 stars

  • Very active

    1,395 commits in 52 weeks

  • Community-driven

    ~160 contributors

  • Permissive license

    MIT

  • Repeat trending

    10 trending appearances

What mempalace does

MemPalace functions as a local-first memory index specifically designed for AI agents that explicitly avoids summarizing or extracting data destructively. The software stores complete conversational histories as verbatim text locally, ensuring absolute privacy and highly precise recall. It intelligently retrieves historical context utilizing high-accuracy semantic search mechanisms structured around logical domains like specific projects, topics, and original content. This heavily structured local index actively prevents AI coding agents from losing crucial project context when short-term conversational memory windows inevitably expire.

Developers and AI engineers building autonomous agents requiring persistent, highly private conversational history. Users must be completely comfortable configuring local storage backends and Python execution environments.

  • Verbatim storage: Retains exact conversation histories securely without destructive summarizing or AI-driven paraphrasing.
  • Semantic retrieval: Retrieves highly relevant historical context utilizing advanced, structured local vector searches.
  • Local execution: Processes data entirely on the host machine locally without relying on external third-party APIs.
  • Structured indexing: Organizes knowledge logically into strict hierarchical structures based on people, projects, and distinct topics.
  • Pluggable backend: Allows developers to configure custom storage backends programmatically to fit specific infrastructure requirements.

Where teams use it

Persistent AI context

Provide complex coding agents with persistent access to long-term project history after their initial session expires.

Private knowledge retention

Store highly sensitive conversational data locally without continuously transmitting it to external vector database providers.

Semantic querying

Search through massive conversational logs accurately based on meaning rather than relying on strict keyword matching.

Agent integration

Wire automated auto-save hooks into command-line agents directly to ensure uninterrupted knowledge persistence automatically.

Getting started: https://github.com/MemPalace/mempalace

README

develop branch
MemPalace

MemPalace

Local-first AI memory. Verbatim storage, pluggable backend, 96.6% R@5 raw on LongMemEval — zero API calls.

Caution

Beware of impostor sites. MemPalace has no other official websites. The only official sources are this GitHub repository, the PyPI package, and the docs at mempalaceofficial.com. Any other domain (including .tech, .net, or other .com variants) is an impostor and may distribute malware. Details and timeline: docs/HISTORY.md.

Important

Claude Code sessions expire in 30 days without auto-save hooks wired. Read this →

Need the shortest recovery/setup path? Use the Claude Code retention setup checklist.


What it is

MemPalace stores your conversation history as verbatim text and retrieves it with semantic search. It does not summarize, extract, or paraphrase. The index is structured — people and projects become wings, topics become rooms, and original content lives in drawers — so searches can be scoped rather than run against a flat corpus.

The retrieval layer is pluggable. The current default is ChromaDB; the interface is defined in mempalace/backends/base.py and alternative backends can be dropped in without touching the rest of the system.

Nothing leaves your machine unless you opt in.

Architecture, concepts, and mining flows: mempalaceofficial.com/concepts/the-palace.


Install

Agent-guided setup

Install the MemPalace skills first, then ask your coding agent to set up MemPalace. The setup skill detects your system, installs the Python package, configures MCP, and asks whether you want a private local palace, a shared-brain hub, or a client connected to an existing hub:

npx skills add MemPalace/mempalace

The repository exposes three skills: mempalace for guided installation and operations, mempalace-recall for search-before-answer recall, and mempalace-task for logstream delegation. Installing a skill does not by itself install the MemPalace CLI or MCP server; the setup skill guides the agent through those system changes and verifies the live connection.

During guided setup the agent can offer weekly stable-release checks. They are disabled by default, contact only PyPI when enabled, and never install updates automatically. Cached availability appears in scoped mempalace_status fields for the serving runtime and, when a local proxy is present, its client runtime, allowing the agent to explain the release and request authorization before showing an exact upgrade plan. Setup records whether the runtime came from uv tool, pipx, or pip so the plan never proposes an upgrade command for the wrong installation.

Direct CLI setup

MemPalace ships a CLI, so install it in an isolated environment to avoid PEP 668 errors on Debian/Ubuntu/Homebrew Pythons and to keep mempalace's deps (chromadb, numpy, grpcio, …) from conflicting with anything else in your global site-packages.

We recommend uv — uv tool install puts the mempalace CLI in an isolated environment on your PATH:

uv tool install mempalace
mempalace init ~/projects/myapp

pipx works the same way if you prefer it: pipx install mempalace.

Prefer plain pip only inside an activated virtualenv where you explicitly want import mempalace available:

python -m venv .venv && source .venv/bin/activate
pip install mempalace

Android / Termux

Native Termux installation is not currently supported because compiled dependencies such as ChromaDB and ONNX Runtime publish Linux wheels, not Android wheels. Android ARM64 users can run the regular Linux packages in an isolated Debian PRoot container instead. See the Termux installation guide for the tested setup and an argv-preserving launcher.

Docker

A container image is also available for running the MCP server or the CLI without a local Python toolchain. Multi-arch (amd64 + arm64), so it runs natively on Apple Silicon:

docker pull ghcr.io/mempalace/mempalace:latest

Everything persists under /data — palace, config, and the cached embedding model — so mount a volume there and reuse it across runs:

# MCP server over stdio — note the `-i` flag (JSON-RPC needs stdin)
docker run -i --rm -v mempalace-data:/data ghcr.io/mempalace/mempalace

# Run any CLI command instead. The container only sees what you mount, so
# mount the directory you want to mine — read-only is enough, mining never
# writes to the source.
docker run --rm -v mempalace-data:/data -v /path/to/project:/work:ro \
  ghcr.io/mempalace/mempalace mine /work
docker run --rm -v mempalace-data:/data ghcr.io/mempalace/mempalace search "why GraphQL"

The first command that needs embeddings downloads the model into /data (~80 MB for the default minilm, ~300 MB for embeddinggemma). It is a one-off as long as the volume persists, but it does mean the first call is slow and needs network — worth knowing before assuming a hung container.

Wire it into an MCP client (e.g. Claude Code) as a stdio server. Mount anything you want the server to be able to mine — it cannot reach your transcripts otherwise:

{
  "mcpServers": {
    "mempalace": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-v", "mempalace-data:/data",
        "-v", "/absolute/path/to/.claude/projects:/transcripts:ro",
        "ghcr.io/mempalace/mempalace"
      ]
    }
  }
}

Use a real absolute path there — ~ and $HOME are not expanded by every MCP client. Paths are container paths from then on: mine /transcripts, not ~/.claude/projects.

Mount permissions on Linux. The image runs as uid 1000 and bind mounts keep their host ownership, so a mounted directory has to be readable by that uid — an ordinary 0755 checkout is fine, a 0700 directory is not, and the failure surfaces as PermissionError: [Errno 13] rather than anything about Docker. Docker Desktop maps uids on macOS and Windows, so this only bites on Linux. Do not work around it with --user: /data is owned by uid 1000 inside the image, so another uid cannot write the palace at all.

docker compose run --rm mcp works too (see docker-compose.yml), and deploy/docker-compose.server.yml stands up the team server. To build the image yourself instead of pulling — required for the GPU variant, which is not published:

docker build -t mempalace .                                  # CPU
docker build --build-arg EXTRAS="extract,spellcheck" -t mempalace .
docker build -f Dockerfile.gpu -t mempalace:gpu .            # CUDA; run with --gpus all

The GPU image is x86_64-only: onnxruntime-gpu publishes no aarch64 Linux wheels, so that last build fails on an ARM host (including Apple Silicon) with a dependency-resolution error rather than an obvious one.

Note that a build from a clone uses whatever branch you checked out; develop is the default branch, so pull the published image if you want the released version.

Storage backends

ChromaDB is the default and needs no configuration. MemPalace also ships a pluggable backend contract, exercised across deliberately different substrates so the contract is never accidentally shaped around one vendor. Every non-default backend is opt-in.

Backend Mode Install Namespaces Lexical Configure with
chroma (default) Local (embedded) bundled – ✓ –
sqlite_exact Local (exact NumPy) bundled – ✓ –
rust_exact Local (native vectors) wheel / compiled – ✓ –
milvus Local (Lite) · Server opt-in mempalace[milvus] ✓ ✓ MEMPALACE_MILVUS_URI
qdrant Server (REST) bundled ✓ ✓ MEMPALACE_QDRANT_URL
pgvector Server (Postgres) mempalace[pgvector] ✓ ✓ MEMPALACE_PGVECTOR_DSN

Select with --backend <name>, MEMPALACE_BACKEND=<name>, or "backend": "<name>" in config.json. rust_exact uses the exact same sqlite_exact.sqlite3 file on disk as sqlite_exact with zero data migration. See native installation and vector CLI usage for the separately distributed wheel and executables.

Native vector search

rust_exact and the standalone mempalace-native CLI scan the same sqlite_exact database with a native Rust engine. The rust_exact adapter falls back to the Python backend for complex filters, requests for returned embeddings, and installs without the native extension; the mempalace-native executable is Rust-only and has no Python fallback. No benchmark figures are published for this release; mempalace-native bench --db <sqlite_exact.sqlite3> measures it on your own data. See crates/ for the core workspace, PyO3 bindings, and native CLI.

Quickstart

# Mine content into the palace
mempalace mine ~/projects/myapp                    # project files
mempalace mine ~/.claude/projects/ --mode convos   # Claude Code sessions (scope with --wing per project)

# Search
mempalace search "why did we switch to GraphQL"

# Load context for a new session
mempalace wake-up

# Score how well organized the palace is (read-only, safe while the MCP server runs)
mempalace audit

For Claude Code, Gemini CLI, Antigravity, MCP-compatible tools, and local models, see mempalaceofficial.com/guide/getting-started.


Benchmarks

All numbers below are reproducible from this repository with the commands in benchmarks/BENCHMARKS.md. Full per-question result files are committed under benchmarks/results_*.

LongMemEval — retrieval recall (R@5, 500 questions):

Mode R@5 LLM required
Raw (semantic search, no heuristics, no LLM) 96.6% None
Hybrid v4, held-out 450q (tuned on 50 dev, not seen during training) 98.4% None
Hybrid v4 + LLM rerank (full 500) ≥99% Any capable model

The raw 96.6% requires no API key, no cloud, and no LLM at any stage. The hybrid pipeline adds keyword boosting, temporal-proximity boosting, and preference-pattern extraction; the held-out 98.4% is the honest generalisable figure.

The rerank pipeline promotes the best candidate out of the top-20 retrieved sessions using an LLM reader. It works with any reasonably capable model — we have reproduced it with Claude Haiku, Claude Sonnet, and minimax-m2.7 via Ollama Cloud (no Anthropic dependency). The gap between raw and reranked is model-agnostic; we do not headline a "100%" number because the last 0.6% was reached by inspecting specific wrong answers, which benchmarks/BENCHMARKS.md flags as teaching to the test.

Other benchmarks (full results in benchmarks/BENCHMARKS.md):

Benchmark Metric Score Notes
LoCoMo (session, top-10, no rerank) R@10 60.3% 1,986 questions
LoCoMo (hybrid v5, top-10, no rerank) R@10 88.9% Same set
ConvoMem (all categories, 250 items) Avg recall 92.9% 50 per category
MemBench (ACL 2025, 8,500 items) R@5 80.3% All categories

We deliberately do not include a side-by-side comparison against Mem0, Mastra, Hindsight, Supermemory, or Zep. Those projects publish different metrics on different splits, and placing retrieval recall next to end-to-end QA accuracy is not an honest comparison. See each project's own research page for their published numbers.

Reproducing every result:

git clone https://github.com/MemPalace/mempalace.git
cd mempalace
uv sync --extra dev   # or: pip install -e ".[dev]"
# see benchmarks/README.md for dataset download commands
uv run python benchmarks/longmemeval_bench.py /path/to/longmemeval_s_cleaned.json

Knowledge graph

MemPalace includes a temporal entity-relationship graph with validity windows — add, query, invalidate, timeline — backed by local SQLite. Usage and tool reference: mempalaceofficial.com/concepts/knowledge-graph.

MCP server

45 MCP tools cover palace reads/writes, knowledge-graph operations, cross-wing navigation, drawer management, agent diaries, and agent coordination (logstream events + artifact handoffs). Installation and the full tool list: mempalaceofficial.com/reference/mcp-tools.

Agents

Each specialist agent gets its own wing and diary in the palace. Discoverable at runtime via mempalace_list_agents — no bloat in your system prompt: mempalaceofficial.com/concepts/agents.

Auto-save hooks

Auto-save hooks for Claude Code, Codex CLI, and Cursor IDE save periodically and before context compression:

If you are installing under time pressure, start with the Claude Code retention setup checklist: wire the hooks, back up existing JSONL transcripts, and backfill them with mempalace mine ~/.claude/projects/ --mode convos.

For per-message recall on top of the file-level chunks the hooks produce, run mempalace sweep <transcript-dir> periodically — it stores one verbatim drawer per user/assistant message, idempotent and resume-safe.


Requirements

  • Python 3.9+
  • A vector-store backend (ChromaDB by default)
  • ~300 MB disk for the embedding model. Onboarding (python -m mempalace.onboarding) offers embeddinggemma-300m (multilingual, 100+ languages, recommended) or all-MiniLM-L6-v2 (English-only, ~30 MB). See the docstring at mempalace/embedding.py for details and migration notes.
  • Optional — compute embeddings on a server instead of locally. Set embedding_model: "openai-compat" in ~/.mempalace/config.json together with embedding_api_url / embedding_api_model (and embedding_api_key if the server needs auth) to use any OpenAI-compatible /v1/embeddings endpoint — LM Studio, llama.cpp, vLLM, Ollama's OpenAI shim, or a self-hosted server (e.g. a larger multilingual or GPU-served embedder). Each key is overridable via the matching MEMPALACE_EMBEDDING_API_* env var. When the endpoint is on your machine or LAN, no content leaves your network. Switching to it requires mempalace repair rebuild-index (different vector space).

No API key is required for the core benchmark path.

Docs

Contributing

PRs welcome. See CONTRIBUTING.md.

License

MIT — see LICENSE.

View on GitHub

Recent activity

commits and pull requests

Releases and announcements

18 total
  1. v3.10.0 — lighter ways in for agentsv3.10.0Sep 16, 2026155 downloads

    Agents get lighter ways in: a 3-tool MCP server with Palace Query Language, shared-brain rules for `host:harness:project` identities, and optional native exact-vector search. New installs follow XDG, and storage fixes close a silent write-loss path, a macOS integrity refusal and several hangs. ### Upgrade notes - **`mempalace rules` no longer accepts `--agent`.** Pass `--host`, `--harness` and `--project`, then re-render any installed shared-brain block. (#2508) - **`get_collection()` refuses names MemPalace never reads.** Any name other than the configured drawers collection or `mempalace_closets` raises `CollectionNameMismatchError`; maintenance scripts can pass `_skip_name_check=True`. (#2446) - **The MCP event listing returns the newest events first when no cursor is given.** `mempalace_event_list` and `palace_coordinate` now default to newest-first unless `since_event_id` or `order` is passed; `mempalace logstream list` and `Logstream.list_events()` still default to oldest-first. (#2497) - **New installs keep config and palace under `~/.config/mempalace`** (or `$XDG_CONFIG_HOME/mempalace`). Existing `~/.mempalace` installs are unchanged. (#148) ### Performance & Architectur

  2. ## v3.9.0 — one hub for every agent One hub now serves every agent. CLI search reuses the live palace index instead of loading another multi-gigabyte HNSW copy, concurrent searches stop blocking each other, and skill-first coordination plus opt-in release awareness make shared-brain fleets easier to operate safely. ### Shared hub and search - **`mempalace search` reuses a healthy live Hub.** On the reported 4.99-million-vector palace, two direct CLI searches held about 18.6 GB of private RSS. Forwardable searches now reuse the Hub collection while preserving filters, ranking, output, authentication, configuration negotiation, and safe fallback behavior. (#2379) - **Hub reads run concurrently.** Searches no longer serialize behind one exclusive HTTP dispatch lock; reads share a writer-preferring lock while mutations remain exclusive. (#2398) - **Search results are clearer and faster to enrich.** Public similarity is the raw vector score, closet boost remains in effective ranking, source lookups are indexed, and duplicate enriched passages are removed. (#2399, #2143) - **A private-palace benchmark is included** for product search evaluation without exposing private queries or corp

  3. ## v3.8.0 — fast large palaces, lean MCP proxies, wakeable agents Large palaces get fast and stay small in 3.8.0. Chroma metadata tools no longer cold-load HNSW, `sqlite_exact` stops scanning and hydrating the whole palace for common reads, long-running Chroma servers stop rebuilding their client on their own writes, and proxied MCP sessions no longer import a storage stack they never use. Agents also gain a persistent `logstream watch` primitive so coordination can wake a harness instead of relying on repeated five-minute waits. ### Performance - **Chroma metadata reads skip the vector index.** On a 1.7 GB / 165k-drawer palace, wing-scoped `list_drawers(limit=20)` fell from **2.31 s and 1148 MB peak RSS to 0.01 s and 86 MB**. `list_drawers` and tunnel reads now query Chroma's SQLite metadata directly, push filters into SQL, and hydrate only the requested previews. (#2314) - **`sqlite_exact` common reads no longer walk the whole palace.** On a live 167k-drawer / 166k-closet palace, `mempalace_status` fell from **6997 ms to 1045 ms** and warm `mempalace_search` from **6364 ms to 210–1600 ms**. Vector ranking is batched and cached, top-k documents are hydrated afterward, equality

  4. ## v3.7.1 — mine completeness, reconnect integrity, clean shutdown Post-3.7.0 integrity patch: ingest no longer hangs on non-regular files, incomplete mines can be retried instead of permanently skipped, chromadb reconnect no longer rewinds the HNSW index, and MCP releases the writer lease on SIGTERM/SIGHUP. ### Bug Fixes - **Ingest commands no longer hang on a named pipe.** `os.walk` and `glob` list a FIFO as an ordinary filename and MemPalace decides what to read from the suffix, so a pipe called `notes.md` in a mined directory wedged `mine` in the kernel forever: opening a FIFO for reading waits for a writer that never arrives, and the `S_ISREG` refusal written on the next line could never run. `mine --mode convos`, `sweep`, `init`, `compress` and `split` blocked the same way through their own readers. The four affected opens now pass `O_NONBLOCK`, which makes the existing type check reachable — a pipe is refused on its mode, with or without a live writer — and the discovery walks drop non-regular entries with a `SKIP: <name> (not a regular file)` line, so the readers that use a plain `open()` never see one. Regular files read back byte-identical; the one case where the flag

  5. ## v3.7.0 — agent logstream, integrity spine, and pluggable embeddings The headline of this release is **agent logstream coordination**: an append-only, local-first event layer so agents on different machines can delegate work, wait for replies, exchange patches, and acknowledge handoffs through the MemPalace hub — without a human relaying messages. Everything else in 3.7.0 hardens long-lived palaces under multi-session load (single-writer ownership, safer repair/re-mine, MCP lifecycle) and expands embed/search options (OpenAI-compatible embeddings, search date windows) without changing the local-first default. ### Features - **Agent logstream coordination (RFC 003).** Append-only event layer for multi-agent work: durable task packets, wait/ack handoffs, patch and file artifacts, and live tailing over the MCP HTTP hub (`GET /logstream/stream` SSE). MCP tools include `mempalace_event_append` / `list` / `wait` / `ack`, artifact put/get, and patch submit; CLI `mempalace logstream` mirrors the core verbs. Events and artifacts stay local, verbatim, and separate from the drawer palace (`logstream.sqlite3`). Shared-brain / multi-machine agent fleets no longer need a human to relay stat

Code frequency

additions and deletions
+363.6K-363.6KWeek of 2026-03-29: +16,358 linesWeek of 2026-03-29: -200 linesWeek of 2026-04-05: +25,838 linesWeek of 2026-04-05: -2,503 linesWeek of 2026-04-12: +363,613 linesWeek of 2026-04-12: -6,223 linesWeek of 2026-04-19: +12,911 linesWeek of 2026-04-19: -903 linesWeek of 2026-04-26: +9,200 linesWeek of 2026-04-26: -1,105 linesWeek of 2026-05-03: +7,658 linesWeek of 2026-05-03: -1,162 linesWeek of 2026-05-10: +11,232 linesWeek of 2026-05-10: -1,170 linesWeek of 2026-05-17: +11,185 linesWeek of 2026-05-17: -1,036 linesWeek of 2026-05-24: +23,210 linesWeek of 2026-05-24: -1,138 linesWeek of 2026-05-31: +12,529 linesWeek of 2026-05-31: -498 linesWeek of 2026-06-07: +6,002 linesWeek of 2026-06-07: -568 linesWeek of 2026-06-14: +8,351 linesWeek of 2026-06-14: -1,092 linesWeek of 2026-06-21: +2,841 linesWeek of 2026-06-21: -663 linesWeek of 2026-06-28: +18,769 linesWeek of 2026-06-28: -842 linesWeek of 2026-07-05: +2,444 linesWeek of 2026-07-05: -364 linesWeek of 2026-07-12: +5,474 linesWeek of 2026-07-12: -331 linesWeek of 2026-07-19: +1,732 linesWeek of 2026-07-19: -144 linesWeek of 2026-07-26: +5,739 linesWeek of 2026-07-26: -443 linesWeek of 2026-08-02: +7,284 linesWeek of 2026-08-02: -2,400 linesWeek of 2026-08-09: +4,646 linesWeek of 2026-08-09: -421 linesWeek of 2026-08-16: +8,182 linesWeek of 2026-08-16: -826 linesWeek of 2026-08-23: +8,543 linesWeek of 2026-08-23: -657 linesWeek of 2026-08-30: +14,549 linesWeek of 2026-08-30: -731 linesWeek of 2026-09-06: +30,862 linesWeek of 2026-09-06: -24,705 linesWeek of 2026-09-13: +17,971 linesWeek of 2026-09-13: -3,170 linesWeek of 2026-09-20: +12,545 linesWeek of 2026-09-20: -681 linesWeek of 2026-09-27: +3,193 linesWeek of 2026-09-27: -281 linesMar 29, 2026Sep 27, 2026
+652.9K lines added, -54.3K removed over the last year.

Commits per week

last 52 weeks
2270Week of 2025-10-05: 0 commitsWeek of 2025-10-12: 0 commitsWeek of 2025-10-19: 0 commitsWeek of 2025-10-26: 0 commitsWeek of 2025-11-02: 0 commitsWeek of 2025-11-09: 0 commitsWeek of 2025-11-16: 0 commitsWeek of 2025-11-23: 0 commitsWeek of 2025-11-30: 0 commitsWeek of 2025-12-07: 0 commitsWeek of 2025-12-14: 0 commitsWeek of 2025-12-21: 0 commitsWeek of 2025-12-28: 0 commitsWeek of 2026-01-04: 0 commitsWeek of 2026-01-11: 0 commitsWeek of 2026-01-18: 0 commitsWeek of 2026-01-25: 0 commitsWeek of 2026-02-01: 0 commitsWeek of 2026-02-08: 0 commitsWeek of 2026-02-15: 0 commitsWeek of 2026-02-22: 0 commitsWeek of 2026-03-01: 0 commitsWeek of 2026-03-08: 0 commitsWeek of 2026-03-15: 0 commitsWeek of 2026-03-22: 0 commitsWeek of 2026-03-29: 3 commitsWeek of 2026-04-05: 159 commitsWeek of 2026-04-12: 227 commitsWeek of 2026-04-19: 92 commitsWeek of 2026-04-26: 85 commitsWeek of 2026-05-03: 83 commitsWeek of 2026-05-10: 69 commitsWeek of 2026-05-17: 51 commitsWeek of 2026-05-24: 32 commitsWeek of 2026-05-31: 44 commitsWeek of 2026-06-07: 40 commitsWeek of 2026-06-14: 57 commitsWeek of 2026-06-21: 27 commitsWeek of 2026-06-28: 67 commitsWeek of 2026-07-05: 26 commitsWeek of 2026-07-12: 25 commitsWeek of 2026-07-19: 7 commitsWeek of 2026-07-26: 23 commitsWeek of 2026-08-02: 47 commitsWeek of 2026-08-09: 29 commitsWeek of 2026-08-16: 41 commitsWeek of 2026-08-23: 50 commitsWeek of 2026-08-30: 15 commitsWeek of 2026-09-06: 39 commitsWeek of 2026-09-13: 39 commitsWeek of 2026-09-20: 11 commitsWeek of 2026-09-27: 7 commitsOct 5, 2025Sep 27, 2026
1.4K commits in the last 52 weeks.

When work happens

weekday and hour
SunMonTueWedThuFriSat036912151821Sun 0:00 — 8 commitsSun 1:00 — 19 commitsSun 2:00 — 5 commitsSun 3:00 — 3 commitsSun 4:00 — 4 commitsSun 5:00 — 8 commitsSun 6:00 — 4 commitsSun 7:00 — 5 commitsSun 8:00 — 2 commitsSun 9:00 — 3 commitsSun 10:00 — 7 commitsSun 11:00 — 8 commitsSun 12:00 — 13 commitsSun 13:00 — 15 commitsSun 14:00 — 11 commitsSun 15:00 — 9 commitsSun 16:00 — 9 commitsSun 17:00 — 10 commitsSun 18:00 — 12 commitsSun 19:00 — 7 commitsSun 20:00 — 13 commitsSun 21:00 — 12 commitsSun 22:00 — 17 commitsSun 23:00 — 10 commitsMon 0:00 — 8 commitsMon 1:00 — 15 commitsMon 2:00 — 16 commitsMon 3:00 — 13 commitsMon 4:00 — 8 commitsMon 5:00 — 9 commitsMon 6:00 — 3 commitsMon 7:00 — 11 commitsMon 8:00 — 5 commitsMon 9:00 — 5 commitsMon 10:00 — 13 commitsMon 11:00 — 1 commitsMon 12:00 — 6 commitsMon 13:00 — 9 commitsMon 14:00 — 5 commitsMon 15:00 — 7 commitsMon 16:00 — 7 commitsMon 17:00 — 11 commitsMon 18:00 — 7 commitsMon 19:00 — 8 commitsMon 20:00 — 9 commitsMon 21:00 — 15 commitsMon 22:00 — 5 commitsMon 23:00 — 2 commitsTue 0:00 — 3 commitsTue 1:00 — 3 commitsTue 2:00 — 2 commitsTue 3:00 — 4 commitsTue 4:00 — 4 commitsTue 5:00 — 10 commitsTue 6:00 — 1 commitsTue 7:00 — 8 commitsTue 8:00 — 9 commitsTue 9:00 — 10 commitsTue 10:00 — 3 commitsTue 11:00 — 16 commitsTue 12:00 — 11 commitsTue 13:00 — 10 commitsTue 14:00 — 11 commitsTue 15:00 — 9 commitsTue 16:00 — 8 commitsTue 17:00 — 24 commitsTue 18:00 — 13 commitsTue 19:00 — 16 commitsTue 20:00 — 4 commitsTue 21:00 — 20 commitsTue 22:00 — 6 commitsTue 23:00 — 5 commitsWed 0:00 — 10 commitsWed 1:00 — 10 commitsWed 2:00 — 5 commitsWed 3:00 — 6 commitsWed 4:00 — 6 commitsWed 5:00 — 3 commitsWed 6:00 — 3 commitsWed 7:00 — 3 commitsWed 8:00 — 5 commitsWed 9:00 — 4 commitsWed 10:00 — 4 commitsWed 11:00 — 7 commitsWed 12:00 — 8 commitsWed 13:00 — 5 commitsWed 14:00 — 6 commitsWed 15:00 — 13 commitsWed 16:00 — 11 commitsWed 17:00 — 11 commitsWed 18:00 — 18 commitsWed 19:00 — 15 commitsWed 20:00 — 16 commitsWed 21:00 — 8 commitsWed 22:00 — 5 commitsWed 23:00 — 9 commitsThu 0:00 — 8 commitsThu 1:00 — 13 commitsThu 2:00 — 7 commitsThu 3:00 — 5 commitsThu 4:00 — 7 commitsThu 5:00 — 4 commitsThu 6:00 — 7 commitsThu 7:00 — 5 commitsThu 8:00 — 9 commitsThu 9:00 — 13 commitsThu 10:00 — 10 commitsThu 11:00 — 7 commitsThu 12:00 — 14 commitsThu 13:00 — 8 commitsThu 14:00 — 7 commitsThu 15:00 — 5 commitsThu 16:00 — 17 commitsThu 17:00 — 5 commitsThu 18:00 — 3 commitsThu 19:00 — 9 commitsThu 20:00 — 6 commitsThu 21:00 — 7 commitsThu 22:00 — 10 commitsThu 23:00 — 11 commitsFri 0:00 — 13 commitsFri 1:00 — 9 commitsFri 2:00 — 5 commitsFri 3:00 — 9 commitsFri 4:00 — 3 commitsFri 5:00 — 6 commitsFri 6:00 — 4 commitsFri 7:00 — 13 commitsFri 8:00 — 13 commitsFri 9:00 — 8 commitsFri 10:00 — 8 commitsFri 11:00 — 9 commitsFri 12:00 — 5 commitsFri 13:00 — 8 commitsFri 14:00 — 13 commitsFri 15:00 — 6 commitsFri 16:00 — 5 commitsFri 17:00 — 5 commitsFri 18:00 — 4 commitsFri 19:00 — 20 commitsFri 20:00 — 6 commitsFri 21:00 — 9 commitsFri 22:00 — 7 commitsFri 23:00 — 15 commitsSat 0:00 — 12 commitsSat 1:00 — 7 commitsSat 2:00 — 3 commitsSat 3:00 — 6 commitsSat 4:00 — 8 commitsSat 5:00 — 3 commitsSat 6:00 — 1 commitsSat 7:00 — 5 commitsSat 8:00 — 2 commitsSat 9:00 — 7 commitsSat 10:00 — 10 commitsSat 11:00 — 10 commitsSat 12:00 — 11 commitsSat 13:00 — 6 commitsSat 14:00 — 8 commitsSat 15:00 — 3 commitsSat 16:00 — 6 commitsSat 17:00 — 7 commitsSat 18:00 — 18 commitsSat 19:00 — 10 commitsSat 20:00 — 9 commitsSat 21:00 — 13 commitsSat 22:00 — 18 commitsSat 23:00 — 11 commits
Commit volume by weekday and hour (UTC). Larger dots mean more commits.
DateListRankStars gained
Jun 6, 2026daily#24+48
Apr 15, 2026daily#25+98
Apr 14, 2026daily#20+110
Apr 13, 2026daily#15+171
Apr 12, 2026daily#7+473
Apr 11, 2026daily#10+451
Apr 10, 2026daily#2+858
Apr 9, 2026daily#1+1,318
Apr 8, 2026daily#1+1,705
Apr 7, 2026daily#1+2,231
  • public-apis/public-apis

    A collective list of free APIs

    486.1K stars · Python

  • openclaw/openclaw

    The AI that really does things. Any OS. Any Platform. The lobster way. 🦞

    391.3K stars · TypeScript

  • donnemartin/system-design-primer

    Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.

    373.2K stars · Python

  • obra/superpowers

    An agentic skills framework & software development methodology that works.

    295.2K stars · Shell

  • practical-tutorials/project-based-learning

    Curated list of project-based tutorials

    285.8K stars · Python

  • affaan-m/ECC

    The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

    272.8K stars · JavaScript