JuliusBrussee/cavemem
Cross-agent persistent memory for coding assistants. Stored compressed. Retrieved fast. Local by default.
What it solves
cavemem provides persistent, cross-agent memory for coding assistants. It prevents agents from forgetting context across different sessions or different IDEs, allowing them to recall previous observations and interactions without relying on a cloud-based memory system.
How it works
The system uses hooks that trigger at session boundaries to capture observations. These observations are compressed using a deterministic "caveman grammar" (reducing prose tokens by approximately 75% while preserving code and paths exactly) and stored in a local SQLite database with FTS5 keyword search.
Agents retrieve this memory via a Model Context Protocol (MCP) server providing tools like search, timeline, and get_observations. A local background worker handles embedding generation and serves a read-only web viewer for humans to browse sessions.
Who it’s for
Developers using AI coding assistants such as Claude Code, Cursor, GitHub Copilot, OpenCode, Codex, Augment Code, Gemini CLI, Antigravity, or IBM Bob who want a local, privacy-aware persistent memory layer.
Highlights
- Cross-IDE Support: Captures data from several IDEs and allows others (query-only) to search that shared memory.
- Local-First: Data is stored in a local SQLite DB with no required network calls; embeddings can be local or remote.
- Compressed Storage: Uses a specialized grammar to save space at rest while remaining expandable for humans.
- Hybrid Search: Combines SQLite FTS5 keyword search with a local vector index and a tunable ranker.
- Privacy Controls: Supports path globs for exclusion and automatically strips content within
<private>tags. - Web Viewer: Includes a token-protected local UI for browsing captured sessions.