ZeroMem

Long-term memory for Claude Code, over your own session history.
The two green badges are load-bearing claims, not decoration.
tests/test_no_llm_calls.py fails the build if any module under zeromem/
imports an HTTP client or names an LLM API, and every dependency in
requirements.txt was already present — BM25 is vendored on scipy.sparse,
nearest-neighbour search is a numpy matmul, entity extraction is regex.
ZeroMem is an independent, from-scratch Claude Code skill: it indexes your own
Claude Code transcripts (~/.claude/projects/**/*.jsonl) and returns evidence
for recall using deterministic, token-free memory operations — no LLM call
anywhere in the memory pipeline itself.
The architecture takes its starting point from the Zero-Mem paper
(arXiv:2607.29377v1) and builds on its four components — a
provenance-preserving token-free memory substrate, query-conditioned evidence
routing, dual-view retrieval with closure, and deterministic calibration. Every
line of code here is written from scratch against Claude Code transcripts; no
code, data, or result is taken from the paper.
Several things this project adds are not in the paper and were designed and
measured here:
- Abstention — a support gate that reports when the corpus does not hold
the answer, with the missing terms named (
references/abstention.md)
- A targeted probe on weak results that says where each missing term
actually occurs, if anywhere (
zeromem/retrieve/escalate.py)
- A local recall daemon that loads the index once, ~18× faster warm recall
(
references/latency.md)
- A measurement suite — throughput, extractor precision, router accuracy,
recall ablations, abstention — all run on a real corpus, all reported with
what the sample cannot see
The only model in the loop is Claude, reading what the pipeline returns.
Install
Works the same on Windows, macOS, and Linux. Python 3.12+ is the only
prerequisite.
git clone https://github.com/viethuynh243/ZeroMem
cd ZeroMem
python install.py
That installs the engine (putting zeromem on your PATH) and links the skill
into ~/.claude/skills/zeromem. --no-skill installs the engine only,
--uninstall removes the link and never the repo.
Total download: numpy, scipy, regex. Nothing else is required, no model is
fetched, and the pipeline makes no network call at any point. The dense encoder
tiers (~2 GB of torch wheels) are strictly opt-in:
python install.py --dense # only if you want the balanced/full tiers
Without them the tier auto-routes to lite, which is BM25-only and fully
functional — abstention, the entity graph, closure, and calibration all work
unchanged.
As a Claude Code plugin
If you would rather install through Claude Code's plugin system:
/plugin marketplace add viethuynh243/ZeroMem
/plugin install zeromem@zeromem
That delivers the skill; run pip install zeromem (or pip install -e . in a
clone) once for the engine itself.
Already have it another way?
pip install git+https://github.com/viethuynh243/ZeroMem gives you the engine
alone. Verify any install with:
zeromem doctor # or: python -m zeromem doctor
First build
Start with one project rather than the whole corpus:
zeromem status # what is available
zeromem build --scope <SLUG> --with-graph
A full-corpus build here took ~45 minutes for 135,369 units. build refuses a
projected encode over 10 minutes unless you pass --yes-long-build.
First recall
zeromem recall "what did I do about the ENOENT bug" --top-k 5
Optionally start the daemon first — it makes recall ~18× faster by loading the
index once instead of per call:
zeromem serve
Keeping it current
zeromem update # incremental refresh + graph rebuild
zeromem update --quiet # silent when nothing changed
Scheduling is documented in references/usage.md and deliberately not
enabled — a multi-minute background encode is your decision.
Documentation