Documentation
DevMemory is a persistent memory layer for AI coding tools. It saves your project context as you work and restores it in whatever tool you switch to next.
Overview
When your AI credits run out mid-task, the next tool starts from zero — unless your context was saved before the credits died. DevMemory makes saving deterministic: it does not rely on the model remembering to call a tool.
It captures work three ways depending on the tool:
- Transcript hooks — Claude Code and Windsurf fire an OS hook that hands over a plaintext transcript; a small script POSTs each turn.
- Watch daemon — Claude Code, Cursor, Cline, Kilo and Codex persist conversations locally;
devmemory starttails those stores. - MCP + rules — in any MCP tool (Antigravity, Claude Desktop, or any of the above), just say “continue” and the agent attaches the open project and restores it via
continue_here, then saves as you work. No CLI required.
Installation
Pick whichever fits your setup — none of these require you to create a virtual environment by hand.
Prefer the top options: npx, pipx, or uv need no virtual environment. Plain pip install errors on modern Debian/Ubuntu (PEP 668) unless you're inside a venv.
Quick start
Get running in under a minute:
# 1 — connect DevMemory to your tool (use --tool all for every detected tool) devmemory install --tool cursor --api-key YOUR_KEY --host https://devmemory.io # 2 — attach the project you're working on devmemory start # 3 — hit a wall? open the same project in another tool and continue devmemory continue
Get your API key from the dashboard. Point clients at your server with --host.
The attach model
Auto-save is opt-in and scoped to one project at a time. Nothing is saved until you attach — no background daemon quietly recording every repo you touch.
Two ways to attach, same result:
- In the tool — just say “continue” (or “start on this project”). The agent calls
continue_herefor the folder you have open, attaching that project and restoring its context. Works in any MCP-connected tool; no terminal needed. - From a terminal — run
devmemory startin the project folder. Best for the store-tailing tools, since it also launches the watch daemon.
The CLI commands:
devmemory start— attach the current project (resolved from its git remote), restore its saved context, and begin auto-saving. Runs until you stop; long idle gaps are fine.devmemory continue— re-attach the active project to a new tool, restore its context there, and resume saving from that tool.devmemory stop— detach and stop auto-saving.devmemory status— show the active project, the attached tool, and the daemon state.
Both the watch daemon and the deterministic hooks respect the active project. If nothing is attached, they save nothing and log a hint to run devmemory start.
Prompts to paste
No commands to memorise — say one of these to your AI tool and it drives DevMemory through the MCP tools. It uses the project folder you have open, so you never name a project (except "switch"). Click to copy:
For "switch to another project", replace PROJECT_NAME with the project's name. These work in any MCP-connected tool (Claude Code, Cursor, Windsurf, Augment, Antigravity, Claude Desktop, Cline, Kilo).
CLI commands
| Command | What it does |
|---|---|
devmemory install | Wire DevMemory into a tool via MCP + hooks. --tool all configures every detected tool. |
devmemory start | Attach a project, restore context, begin auto-saving. |
devmemory continue | Re-attach the active project to a new tool and resume saving. |
devmemory stop | Detach and stop the watch daemon. |
devmemory status | Show the active session and daemon state. |
devmemory inject | Manually load context into CLAUDE.md / rules files for a project. |
devmemory watch --list | Show the auto-save mechanism and detected stores per tool. |
devmemory --rest | Run the REST API + dashboard locally (self-hosting). |
Supported tools
DevMemory never fakes support. Each tool is captured by a real, verified mechanism. There are four ways context gets saved:
Per-tool summary (same data drives the in-app Setup guide, which also shows exact config snippets):
Windsurf and Antigravity encrypt conversations on disk. DevMemory doesn't try to crack that — Windsurf hands its hook a plaintext transcript, and Antigravity saves through the MCP tools + a rules file. Run devmemory watch --list to see the exact mechanism + detected stores on your machine.
MCP tools
Once connected, your AI tool can call these directly. The one you'll use most:
continue_here— attach this project and load its context in one call, for the folder you have open. Trigger it by saying "continue", "start on this project", or "pick up where we left off". The project is picked from the open folder automatically; to target a different one, tell the agent its name.save_context— save a typed block (goal, decision, code, error, next_step, note).get_context— retrieve saved blocks for the project or session.generate_resume_prompt— build a "continue here" prompt tuned for a target tool.start_session/end_session/list_sessions_tool— manage development sessions.save_tasks/update_task— track a task list across tools.list_projects_tool— list all projects on your account.
Self-hosting
Run DevMemory entirely on your own infrastructure. SQLite for local use, PostgreSQL for production.
# start the REST API + dashboard on http://localhost:8765 devmemory --rest --host 0.0.0.0 --port 8765
Then point clients at it with --host http://your-server:8765 during devmemory install. The dashboard lives at /app; the API reference is at /api-docs.
Troubleshooting
Nothing is being saved
Auto-save is opt-in. Run devmemory start in your project first, then check devmemory status. If the daemon isn't running, start will relaunch it.
Which tools are actually captured on this machine?
Run devmemory watch --list — it reports the exact mechanism per tool and which local stores were detected.
Context isn't loading in the new tool
Make sure you run devmemory continue from the same project directory, and that the tool was connected with devmemory install.
Need the API reference? See /api-docs. Prefer the dashboard? Open the app.