5d64df2ba5
Documentation Updates: - README.md: Updated version badge, What's New, and search section - docs/usage/search-tools.mdx: Rewrote for skill-based natural language approach - docs/architecture/mcp-search.mdx → search-architecture.mdx: Complete rewrite - docs/architecture/overview.mdx: Updated components and search pipeline - docs/usage/getting-started.mdx: Added skill-based search section - docs/configuration.mdx: Updated search configuration for v5.4.0 - docs/introduction.mdx: Updated key features - docs/docs.json: Updated navigation to search-architecture Key Changes: - Emphasized ~2,250 token savings per session start - Converted all examples to natural language queries - Documented 10 HTTP API endpoints - Explained progressive disclosure pattern - Added migration notes (transparent, no user action required) - Removed outdated MCP references 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
106 lines
5.4 KiB
Plaintext
106 lines
5.4 KiB
Plaintext
---
|
|
title: "Introduction"
|
|
description: "Persistent memory compression system for Claude Code"
|
|
---
|
|
|
|
# Claude-Mem
|
|
|
|
**Persistent memory compression system for Claude Code**
|
|
|
|
Claude-Mem seamlessly preserves context across sessions by automatically capturing tool usage observations, generating semantic summaries, and making them available to future sessions. This enables Claude to maintain continuity of knowledge about projects even after sessions end or reconnect.
|
|
|
|
## Quick Start
|
|
|
|
Start a new Claude Code session in the terminal and enter the following commands:
|
|
|
|
```bash
|
|
/plugin marketplace add thedotmack/claude-mem
|
|
/plugin install claude-mem
|
|
```
|
|
|
|
Restart Claude Code. Context from previous sessions will automatically appear in new sessions.
|
|
|
|
## Key Features
|
|
|
|
- 🧠 **Persistent Memory** - Context survives across sessions
|
|
- 🔍 **Skill-Based Search** - Query your project history with natural language (~2,250 token savings)
|
|
- 🌐 **Web Viewer UI** - Real-time memory stream visualization at http://localhost:37777
|
|
- 🎨 **Theme Toggle** - Light, dark, and system preference themes
|
|
- 🤖 **Automatic Operation** - No manual intervention required
|
|
- 📊 **FTS5 Search** - Fast full-text search across observations
|
|
- 🔗 **Citations** - Reference past decisions with `claude-mem://` URIs
|
|
|
|
## How It Works
|
|
|
|
```
|
|
┌─────────────────────────────────────────────────────────────┐
|
|
│ Session Start → Inject context from last 10 sessions │
|
|
└─────────────────────────────────────────────────────────────┘
|
|
↓
|
|
┌─────────────────────────────────────────────────────────────┐
|
|
│ User Prompts → Create session, save user prompts │
|
|
└─────────────────────────────────────────────────────────────┘
|
|
↓
|
|
┌─────────────────────────────────────────────────────────────┐
|
|
│ Tool Executions → Capture observations (Read, Write, etc.) │
|
|
└─────────────────────────────────────────────────────────────┘
|
|
↓
|
|
┌─────────────────────────────────────────────────────────────┐
|
|
│ Worker Processes → Extract learnings via Claude Agent SDK │
|
|
└─────────────────────────────────────────────────────────────┘
|
|
↓
|
|
┌─────────────────────────────────────────────────────────────┐
|
|
│ Session Ends → Generate summary, ready for next session │
|
|
└─────────────────────────────────────────────────────────────┘
|
|
```
|
|
|
|
**Core Components:**
|
|
1. **5 Lifecycle Hooks** - SessionStart, UserPromptSubmit, PostToolUse, Stop, SessionEnd
|
|
2. **Worker Service** - HTTP API on port 37777 managed by PM2
|
|
3. **SQLite Database** - Stores sessions, observations, summaries with FTS5 search
|
|
4. **9 MCP Search Tools** - Query historical context with citations
|
|
5. **Web Viewer UI** - Real-time visualization with SSE and infinite scroll
|
|
|
|
See [Architecture Overview](architecture/overview) for details.
|
|
|
|
## System Requirements
|
|
|
|
- **Node.js**: 18.0.0 or higher
|
|
- **Claude Code**: Latest version with plugin support
|
|
- **PM2**: Process manager (bundled - no global install required)
|
|
- **SQLite 3**: For persistent storage (bundled)
|
|
|
|
## What's New in v5.1.2
|
|
|
|
**Latest Updates (v5.1.2):**
|
|
- Theme toggle for light, dark, and system preferences in viewer UI
|
|
- Improved visual design with theme-aware components
|
|
|
|
**Recent Updates (v5.1.0):**
|
|
- Web-based viewer UI for real-time memory stream visualization
|
|
- Server-Sent Events (SSE) for instant updates
|
|
- Infinite scroll pagination with project filtering
|
|
- 8 new HTTP/SSE endpoints in worker service
|
|
|
|
**Previous Updates (v4.3.1):**
|
|
- Fixed SessionStart hook context injection
|
|
- Smart install caching for Windows compatibility
|
|
- Progressive disclosure context with observation timelines
|
|
|
|
## Next Steps
|
|
|
|
<CardGroup cols={2}>
|
|
<Card title="Installation" icon="download" href="/installation">
|
|
Quick start & advanced installation
|
|
</Card>
|
|
<Card title="Getting Started" icon="rocket" href="/usage/getting-started">
|
|
Learn how Claude-Mem works automatically
|
|
</Card>
|
|
<Card title="Architecture" icon="sitemap" href="/architecture/overview">
|
|
System components & data flow
|
|
</Card>
|
|
<Card title="Search Tools" icon="magnifying-glass" href="/usage/search-tools">
|
|
Query your project history
|
|
</Card>
|
|
</CardGroup>
|