claude-mem is a free, open source ai development platforms project written in TypeScript and released under Apache-2.0. It has 110,572 GitHub stars, 9,645 forks and 186 open issues, and was last pushed 12 hours ago. On this registry it ranks #6 of 156 tracked projects in AI Development Platforms, with 5 head-to-head comparisons available. It gained 15,554 stars over the last 30 tracked days.

What is claude-mem?

claude-mem is an Apache-2.0 TypeScript memory layer for AI coding agents that captures what an agent did during a session, compresses it with AI, and injects the relevant parts back into future sessions, built for developers running Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode and similar tools.

What it is

claude-mem is a persistent context plugin that sits alongside an agent's own memory rather than replacing it. The README frames the split plainly: the agent remembers the user, while claude-mem remembers what the bot did, what was decided, and what to do next. Those notes are written to disk during a session and returned to the agent when a new session starts. The project lives in the Claude Code plugin ecosystem and the broader agent-tooling space, distributed as the claude-mem package on npm while the README announces a rename to Grok Mem. The package name is unchanged.

The concrete problem it solves is session amnesia. Agents are stateless between runs, so decisions, bug fixes and open threads are lost the moment a session ends. claude-mem replaces manual re-briefing and hand-written context files with automatic capture, AI compression, and layered retrieval that surfaces only the parts relevant to the current task. Storage and recall are backed by ChromaDB, and integration runs through the Claude Agent SDK.

Key capabilities

  • Persistent memory that survives across sessions, so context from earlier work appears automatically in new ones.
  • Progressive disclosure of memory, retrieving context in layers with token cost visibility rather than dumping everything into the prompt.
  • Skill-based search through the mem-search skill, letting an agent query its own project history on demand.
  • A Web Viewer UI serving a real-time memory stream at the worker URL printed on startup.
  • A Claude Desktop skill for searching stored memory from Claude Desktop conversations.
  • Privacy control that excludes sensitive content from capture using dedicated exclusion tags.
  • Provider choice at install time: the hosted claude-mem observer, a personal OpenRouter or Gemini key, or the user's existing Anthropic plan.

Who uses it and how

  • Claude Code users install through the plugin marketplace with /plugin marketplace add thedotmack/claude-mem and /plugin install claude-mem, then restart the editor.
  • OpenClaw gateway operators run a single curl -fsSL https://install.cmem.ai/openclaw.sh | bash command, which handles dependencies, plugin setup, provider configuration and worker startup, with optional real-time observation feeds to Telegram, Discord, Slack and similar channels.
  • Grok Bot deployments rely on chat log watching, because that host exposes no hooks; the default provider is hosted CMEM Pro and the local observer is opt-in via --provider host.
  • CI and other non-interactive shells complete installation without any account interaction by passing an explicit --provider flag or setting CLAUDE_MEM_ONLINE_OPTIN=false.
  • The awareness push pilot appends needle observations such as decision, bugfix, security_alert and sensitive as dated lines into a bot's memory/log/YYYY-MM.md, without touching profile.md, user memory or project memory.

Getting started

Install with npx claude-mem install, optionally adding --ide opencode, --ide antigravity or --ide grok-bot for those hosts, or use the /plugin commands inside Claude Code. Note that npm install -g claude-mem installs the SDK and library only, without registering plugin hooks or setting up the worker service.

How it compares

This registry lists no competing memory products to compare against, and the tools named in the claude-mem facts are the agents it plugs into rather than rivals, so it stands alone here as a memory layer for them. Its Apache-2.0 licence and npm distribution make the code inspectable and self-hostable regardless of which provider is chosen.

When to use it — and when not to

Adopting it means running a background worker service and choosing a memory provider: the hosted observer, which is free for the first 30 days and then falls back to the user's Anthropic plan unless subscribed, or a self-supplied OpenRouter or Gemini key or a local observer. Anyone who cannot run that worker, or who wants zero account interaction by default, should prefer explicit provider flags or skip the hosted path entirely. Two caveats are worth weighing: the README is currently dominated by a rebrand notice, so documentation of the underlying behaviour is thin, and the project carries 186 open issues against a very large user base.

project readme (upstream, from github) — read inline



Vercel OSS Program

Claude-Mem is now Grok Mem. The package is still claude-mem.

🇨🇳 中文 • 🇹🇼 繁體中文 • 🇯🇵 日本語 • 🇵🇹 Português • 🇧🇷 Português • 🇰🇷 한국어 • 🇪🇸 Español • 🇩🇪 Deutsch • 🇫🇷 Français • 🇮🇱 עברית • 🇸🇦 العربية • 🇷🇺 Русский • 🇵🇱 Polski • 🇨🇿 Čeština • 🇳🇱 Nederlands • 🇹🇷 Türkçe • 🇺🇦 Українська • 🇻🇳 Tiếng Việt • 🇵🇭 Tagalog • 🇮🇩 Indonesia • 🇹🇭 ไทย • 🇮🇳 हिन्दी • 🇧🇩 বাংলা • 🇵🇰 اردو • 🇷🇴 Română • 🇸🇪 Svenska • 🇮🇹 Italiano • 🇬🇷 Ελληνικά • 🇭🇺 Magyar • 🇫🇮 Suomi • 🇩🇰 Dansk • 🇳🇴 Norsk

