> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/thedotmack/claude-mem/llms.txt
> Use this file to discover all available pages before exploring further.

# Claude Mem — Persistent Memory for Claude Code

> Automatically capture, compress, and inject context across every Claude Code session. Never lose what Claude learned.

Claude Mem is a Claude Code plugin that gives your AI coding sessions a long-term memory. Every tool call, file read, bug fix, and architectural decision gets captured, compressed using Claude's Agent SDK, and injected back into future sessions — automatically, with no manual intervention.

<CardGroup cols={2}>
  <Card title="Quick Start" icon="rocket" href="/installation">
    Install Claude Mem in two commands and start your first session with persistent memory.
  </Card>

  <Card title="How It Works" icon="brain" href="/usage/getting-started">
    Learn how lifecycle hooks capture your work and how context gets injected into new sessions.
  </Card>

  <Card title="Memory Search" icon="magnifying-glass" href="/usage/search-tools">
    Query your entire project history with natural language using MCP search tools.
  </Card>

  <Card title="Architecture" icon="diagram-project" href="/architecture/overview">
    Explore the system design: hooks, worker service, SQLite, and hybrid semantic search.
  </Card>
</CardGroup>

## Install in two commands

Open a new Claude Code session and run:

```bash theme={null}
/plugin marketplace add thedotmack/claude-mem
/plugin install claude-mem
```

Restart Claude Code. Context from your previous sessions will automatically appear at the start of every new session.

## What Claude Mem does

<Steps>
  <Step title="Captures every tool use">
    The `PostToolUse` hook fires after every file read, write, bash command, and search. Each tool execution is sent to the background worker for AI processing.
  </Step>

  <Step title="Compresses into structured observations">
    The worker service uses the Claude Agent SDK to extract structured observations — title, narrative, facts, file references, and semantic concepts — from raw tool data.
  </Step>

  <Step title="Injects context into new sessions">
    When you start a new Claude Code session, the `SessionStart` hook queries the database and injects a timeline of recent observations into your session context.
  </Step>

  <Step title="Lets you search your history">
    Use the built-in MCP tools (`search`, `timeline`, `get_observations`) to query your entire project history with natural language — in any session.
  </Step>
</Steps>

## Key features

<CardGroup cols={2}>
  <Card title="Progressive disclosure search" icon="layer-group" href="/usage/search-tools">
    3-layer MCP workflow: search index → timeline context → full details. \~10x token savings vs. naive RAG.
  </Card>

  <Card title="Privacy control" icon="lock" href="/usage/private-tags">
    Wrap any content in `<private>` tags to exclude it from memory storage at the hook level.
  </Card>

  <Card title="Web viewer UI" icon="display" href="/usage/getting-started">
    Real-time memory stream at `http://localhost:37777` with infinite scroll, project filtering, and settings.
  </Card>

  <Card title="Multiple AI providers" icon="sparkles" href="/usage/gemini-provider">
    Use Claude, Gemini (free tier available), or any OpenRouter model for observation processing.
  </Card>

  <Card title="Mode system" icon="sliders" href="/modes">
    Switch between coding, email investigation, and chill modes. 28+ languages supported.
  </Card>

  <Card title="OpenClaw integration" icon="dragon" href="/openclaw-integration">
    Add persistent memory to autonomous agents running on OpenClaw gateways.
  </Card>
</CardGroup>

<Note>
  Claude Mem is open source under AGPL-3.0. Source code is available at [thedotmack/claude-mem](https://github.com/thedotmack/claude-mem).
</Note>
