AgentMemory
Persistent, searchable local memory for AI coding agents — capture each session automatically and recall decisions across Claude Code, Codex, Cursor and any MCP client.
- Source repo
- rohitg00/agentmemory
- Stars
- ★ 31k
- Last updated
- 6d ago
- FARS reviewed
- Nov 24, 2026
- License
- Apache-2.0
- Primary language
- TypeScript
- FA score
- 73/100 · Some gaps
At a glance
- How it runs
- Works with
- Universal · cross-platformCodex · Claude Code · Claude.ai
- Cost
- Free, no paid service needed
- Setup effort
- Low · running in minutes
- You'll need
- Typical use
- A solo developer moving between repos: the JWT middleware and jose-over-jsonwebtoken choice made in a Claude Code session is recalled automatically when adding rate limiting in Cursor later.
- Not a fit if
- Teams unwilling to run a local Node.js daemon alongside their agents
- Teams that want a vendor-hosted memory API with accounts out of the box
- Website
- agent-memory.dev/docs ↗ set on GitHub
- Maintenance
- Commits in the last 30 dayslast commit 2026-11-18
- Source review
- 73/100 · Some gaps
What does this agent do, and when should you use it?
AgentMemory is an Apache-2.0 memory server for coding agents, distributed as the npm package @agentmemory/agentmemory (CLI) plus @agentmemory/mcp, a stdio bridge exposing 54 memory tools. Native hooks and plugins on supported hosts capture session and tool events, run a privacy filter, store the observations outside your repository, and index them in BM25, with vector embeddings and a knowledge graph as opt-in additions. At session start the server loads a project profile, runs hybrid BM25 + vector + graph retrieval fused with RRF, and injects results inside a default 2000-token budget. Memories consolidate through four tiers — working, episodic, semantic, procedural — with decay, contradiction detection and TTL eviction, and can be browsed, edited, forgotten or replayed in a live viewer on port 3113 while the REST API listens on 3111. It needs Node.js 20+, defaults to loopback binding, ships Docker Compose and Fly.io/Railway/Render/Coolify templates for self-hosting, and keyword recall works with no API key at all.
The end-to-end flow is capture → filter → store → index → recall. On the capture side, hooks such as SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, PostToolUseFailure, PreCompact, SubagentStart/Stop, Stop and SessionEnd write stable event IDs into a durable capture inbox with an offline spool that agentmemory capture --drain replays; a privacy filter strips API keys, secrets and <private> blocks. On the store side, raw observations are kept, compressed synthetically by default (LLM-written compression requires a provider plus AGENTMEMORY_AUTO_COMPRESS=true), indexed in BM25, given vector embeddings when an embedding provider is active, and turned into knowledge-graph entities when GRAPH_EXTRACTION_ENABLED=true. On the recall side, SessionStart loads the project profile (top concepts, files, patterns) and runs a three-stream retrieval inside a configurable token budget. It exposes 54 MCP tools (memory_smart_search, memory_save, memory_sessions, memory_governance_delete and others), a bearer-authenticated REST surface (/agentmemory/remember, /agentmemory/smart-search, /agentmemory/health, /agentmemory/livez) and CLI subcommands including agentmemory, stop, status, capture, connect, doctor, remove, upgrade, import-jsonl and demo.
- A solo developer moving between repos: the JWT middleware and jose-over-jsonwebtoken choice made in a Claude Code session is recalled automatically when adding rate limiting in Cursor later.
- A team standardizing across tools: Claude Code, Codex CLI, Copilot CLI, Gemini CLI, Zed and Cline all point at one local server and share one memory store instead of per-editor setup.
- A newcomer inheriting a long-lived project: run
import-jsonlover existing Claude Code JSONL transcripts, then scrub the Replay timeline of prompts, tool calls and results. - An engineering lead doing delivery retro: pull summaries, lessons and commit-context per session and search for why a decision was made months earlier.
- A security-conscious shop: memory stays in the OS data directory outside the repo, secrets are filtered before storage, and BM25-only mode runs with no external service.
- An engineer wiring memory into a custom pipeline: call the port-3111 REST endpoints or the 54 MCP tools directly instead of depending on a specific editor plugin.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Install / run
npx -y @agentmemory/agentmemory@latestnpx skills add rohitg00/agentmemory -ynpm install -g @agentmemory/agentmemory@latestnpm install && npm run build && npm start
- Environment variables
AGENTMEMORY_SECRET- Config files
~/.agentmemory/.env- Runtime
- Node.js 20
- Install notes cover
- Windows · macOS · Linux · WSL
How do you install or deploy this agent?
Requirements: Node.js 20 or newer with npm and npx; on macOS/Linux the automatic runtime setup also needs curl, a POSIX sh and tar. The canonical install path is npx:
npx -y @agentmemory/agentmemory@latestThe wizard asks which agents to connect and whether to use a provider or keyless mode; it writes the configuration, starts the memory server, and offers a global install of the agentmemory command. Then install the 17 native skills so your agent knows when to reach for memory:
npx skills add rohitg00/agentmemory -yGlobal install (may hit EACCES on the global prefix):
npm install -g @agentmemory/agentmemory@latestBuilding from source:
git clone https://github.com/rohitg00/agentmemory.git && cd agentmemory
npm install && npm run build && npm startWindows 10/11 is supported natively: the CLI downloads the Windows ZIP for iii-engine v0.25.1, verifies its SHA-256 and extracts iii.exe into %USERPROFILE%\.agentmemory\bin. WSL2 follows the Linux path.
How do you use this agent?
Start the server in one terminal:
npx -y @agentmemory/agentmemory@latestIn a second terminal, seed sample sessions and exercise recall:
npx -y @agentmemory/agentmemory@latest demoKeyless mode uses BM25. To enable on-device semantic recall, add this to ~/.agentmemory/.env and restart (the first request downloads Xenova/all-MiniLM-L6-v2):
EMBEDDING_PROVIDER=localCheck health and status:
curl -fsS http://localhost:3111/agentmemory/livez
curl -fsS http://localhost:3111/agentmemory/health
npx -y @agentmemory/agentmemory@latest statusProtected REST requests need the daemon secret:
read -r AGENTMEMORY_SECRET < "$HOME/.agentmemory/secret"curl -fsS -X POST http://localhost:3111/agentmemory/remember \
-H "Authorization: Bearer $AGENTMEMORY_SECRET" \
-H 'Content-Type: application/json' \
-d '{"content":"agentmemory restart persistence probe","concepts":["install-check"]}'
curl -fsS -X POST http://localhost:3111/agentmemory/smart-search \
-H "Authorization: Bearer $AGENTMEMORY_SECRET" \
-H 'Content-Type: application/json' \
-d '{"query":"restart persistence probe","limit":5}'Connect an agent (Claude Code, Codex and Cursor shown):
agentmemory connect claude-code --with-hooks
agentmemory connect codex --with-hooks
agentmemory connect cursorOpen http://localhost:3113 for the live viewer with memories, knowledge graph, sessions and session replay.
Safety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Modifies local files; work on a clean Git branch or dedicated worktree.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
Inherits capabilities of connected MCP servers; audit third-party servers before enabling.
FARS trust-control audit
- data-flow disclosure
- sensitive-data handling
What are this agent's strengths and limitations?
- Capture, recall and storage all run locally by default, with BM25 keyword recall that needs no API key and no external database.
- One shared store across many agents — Claude Code, Codex CLI, Copilot CLI, Cursor, Gemini CLI, Zed, Cline, OpenCode and more — reachable through both MCP and REST.
- Published LongMemEval-S numbers for the keyless BM25 component: 84.7% recall-all@5 versus 72.1% for a lexical baseline, with reproduction steps and stated limitations.
- Four-tier consolidation with decay, contradiction detection, TTL eviction, advisory
similarTonear-duplicate hints, and recall hygiene that drops superseded versions from the indexes. - Privacy filter strips API keys, secrets and
<private>tags before storage, and memories live in an OS data directory outside the repository. - Apache-2.0 with Docker Compose plus Fly.io, Railway, Render and Coolify self-hosting templates, source builds and native Windows support.
- Requires a always-on local Node.js 20+ server plus a pinned iii-engine v0.25.1 download, so hosted setups must provision another process and two ports (3111, 3113).
- Per-agent wiring is genuinely heterogeneous: Codex uses TOML, OpenCode uses an array-shaped
mcpkey, Zed usescontext_servers, Goose usesextensions, so each host needs its ownconnect. - Hook commands embed absolute paths into the installed package, so every upgrade needs the matching
connectre-run or capture silently stops; the MCP-standalone Claude Code path is especially fragile. - Semantic recall is not on by default: keyless mode disables vectors, and local embeddings require manually setting
EMBEDDING_PROVIDER=localand waiting for the model download. - The README itself frames the benchmark as a retrieval-component test and says full-system answer quality, hybrid retrieval and competitor rankings need separate evaluation.
- Relying on
import-jsonlas the main capture path collides with Claude Code'scleanupPeriodDays(default 30 days), which deletes older transcripts before import.
How does this agent compare with similar options?
The README names several alternatives and what each is the better starting point for: Mem0 for memory APIs, hosted or self-hosted, with SDKs and agent plugins; Supermemory for memory and document context via a hosted API or local server; Zep/Graphiti for enterprise context and temporal knowledge graphs; Letta for building stateful agents with their own managed memory; Cognee for turning documents, code and conversations into searchable knowledge; and claude-mem for capturing and summarizing coding sessions across supported agents. AgentMemory positions itself around shared local memory for the agents you already use, automatic hook capture, scoped recall and a live viewer, and explicitly warns that scores from different datasets and metrics are not a head-to-head ranking.
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| AgentMemory This agent | 73 · Some gaps | CLIFree | ★ 31k | 6d ago | TypeScript | Codex · Claude Code · Claude.ai |
| Caura | 77 · Good | Self-hosted serviceFreemium | ★ 574 | today | Python | Codex · Claude Code · Claude.ai |
| Ori Mnemos | 56 · Major gaps | CLIFree | ★ 337 | 1mo ago | TypeScript | Claude Code · OpenAI API · Claude API |
| GraphMind Code Graph | 55 · Major gaps | Desktop appFreemium | ★ 218 | 1mo ago | Rust | Claude Code · Claude.ai |
How does FollowAgents rate this agent?
Why each dimension lost points
Least privilege: the server binds loopback by default, REST requires the daemon secret, and AGENTS.md mandates field whitelisting at endpoints; however hooks capture all tool inputs/outputs, prompts and final replies (including results from other MCP connectors) by default, which is broad, so 2. User confirmation: setup is interactive and external providers, paid features and transcript import require authorization, but automatic capture has no per-event confirmation (by design and disclosed), so 2. Data-flow transparency: the architecture skill has a dedicated Data boundary section and the config skill enumerates exactly what leaves the machine under which flag — thorough, 3. Sensitive data: `<private>` blocks and common secret formats are redacted before storage, scrubRecord, HTTPS enforced for non-loopback URLs, secret stored in ~/.agentmemory/secret with an explicit credential mode — 3. Dependency security: SECURITY.md states no lockfile is committed (#540), relying on SemVer ranges and Dependabot; overrides and guarded optional deps help, but reproducible installs and supply-chain pinning have a real gap, so 1. External effects: LLM, cloud embeddings, Redis and mesh sync are explicit opt-ins and default local, but mesh/remote-daemon paths exist, so 2. Rollback: export/import, snapshot, forget/evict, --data-dir and backup docs exist, but there is no per-write undo semantics, so 2. Source attribution: memories link to sessions/commits and the viewer shows original sources, benchmarks cite a baseline, but not all memory types are covered, so 2.
Self-consistency: README, AGENTS.md, skills and code broadly agree on ports, tool counts and version, and docs:sync enforces this; but README claims '0 external DBs' while the architecture skill says Redis is optional — a mild tension, so 2. Dependency availability: Node 20+, npm/npx, curl/tar requirements are explicit, iii-sdk is pinned at 0.25.1 and optional deps degrade gracefully, but the absent lockfile lets resolution drift, so 2. Failure messages: status, livez/health endpoints, TROUBLESHOOTING and a capture spool exist, but no concrete error-message samples are shown, so 2.
Audience and scenarios: covers Claude Code, Codex, Cursor, Gemini CLI and many hosts, with clear capture/recall/handoff/inspect scenarios — 3. Capability boundaries: skills state keyless mode has no vectors, cloud Devin cannot reach a local server, Windows support is partial, and injection is off by default — well bounded, 3. Trigger precision: skill descriptions say 'Use when…', but some (e.g. architecture) have broad triggers, so 2. Environment fit: macOS/Linux/WSL2/Docker supported, native Windows limited and CI does not cover Windows, so 2.
Information architecture: README is well sectioned with companion skills, docs and benchmark directories — 3. Install notes: npx install, EACCES, npx cache, demo validation and restart-persistence checks are all documented — 3. Naming stability: package name and version 0.9.33 are stable and docs:sync propagates versions, but 0.x API stability is not promised, so 2. Examples and FAQ: quick start, demo and collapsible details exist, but there is no systematic FAQ, so 2. Known limitations: benchmark limits, keyless semantic queries returning zero, Windows/cloud-session limits are stated, so 2. License: Apache-2.0 with full LICENSE text — 3. Versioning/changelog: CHANGELOG.md and release notes with SemVer are referenced, but the changelog content is not in the packet, so 2. Maintenance responsibility: SECURITY.md gives response targets, supported-version windows and contact, but publisher identity is unverified, so 2.
Output usability: recall results are formatted with title/type/score, the viewer visualizes memory, and MCP tools are directly consumable, but handling of noisy or conflicting memories is not described, so 2. Marginal value: the LongMemEval-S component test shows strict recall-all@5 of 84.7% vs 72.1% baseline (+12.6pp), but it is retrieval-only, not end-to-end answer quality, so 2. Cost-benefit: keyless BM25 needs no API key and local embeddings are free, but full features need a provider and model download, so 2.
Claim traceability: the benchmark gives date, sample size, exclusion rules and reproduction steps, and the comparison doc is date-stamped, so 2. Cross-source corroboration: README, AGENTS.md, skills and source agree on ports, tool counts and default flags, so 2. Fact/inference separation: the benchmark explicitly says the component test is not full-system quality, but some marketing phrasing (e.g. '#1') lacks supporting evidence, so 2.
- Default hooks capture all tool inputs/outputs, prompts and final replies, including results from other MCP connectors; confirm the redaction scope or disable automatic capture in sensitive repositories.
- No lockfile is committed and dependencies resolve via SemVer ranges; for reproducible or hardened builds, generate your own shrinkwrap and audit the dependency tree.
- Publisher identity is not verified by the FollowAgents curated enterprise registry; maintenance responsibility and update path rest on in-repo documents only and cannot be used to infer reliability.
- Claims such as '#1' and '5,000+ tests passing' are self-reported, and the benchmark is a retrieval-component test, not end-to-end answer quality.
- Native Windows support is limited and CI does not cover Windows; validate before cross-platform use.
FAQ
Do I need a model API key to get value out of it?
memory_recall (the mem::search path) uses BM25, and memory_smart_search can also fuse structural graph matches when graph data exists. For free on-device semantics, set EMBEDDING_PROVIDER=local in ~/.agentmemory/.env and restart; the first embedding request downloads Xenova/all-MiniLM-L6-v2 and inference then runs locally.Where does the memory live, and will it pollute my repository?
~/Library/Application Support/agentmemory on macOS, $XDG_DATA_HOME/agentmemory or ~/.local/share/agentmemory on Linux, %APPDATA%\agentmemory on Windows. Change it with --data-dir <path> or AGENTMEMORY_DATA_DIR; --instance 1 uses an instance-1 subdirectory with ports 3211 and 3213. Keep the same directory across restarts and upgrades.Will secrets end up inside stored memories?
<private> tagged content, and user prompts and assistant replies are filtered too. The REST API is protected by a bearer secret from AGENTMEMORY_SECRET or ~/.agentmemory/secret, and both the API and viewer bind to loopback by default — if you expose them, add authentication and TLS yourself.Does it conflict with my existing CLAUDE.md or MEMORY.md?
CLAUDE_MEMORY_BRIDGE=true plus CLAUDE_PROJECT_PATH, then restart), and memory_claude_bridge_sync exports only the latest memories scoped to that project. Export creates MEMORY.md only when it is absent; existing files are preserved, and different content returns an error rather than overwriting.Capture stopped working after an upgrade — what should I check?
connect command after upgrading. agentmemory doctor gives interactive diagnostics and fix prompts, --verbose surfaces server detail, and agentmemory capture shows the capture inbox and offline spool.Is AgentMemory free?
Is AgentMemory open source?
Is AgentMemory safe to use?
Is AgentMemory still maintained?
Who makes AgentMemory?
What is AgentMemory's official website?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.