Claude-Mem gives coding agents memory that outlives a single session. It hooks into the agent's lifecycle, records what tools were used and why, condenses those observations into semantic summaries, and injects the relevant context back into later sessions, so an agent keeps working knowledge of a project after a session ends or reconnects.
It was built for Claude Code and installs there as a plugin, with additional install paths for OpenCode, the Antigravity CLI, and OpenClaw gateways. The npm package on its own is the SDK/library; the plugin hooks and worker service are set up through the installer.
The system has six core parts: five lifecycle hooks (SessionStart, UserPromptSubmit, PostToolUse, Stop, SessionEnd), a cached dependency checker, a local HTTP worker service managed by Bun that also serves a web viewer, a SQLite database of sessions, observations, and summaries with FTS5 full-text search, a mem-search skill for natural-language queries, and a Chroma vector database for hybrid semantic and keyword retrieval. An optional cloud sync mirrors the local database to cmem.ai and exposes a private MCP endpoint.
Memory search over MCP follows a three-layer pattern that limits token spend: search returns a compact index with IDs (about 50–100 tokens per result), timeline shows the chronological context around a hit, and get_observations fetches full details only for the IDs you select (about 500–1,000 tokens per result).
Features
- Persistent memory: context from earlier sessions is captured automatically and surfaces in new ones without manual steps
- Progressive disclosure: layered retrieval that shows the token cost of each step before fetching full detail
- MCP search tools: search, timeline, and get_observations with filters by type, date, and project
- mem-search skill: natural-language queries over project history from inside the agent
- Web viewer: a real-time memory stream served at the worker URL printed on startup
- Claude Desktop skill: search stored memory from Claude Desktop conversations
- Privacy control: tags exclude sensitive content from storage
- Context configuration: settings for what context is injected and when
- Citations: observation IDs referenced through the worker API or browsed in the viewer
- OpenClaw integration: an installer sets up the plugin, provider configuration, worker, and optional observation feeds to Telegram, Discord, or Slack
- Cloud sync: the worker syncs on write to cmem.ai with no separate daemon
Integrates with
Alternatives
Engram
Cross-session memory store for AI coding agents, exposed over MCP with local SQLite full-text search
Iai Personal Memory Engine
Independent Autistic Intelligence — a cyber brain for your AI. It never forgets a detail, remembers exactly what you said, and learns how yo
Memorix
Open-source cross-agent memory layer for coding agents via MCP. Compatible with Claude Code, Codex, Cursor, Windsurf, Gemini CLI, Antigravit
