Skip to content

thedotmack/claude-mem

⭐ 74,313  ·  TypeScript  ·  GitHub Repo

A Claude Code plugin that automatically captures everything Claude does during your coding sessions, compresses it with AI (using Claude's agent-sdk), and injects relevant context back into future sessions.

ai ai-agents ai-memory anthropic artificial-intelligence chromadb claude claude-agent-sdk

1-Sentence Summary

Automatic, persistent memory for Claude Code that captures, compresses, and injects context across sessions.

🔥 Key Capabilities & USP

  • Automatic Context Capture & Compression - Every tool call and observation during your coding session is recorded and then semantically compressed using Claude's agent-sdk. This solves the fundamental pain point of AI assistants forgetting project state between sessions, eliminating the need for manual note-taking or context re-priming.

  • Progressive Disclosure - A layered memory retrieval strategy that injects historical context based on relevance and token cost. Instead of dumping everything into the context window, it intelligently prioritizes the most pertinent memories, keeping your token budget efficient while maintaining continuity.

  • Skill-Based Semantic Search - The mem-search skill lets you query your entire project history using natural language. Powered by a hybrid search engine combining Chroma vector database and SQLite FTS5, this turns your accumulated session history into a searchable, actionable knowledge base.

  • Real-Time Web Viewer & API - A live memory stream at http://localhost:37777 provides 10 search endpoints with observation citations. You can trace exactly where a memory came from, making the system transparent and auditable.

  • Multi-IDE & Multi-Platform - Works with Claude Code, Gemini CLI, and OpenCode out of the box, with additional integration for OpenClaw gateways and notification feeds to Telegram, Discord, and Slack. This is a cross-platform memory layer, not a single-IDE hack.

Architecture

Technical Architecture

ComponentTechnologyRole
Lifecycle Hooks6 shell scripts (SessionStart, UserPromptSubmit, PostToolUse, Stop, SessionEnd)Capture all events during a coding session
Worker ServiceBun runtime, HTTP API on port 37777Provides web viewer UI and search endpoints
Local StorageSQLite with FTS5Full-text search for local memory storage
Vector SearchChroma vector databaseHybrid semantic search for relevance ranking
AI CompressionClaude agent-sdkGenerates semantic summaries from raw observations
Smart InstallCached dependency checker (pre-hook script)Efficient setup with dependency caching

Quick Start Guide

bash
# Install the plugin into Claude Code
npx claude-mem install
bash
# Install for Gemini CLI
npx claude-mem install --ide gemini-cli
bash
# Install for OpenCode
npx claude-mem install --ide opencode
bash
# Alternative: Install via Claude Code plugin marketplace
/plugin marketplace add thedotmack/claude-mem
/plugin install claude-mem
bash
# For OpenClaw gateway integration
curl -fsSL https://install.cmem.ai/openclaw.sh | bash

Pros, Cons & Use Cases

Pros

  • Fully automatic - Zero manual intervention required once installed; memory capture and injection happen transparently.
  • Privacy controls - Use <private> tags to exclude sensitive content from being captured.
  • Fine-grained configuration - Control exactly how much context gets injected into each session.
  • Traceable citations - Every memory includes an observation ID, enabling full audit trails.
  • Multi-language documentation - Broad community adoption with accessible onboarding.

Cons

  • Node.js >=18.0.0 required - Not compatible with older runtime environments.
  • External AI dependency - Relies on Claude agent-sdk for compression; no offline fallback.
  • Beta features are experimental - Endless Mode and other advanced features may have stability issues.
  • Local resource consumption - Worker service runs on port 37777, consuming CPU and memory.

Who should NOT use this?

  • Developers on resource-constrained machines - The worker service and Chroma vector database add overhead that may impact low-spec systems.
  • Teams with strict air-gapped or offline requirements - The AI compression step requires external API calls to Claude.
  • Short-session workflows - If your coding sessions are consistently under 5 minutes, the setup overhead outweighs the benefit.
  • Projects with highly sensitive IP - Even with <private> tags, the dependency on external AI services may violate compliance policies.

Ideal Use Cases

  • Long-running, complex projects - Weeks or months of development where context continuity dramatically reduces re-priming time.
  • Multi-developer codebases - New team members can benefit from accumulated project memory without reading through entire commit histories.
  • Research and exploratory coding - When you need to revisit experimental branches or debugging sessions weeks later.
  • CI/CD and automation workflows - Pair with notification feeds to Discord/Slack/Telegram for real-time monitoring of AI agent activity.

Community & Activity

74,313 stars on GitHub signals massive community validation and rapid adoption. This is not a niche experiment—it's one of the most popular AI agent tools on the platform. The project is actively maintained, with the last update on May 10, 2026, indicating ongoing development and feature iteration. The extensive topic tags (from chromadb to supermemory) show a well-architected project that integrates with the broader AI agent ecosystem rather than existing in isolation. With multi-language documentation and support for three major coding assistants (Claude Code, Gemini CLI, OpenCode), the project has clearly invested in accessibility and cross-platform compatibility. The momentum here is real—this is the kind of tool that changes how teams think about AI-assisted development.

Project data from GitHub API, updated in real-time