cleanup and remote only
This commit is contained in:
@@ -1,29 +1,10 @@
|
||||
> [!CAUTION]
|
||||
> **Scam alert.** The only official sources for MemPalace are this
|
||||
> [GitHub repository](https://github.com/MemPalace/mempalace), the
|
||||
> [PyPI package](https://pypi.org/project/mempalace/), and the docs site at
|
||||
> **[mempalaceofficial.com](https://mempalaceofficial.com)**. Any other
|
||||
> domain — including `mempalace.tech` — is an impostor and may distribute
|
||||
> malware. Details and timeline: [docs/HISTORY.md](docs/HISTORY.md).
|
||||
|
||||
> [!IMPORTANT]
|
||||
> **🚨 Claude Code sessions expire in 30 days w/out auto-save hooks wired!** **[Read this →](https://github.com/MemPalace/mempalace/discussions/1388)**
|
||||
|
||||
|
||||
<div align="center">
|
||||
|
||||
<img src="assets/mempalace_logo.png" alt="MemPalace" width="240">
|
||||
|
||||
# MemPalace
|
||||
# MemPalace — local fork
|
||||
|
||||
Local-first AI memory. Verbatim storage, pluggable backend, 96.6% R@5 raw on LongMemEval — zero API calls.
|
||||
|
||||
[![][version-shield]][release-link]
|
||||
[![][python-shield]][python-link]
|
||||
[![][license-shield]][license-link]
|
||||
[![][discord-shield]][discord-link]
|
||||
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.
|
||||
|
||||
</div>
|
||||
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>.
|
||||
|
||||
---
|
||||
|
||||
@@ -76,62 +57,34 @@ mempalace wake-up
|
||||
For Claude Code, Gemini CLI, MCP-compatible tools, and local models, see
|
||||
[mempalaceofficial.com/guide/getting-started](https://mempalaceofficial.com/guide/getting-started.html).
|
||||
|
||||
---
|
||||
|
||||
## Benchmarks
|
||||
|
||||
All numbers below are reproducible from this repository with the commands
|
||||
in [`benchmarks/BENCHMARKS.md`](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`](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:**
|
||||
|
||||
```bash
|
||||
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
|
||||
```
|
||||
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.
|
||||
|
||||
---
|
||||
|
||||
## Server mode (Unraid / shared across machines)
|
||||
|
||||
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.
|
||||
|
||||
The `deploy/unraid/` directory ships a complete two-container stack:
|
||||
|
||||
* `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`.
|
||||
|
||||
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.
|
||||
|
||||
Full install, client config, hook setup, and troubleshooting:
|
||||
[`deploy/unraid/README.md`](deploy/unraid/README.md).
|
||||
|
||||
## Knowledge graph
|
||||
|
||||
MemPalace includes a temporal entity-relationship graph with validity
|
||||
@@ -155,46 +108,29 @@ system prompt:
|
||||
|
||||
## Auto-save hooks
|
||||
|
||||
Two Claude Code hooks save periodically and before context compression:
|
||||
[mempalaceofficial.com/guide/hooks](https://mempalaceofficial.com/guide/hooks.html).
|
||||
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).
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
---
|
||||
|
||||
## Requirements
|
||||
|
||||
- Python 3.9+
|
||||
- Python 3.9+ (server image uses 3.13)
|
||||
- A vector-store backend (ChromaDB by default)
|
||||
- ~300 MB disk for the default embedding model
|
||||
- Docker + Compose Manager plugin on Unraid for the server-mode path
|
||||
|
||||
No API key is required for the core benchmark path.
|
||||
No API key is required for any path.
|
||||
|
||||
## Docs
|
||||
|
||||
- Getting started → [mempalaceofficial.com/guide/getting-started](https://mempalaceofficial.com/guide/getting-started.html)
|
||||
- CLI reference → [mempalaceofficial.com/reference/cli](https://mempalaceofficial.com/reference/cli.html)
|
||||
- Python API → [mempalaceofficial.com/reference/python-api](https://mempalaceofficial.com/reference/python-api.html)
|
||||
- Full benchmark methodology → [benchmarks/BENCHMARKS.md](benchmarks/BENCHMARKS.md)
|
||||
- Release notes → [CHANGELOG.md](CHANGELOG.md)
|
||||
- Corrections and public notices → [docs/HISTORY.md](docs/HISTORY.md)
|
||||
|
||||
## Contributing
|
||||
|
||||
PRs welcome. See [CONTRIBUTING.md](CONTRIBUTING.md).
|
||||
- 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)
|
||||
|
||||
## License
|
||||
|
||||
MIT — see [LICENSE](LICENSE).
|
||||
|
||||
<!-- Link Definitions -->
|
||||
[version-shield]: https://img.shields.io/badge/version-3.3.4-4dc9f6?style=flat-square&labelColor=0a0e14
|
||||
[release-link]: https://github.com/MemPalace/mempalace/releases
|
||||
[python-shield]: https://img.shields.io/badge/python-3.9+-7dd8f8?style=flat-square&labelColor=0a0e14&logo=python&logoColor=7dd8f8
|
||||
[python-link]: https://www.python.org/
|
||||
[license-shield]: https://img.shields.io/badge/license-MIT-b0e8ff?style=flat-square&labelColor=0a0e14
|
||||
[license-link]: https://github.com/MemPalace/mempalace/blob/main/LICENSE
|
||||
[discord-shield]: https://img.shields.io/badge/discord-join-5865F2?style=flat-square&labelColor=0a0e14&logo=discord&logoColor=5865F2
|
||||
[discord-link]: https://discord.com/invite/ycTQQCu6kn
|
||||
|
||||
Reference in New Issue
Block a user