← all repositories
thedotmack/claude-mem

Giving Claude Code a memory that outlasts the terminal

Persistent memory for coding agents that currently forget everything when the session ends.

88.3k stars JavaScript AgentsRAG · Search
claude-mem
Velocity · 7d
+122
★ / day
Trend
cooling
star history

What it does

claude-mem is a persistent memory layer for Claude Code, Gemini CLI, OpenCode, and similar agents. It hooks into session lifecycle events to record tool usage and observations, stashes them in a local SQLite database with Chroma vector search, and automatically primes new sessions with relevant history. The goal is continuity: your agent remembers yesterday’s decisions without you repeating them.

The interesting bit

Instead of dumping entire chat logs into the context window, the project treats retrieval as a token-budget problem. It exposes a three-layer MCP search workflow—index, timeline, then full observation—that the documentation claims yields ~10× token savings by filtering before fetching details. There is also a local web viewer on port 37777 if you want to browse your agent’s memory like a security DVR.

Key highlights

  • Hooks into session lifecycle events (SessionStart, PostToolUse, SessionEnd, and others) to record observations automatically
  • Stores data locally in SQLite with hybrid semantic and keyword search via Chroma
  • Surfaces memory through a local web viewer and MCP tools with progressive disclosure layers
  • Supports <private> tags to keep sensitive content out of the persistent store
  • Also integrates with OpenClaw gateways and Claude Desktop

Caveats

  • Installing via npm install -g only gets the SDK, not the plugin hooks or worker service; the npx route is required for full functionality
  • Experimental features like Endless Mode live in a beta channel
  • The architecture depends on Bun and Node ≥ 18

Verdict

Worth a look if you live in Claude Code or Gemini CLI and are tired of re-establishing context each morning. Skip it if you prefer stateless agent interactions or don’t want another local service running on port 37777.

Frequently asked

What is thedotmack/claude-mem?
Persistent memory for coding agents that currently forget everything when the session ends.
Is claude-mem open source?
Yes — thedotmack/claude-mem is open source, released under the Apache-2.0 license.
What language is claude-mem written in?
thedotmack/claude-mem is primarily written in JavaScript.
How popular is claude-mem?
thedotmack/claude-mem has 88.3k stars on GitHub and is currently cooling off.
Where can I find claude-mem?
thedotmack/claude-mem is on GitHub at https://github.com/thedotmack/claude-mem.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.