claude-mem
Open-source persistent memory engine that captures agent session activity, compresses it with AI, and injects relevant context into future sessions across Claude Code, Codex, Gemini, OpenCode, and other supported tools.
Visit thedotmack/claude-memOverview
claude-mem is an open-source persistent memory compression system for Claude Code and other coding agents. It captures tool usage observations during sessions, generates semantic summaries, and injects relevant context into future sessions so work can continue across session boundaries and machines. The local engine stores memory on the user's machine, while optional CMEM Pro adds hosted observation, cloud sync, and private MCP recall.
Key Features
- Persistent memory keeps context available across sessions.
- Progressive recall lets an agent find a relevant note before reading its details.
- MCP search workflow uses search, timeline, and get_observations for token-efficient retrieval.
- Cloud sync keeps captured project memory available across connected computers.
- Privacy control supports private tags to exclude sensitive content from storage.
- TeamBrain provides an optional shared workspace with team work lists, member attribution, and linked findings.
Use Cases
- Resume work with prior decisions, discoveries, and fixes available in later sessions.
- Search project history for past bug fixes and architectural decisions.
- Recall synced memory from MCP clients, including ChatGPT when the account supports custom connectors.
- Share a project's history across supported tools such as Claude Code, Cursor, Codex, and ChatGPT.
Getting Started
- Run npx claude-mem install for the default setup.
- Target specific environments with IDE flags, such as npx claude-mem install --ide opencode or npx claude-mem install --ide grok-bot.
- Restart the host tool after installation so previous-session context can appear in new sessions.
Deployment & Requirements
- Node.js 20.0.0 or higher.
- Claude Code latest version with plugin support for Claude Code integration.
- Bun JavaScript runtime and process manager, auto-installed if missing.
- uv Python package manager for vector search, auto-installed if missing.
- SQLite 3 for persistent storage, bundled with the system.
Before You Adopt
- License: Apache-2.0. Review its terms before using, modifying, or distributing the project.
- Capture is limited to the tools and integrations installed; MCP recall does not imply automatic capture from every client.
- Memory is stored locally by the open-source engine; enabling cloud sync also stores synced data with CMEM, so privacy policy review is advised before connecting.
- Hosted observation and cloud sync are provided by the paid CMEM Pro service rather than the free open-source engine.
- Token-use effects vary by workload and provider, and CMEM Pro does not alter another subscription's price or limits.