Rank #03 · Daily

Rank #03 · Daily · AI

claude-mem: Persistent Cross-Session Memory for Coding Agents

· Daily Top10 · License: Apache-2.0

Rank #03 Daily — thedotmack/claude-mem

Productize long-term agent memory—capture, compress, and reinject—so sessions stop starting from zero across major agent hosts.

  • Board: Rank #03 · Daily
  • Repo: thedotmack/claude-mem
  • Stars / lang / license: ~110,318 stars · TypeScript · Apache-2.0
  • License label: License: Apache-2.0
  • Data verified: 2026-11-02 ~22:16 Asia/Shanghai (GitHub API get_repository + README get_file_contents)
  • Trending note: ~+1,799 stars today (live UI); archive earlier same day ~+1,526 when the repo sat near Daily #1
  • Tags: AI · agent-memory · RAG · MCP · Claude-Code · long-term-memory · SQLite

What it does

claude-mem (thedotmack) is a persistent memory compression system aimed first at Claude Code and expanded to many harnesses. It automatically captures tool-usage observations during sessions, generates semantic summaries, and makes them available to future sessions so agents keep project continuity after reconnects.

Core loop from the public materials:

  1. Capture — lifecycle hooks (SessionStart, UserPromptSubmit, Pre/PostToolUse, Stop, SessionEnd) observe what the agent does via claude-mem hook … launchers the installer places on PATH.
  2. Compress — observations and summaries land in local storage (SQLite + hybrid search with Chroma vector DB); optional cloud sync to cmem.ai.
  3. Reinject — relevant context is primed into new sessions; MCP search tools follow progressive disclosure: search (compact index) → timeline → get_observations (full detail only for filtered IDs).

Install is typically npx claude-mem install (or IDE-specific flags such as --ide opencode, --ide t3code, --ide grok-bot, --ide antigravity, Pi/DeepSeek harness flags, OpenClaw gateway script, or Claude Code marketplace /plugin install). The README stresses that npm install -g claude-mem installs the SDK only—hooks and worker setup require the installer//plugin path. Node ≥20; Bun and uv are auto-installed if missing for worker/vector paths.

Documented extras include a local “My Work” / viewer UI at the worker URL, optional TeamBrain shared workspace, privacy tags (<private>), opt-in screenshots under ~/.claude-mem/media-v1/, context configuration, and mode/language settings (e.g. code--zh). Installer may offer a hosted observer trial / sign-in flow; you can skip with --provider, CLAUDE_MEM_ONLINE_OPTIN=false, or non-interactive CI. Homepage: claude-mem.ai · docs: docs.claude-mem.ai.

Who it’s for

Stars / language / license

~110,318 stars · TypeScript · Apache-2.0
Data verified: 2026-11-02 ~22:16 Asia/Shanghai (GitHub API get_repository + README get_file_contents)

Trending note (selection ~22:14 Asia/Shanghai): ~+1,799 stars today (live UI); archive earlier same day ~+1,526 when the repo sat near Daily #1

Category tags

AI · agent-memory · RAG · MCP · Claude-Code · long-term-memory · SQLite

How it differs from similar projects

Many agents ship chat history inside one host; claude-mem productizes cross-session, cross-host memory as an installable observer + search layer. Versus generic vector notebooks or mem0-style libraries alone, the Rising pitch is the full capture → compress → reinject pipeline wired into agent lifecycle hooks and MCP search with progressive disclosure (compact index before expensive detail fetches). Versus “paste a giant CONTEXT.md” workflows, it emphasizes automatic observation capture and token-aware retrieval.

Be conservative on marketing claims: treat “up to 100% more usage” / observer trial language in the installer docs as product narrative, not an independent benchmark. License is Apache-2.0 for the open project; hosted CMEM Pro / cloud sync have their own commercial boundary described in project docs (docs/license.md, docs/ip-boundary.md). A third-party CMEM token exists and is “embraced” by the author—unrelated to the software license.

Digging into the memory workflow

A typical progressive-disclosure turn (from project docs):

  1. Call MCP search with a natural-language query and optional type/date filters → get a compact ID index.
  2. Optionally call timeline around an interesting observation.
  3. Call get_observations only for the IDs you still need → full detail (~order-of-magnitude more tokens per hit than the index).

Settings live in ~/.claude-mem/settings.json (model, worker port, data directory, log level, context injection). CLAUDE_MEM_SESSION_START_INCLUDE_ALL_SOURCES controls whether SessionStart context pulls every harness or only the current one. Modes under plugin/modes/ control workflow tone and observation language (code, code--zh, code--ja, …).

Takeaways

Repo link

https://github.com/thedotmack/claude-mem