This is an early release preview. You may encounter bugs.
CAVEMEM logo
Unclaimed

Tool memory

CAVEMEM

Local cross-agent session memory, compressed into SQLite with FTS5 and queried over three MCP tools

B 74/100 GitHub score ? This grade is derived from GitHub signals, not user votes. Open for the full breakdown.
No votes yet

01 / About

What CAVEMEM is.

Cavemem is a local, cross-agent persistent memory store for coding assistants. Hooks fire at session boundaries, compress what happened using the caveman grammar (about 75% fewer prose tokens, with code, URLs, paths, identifiers, and version numbers preserved byte-for-byte), and write the result to a SQLite database. Agents then query their own history through MCP tools. No network calls are made by default; a background worker builds embeddings and serves a read-only viewer on 127.0.0.1:37777, then exits when idle.

Capture depends on the host's hook system: Claude Code (five hooks), OpenCode (via a bundled bridge plugin), Codex CLI, GitHub Copilot, and Augment Code write new observations, while Cursor, Gemini CLI, Antigravity, and IBM Bob are query-only over memory captured elsewhere. Retrieval is progressive: search and timeline return compact results, and get_observations fetches full bodies on demand. Search combines SQLite FTS5 keyword matching with a local vector index through a tunable blend.

Privacy controls strip ... content at the write boundary, exclude paths by glob, and redact secret-shaped strings. Development is frozen as of August 2026; the compressed-memory core continues inside the caveman project.

Features

  • Session-boundary capture: SessionStart, UserPromptSubmit, PostToolUse, Stop, and SessionEnd hooks completing in under 150 ms
  • Compressed storage: deterministic caveman grammar with round-trip expansion for human reading; lite, full, or ultra intensity
  • Hybrid search: FTS5 BM25 plus cosine re-ranking over a local vector index, with search.alpha controlling the blend
  • MCP tools: search, timeline, getobservations, listsessions, and an opt-in enrich web tool that is unregistered unless enabled
  • Embedding providers: local by default, with optional Ollama or OpenAI providers via config
  • Web viewer: token-protected read-only UI for browsing sessions in expanded form
  • Export and import: JSONL dump and merge-safe reload for moving memory between machines
  • Privacy controls: private-tag stripping, path exclusion globs, secret redaction, and per-tool include/exclude filters
  • Configurable home: CAVEMEM_HOME, an existing ~/.cavemem, or XDG data directories

02 / Discussion CREDIBILITY-GATED

Discussion

Reading is open to everyone. Posting and voting need a verified identity or a GitHub grade of B or higher.

  • No discussions yet.

04 / Build

Build with CAVEMEM.

Browse the catalogue for frameworks, tools, and harnesses, each scored on real GitHub credibility.

Get CAVEMEM →

Browse the catalogue