GitHub - thedotmack/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

GitHub - thedotmack/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 an open-source memory engine providing persistent context across AI agent sessions. It captures, compresses, and retrieves relevant history for tools like Claude Code, Copilot, and Gemini.

Overview

What is Claude-Mem

Claude-Mem is an open-source memory engine designed to solve the fragmentation problem inherent in many AI agent workflows. By providing persistent context across sessions, it ensures that AI agents can remember past interactions, decisions, and progress, creating a seamless continuity of work. The tool captures everything an agent does during sessions, compresses this data using AI techniques, and injects the most relevant context back into future sessions.

Built to be agnostic to the specific AI model being used, Claude-Mem supports a wide array of agents including Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, and OpenCode. Under the hood, it leverages technologies like ChromaDB, SQLite, embeddings, and Retrieval-Augmented Generation (RAG) to store and retrieve memories efficiently. This architecture allows developers and power users to maintain stateful interactions with their AI assistants without relying on the limited context windows of individual models.

For more information on similar developer tools, you can explore our ToolSeekAI tools directory. Additionally, if you are looking to compare this against other memory management solutions, check our rankings.

Key features

  • Persistent Context Across Sessions: The core functionality automatically captures agent actions and decisions. Instead of losing context when a session ends, the system compresses this data and makes it available for future interactions, ensuring no critical detail is lost.
  • Multi-Agent Support: Unlike tools locked to a single ecosystem, Claude-Mem is compatible with major AI coding assistants and agents. It works seamlessly with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, and OpenCode.
  • AI-Powered Compression: To manage storage overhead and reduce latency, the tool uses AI to summarize and compress session data. This ensures that only key information is preserved, maintaining efficiency while retaining semantic meaning.
  • Relevant Context Injection: When a new session begins, the system retrieves and injects only the memories most relevant to the current task. This prevents context window bloat and keeps the AI focused on pertinent historical data.
  • Open Source Architecture: Being fully open-source, Claude-Mem allows for extensive customization and self-hosting. Developers can modify the engine to fit specific workflow requirements or integrate it into proprietary systems.
  • Embeddings & RAG Integration: The tool utilizes vector embeddings and Retrieval-Augmented Generation (RAG) to accurately find and apply relevant memories. This ensures high precision in retrieving past interactions that match the current query or task.
  • Lightweight Storage: Backed by ChromaDB and SQLite, the storage layer is designed for efficiency. These technologies allow for fast read/write operations and easy local deployment.

Use cases

  • Long-running development projects: In complex software development, agents can remember code changes, bug fixes, and architectural decisions across multiple coding sessions. This reduces the need to repeatedly explain project history to the AI.
  • Personal AI assistants: Users can maintain context about personal preferences, ongoing tasks, and past conversations. This creates a more personalized and consistent assistant experience over time.
  • Automated workflows: For agents running automated scripts or workflows, Claude-Mem allows them to pick up exactly where they left off after interruptions, session timeouts, or restarts.
  • Research and analysis: Researchers can keep track of findings, hypotheses, and data sources across extended research sessions. The AI can reference previous analyses to build upon existing knowledge.
  • Multi-agent collaboration: In scenarios where multiple agents work on the same project, Claude-Mem facilitates sharing context between them, ensuring a unified understanding of the project state.

Pricing overview

Claude-Mem is an open-source project available on GitHub under the repository thedotmack/claude-mem. There is no direct pricing information provided in the source material, as the software itself is free to use. Users can self-host the memory engine at no cost.

However, users should be aware of potential indirect costs:

  • Infrastructure: Self-hosting requires local compute resources or cloud servers, which may incur hosting fees depending on the setup.
  • API Usage: While the memory engine itself is free, the AI compression and embedding processes may rely on external APIs (depending on configuration), which could involve usage-based charges from providers like Anthropic, OpenAI, or others.
  • Maintenance: As an open-source tool, there may be implicit costs related to time spent configuring, maintaining, and troubleshooting the integration.

For those interested in commercial alternatives with managed infrastructure, you might want to review other options on ToolSeekAI tools.

Who should use it

Claude-Mem is ideal for developers and power users who work extensively with AI agents and require persistent state management. It is particularly suited for:

  • Software Engineers: Those using AI coding assistants for long-term projects who need the AI to remember refactoring decisions, bug fixes, and codebase structure.
  • AI Enthusiasts: Users experimenting with multi-agent systems or custom AI workflows who need a reliable way to pass context between different tools.
  • Researchers: Individuals conducting long-form research or analysis who need their AI assistant to retain and reference previous findings.
  • Self-Hosters: Privacy-conscious users who prefer to keep their interaction data local and under their own control rather than relying on proprietary cloud services.

Evaluation Context

Onboarding Flow: As an open-source GitHub repository, onboarding typically involves cloning the repo and following the installation instructions provided in the README. Users familiar with Python environments and vector databases like ChromaDB will find the setup straightforward.

