DEV.co
RAG Frameworks · thedotmack

claude-mem

Claude-Mem is a JavaScript plugin that automatically captures and compresses context from AI agent sessions, storing relevant information and reinjecting it into future sessions. It works with Claude Code, OpenCode, and other AI agents to maintain project continuity across disconnected work periods.

Source: GitHub — github.com/thedotmack/claude-mem
86.4k
GitHub stars
7.5k
Forks
JavaScript
Primary language
Apache-2.0
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositorythedotmack/claude-mem
Ownerthedotmack
Primary languageJavaScript
LicenseApache-2.0 — OSI-approved
Stars86.4k
Forks7.5k
Open issues235
Latest releasev13.10.2 (2026-07-05)
Last updated2026-07-08
Sourcehttps://github.com/thedotmack/claude-mem

What claude-mem is

Node.js/JavaScript-based memory system using embeddings and semantic compression to capture tool observations, generate summaries, and perform retrieval-augmented generation (RAG) via SQLite and ChromaDB backends. Operates through lifecycle hooks in Claude Code and integrates with the OpenClaw gateway as a persistent worker service.

Quickstart

Get the claude-mem source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/thedotmack/claude-mem.gitcd claude-mem# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Long-running AI agent projects

Maintain continuity across multiple Claude Code sessions when building features, debugging, or refactoring complex codebases. Agents recall prior analysis and architectural decisions without manual context setup.

Multi-agent system orchestration

Share compressed context across different AI agents (Gemini, Copilot, Hermes) working on the same project. Reduces redundant analysis and accelerates onboarding of new agent instances.

Embedded memory in deployed agents

Deploy as OpenClaw gateway plugin to add persistent memory to production AI agents and autonomous systems. Web UI provides real-time visibility into memory operations.

Implementation considerations

  • Requires Node.js ≥20.0.0; install via `npx claude-mem install` to properly register hooks and worker service, not via direct npm install.
  • Memory storage backends (SQLite, ChromaDB) run locally; plan for disk space and database maintenance as memory grows over time.
  • Embedding model selection affects quality and cost; configuration needed for AI provider (Anthropic, OpenAI, etc.) and token budgets.
  • Use `<private>` tags in agent outputs to exclude sensitive data from storage; no automatic PII detection or redaction.
  • Worker service runs as persistent Bun process; requires process management or systemd integration for production uptime.

When to avoid it — and what to weigh

  • Single-session, stateless workflows — If your agent work is one-off or sessions are complete and discarded, the overhead of memory capture and retrieval will not provide value.
  • Strict data residency or air-gapped environments — Claude-Mem stores compressed summaries locally but requires node runtime and external embedding models; offline-only scenarios or regulated data isolation may be problematic.
  • Real-time, latency-critical agent responses — Memory retrieval and context injection add processing overhead; agents requiring sub-second response times may see noticeable latency during memory lookups.
  • Teams with no Node.js or JavaScript infrastructure — Installation and configuration require npm/Node.js tooling and familiarity with Claude Code plugin architecture or OpenClaw gateways.

License & commercial use

Apache License 2.0 (Apache-2.0). Permissive OSI-approved open-source license allowing commercial use, modification, and distribution with proper attribution and liability/warranty disclaimers.

Apache-2.0 permits commercial use without explicit permission requirement. However, verify compatibility with your deployment environment (e.g., OpenClaw, embedding providers, data hosting) and review any third-party dependencies for their own license restrictions. No warranty or support guarantees in license text.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationStrong
License clarityClear
Deployment complexityModerate
DEV.co fitGood
Assessment confidenceHigh
Security considerations

Local storage of summaries and embeddings via SQLite/ChromaDB; no end-to-end encryption mentioned. <private> tag mechanism allows opt-out of memory capture but is manual and depends on agent discipline. No audit logging, access control, or data deletion workflow documented. Review data residency requirements before storing compressed agent context; verify embedding provider's data handling if using external models.

Alternatives to consider

Mem0

Standalone memory management platform for AI agents; offers managed SaaS and on-premise options with multi-agent support, but requires API integration rather than plugin-based deployment.

LangChain memory modules (ConversationBufferMemory, etc.)

Lightweight in-process memory primitives for Python/JS; simpler for development but lack cross-session persistence and semantic compression out of the box.

RAG frameworks (LlamaIndex, Pinecone vector store)

General-purpose retrieval-augmented generation systems; more flexible for custom backends and scaling but require more plumbing to integrate with agent workflows.

Software development agency

Build on claude-mem with DEV.co software developers

Start with `npx claude-mem install` to enable automatic context preservation across sessions. Review the docs for configuration, integrations, and best practices—or consult our team for production deployments.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related on DEV.co

Explore the category and the services that help you build with it.

claude-mem FAQ

Does Claude-Mem work with local/self-hosted LLMs?
Unknown. Docs mention Claude, Gemini, Copilot, Hermes, OpenCode as supported agents, but no explicit guidance on local model inference or open-source LLM backends.
Can I export or backup stored memories?
Not clearly stated in provided data. Web UI viewer shows memory stream, but export format and backup procedures are not documented in the excerpt.
What happens to memory if I switch embedding models?
Unknown. Changing embedding providers mid-project may render stored embeddings stale or incompatible; reindexing process not documented.
How much does the worker service cost to run?
Claude-Mem itself is free and open-source. Costs depend on embedding model provider (Anthropic, OpenAI, etc.), storage infrastructure, and optional integrations (Slack, Discord). Must estimate separately.

Work with a software development agency

From first prototype to production, DEV.co delivers software development services around tools like claude-mem. Our software development agency staffs experienced software developers and web developers for custom software development, web development, integrations, and ongoing support across rag frameworks and beyond.

Ready to Add Persistent Memory to Your AI Agents?

Start with `npx claude-mem install` to enable automatic context preservation across sessions. Review the docs for configuration, integrations, and best practices—or consult our team for production deployments.