v0.9.31Open source, Apache-2.0

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.

Star on GitHub30K
Read the docs
MCP tools
54 source
Memory storage
Local by default how
local store · your machine230 observations · 5 topics
each dot is one captured tool callmove your pointer to recall
The AgentMemory viewer

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.

localhost:3113Recorded tour
Recorded tour of the AgentMemory viewer with sample project data
  • Memories
  • Session replay
  • Lessons
  • Knowledge graph
  • Health
Open full-size tour
Use cases

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.

claude-code · monday 14:02
> fix login failing after ~15 minutes
⏺ Edit(src/auth/refresh.ts)
⏺ Bash(npm test -- auth)
⎿ 41 passed
PostToolUse → agentmemory
cursor · tuesday 10:15
why does login fail after 15 minutes?
memory_recall · 1 result
Fixed Monday in refresh.ts, from a Claude Code session. This route skips that middleware.
without memoryEach tool starts blind. You retell Cursor what Claude Code already found.

Example sessions. The commands, skills and hooks shown are real.

What your agent gets

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.

your historyshared history
  • claude-code
  • cursor
  • codex
  • illustrative history items
agentmemory127.0.0.1 · on your machine
  1. capture
  2. dedupe
  3. rank
  4. budget
next session · context window
relevant context
› your promptfree for your task

Keyless recall

Keyword search works without an API key. Enable local embeddings to add semantic retrieval.

memory_smart_search("auth refresh")retrieval evaluation

Isolated 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 model

Survives compaction

On supported integrations, enable the PreCompact hook to restore memory context around compaction.

what your agent gets
How it works

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.

  1. 01

    Capture

  2. 02

    Store

  3. 03

    Index

  4. 04

    Consolidate

  5. 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.

In the wild

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
Research

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.

  1. Apr 2026arXiv 2604.12034

    This is the closest practitioner-level prior art to the governance profile this paper proposes.

    on LLM Wiki v2
  2. Apr 2026arXiv 2604.11364

    Closest informal statement of the four-layer thesis.

    on LLM Wiki v2
  3. Apr 2026Zenodo 19545947

    Karpathy’s original pattern gives compiled memory. LLM Wiki v2 gives managed memory.

    on LLM Wiki v2
  4. May 2026arXiv 2607.24759

    LLM Wiki v2 (rohitg00, 2026) adds confidence scoring and explicit supersession of stale claims by higher-confidence successor pages.

    on LLM Wiki v2
  5. Jun 2026arXiv 2606.06240

    Cites agentmemory v0.9.17 and names it as a future integration for testing the paper’s contradiction predicates.

    on agentmemory
Benchmarks

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.

LongMemEval-S · 470 answerable questions

398 of 470 questions found every required source in the top 5 results.

single-session-user63 / 64
multi-session86 / 121
single-session-preference25 / 30
temporal-reasoning99 / 127
knowledge-update70 / 72
single-session-assistant55 / 56
all required sources retrieved incomplete
AdapterStrict recall-all@5Fractional recall@5Any-hit@5
BM25 component84.7%91.7%96.2%
grep baseline72.1%80.8%88.7%

Results and per-question receipts500 questions per adapter, 0 execution failures. 30 unanswerable questions excluded from retrieval metrics.

Reproduce it

Download the dataset from Hugging Face, then run the same evaluation. The pinned dataset and checksum are in the report. See the LongMemEval paper.

Methodology, limitations and historical results
Works with

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 plugin
    12 hooks, MCP, skills
  • Codex CLInative plugin
    6 hooks, MCP
  • Copilot CLInative plugin
    plugin hooks, skills, MCP
  • Cursornative plugin
    7 hooks, 17 skills, MCP
  • OpenCodenative plugin
    capture plugin, MCP
  • Devinnative plugin
    6 hooks, skills, MCP
  • OpenClawnative plugin
    gateway plugin, MCP
  • Hermesnative plugin
    Python plugin, MCP
  • pinative plugin
    installable package, capture, recall, skills
  • Oh My Pinative plugin
    capture, recall, skills, optional MCP
  • OpenHumannative plugin
    native Memory backend
  • Antigravitynative plugin
    MCP, hooks
  • DeepSeek Harnessnative plugin
    native 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 server
    add the MCP block below
  • WarpMCP server
  • ZedMCP server
  • ClineMCP server
  • ContinueMCP server
  • DroidMCP server
  • KiroMCP server
  • Qwen CodeMCP server
  • Roo CodeMCP server
    add the MCP block below
  • Kilo CodeMCP server
    add the MCP block below
  • GooseMCP server
    add the MCP block below
  • AiderREST API
    add the MCP block below
Local-first

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.

your machine127.0.0.1
  1. coding agentClaude Code, Codex, Cursor and others
  2. hooks + MCPPostToolUse, SessionStart, 54 tools
  3. agentmemory127.0.0.1:3111, REST and MCP, auth on
  4. iii engineWorker Compose; state/http workers, engine :49134
  5. on disk~/.agentmemory and the data dir
  1. writes · mem:obs
  2. obs_01PostToolUse · Read src/auth/session.tswritten
  3. obs_02PostToolUse · Bash npm test -- authwritten
  4. obs_03PostToolUse · Edit src/auth/refresh.tswritten
viewer127.0.0.1:3113secret~/.agentmemory/secret, mode 06003 observations stored, 0 bytes sent
outside, optional, off by default
LLM provideroff

Observation text it needs to write summaries and consolidate memories, once you add a key.

Embedding provideroff

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.

Read the security model

FAQ

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.

Install

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.

  1. 01

    Start the memory server

    Installs the pinned engine, starts the server on :3111 and the viewer on :3113.

  2. 02

    Wire an agent

    Connects the selected agent through its native integration or MCP. Add --with-hooks for optional hook capture. Pi and OMP use --with-mcp to add the full toolset alongside their native tools.

  3. 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}"
      }
    }
  }
}
⌂ Proxy