Grok Mem is how Grok Bots remember. Sits next to Grok's own memory. Does not replace it.

Grok mem

License Version Node Mentioned in Awesome Claude Code

thedotmack/claude-mem | Trendshift


Quick Start • How It Works • Search Tools • Documentation • Configuration • Troubleshooting • License

Grok Mem is how Grok Bots remember the work. Grok already remembers you. Grok Mem remembers what the bot did, what we decided, what to do next. Those notes come back in the next chat.


Quick Start

Install Grok Mem for Grok Bot. The package name is still claude-mem.

npx claude-mem install --ide grok-bot

Grok Bot has no host hooks, so we watch the chat log files. Default is CMEM Pro, the hosted memory. Local observer is opt-in: --provider host. Installing this plugin does not install Cursor.

Awareness push pilot (LFG + Orifice): needle observations (decision, bugfix, security_alert, sensitive) are appended as dated - YYYY-MM-DD [awareness] … lines into that bot's memory/log/YYYY-MM.md. Grok Bot already re-reads the log from disk. This does not write profile.md, user-memory, or project memory. Disable with CLAUDE_MEM_GROK_BOT_AWARENESS_ENABLED=false.

Install with a single command:

npx claude-mem install

The installer sets everything up first, then asks you to sign in to claude-mem in your browser (email magic link — no card required). Signing in provisions a memory key for your account and unlocks the claude-mem observer: memory that runs off-plan, free for your first 30 days, so you get up to 100% more usage from your plan. When the free trial ends, memory automatically falls back to your Anthropic plan unless you subscribe. After sign-in you pick your memory provider — the claude-mem observer, your own OpenRouter or Gemini key, or your Anthropic plan.

Prefer to skip the sign-in? Pass an explicit --provider flag, set CLAUDE_MEM_ONLINE_OPTIN=false, or run in CI/non-interactive shells — the installer completes without any account interaction.

Or install for OpenCode:

npx claude-mem install --ide opencode

Or install for Antigravity CLI (setup guide):

npx claude-mem install --ide antigravity

Or install from the plugin marketplace inside Claude Code:

/plugin marketplace add thedotmack/claude-mem

/plugin install claude-mem

Restart Claude Code. Context from previous sessions will automatically appear in new sessions.

Note: Claude-Mem is also published on npm, but npm install -g claude-mem installs the SDK/library only — it does not register the plugin hooks or set up the worker service. Always install via npx claude-mem install or the /plugin commands above.

🦞 OpenClaw Gateway

Install claude-mem as a persistent memory plugin on OpenClaw gateways with a single command:

curl -fsSL https://install.cmem.ai/openclaw.sh | bash

The installer handles dependencies, plugin setup, AI provider configuration, worker startup, and optional real-time observation feeds to Telegram, Discord, Slack, and more. See the OpenClaw Integration Guide for details.

Key Features:

  • 🧠 Persistent Memory - Context survives across sessions
  • 📊 Progressive Disclosure - Layered memory retrieval with token cost visibility
  • 🔍 Skill-Based Search - Query your project history with mem-search skill
  • 🖥️ Web Viewer UI - Real-time memory stream at the worker URL printed on startup
  • 💻 Claude Desktop Skill - Search memory from Claude Desktop conversations
  • 🔒 Privacy Control - Use `` tags to exclude sensitive content from storage
  • ⚙️ Context Configuration - Fine-grained control over what context gets injected
  • 🤖 Automatic Operation - No manual intervention required
  • 🔗 Citations - Reference past observations with IDs through the worker API or view all in the web viewer

Documentation

📚 View Full Documentation - Browse on official website

Getting Started

  • Installation Guide - Quick start & advanced installation
  • Usage Guide - How Claude-Mem works automatically
  • Search Tools - Query your project history with natural language
  • Cloud Sync - Back up your memories to cmem.ai — no daemon, the worker syncs on write

Best Practices

Architecture

Configuration & Development


How It Works

Core Components:

  1. 5 Lifecycle Hooks - SessionStart, UserPromptSubmit, PostToolUse, Stop, SessionEnd (6 hook scripts)
  2. Smart Install - Cached dependency checker (pre-hook script, not a lifecycle hook)
  3. Worker Service - Local HTTP API with web viewer UI and search endpoints, managed by Bun
  4. SQLite Database - Stores sessions, observations, summaries
  5. mem-search Skill - Natural language queries with progressive disclosure
  6. Chroma Vector Database - Hybrid semantic + keyword search for intelligent context retrieval

See Architecture Overview for details.


MCP Search Tools

Claude-Mem provides intelligent memory search through 4 MCP tools following a token-efficient 3-layer workflow pattern:

The 3-Layer Workflow:

  1. search - Get compact index with IDs (~50-100 tokens/result)
  2. timeline - Get chronological context around interesting results
  3. get_observations - Fetch full details ONLY for filtered IDs (~500-1,000 tokens/result)

How It Works:

  • Claude uses MCP tools to search your memory
  • Start with search to get an index of results
  • Use timeline to see what was happening around specific observations
  • Use get_observations to fetch full details for relevant IDs
  • ~10x token savings by filtering before fetching details

Available MCP Tools:

  1. search - Search memory index with full-text queries, filters by type/date/project
  2. timeline - Get chronological context around a specific observation or query
  3. get_observations - Fetch full observation details by IDs (always batch multiple IDs)

Example Usage:

// Step 1: Search for index
search(query="authentication bug", type="bugfix", limit=10)

// Step 2: Review index, identify relevant IDs (e.g., #123, #456)

// Step 3: Fetch full details
get_observations(ids=[123, 456])

See Search Tools Guide for detailed examples.


Release Branches

Stable releases ship from main and are published to npm. core-dev and community-edge are source-run branches for early reliability fixes and community integrations. See Release Branches for the branch flow and non-stable run instructions.


System Requirements

  • Node.js: 20.0.0 or higher
  • Claude Code: Latest version with plugin support
  • 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)

Windows Setup Notes

If you see an error like:

npm : The term 'npm' is not recognized as the name of a cmdlet

Make sure Node.js and npm are installed and added to your PATH. Download the latest Node.js installer from https://nodejs.org and restart your terminal after installation.


Configuration

Settings are managed in ~/.claude-mem/settings.json (auto-created with defaults on first run). Configure AI model, worker port, data directory, log level, and context injection settings.

See the Configuration Guide for all available settings and examples.

Mode & Language Configuration

Claude-Mem supports multiple workflow modes and languages via the CLAUDE_MEM_MODE setting.

This option controls both:

  • The workflow behavior (e.g. code, chill, investigation)
  • The language used in generated observations
How to Configure

Edit your settings file at ~/.claude-mem/settings.json:

{
  "CLAUDE_MEM_MODE": "code--zh"
}

Modes are defined in plugin/modes/. To see all available modes locally:

ls ~/.claude/plugins/marketplaces/thedotmack/plugin/modes/
Available Modes
Mode Description
code Default English mode
code--zh Simplified Chinese mode
code--ja Japanese mode

Language-specific modes follow the pattern code--[lang] where [lang] is the ISO 639-1 language code (e.g., zh for Chinese, ja for Japanese, es for Spanish).

Note: code--zh (Simplified Chinese) is already built-in — no additional installation or plugin update is required.

After Changing Mode

Restart Claude Code to apply the new mode configuration.

Development

See the Development Guide for build instructions, testing, and contribution workflow.


Troubleshooting

If experiencing issues, describe the problem to Claude and the troubleshoot skill will automatically diagnose and provide fixes.

See the Troubleshooting Guide for common issues and solutions.


Bug Reports

Create comprehensive bug reports with the automated generator:

cd ~/.claude/plugins/marketplaces/thedotmack
npm run bug-report

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes with tests
  4. Update documentation
  5. Submit a Pull Request

Claude-Mem ships from three branches: main (stable), core-dev, and community-edge. Only main is published to npm; the others are run from source. See Release Branches for the strategy and local run instructions.

See Development Guide for contribution workflow.


License

Claude-Mem is licensed under the Apache License 2.0.

We chose Apache-2.0 because durable agentic memory should be easy to embed in developer tools, local agents, MCP servers, enterprise systems, robotics stacks, and production agent harnesses.

See the LICENSE file for full details. See docs/license.md and docs/ip-boundary.md for licensing scope and the open/commercial boundary.

Note on Ragtime: The ragtime/ directory is licensed under the Apache License 2.0. See ragtime/LICENSE for details.


Support


Built with Claude Agent SDK | Works with Claude Code | Made with TypeScript


What About CMEM?

CMEM is a token created by a 3rd party but officially embraced by the creator of Claude-Mem (Alex Newman, @thedotmack). The token acts as a community catalyst for growth and a vehicle for bringing CMEM to the developers and knowledge workers that need it most.

Official BASE CA: 0x76b1967eec0ccaeb001bbbb2b40dc4badba31ba3

Frequently asked questions

Is claude-mem free to use?

claude-mem is open source under the Apache-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does claude-mem do?

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context b

What is claude-mem written in?

claude-mem is primarily written in TypeScript. Its source is publicly available at https://github.com/thedotmack/claude-mem, and it has 110,572 GitHub stars.