Persistent memory for coding agents.
Keep project decisions across sessions and agents. agentmemory captures supported activity, stores it on your machine, and hands the right context back next time. No account, no API key, no cloud.
See what your agents remember.
Follow a session, explore connected memories and trace a lesson back to its source. Included with AgentMemory, right on your machine.

- Memories
- Session replay
- Lessons
- Knowledge graph
- Health
What changes when your agent remembers.
Six things that happen every week with a coding agent, and what they look like with agentmemory running.
Claude Code, Cursor, Codex and the rest share one local memory server.
Example sessions. The commands, skills and hooks shown are real.
Relevant context, within a budget you control.
Recall by project and agent, select saved memories, and expand a source when you need more detail. The diagram illustrates selection from shared history; the amount returned depends on the query and budget.
- claude-code
- cursor
- codex
- illustrative history items
- capture
- dedupe
- rank
- budget
- Scopedfilter recall by project and agentrecall guide
- Budgetedchoose how much context to retrievecontext budgets
- Expandablefollow a result back to its full sourcesource expansion
Keyless recall
Keyword search works without an API key. Enable local embeddings to add semantic retrieval.
memory_smart_search("auth refresh")retrieval evaluationIsolated on your machine
Binds to 127.0.0.1 with auth on by default. Memory text stays local unless you configure a remote service.
security modelSurvives compaction
On supported integrations, enable the PreCompact hook to restore memory context around compaction.
From one tool call to the next session.
Scroll through one real bug fix. Monday's session gets captured, indexed and consolidated. Tuesday's session starts already knowing it.
- 01
Capture
- 02
Store
- 03
Index
- 04
Consolidate
- 05
Recall
01 Capture. Hooks fire on every prompt and tool call. Each event is posted to the local server on :3111 with a restart-safe id, or spooled to disk if the server is down.
02 Store. Each event becomes an observation in the local store on your machine: the tool, the file, a bounded copy of the output, and the session it came from.
03 Index. Observations are indexed twice: BM25 terms for exact words, and vectors for meaning. Local embeddings work with no API key.
04 Consolidate. When the session ends, related observations collapse into one memory. It keeps links back to every observation it came from.
05 Recall. The next session opens with the right memory already in context. Your agent starts in the right file instead of from zero.
Said by people who use it.
Every quote links to where it was said.
I backfilled agent memory on my past month's Cursor agent transcripts. It was surprisingly accurate. Picked up on things that I moved away from.
Peter NeyraBackfilled a month of Cursor transcriptssource Tackles one of the biggest pain points with coding agents: losing useful project context across sessions without bloating the context window.
Alper TayfurProduct Hunt launch threadsource Memory often becomes just more noise over time. Agentmemory feels more intentional compared to a lot of tools in this space.
Thomas HallProduct Hunt launch threadsource Been using it for 2 weeks, and I definitely see improvements.
Pranav PrakashTwo weeks of daily usesource
Cited in agent memory research.
Researchers designing memory for AI agents cite LLM Wiki v2, the design agentmemory implements, and agentmemory itself. Every entry links to the paper.
This is the closest practitioner-level prior art to the governance profile this paper proposes.
on LLM Wiki v2 Closest informal statement of the four-layer thesis.
on LLM Wiki v2 Karpathy’s original pattern gives compiled memory. LLM Wiki v2 gives managed memory.
on LLM Wiki v2 LLM Wiki v2 (rohitg00, 2026) adds confidence scoring and explicit supersession of stale claims by higher-confidence successor pages.
on LLM Wiki v2 Cites agentmemory v0.9.17 and names it as a future integration for testing the paper’s contradiction predicates.
on agentmemory
Useful recall. No model API required.
Keyless BM25 finds every required source for 84.7% of answerable LongMemEval-S questions, 12.6 percentage points above the lexical baseline on the same inputs. At least one relevant source is found for 96.2%. No embedding model or paid API.
398 of 470 questions found every required source in the top 5 results.
| Adapter | Strict recall-all@5 | Fractional recall@5 | Any-hit@5 |
|---|---|---|---|
| BM25 component | 84.7% | 91.7% | 96.2% |
| grep baseline | 72.1% | 80.8% | 88.7% |
Results and per-question receipts500 questions per adapter, 0 execution failures. 30 unanswerable questions excluded from retrieval metrics.
Download the dataset from Hugging Face, then run the same evaluation. The pinned dataset and checksum are in the report. See the LongMemEval paper.
26 agents. One memory.
Switch agents mid-project and the memory comes with you. Every agent below reads and writes the same memory store.
Native plugins 13
Capture requires an installed native plugin or hooks. Use --with-hooks where hook capture is opt-in.
Claude Codenative plugin12 hooks, MCP, skills
Codex CLInative plugin6 hooks, MCP- Copilot CLInative pluginplugin hooks, skills, MCP
- Cursornative plugin7 hooks, 17 skills, MCP
OpenCodenative plugincapture plugin, MCP
Devinnative plugin6 hooks, skills, MCP
OpenClawnative plugingateway plugin, MCP
Hermesnative pluginPython plugin, MCP- pinative plugininstallable package, capture, recall, skills
- Oh My Pinative plugincapture, recall, skills, optional MCP
OpenHumannative pluginnative Memory backend- Antigravitynative pluginMCP, hooks
- DeepSeek Harnessnative pluginnative capture and recall, MCP
MCP and REST 13
Any MCP client gets the memory tools. Anything that speaks HTTP can use the REST API.
Gemini CLIMCP server
Claude DesktopMCP serveradd the MCP block below- WarpMCP server
- ZedMCP server
ClineMCP server
ContinueMCP server- DroidMCP server
- KiroMCP server
- Qwen CodeMCP server
Roo CodeMCP serveradd the MCP block below
Kilo CodeMCP serveradd the MCP block below
GooseMCP serveradd the MCP block below
AiderREST APIadd the MCP block below
Everything runs inside your machine.
Capture, storage and keyword search run locally. The REST API and viewer bind to 127.0.0.1 by default. Configured remote services receive the text they process. Installation, updates and model downloads need network access.
- coding agentClaude Code, Codex, Cursor and others
- hooks + MCPPostToolUse, SessionStart, 54 tools
- agentmemory127.0.0.1:3111, REST and MCP, auth on
- iii engineWorker Compose; state/http workers, engine :49134
- on disk~/.agentmemory and the data dir
- writes · mem:obs
- obs_01PostToolUse · Read src/auth/session.tswritten
- obs_02PostToolUse · Bash npm test -- authwritten
- obs_03PostToolUse · Edit src/auth/refresh.tswritten
Observation text it needs to write summaries and consolidate memories, once you add a key.
Text to embed for semantic recall. EMBEDDING_PROVIDER=local embeds on your machine and sends nothing.
Telemetry: none. The iii engine's anonymous usage telemetry is off; agentmemory starts it with III_TELEMETRY_ENABLED=false.
- bindREST and viewer listen on 127.0.0.1; live updates use the authenticated REST feed.
- authA random secret is generated on first start. Every bundled client reads it.
- accountNone. No sign-up, no hosted service, no analytics.
Questions people ask first.
What does agentmemory actually store?
Observations from your agent's sessions: the prompts you typed, the tools it called and a bounded copy of their output, and the session summaries built from them. Consolidation turns related observations into memories, lessons and graph facts. By default, records live in a data folder on your machine, for example ~/Library/Application Support/agentmemory on macOS.
Does anything leave my machine?
Memory text stays local when you use local storage and keyless search or local models. Keyless search does not guarantee local storage: a configured remote Redis backend stores memory records remotely. Installation, updates and the first local model download need network access. Configured remote LLM or embedding services receive the text they process. AgentMemory starts its runtime with usage telemetry disabled.
Do I need an API key?
No. Keyless mode works out of the box with BM25 recall. Set EMBEDDING_PROVIDER=local for free on-device semantic recall, or add a provider key for LLM consolidation.
Which agents does it work with?
Any MCP client. Claude Code, Codex CLI, Copilot CLI, Cursor, OpenCode, Devin and others get native plugins with hooks that capture automatically. Run agentmemory connect <agent> to wire one.
What happens if the server crashes mid-session?
Hooks write to an offline spool while the server is down and drain it when it comes back. Each event has a restart-safe id, so replays are stored once. Vectors survive a crash through a pending log. Every publish runs a release gate that force-kills the installed package and checks nothing was lost.
How is it licensed?
Apache-2.0. The whole runtime is open source, including the parts that run on your machine. There is no hosted tier and no feature held back.
One command. Then pick your agent.
Node.js 20 or newer. The first run walks you through which agents to wire and whether to add a model provider. Skip it and you stay keyless.
- 01
Start the memory server
Installs the pinned engine, starts the server on :3111 and the viewer on :3113.
- 02
Wire an agent
Connects the selected agent through its native integration or MCP. Add
--with-hooksfor optional hook capture. Pi and OMP use--with-mcpto add the full toolset alongside their native tools. - 03
Or let your agent do it
Paste this into any coding agent. It reads the install guide and runs the steps for you.
Any other MCP client
Merge this entry into the client's mcpServers object. With no variables set, it talks to http://localhost:3111.
{
"mcpServers": {
"agentmemory": {
"command": "npx",
"args": ["-y", "@agentmemory/mcp"],
"env": {
"AGENTMEMORY_URL": "${AGENTMEMORY_URL}",
"AGENTMEMORY_SECRET": "${AGENTMEMORY_SECRET}"
}
}
}
}