30.7K ·GitHub
What is this?
Persistent memory for AI coding agents: it captures what your agent does, compresses it into searchable memory, and injects the right context when the next session starts, so you stop re-explaining your project to Claude Code, Cursor or Codex.
Is this a library I import into my code, or a separate service my agents talk to?
A separate local memory server plus an agentmemory CLI. Your coding agents connect to it through hooks, MCP, or a REST API, and nothing gets imported into your project's code.
How do I get it running?
Install Node.js 20+ and run npx -y @agentmemory/agentmemory@latest. The first run is interactive: choose the agents to wire and an LLM provider (or keyless mode), then it seeds the config, starts the memory server, and offers a global install.
Which coding agents can it give memory to?
Any agent with hooks, MCP, or a REST API — 20 adapters: Claude Code (12 hooks + MCP), Codex CLI, Cursor, Gemini CLI, OpenCode (22 hooks), Copilot CLI, Cline, Aider, Devin, Warp, Hermes, OpenClaw. All share one server; wire more anytime with agentmemory connect.
Does it work on native Windows, or is that a hassle?
It runs, but WSL2 is the fast path. Native Windows needs the pinned iii-engine v0.11.2 ZIP downloaded and iii.exe extracted manually — the CLI does not auto-extract it; Docker Desktop is the other supported route.
Does the memory stay on my machine, or is it sent to some cloud?
It stays local: the server runs on your machine (ports 3111 REST/MCP, 3112 streams, 3113 viewer, 49134 worker) and state lives in your user data directory, outside the repo. Local embedding mode (EMBEDDINGPROVIDER=local) runs inference on-device after a one-time model download.
Do I need an LLM API key to use it?
No. Keyless mode works out of the box — keyword recall runs on BM25 without any key. A provider unlocks LLM features; EMBEDDINGPROVIDER=local gives free on-device semantic recall (all-MiniLM-L6-v2, downloaded once), and LLM-written compression additionally needs AGENTMEMORYAUTOCOMPRESS=true.
What does it change in practice, day to day?
Session 1 you set up JWT auth; in session 2, when you ask for rate limiting, the agent already knows your auth uses jose middleware in src/middleware/auth.ts and that you picked jose over jsonwebtoken for Edge compatibility — no re-explaining, no copy-pasting context.
Why not just keep using CLAUDE.md?
Built-in options like CLAUDE.md or .cursorrules cap out at about 200 lines and go stale. agentmemory captures continuously, compresses what it sees into searchable memory, injects the right context each session, and shares it across all your agents instead of one file per tool.
What is the bundled iii engine?
It is the local storage/search engine, pinned at v0.11.2 and installed to ~/.agentmemory/bin. The worker cannot speak another engine's protocol, so it will not attach to your own iii — it runs the pinned version alongside, leaving your install untouched.
What are similar projects?
ruflo, memex, operator-memory, billion-context, context-mode, MemOS, mem0, brigade
Which topics is it in?
claudecode, genai, hybrid-search, pi, hermes, hooks, copilot, gemini-cli, knowledge-graph, embeddings, openclaw, harness