2026-05-09 10:52:25 -05:00
# MemPalace — local fork
2026-04-04 18:16:04 -07:00
2026-04-14 21:37:20 -03:00
Local-first AI memory. Verbatim storage, pluggable backend, 96.6% R@5 raw on LongMemEval — zero API calls.
2026-04-04 18:16:04 -07:00
2026-05-09 10:52:25 -05:00
This is a personal fork configured for **server-mode deployment ** — MemPalace runs as a Docker container (typically on Unraid) and multiple AI tools (Claude Code, Codex, Antigravity) connect to a single shared palace from any machine on the network.
2026-04-04 18:16:04 -07:00
2026-05-09 10:52:25 -05:00
The upstream project lives at <https://github.com/MemPalace/mempalace>; refer there for benchmark methodology, contribution guidelines, project history, and the public docs site at <https://mempalaceofficial.com>.
2026-04-04 18:16:04 -07:00
---
2026-04-14 21:37:20 -03:00
## What it is
2026-04-11 14:25:16 +10:00
2026-04-14 21:37:20 -03:00
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.
2026-04-11 14:25:16 +10:00
2026-04-14 21:37:20 -03:00
The retrieval layer is pluggable. The current default is ChromaDB; the
interface is defined in [`mempalace/backends/base.py` ](mempalace/backends/base.py )
and alternative backends can be dropped in without touching the rest of
the system.
2026-04-11 14:25:16 +10:00
2026-04-14 21:37:20 -03:00
Nothing leaves your machine unless you opt in.
2026-04-11 14:25:16 +10:00
2026-04-14 21:37:20 -03:00
Architecture, concepts, and mining flows:
[mempalaceofficial.com/concepts/the-palace ](https://mempalaceofficial.com/concepts/the-palace.html ).
2026-04-11 14:25:16 +10:00
---
2026-04-14 21:37:20 -03:00
## Install
2026-04-04 18:16:04 -07:00
2026-05-08 01:37:46 -03:00
We recommend [`uv` ](https://docs.astral.sh/uv/ ) — `uv tool install` puts
the `mempalace` CLI in an isolated environment on your PATH:
2026-04-04 18:16:04 -07:00
``` bash
2026-05-08 01:37:46 -03:00
uv tool install mempalace
2026-04-04 18:16:04 -07:00
mempalace init ~/projects/myapp
```
2026-05-08 01:37:46 -03:00
If you prefer pip, `pip install mempalace` still works.
2026-04-14 21:37:20 -03:00
## Quickstart
2026-04-04 18:16:04 -07:00
``` bash
2026-04-14 21:37:20 -03:00
# Mine content into the palace
mempalace mine ~/projects/myapp # project files
2026-04-18 11:41:08 -07:00
mempalace mine ~/.claude/projects/ --mode convos # Claude Code sessions (scope with --wing per project)
2026-04-13 17:11:11 -07:00
2026-04-14 21:37:20 -03:00
# Search
mempalace search "why did we switch to GraphQL"
2026-04-04 18:16:04 -07:00
2026-04-14 21:37:20 -03:00
# Load context for a new session
mempalace wake-up
2026-04-04 18:16:04 -07:00
```
2026-04-14 21:37:20 -03:00
For Claude Code, Gemini CLI, MCP-compatible tools, and local models, see
[mempalaceofficial.com/guide/getting-started ](https://mempalaceofficial.com/guide/getting-started.html ).
2026-04-08 20:40:03 +03:00
2026-05-09 10:52:25 -05:00
Benchmark methodology and per-question result files live in the upstream repository — this fork has had the `benchmarks/` directory removed since it isn't needed for deployment.
2026-04-04 18:16:04 -07:00
2026-05-09 10:52:25 -05:00
---
2026-04-04 18:16:04 -07:00
2026-05-09 10:52:25 -05:00
## Server mode (Unraid / shared across machines)
2026-04-04 18:16:04 -07:00
2026-05-09 10:52:25 -05:00
Most users run MemPalace locally on a single machine. If you work
across multiple machines and want one shared memory, you can deploy it
as a Docker container — typically on a home NAS like Unraid — and
point Claude Code, Codex, Antigravity, or any MCP client on each
machine at the same palace.
2026-04-04 18:16:04 -07:00
2026-05-09 10:52:25 -05:00
The `deploy/unraid/` directory ships a complete two-container stack:
2026-04-04 18:16:04 -07:00
2026-05-09 10:52:25 -05:00
* `mempalace` runs the existing MCP-over-SSE endpoint plus a small
HTTP transcript-ingest endpoint, both in a single process so there's
exactly one ChromaDB writer.
* `caddy` sidecar terminates TLS, enforces a bearer-token check on
every request, and reverse-proxies `/sse` and `/ingest` .
2026-04-04 18:16:04 -07:00
2026-05-09 10:52:25 -05:00
Auto-save hooks have remote-aware variants
(`hooks/mempal_save_hook_remote.sh` ,
`hooks/mempal_precompact_hook_remote.sh` ) that POST transcripts to the
server instead of running `mempalace mine` locally.
2026-04-04 18:16:04 -07:00
2026-05-09 10:52:25 -05:00
Full install, client config, hook setup, and troubleshooting:
[`deploy/unraid/README.md` ](deploy/unraid/README.md ).
2026-04-04 18:16:04 -07:00
2026-04-14 21:37:20 -03:00
## Knowledge graph
2026-04-04 18:16:04 -07:00
2026-04-14 21:37:20 -03:00
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 ](https://mempalaceofficial.com/concepts/knowledge-graph.html ).
2026-04-04 18:16:04 -07:00
2026-04-14 21:37:20 -03:00
## MCP server
2026-04-04 18:16:04 -07:00
2026-04-14 21:37:20 -03:00
29 MCP tools cover palace reads/writes, knowledge-graph operations,
cross-wing navigation, drawer management, and agent diaries. Installation
and the full tool list:
[mempalaceofficial.com/reference/mcp-tools ](https://mempalaceofficial.com/reference/mcp-tools.html ).
2026-04-04 18:16:04 -07:00
2026-04-14 21:37:20 -03:00
## Agents
2026-04-04 18:16:04 -07:00
2026-04-14 21:37:20 -03:00
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 ](https://mempalaceofficial.com/concepts/agents.html ).
2026-04-04 18:16:04 -07:00
2026-04-14 21:37:20 -03:00
## Auto-save hooks
2026-04-04 18:16:04 -07:00
2026-05-09 10:52:25 -05:00
Two hooks save periodically and before context compression. In this fork the **remote ** variants ship — they POST the active transcript to the server's `/ingest/transcript` endpoint with bearer auth instead of running `mempalace mine` locally. Setup, env-var contract, and troubleshooting: [`hooks/README.md` ](hooks/README.md ).
2026-04-04 18:16:04 -07:00
2026-05-09 10:52:25 -05:00
For per-message recall on top of the file-level chunks the hooks produce, `mempalace sweep <transcript-dir>` runs inside the container (`docker exec mempalace mempalace sweep ...` ) — stores one verbatim drawer per user/assistant message, idempotent and resume-safe.
2026-04-27 02:26:53 -03:00
2026-04-04 18:16:04 -07:00
---
## Requirements
2026-05-09 10:52:25 -05:00
- Python 3.9+ (server image uses 3.13)
2026-04-14 21:37:20 -03:00
- A vector-store backend (ChromaDB by default)
- ~300 MB disk for the default embedding model
2026-05-09 10:52:25 -05:00
- Docker + Compose Manager plugin on Unraid for the server-mode path
2026-04-04 18:16:04 -07:00
2026-05-09 10:52:25 -05:00
No API key is required for any path.
2026-04-04 18:16:04 -07:00
2026-04-14 21:37:20 -03:00
## Docs
2026-04-04 18:16:04 -07:00
2026-05-09 10:52:25 -05:00
- Server-mode deployment → [`deploy/unraid/README.md` ](deploy/unraid/README.md )
- Hook setup (remote variants) → [`hooks/README.md` ](hooks/README.md )
- Release notes → [`CHANGELOG.md` ](CHANGELOG.md )
- Project conventions → [`CLAUDE.md` ](CLAUDE.md )
- Upstream CLI / Python API reference → [mempalaceofficial.com ](https://mempalaceofficial.com )
2026-04-04 18:16:04 -07:00
## License
MIT — see [LICENSE ](LICENSE ).