What It Does

claude-mem gives any AI agent persistent, cross session context memory: it captures everything the agent does in a session, compresses it with AI, and injects the relevant context into future sessions. It records all of the agent's behavior during a session, compresses and summarizes it with AI, and recalls relevant context on demand in later sessions. It supports a long list of hosts: Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, and OpenCode. For privacy minded users, tightening system level data collection pairs well with this project; see Turn Off Windows 11 Ads, Recommendations, and Telemetry.

The Problem It Solves

By default an AI agent loses context when the session ends and must re gather background on restart. claude-mem solves the core pain of long term memory and cross session continuity in multi agent workflows by recording session behavior, compressing it for storage, and injecting it on demand later. In other words, it lets the agent remember what you did before and how, instead of starting from zero every time.

Language and Architecture

  • Main language is TypeScript.
  • The storage layer uses SQLite, accessed directly through bun:sqlite with schema migration, layered with ChromaDB for vector and embedding sync and several search strategies.
  • A worker-service runs in the background, listens on a local port, and routes providers by session source, for example codex routes to codex; sync-api is deployed through fly.toml and runs as non root.
  • It captures Read and Edit through a PostToolUse hook and injects context through a SessionStart hook; the viewer frontend uses SSE for live feedback; it ships installers for many IDEs, covering Cursor, Gemini CLI, OpenCode, Windsurf, OpenClaw, and MCP.
  • Runtime depends on Bun, Node 20 or newer, uv for Python, and Docker.

License

Apache-2.0

Agent memory is a core topic in 2026, and multi agent workflows have a strong need for durable context. The project positions itself as Every Agent, a universal memory layer, and iterates extremely fast, at version 15.9.0 with nearly 3,900 commits. It gained about 1,139 stars that day.

https://github.com/thedotmack/claude-mem (site https://claude-mem.ai)

Summary

claude-mem turns the agent memory pain point into a universal, pluggable layer. Its Every Agent positioning is host agnostic and its iteration is quick, which makes it a memory base worth trying for anyone running agent workflows over time.

Getting Started

First run SQLite and ChromaDB locally to confirm memory writes and reads, then connect it to your agent host. The PostToolUse and SessionStart hooks are the heart of its memory, so do not disable them. The multi IDE installer covers a wide range, so pick the one for your editor. On privacy, enable it only on trusted projects and keep it off in sensitive environments. The version moves fast, so glance at the changelog before updating to avoid schema changes breaking your existing memory. Treat it like any local datastore you care about, with a backup plan, because once it holds weeks of context you will not want to lose the file to a single disk error.

FAQ

Where does it store my data? By default locally, in SQLite plus ChromaDB, with both structured and vector data on your machine. So it is more a local memory store than a cloud service.

How is it different from a model's built in memory? Many models forget the moment a session closes, or remember shallowly. claude-mem explicitly captures your tool calls and edits, compresses them, and injects them across sessions, so the memory is more continuous and more controllable, and you can see what it kept.

Does it record too much private data? It records behavior during a session, which is a double edged sword. If you care, tighten system level privacy as well, and only enable it on projects you trust, never bare on a public or sensitive environment.