Claude-Mem plugin
A persistent memory plugin: stores observations from agent sessions and injects relevant context into new ones
- 104,106 ★ on the repository
- Last commit
- Apache-2.0
Broad access
Why this level
- Hooks record agent actions and tool output
- Runs a local worker with an HTTP API
- Offers hosted memory storage by default
Install
- Works in
Manual install
/plugin marketplace add thedotmack/claude-mem
/plugin install claude-memRestart Claude Code after installing
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- Hooks record agent actions and tool output
- Runs a local worker with an HTTP API
- Offers hosted memory storage by default
This is third-party code. Review the repository files before installing.
What it does
The plugin uses lifecycle hooks to record what the agent did and what was decided, storing it in SQLite. In a new session context from past sessions is injected automatically. Memory search runs through the mem-search skill and the search, timeline and get_observations MCP tools, with hybrid search backed by Chroma. It includes a web viewer for the memory stream and tags to exclude sensitive content.
Who it is for. Developers running long projects in Claude Code who are tired of re-explaining context.
Good fit when
- You need to recall how a problem was solved last time
- The project runs for weeks and context gets lost between sessions
- You want natural language search over the agent's work history
Not a fit when
- You cannot store work history outside the project or send it to the cloud
- Short one-off tasks that need no memory
Example request
Did we already fix the auth bug? Search memory for how we solved itLimitations
Per the README the project is renamed Grok Mem, but the package is still claude-mem. The installer asks you to sign in and uses hosted memory by default, which you can skip with --provider or CLAUDE_MEM_ONLINE_OPTIN=false. npm install -g claude-mem installs only the SDK without hooks. Vector search needs uv, and the worker is managed by Bun.
How to disable. Remove the claude-mem plugin in Claude Code. Settings live in ~/.claude-mem/settings.json.
FAQ
Can I skip the sign-in?
Yes. Pass an explicit --provider flag, set CLAUDE_MEM_ONLINE_OPTIN=false or run the installer in a non-interactive shell.
Why does nothing work after npm install -g?
That installs the library only. Hooks and the worker are registered via npx claude-mem install or the /plugin commands.
Discussion
No questions or reviews yet.
Related
PluginsA long-term memory plugin that keeps decisions, preferences and task state across sessions and injects only what a query needs
The Supermemory plugin for Claude Code: persistent memory across sessions with automatic prompt recall, conversation capture and a codebase index
A plugin with memory of past chats: it searches by meaning for decisions and reasons across Claude Code, Codex, Cursor and opencode sessions over MCP
Long-term agent memory in local Markdown files with a link graph, semantic search and MCP access
Shared local memory for AI agents: Claude Code, Codex, Cursor and others find the agreements of past sessions in it and record new ones
Shared semantic memory for agents: conversations are saved as markdown and recalled by search across Claude Code, Codex and other agents
Comparison with similar tools
Entries that share the main search query, and how they differ.
| Entry | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| Claude-Mem (this entry) | no | 104,106 | ||
| Engram by Gentleman Programming | no | not required | 7,679 | persistent memory for AI coding agents in a single Go binary |
| Episodic Memory | no | 493 | a plugin with memory of past chats | |
| Sno Station | no | 980 | one local memory for Codex |
README in short
The README covers installing via npx claude-mem install for Claude Code, OpenCode, Antigravity and others, and via the plugin marketplace. The architecture includes five lifecycle hooks, a local worker with an HTTP API, SQLite and Chroma. Search follows a three-step pattern to save tokens. Apache 2.0 license, docs at docs.claude-mem.ai.
README badge
Original SKILL.md
--- name: mem-search description: Search claude-mem's persistent cross-session memory database. Use when user asks "did we already solve this?", "how did we do X last time?", or needs work from previous sessions. --- # Memory Search Search past work across all sessions. Simple workflow: search -> filter -> fetch -> (rarely) disclose raw tool I/O. ## When to Use Use when users ask about PREVIOUS sessions (not current conversation): - "Did we already fix this?" - "How did we solve X last time?" - "What happened last week?" ## Layered Workflow (ALWAYS Follow) **NEVER fetch full details without filtering first. 10x token savings.** ### Step 1: Search - Get Index with IDs Use the `search` MCP tool: ``` search(query="authentication", limit=20, project="my-project") ``` **Returns:** Table with IDs, timestamps, types, titles (~50-100 tokens/result) ``` | ID | Time | T | Title | Read | |----|------|---|-------|------| | #11131 | 3:48 PM | 🟣 | Added JWT authentication | ~75 | | #10942 | 2:15 PM | 🔴 | Fixed auth token expiration | ~50 | ``` **Parameters:** - `query` (string) - Search term - `limit` (number) - Max results, default 20, max 100 - `project` (string) - Project name filter - `type` (string, optional) - "observations", "sessions", or "prompts" - `obs_type` (string, optional) - Comma-separated: bugfix, feature, decision, discovery, change - `dateStart` (string, optional) - YYYY-MM-DD or epoch ms - `dateEnd` (string, optional) - YYYY-MM-DD or epoch ms - `offset` (number, optional) - Skip N results - `orderBy` (string, optional) - "date_desc" (default), "date_asc", "relevance" ### Step 2: Timeline - Get Context Around Interesting Results Use the `timeline` MCP tool: ``` timeline(anchor=11131, depth_before=3, depth_after=3, project="my-project") ``` Or find anchor automatically from query: