Repolode
thedotmack

thedotmack/claude-mem

Persistent memory for coding agents that captures session activity, compresses it with AI, and injects relevant context into future sessions.

Stars
101,763
Forks
8,950
Open issues
92
Last commit
24 hours ago

What is it?

Claude-Mem is a memory layer for AI coding agents. It records the tool usage and observations from each session, generates compressed semantic summaries with an AI model, and makes them available when a later session starts, so the agent keeps track of a project after a session ends or reconnects.

It is built around lifecycle hooks in Claude Code, with installers for other hosts such as OpenCode, Codex, OpenClaw and T3 Code. A local worker service exposes an HTTP API and a web viewer, and stores data in SQLite with FTS5 search. Chroma provides vector search, so queries can combine semantic and keyword matching.

Agents query memory through four MCP tools using a three-step pattern: a compact search index, a timeline around matching results, then full details only for selected IDs. Content wrapped in private tags is excluded from storage, and a mode setting controls workflow style and the language of generated observations.

Key features

  • 01Captures tool usage and session observations automatically through lifecycle hooks.
  • 02Compresses session activity into semantic summaries using an AI model.
  • 03Injects relevant past context into new sessions at startup.
  • 04Provides MCP search tools with a token-efficient three-step retrieval flow.
  • 05Combines SQLite full-text search with Chroma vector search.
  • 06Includes a local web viewer and HTTP API for browsing memory.

Use cases

  • Keeping project context across many Claude Code sessions on a long-running codebase.
  • Letting an agent recall earlier bug fixes and design decisions without re-reading full transcripts.
  • Searching past agent work by keyword, type, or date through MCP tools.

Quick start

  1. 1

    Install the plugin with one command

    npx claude-mem install
  2. 2

    Sign in to claude-mem in your browser (email magic link) or pick a provider

  3. 3

    Restart Claude Code; past session context will appear in new sessions

Things to know

  • Signing in unlocks the claude-mem observer with a 30-day free trial; after that, memory falls back to your Anthropic plan unless you subscribe.
  • The npm package installs only the SDK/library, so use the npx installer or the /plugin commands to get the hooks and worker service.
  • Node.js 20 or later is required.

Topics

FAQ

What is claude-mem?
Persistent memory for coding agents that captures session activity, compresses it with AI, and injects relevant context into future sessions. Claude-Mem is a memory layer for AI coding agents. It records the tool usage and observations from each session, generates compressed semantic summaries with an AI model, and makes them available when a later session starts, so the agent keeps track of a project after a session ends or reconnects.
Is claude-mem free to use? What license does it have?
claude-mem is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is claude-mem still maintained?
Actively maintained. The last commit to claude-mem was on Oct 19, 2026.
What can I use claude-mem for?
Keeping project context across many Claude Code sessions on a long-running codebase. Letting an agent recall earlier bug fixes and design decisions without re-reading full transcripts. Searching past agent work by keyword, type, or date through MCP tools.
How do I install claude-mem?
Install the plugin with one command: npx claude-mem install Sign in to claude-mem in your browser (email magic link) or pick a provider Restart Claude Code; past session context will appear in new sessions
Where can I get claude-mem?
The source code and installation instructions are on GitHub: https://github.com/thedotmack/claude-mem

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects