Agents forget. This one kept the notes.
Persistent memory over MCP. Cavemem compresses what an agent learns with a deterministic grammar — about 75% fewer tokens, code and paths preserved — keeps it in local SQLite, and hands it back when the agent asks.
Frozen since August 2026 · still installable and working
MIT · TypeScript · JuliusBrussee/cavemem
Every session opens at zero. So you explain the codebase again.
A coding agent learns something real — where tenant identity comes from, why a flag is off, which test guards it — and then the context window closes and it is gone. The next session pays full price to learn it again.
Cavemem wrote it down instead, compressed, on your machine, and served it back through three MCP tools.
- searchhybrid: FTS5 + local vectors
- timelinewhat happened, in order
- get_observationsthe raw rows
The agent asks. The archive answers. In fewer tokens than it was written in.
Where does organization identity come from?
search({
q: "organization identity",
limit: 3,
})3 observations · local
Tenant authority comes from verified claims
org id <- auth ctx claim. body no pick tenant. every store query carry org id.
cloud/control-api/internal/auth/tokens.go
the row as kept: ~75% fewer tokens, the path untouched
Compression is a deterministic grammar — about 75% fewer tokens, code and paths preserved. The database is local SQLite; nothing leaves the machine by default.
What shipped in the box. All of it still runs.
- 01
Observations compressed by a deterministic grammar and stored in local SQLite.
- 02
Hybrid retrieval: SQLite FTS5 for the words, a local vector index for the sense.
- 03
Three MCP tools — search, timeline, get_observations — so any MCP client can read the memory.
- 04
Local-first: no network calls by default. The database is a file you own.
- 05
A web viewer at localhost:37777 for reading and pruning what was kept.
- 06
Privacy controls: <private> tags are stripped, and paths can be excluded outright.
Frozen, not deleted.
The core moved in.
Frozen since August 2026 · still installable and working
No longer in active development. The compressed-memory core now ships inside caveman.