Claude-Mem
Persistent, searchable project memory for coding agents across sessions.
- Source repo
- thedotmack/claude-mem
- Stars
- ★ 116k
- Last updated
- today
- License
- Apache-2.0
- Primary language
- TypeScript
- FA score
- 64/100 · Some gaps
At a glance
- How it runs
- Works with
- Portable with changesCodex · Claude CodeClaude.ai (Partial support)
- Cost
- Free tier plus a paid hosted plan
- Setup effort
- Low · running in minutes
- You'll need
- Typical use
- A Claude Code developer maintaining a long-lived codebase who needs a new session to recover earlier authentication debugging context.
- Not a fit if
- Teams avoiding Node.js, Bun, and uv runtime dependencies
- Users needing non-Claude integrations documented as fully as Claude Code
- Teams unable to consistently mark sensitive tool-use records
- Website
- claude-mem.ai ↗ set on GitHub
- Maintenance
- Commits in the last 30 dayslast commit 2026-11-10latest release v15.15.2 (2026-11-10)+576.6 ★/day over 7 days
- Source review
- 64/100 · Some gaps
What does this agent do, and when should you use it?
Claude-Mem is a persistent memory-compression system built for Claude Code, with the repository description also listing Codex, OpenCode, and other agent environments. Lifecycle hooks capture tool-use observations, create semantic summaries, and inject relevant context into later sessions. Its components include a Bun-managed local Worker Service, SQLite, Chroma vector search, a Web Viewer, and the mem-search Skill. The worker exposes a local HTTP API, search endpoints, and a live memory stream, while SQLite stores sessions, observations, and summaries. It fits developers who need continuity across coding sessions, although its most fully documented installation path is the Claude Code plugin workflow.
Claude-Mem runs hook scripts around SessionStart, UserPromptSubmit, PostToolUse, Stop, and SessionEnd to capture agent tool-use observations and generate semantic summaries. It stores sessions, observations, and summaries in SQLite, and uses a Chroma vector database alongside keyword search for hybrid retrieval. In a later session, relevant stored context can be injected automatically; MCP retrieval can start with search, add chronological context with timeline, and fetch selected full records with get_observations(ids=[...]). The Bun-managed Worker Service provides a local HTTP API, search endpoints, and a Web Viewer. Content wrapped in <private> tags is excluded from storage.
- A Claude Code developer maintaining a long-lived codebase who needs a new session to recover earlier authentication debugging context.
- An engineer investigating a multi-session bug who wants to search compact observation indexes before fetching only the relevant full records.
- An OpenCode user who wants to add persistent memory to coding sessions with
npx claude-mem install --ide opencode. - A team operating an OpenClaw Gateway that needs a persistent-memory plugin and may route real-time observation feeds to Telegram, Discord, or Slack.
- A technical lead who needs to inspect locally stored project memory through the worker's Web Viewer or HTTP API.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Install / run
npx claude-mem installnpx claude-mem install --ide opencodenpx claude-mem install --ide antigravity
- Config files
~/.claude-mem/settings.json- Runtime
- Node.js 20.0.0
How do you install or deploy this agent?
For Claude Code, run npx claude-mem install, then restart Claude Code; prior-session context is then injected automatically into new sessions. For OpenCode, run npx claude-mem install --ide opencode; for Antigravity CLI, run npx claude-mem install --ide antigravity. Inside Claude Code, the documented alternative is /plugin marketplace add thedotmack/claude-mem followed by /plugin install claude-mem. Node.js 20.0.0 or later is required; Bun and uv are auto-installed when absent, and SQLite 3 is bundled. The supplied material does not specify any required API key or credential.
How do you use this agent?
After installation and restart, Claude-Mem operates automatically. Configure its AI model, worker port, data directory, log level, and context-injection settings in ~/.claude-mem/settings.json; for example, set {"CLAUDE_MEM_MODE":"code--zh"} and restart Claude Code to use Simplified Chinese mode. For retrieval, use progressive disclosure: search(query="authentication bug", type="bugfix", limit=10), then timeline, then get_observations(ids=[123,456]) for selected records. Wrap content that must not be stored in <private> tags.
What are this agent's strengths and limitations?
- Automatically captures tool-use observations through lifecycle hooks and reinjects relevant context in later sessions.
- Combines SQLite-backed storage with Chroma semantic search and keyword search, exposed through layered
search,timeline, andget_observationsretrieval. - Runs a local worker with an HTTP API, search endpoints, and a Web Viewer for both programmatic and visual inspection.
- Supports
<private>exclusions and fine-grained control over context injection.
- The most detailed documented installation and hook workflow is centered on the Claude Code plugin; the supplied material gives less equivalent integration detail for the other listed agent environments.
- It requires Node.js 20+, and depends on Bun, uv, SQLite 3, and Chroma vector search, adding runtime setup beyond a standalone CLI.
- It stores tool-use observations and session summaries;
<private>tags help, but teams still need a reliable convention for marking sensitive material. npm install -g claude-meminstalls only the SDK/library and does not register hooks or configure the worker, creating a documented deployment pitfall.
How does this agent compare with similar options?
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| Claude-Mem This agent | 64 · Some gaps | CLIFreemium | ★ 116k | today | TypeScript | Codex · Claude Code |
| PowerContext | 82 · Good | CLIFree | ★ 1.6k | today | Python | Codex · Claude Code |
| Ori Mnemos | 56 · Major gaps | CLIFree | ★ 336 | 1mo ago | TypeScript | Claude Code · OpenAI API · Claude API |
| Magic Context | 54 · Major gaps | CLIFree + model costs | ★ 2.5k | today | TypeScript | — |
How does FollowAgents rate this agent?
Why each dimension lost points
The README and install docs describe tool activity going to a local worker, observer compression and local SQLite storage; cloud sync is optional, and default-on analytics and its opt-out are disclosed. This supports a score of 2 for data-flow transparency. Users can choose agents, providers, native-memory behavior and analytics sharing, and the CMEM Pro trial/checkout path is documented, earning 2 for confirmation. `<private>` tags are said to prevent storage, but the sample does not show the filtering implementation, retention policy or encryption, so sensitive-data handling gets 1. Automatic activity capture, a remote script-pipe installation path and limited permission/dependency-security detail in the sample reduce least privilege, dependency security and external effects to 1 each. Uninstall, backup and restore commands exist, but recovery guarantees are not shown, so rollback gets 2. Plugin and package metadata identify an author, repository and license, earning 2 for attribution; publisher identity remains unknown as stipulated.
The README, configuration docs, OpenClaw guide and troubleshooting docs are not fully consistent on defaults such as worker ports: the OpenClaw guide says 37777 while the configuration default is uid-derived. Self-consistency gets 1. The docs list Node, Bun, uv, SQLite and optional Chroma dependencies and a degradation path, but the sample does not establish long-term availability or security maintenance, so dependency availability gets 1. Doctor, logs, health checks and issue-specific diagnostic steps are concrete, earning 2 for failure messages; no runtime result is inferred.
The docs cover many agents, individual and team use, multiple providers, worker/server deployment and language modes, earning 3 for audience/scenarios and 3 for environment fit. They distinguish agents with capture from search-only integrations, cloud sync from local storage, provider choices and context-injection options, earning 2 for capability boundaries; the broad top-level compatibility claim is not fully detailed per integration in this sample. Install triggers and skill purposes are described reasonably specifically, but complete trigger rules and all skills are not shown, so trigger precision gets 2.
The README is organized around quick start, architecture, search, configuration and troubleshooting, earning 3 for information architecture. Installation docs cover interactive and unattended setup, platform differences, providers, startup and common install distinctions, earning 3 for install notes. Product terminology shifts among Claude-Mem, Grok mem and CMEM Pro, so naming stability gets 1. Examples and troubleshooting are extensive, but a port-based `kill -9` suggestion carries risk and the sample does not show a complete FAQ, so this gets 2. Some limitations are disclosed, including possible loss of queued work on restart and search-only integrations, but disclosures are distributed and sit in tension with other retry/recovery descriptions, earning 2. The LICENSE matches package metadata, earning 3. Visible version numbers agree, but changelog content is not included in the sample, so versioning/changelog gets 2. Package/plugin metadata name an author and repository and the contribution guide describes release flow, but maintenance responsibility and registry-verified publisher identity are not independently established, earning 2.
Progressive search, context injection, observations and the viewer/API provide usable ways to retrieve cross-session context, earning 2 for output usability; the claimed roughly 10x token savings is not measured in the sample. Persistent context and on-demand expansion offer clear value over repeatedly rediscovering work, earning 3 for marginal value. Installation, a resident worker, model calls, image storage and optional cloud services add cost and maintenance; provider choices, injection limits and switches for images/tool hooks help, but cost-benefit is not quantified, earning 2.
Several README claims about architecture, commands and configuration can be traced to source/configuration material, earning 2 for claim traceability. The README, install docs, configuration and OpenClaw source corroborate some behavior, but the sample provides limited corroboration for the core observation flow and complete skill implementations, earning 2. Docs sometimes present features, defaults and token savings without clearly separating implementation, options and outcome claims; this is a static review only, so fact/inference separation gets 2.
- The tool records agent tool activity by default and injects compressed observations into later sessions; confirm the project scope, provider and context-injection scope meet your data-handling requirements.
- The docs say `<private>` content is not stored, but the sample does not show the implementation; do not rely on the tag alone for passwords, keys or other sensitive material.
- The installer uses `curl | bash` and supports sending observations to hosted providers; review script provenance and network data paths before managed deployment.
- Worker-port defaults are inconsistent in the sample, and troubleshooting includes force-killing a process by port; verify the target process and active installation settings first.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
Release notes excerpt
Critical fix - Antigravity no longer denies every tool call after an upgrade from 14.x (#5670): an in-place upgrade from an older install left a PreToolUse hook (and a PreInvocation context hook) in ~/.gemini/config/hooks.json. agy kept firing it before every tool call, the current adapter answered with no decision, and agy denied every call until you re-ran install. Now the Antigravity installer finds those stale entries and migrates the file in place with the same merge install performs. It writes only when something is stale, never throws, and leaves a corrupt file untouched. …View on GitHub ↗ -
Release notes excerpt
No replay after an outage When the worker was down or refused a capture, some capture paths kept that work and sent it again later, which could start model calls nobody asked for. They now drop what the worker refused and carry on with new work (#5663): - Transcript capture: a transcript line the worker refuses or cannot take is skipped. Before, the watcher stopped at that line and, once the worker was back, sent it again with every line after it. A restart no longer resends lines from an outage either. …View on GitHub ↗ -
Release notes excerpt
Critical fix - The worker no longer freezes on its first image (#5601): a worker started from a plugin root with no node_modules (the Claude Code marketplace clone) could freeze for good. Bun's auto-install loaded sharp's wasm build, whose first call blocks Bun's main thread, so timers and /api/health stopped and hooks kept reclaiming the worker. Now every worker, server and plugin spawn runs bun --no-install, the installer starts the worker from the plugin cache copy where it just ran bun install, and the media converter refuses sharp's wasm build before decoding, so a worker …View on GitHub ↗
FAQ
Does it store every piece of session content?
<private> tags exclude sensitive content from storage; the system otherwise stores tool-use observations, sessions, and summaries.Will searching history consume a large amount of context?
search returns a compact index of roughly 50–100 tokens per result, then selected records can be retrieved with get_observations at roughly 500–1,000 tokens per result.Is a global npm install enough to set it up?
npm install -g claude-mem installs only the SDK/library. Use npx claude-mem install or the documented Claude Code plugin commands to register hooks and set up the worker.Can observations be generated in Chinese?
CLAUDE_MEM_MODE to code--zh in ~/.claude-mem/settings.json and restart Claude Code.Is Claude-Mem free?
Is Claude-Mem open source?
Is Claude-Mem safe to use?
Is Claude-Mem still maintained?
Who makes Claude-Mem?
What is Claude-Mem's official website?
Thanks — we use this to improve the page.