Cavemem plugin
A plugin saves coding-agent observations in local memory and retrieves history through search, timelines and MCP tools.
- 679 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- Hooks read session history and retain source and observations in a local database.
Install
- Works in
Manual install
npm install -g cavemem
cavemem install # Claude CodeInstalls the package and Claude Code hooks with MCP. Then inspect setup using `cavemem status`.
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- Hooks read session history and retain source and observations in a local database.
This is third-party code. Review the repository files before installing.
What it does
Cavemem hooks coding-agent session events and stores observations in SQLite. A rule-based grammar compresses prose while preserving code and paths. Agents search for relevant records before fetching selected event details. A local web viewer exposes history to users. Full-text search can be supplemented by a vector index. Capture is not available in every client: some integrations only query existing memory. Users can exclude directories and mark private text segments.
Who it is for. For developers searching earlier session decisions across several AI clients.
Good fit when
- Recall a decision from an earlier session.
- Keep history in local SQLite.
- Inspect an event sequence in a browser.
- Share observations across capture-capable and query-only clients.
Not a fit when
- You need new features and active maintenance.
- You expect capture from Cursor or Gemini CLI.
- Agent history cannot be retained on disk.
Example request
Find the earlier authentication decision in Cavemem and show nearby events.Limitations
Development has been frozen since August 2026, so do not expect new features or fixes. Cursor, Gemini CLI and several other clients only query memory captured by a supported hook-capable client. History can contain code and personal information; configure exclusions and `<private>...</private>` markers before capture. On Windows, Claude Code hooks require sh from Git for Windows; otherwise capture may fail even when the general installation status looks healthy.
How to disable. Run `cavemem uninstall` for the relevant client and stop the worker with `cavemem stop`. Remove the saved database separately.
FAQ
Which MCP tools are available?
Search, timeline and retrieval of selected observations.
How do I open the viewer?
Run `cavemem viewer`.
How do I inspect client connections?
Use `cavemem status`.
Can I disable background HTTP serving?
`cavemem config set embedding.autoStart false` disables worker auto-start.
Is there an export?
`cavemem export <out.jsonl>` saves sessions and observations.
Discussion
No questions or reviews yet.
Related
PluginsA local CLI stores project decisions and conventions in SQLite, retrieves relevant entries and shares memory across coding agents.
Fast semantic code search for agents: returns the exact snippets instead of reading whole files and spends far fewer tokens
Local debugging memory for developers and agents: commands, output, errors and working fixes stored in local SQLite
Context Engine: code search and memory for an agent
Context Engine
A skill that teaches an agent to query the Context Engine code index and symbol graph before reading files directly
agentplay turns local Claude Code, Codex and Cursor sessions into a file map and a replayable step timeline.
Local shared project memory for coding agents: facts, decisions and commits available through MCP, CLI and hooks in any agent
README in short
Memory is local by default. Optional remote embedding providers are enabled separately in settings.