claude-mem
Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Claude-Mem is a persistent memory system for AI coding agents that captures tool usage and interactions during sessions, compresses them into semantic summaries, and retrieves relevant context for future sessions. It works as a plugin for Claude Code, OpenCode, Antigravity CLI, and OpenClaw, automatically maintaining continuity of knowledge about projects even after sessions end. The system uses lifecycle hooks to capture observations, a worker service for storage and search, and MCP tools for intelligent memory retrieval with token-efficient progressive disclosure.
Key Features
Use Cases
- 01Maintaining project context across multiple coding sessions in Claude Code or OpenCode
- 02Searching historical bug fixes and implementation decisions from past agent interactions
- 03Retrieving chronological context around specific observations to understand project evolution
- 04Enabling AI agents to remember project-specific patterns and debugging strategies
- 05Synchronizing agent memory across multiple machines via cloud backup
- 06Building knowledge continuity for long-running development projects with frequent session restarts
Related Plugins
View moreandrej-karpathy-skills
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
Understand-Anything
Graphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
rtk
CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies
ruflo
🌊 The original agent meta-harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
claude-mem — FAQ
What is claude-mem?+
Claude-Mem is a persistent memory system for AI coding agents that automatically captures session activity, compresses it into semantic summaries, and retrieves relevant context for future sessions. It works as a plugin for Claude Code, OpenCode, and other compatible AI development environments.
How do I install claude-mem?+
Run 'npx claude-mem install' for Claude Code, or 'npx claude-mem install --ide opencode' for OpenCode. You can also install from the Claude Code plugin marketplace using '/plugin marketplace add thedotmack/claude-mem' followed by '/plugin install claude-mem'. Restart your IDE after installation.
Which AI clients and tools work with claude-mem?+
Claude-Mem works with Claude Code, OpenCode, Codex, Gemini, Hermes, Copilot, Antigravity CLI, and OpenClaw. It can be used with any AI agent that supports the MCP (Model Context Protocol) server architecture.
Do I need API keys or prerequisites to use claude-mem?+
You need Node.js 20.0.0 or higher and the latest version of Claude Code (or compatible IDE) with plugin support. Bun and uv are auto-installed if missing. An AI model configuration is required for generating summaries, which you set in the settings.json file.
Is claude-mem free to use?+
Yes, claude-mem is open source and licensed under Apache License 2.0, making it free to use, modify, and embed in developer tools, agents, and production systems.
How does the progressive disclosure search work?+
Progressive disclosure uses a 3-layer workflow: first use the 'search' tool to get a compact index with IDs (~50-100 tokens per result), then 'timeline' to see chronological context, and finally 'get_observations' to fetch full details only for filtered IDs (~500-1,000 tokens). This saves approximately 10x tokens compared to fetching everything upfront.
How do I install claude-mem?+
Open the source repository on GitHub and follow its README. claude-mem is a plugin — MCP Agents Market links you directly to the official repo.
Is claude-mem free?+
claude-mem is an open-source project hosted on GitHub. Check the repository for its license and any usage requirements.