Your AI assistant's goldfish memory, fixed with a SQLite brain
A plugin that records what Claude Code (and friends) actually did, compresses it, and feeds relevant history back into future sessions so you don't keep re-explaining your codebase.

What it does
Claude-Mem is a persistent memory layer for AI coding agents. It hooks into session lifecycle events—start, prompt submission, tool use, stop, end—capturing observations and summaries to a local SQLite database. On subsequent sessions, it retrieves relevant context via hybrid semantic + keyword search (Chroma + FTS5) and injects it back into the agent’s prompt. There’s also a web viewer on localhost:37777 and MCP search tools for manual querying.
The interesting bit
The “progressive disclosure” search pattern is the quietly clever part: a three-layer MCP workflow—compact index, chronological timeline, then full details only for filtered IDs—claims roughly 10× token savings versus dumping everything into context. For agents burning through context windows, that’s the difference between usable and unusable.
Key highlights
- Hooks into Claude Code, Gemini CLI, OpenCode, and others via lifecycle scripts; OpenClaw gateway supported via curl installer
- Local-first: SQLite + Chroma, with optional vector search; nothing leaves your machine unless configured otherwise
<private>tags to redact sensitive content from storage- Web UI and HTTP API for browsing memory stream and citations by observation ID
- Beta channel with experimental “Endless Mode”
Caveats
- Requires Node ≥18 and Bun for the worker service;
npm install -gonly gets the SDK, not the full plugin setup - The 80K+ star count is suspiciously high for a project at this maturity level; verify independently if that matters to you
- Token savings claims ("~10×") are stated in the README without independent benchmarks shown
Verdict
Worth trying if you live in Claude Code or Gemini CLI and are tired of groundhog-day explanations. Skip it if you already have a well-tuned custom context workflow, or if “install a hook system plus vector database” feels like overkill for your sporadic AI usage.