HubLensClaudethedotmack/claude-mem
// archived 2026-04-18
thedotmack

claude-mem

AI#Claude#LLM#Memory#TypeScript#SQLite
View on GitHub
201

// summary

Claude-Mem is a persistent memory compression system designed to maintain context across sessions for Claude Code and similar CLI tools. It automatically captures tool usage and generates semantic summaries to ensure continuity of project knowledge. The system includes a web viewer, hybrid search capabilities, and fine-grained privacy controls for developers.

// technical analysis

Claude-Mem is a persistent memory and context management system designed specifically for Claude Code to bridge the gap between disconnected AI sessions. By utilizing a combination of lifecycle hooks, a local SQLite database, and a hybrid search architecture (FTS5 and Chroma vector database), it enables agents to retain project knowledge over time. The project prioritizes token efficiency through a progressive disclosure workflow, ensuring that only relevant context is retrieved, which significantly optimizes performance and cost for long-running development tasks.

// key highlights

01
Provides persistent memory that allows AI agents to maintain project context and continuity across multiple sessions.
02
Implements a token-efficient 3-layer search workflow that filters information before fetching full details to save on context costs.
03
Features a real-time web viewer UI at localhost:37777 for monitoring memory streams and managing observations.
04
Supports privacy controls via <private> tags to prevent sensitive information from being stored in the memory database.
05
Utilizes a hybrid search engine combining SQLite FTS5 for keyword matching and Chroma for semantic vector retrieval.
06
Offers an automated, zero-intervention architecture that captures tool usage and generates summaries through lifecycle hooks.

// use cases

01
Persistent cross-session context preservation for AI agents
02
Skill-based natural language memory search with progressive disclosure
03
Real-time memory stream monitoring via a local web viewer UI

// getting started

To begin, install the plugin using the command 'npx claude-mem install' or by using the '/plugin marketplace add thedotmack/claude-mem' command within Claude Code. Once installed, restart your CLI tool to enable automatic context persistence. You can then explore your memory history via the web viewer at http://localhost:37777 or by using the built-in MCP search tools.