Persistent memory for Claude Code, Codex and other AI coding agents - free plugin, your choice of provider
claude-mem is an open-source plugin that gives AI coding agents a persistent memory. It captures what happens during each session, compresses it with AI, and injects the relevant context back into future sessions, so the agent picks up where you left off instead of starting from a blank page.
It installs with a single command and now hooks into far more than Claude Code: Codex, Gemini, Copilot, OpenCode, Cursor, Grok, T3 Code and several other agent harnesses. Memory lives locally in a SQLite database with a vector index, and the agent can query its own history in natural language through built-in search tools designed to use roughly ten times fewer tokens than re-reading full transcripts.
The code is free under the Apache-2.0 license, but the default hosted memory observer runs as a 30-day free trial; after that, memory falls back to your Anthropic plan unless you subscribe, and you can plug in your own OpenRouter or Gemini API key instead. Privacy controls include private tags and automatic redaction of common secrets before storage.
We share our first impressions in our claude-mem discovery.
Captures tool activity during each session, compresses it with AI and injects relevant context back into future sessions automatically.
The agent queries its own history through search, timeline and detail tools designed to use roughly 10x fewer tokens than re-reading transcripts.
Memory lives in a local SQLite database with a vector index; optional cloud sync to cmem.ai when you want backup.
Private tags keep sensitive content out, and recent versions redact webhook URLs, API tokens and other secrets before storage.
The code is free and open-source (Apache-2.0). The default hosted memory observer is a 30-day free trial; after that you can subscribe, fall back to your Anthropic plan, or use your own OpenRouter or Gemini API key.
No. Despite the name, current versions also hook into Codex, Gemini, Copilot, OpenCode, Cursor, Grok, T3 Code, Antigravity and several other agent harnesses.
Locally, in a SQLite database with a vector index on your machine. Optional cloud sync to cmem.ai is available for backup.