Integration Considerations: The tool acts as a middleware layer. Users must ensure their chosen AI agent (e.g., Claude Code, Copilot) is configured to interact with the memory engine. Compatibility with specific versions of these agents should be verified, as updates to the primary AI tools may occasionally require adjustments to the memory engine.

Data and Privacy: Since the tool supports self-hosting, users have full control over their data. Memory storage via SQLite and ChromaDB means data remains local unless explicitly configured otherwise. This is a significant advantage for organizations with strict data governance policies.

Pricing Verification Checklist:

  • Is the software license free? Yes (Open Source).
  • Are there mandatory cloud dependencies? Not confirmed in the source, but likely configurable.
  • Does it require paid API keys for compression? Likely yes, depending on the embedding/compression provider selected.

Comparison Criteria: When comparing Claude-Mem to other memory solutions, consider factors such as supported agents, ease of self-hosting, storage efficiency (compression ratios), and retrieval accuracy (RAG performance).

FAQ

Q: Is Claude-Mem free to use? A: Yes, Claude-Mem is an open-source project available on GitHub. There is no licensing fee, though users may incur costs for infrastructure or API usage depending on their setup.

Q: Which AI agents are supported? A: It supports Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode, and potentially others.

Q: How does it handle data privacy? A: As an open-source tool, it can be self-hosted locally. Users store data using SQLite and ChromaDB, giving them full control over their information.

Q: What technology powers the memory retrieval? A: It uses embeddings and Retrieval-Augmented Generation (RAG) to find and apply relevant memories based on the current session context.

Q: Can I customize the compression algorithms? A: Yes, being open-source allows for customization of the engine, including how session data is compressed and stored.

Q: Where can I find the source code? A: The source code is publicly available on GitHub at github.com/thedotmack/claude-mem.

Why it stands out

  • Supports a wide variety of AI agents including Copilot, Gemini, and Claude Code.
  • Fully open-source with self-hosting capabilities for data privacy.
  • Uses AI-powered compression to reduce storage overhead.
  • Leverages RAG and embeddings for accurate context retrieval.
  • Lightweight storage backend using SQLite and ChromaDB.

Watch before using

  • No official pricing or managed service; requires self-hosting.
  • Potential indirect costs for API usage and infrastructure.
  • Setup complexity may be higher for non-technical users.
  • Compatibility with future agent updates is not guaranteed.
  • Limited documentation depth compared to commercial enterprise solutions.

FAQ

Is Claude-Mem free to use?
Yes, Claude-Mem is an open-source project available on GitHub. There is no licensing fee, though users may incur costs for infrastructure or API usage depending on their setup.
Which AI agents are supported?
It supports Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode, and potentially others.
How does it handle data privacy?
As an open-source tool, it can be self-hosted locally. Users store data using SQLite and ChromaDB, giving them full control over their information.
What technology powers the memory retrieval?
It uses embeddings and Retrieval-Augmented Generation (RAG) to find and apply relevant memories based on the current session context.
Can I customize the compression algorithms?
Yes, being open-source allows for customization of the engine, including how session data is compressed and stored.
Where can I find the source code?
The source code is publicly available on GitHub at github.com/thedotmack/claude-mem.

Related tools and alternatives

View all alternatives
ChatGPT

Chatbots

ChatGPT

ChatGPT by OpenAI is a flagship AI assistant for drafting, reasoning, file analysis, and coding. Offering free and paid tiers with robust features, it serves individuals and enterprises seeking versatile, general-purpose AI workflows.

FeaturedFreeFreeProductivity
Claude

Chatbots

Claude

Claude by Anthropic is an advanced AI assistant specializing in long-document analysis, structured reasoning, and high-quality editorial writing. Ideal for researchers, writers, and teams needing precise, calm, and nuanced text synthesis.

FeaturedFreeFreeProductivity
Perplexity

Chatbots

Perplexity

Perplexity is an AI-powered search engine that combines real-time web browsing with conversational AI. It delivers cited, synthesized answers, making it ideal for researchers and knowledge workers seeking verified, source-backed information quickly.

FeaturedFreeFreeProductivity
Gemini

Chatbots

Gemini

Gemini is Google's flagship multimodal AI model, deeply integrated into Workspace and Search. It offers advanced reasoning, 1M token context, and seamless productivity tools for users within the Google ecosystem.

FeaturedFreeFreeProductivity
About Lumo, the privacy-first AI assistant | Lumo by Proton

Chatbots

About Lumo, the privacy-first AI assistant | Lumo by Proton

Lumo by Proton is a privacy-first AI assistant offering zero-access encryption, open-source code, and GDPR compliance. It ensures conversations are never used for training or ads, available via web, iOS, and Android.

aboutlumo
G

Chatbots

GPT-Live

GPT-Live is OpenAI's real-time voice interaction feature for ChatGPT, enabling low-latency, natural conversations with AI agents.

gpt-liveopenai