claude-mem (2026): Persistent Memory for Claude Code, Codex, Antigravity
Short answer: claude-mem is an open-source memory plugin by Alex Newman (@thedotmack). It records what your coding agent does during a session, compresses those notes with AI and gives the relevant ones back to the next session, so the agent doesn't start from zero each time. It works with Claude Code, Codex CLI, the Antigravity CLI and several other agents. It is not a single skill: it installs hooks and a local background worker.
Unofficial guide. Antigravity Skills is not affiliated with Alex Newman or the claude-mem project. The official source is github.com/thedotmack/claude-mem. Facts below were checked against the repository and docs.claude-mem.ai on November 11, 2026.
Want it ready to install? Get the Project Memory Skill, a no-install alternative inspired by claude-mem that keeps project memory in plain markdown in your repo. Each download uses 1 credit, and new accounts get 1 free credit.
At a glance
| What it is | A plugin and CLI. It adds lifecycle hooks, a local worker service, MCP search tools and bundled skills such as mem-search |
| Author | Alex Newman (@thedotmack) |
| License | Apache-2.0. Hosted cloud and team sync are kept outside the open-source license (licensing scope) |
| Works with | Claude Code, Codex CLI, Antigravity CLI, Cursor, OpenCode and more |
| Latest release | v15.15.2 (November 10, 2026) |
| GitHub stars | 115,779 (November 11, 2026) |
What it does
- Takes notes while you work. Hooks send tool activity to a second agent, the observer, which writes short observations.
- Starts the next session with context. A new session opens with a compact index of past observations. The agent opens full details only when it needs them.
- Searches your history. The bundled
mem-searchskill searches past work in three steps: index, timeline, then details. - Keeps data local by default. Memory is stored in
~/.claude-memon your machine. Cloud sync is opt-in. - Lets you keep secrets out. Anything wrapped in
<private>tags is never stored. - Shows a web viewer. The worker prints a local URL where you can browse memory, sessions and settings.
How to install it
Use the installer or the plugin commands. The README notes that npm install -g claude-mem installs only the SDK/library. It does not register the hooks or start the worker.
npx claude-mem installThe installer finds the agents on your machine and asks which ones to set up. The README lists Node.js 20.19 or later in the 20.x line, or 22.12 or later. Bun and uv are installed automatically if missing.
Google Antigravity
claude-mem supports the Antigravity CLI (agy), not the Antigravity desktop IDE. The setup guide covers only the CLI.
npx claude-mem install --ide antigravityAccording to the guide, the installer:
- adds hooks to
~/.gemini/config/hooks.json - adds a context section to
~/.gemini/GEMINI.md - registers its MCP server in both
~/.gemini/antigravity/mcp_config.jsonand~/.gemini/config/mcp_config.json - writes a rules file to
~/.agents/rules/claude-mem-context.md
You also need to pick an AI provider (Gemini API, Claude SDK or OpenRouter) in ~/.claude-mem/settings.json. Install through agy plugin is not available yet.
Claude Code
Run npx claude-mem install, or install from the plugin marketplace inside Claude Code:
/plugin marketplace add thedotmack/claude-mem
/plugin install claude-memRestart Claude Code. Context from earlier sessions then appears in new sessions.
Codex
Run npx claude-mem install and select Codex CLI when the installer lists the agents it found. The docs do not give a separate Codex-only command.
More detail on skill folders for each agent: How to install skills.
How to use it
Once claude-mem is installed, there is nothing extra to run. Work as usual. The README says observations stream in from your first prompt, and the second session in a project opens with memory from the first.
- Ask the agent whether you solved a problem before. The
mem-searchskill looks it up. - Open the worker URL printed at startup to browse memory, sessions and settings.
- Change behavior in
~/.claude-mem/settings.json. For example,"CLAUDE_MEM_MODE": "code--chill"records fewer observations, andcode--zhwrites them in Chinese. - Check your setup with
npx claude-mem doctorand remove it withnpx claude-mem uninstall.
Things to know before you run it
- Analytics are on by default. The README says anonymous usage analytics are enabled. Turn them off with
npx claude-mem telemetry disable. The telemetry page lists what is collected. - The installer asks you to sign in, and the trial asks for a card. After setup it asks you to sign in to claude-mem in your browser by email magic link, with no card needed to sign in. If you then choose the hosted claude-mem observer, a 30-day free trial starts on a checkout page that asks for a payment method. When the trial ends, memory falls back to your Anthropic plan unless you subscribe.
- You can skip sign-in. Pass an explicit
--providerflag or setCLAUDE_MEM_ONLINE_OPTIN=false. Non-interactive and CI shells also complete without any account step. You can also use your own OpenRouter or Gemini key, or your Anthropic plan. - Memory uses model tokens. The observer is a second agent. Unless you use the hosted observer, it runs on your plan or your own API key.
- It runs a background service and changes agent config. The worker is a local HTTP service. The installer writes hooks, MCP entries and context files into your agent's config folders, as listed above for Antigravity.
- Screenshots are kept by default. Converted copies of tool screenshots are stored under
~/.claude-mem/media-v1/. They are uploaded only when Cloud Sync is on. You can turn this off with the "Keep images" switch in Settings. - Be careful with piped install scripts. The OpenClaw integration installs with a remote script piped to
bash. Read any such script before you run it.
FAQ
Is claude-mem free?
The code is free and open source under Apache-2.0. Memory still costs model usage, either on your Anthropic plan or your own OpenRouter or Gemini key. The hosted claude-mem observer is an optional paid service with a 30-day free trial.
Is claude-mem still AGPL?
No. Older articles say AGPL-3.0, but the repository changed its license to Apache-2.0 in May 2026.
Does claude-mem work in Google Antigravity?
It works with the Antigravity CLI through npx claude-mem install --ide antigravity. The official setup guide covers only the CLI, not the desktop IDE.
Where is my memory stored?
On your machine, in ~/.claude-mem. Cloud sync is opt-in.
How do I stop it from storing something sensitive?
Wrap the text in <private> tags and claude-mem will not store it.
Related on Antigravity Skills
- Agent Memory Systems: a downloadable skill about designing memory for AI agents
- How to install skills
- What are Antigravity skills?
- Browse all skills