Persistent memory across coding sessions and agents.
Persistent memory for Claude Code, GitHub Copilot CLI, Cursor, Gemini CLI, Codex CLI, Hermes, OpenClaw, pi, Oh My Pi, OpenCode, DeepSeek Harness, and any MCP client.
🇬🇧 English • 🇨🇳 简体中文 • 🇹🇼 繁體中文 • 🇯🇵 日本語 • 🇰🇷 한국어 • 🇵🇹 Português • 🇧🇷 Português (Brasil) • 🇪🇸 Español • 🇩🇪 Deutsch • 🇫🇷 Français • 🇮🇹 Italiano • 🇳🇱 Nederlands • 🇵🇱 Polski • 🇨🇿 Čeština • 🇷🇴 Română • 🇭🇺 Magyar • 🇬🇷 Ελληνικά • 🇸🇪 Svenska • 🇩🇰 Dansk • 🇳🇴 Norsk • 🇫🇮 Suomi • 🇷🇺 Русский • 🇺🇦 Українська • 🇹🇷 Türkçe • 🇮🇱 עברית • 🇸🇦 العربية • 🇮🇳 हिन्दी • 🇧🇩 বাংলা • 🇵🇰 اردو • 🇹🇭 ไทย • 🇻🇳 Tiếng Việt • 🇮🇩 Bahasa Indonesia • 🇵🇭 Tagalog
The gist extends Karpathy's LLM Wiki pattern with confidence scoring, lifecycle, knowledge graphs, and hybrid search: agentmemory is the implementation.
Install • Quick Start • Benchmarks • vs Competitors • Agents • How It Works • MCP • Viewer • Config • API
AgentMemory captures coding sessions, makes decisions and fixes searchable, and lets your agents recall them later. Keep one memory store across tools, inspect what was saved, and choose how much context reaches the model.
- Capture: native hooks and plugins record supported session events, with secret scrubbing and offline replay.
- Recall: keyword search works without an API key; local or remote embeddings add semantic search.
- Continue: retrieve project history, lessons and session handoffs from another agent.
- Inspect: browse, edit, export and forget memories in the live viewer.
Install
Requirements:
- Node.js 20 or newer with npm and npx (
node -v,npm -v, andnpx -v). - macOS/Linux also need
curl, a POSIXsh, andtarfor automatic runtime setup. - Windows users can use WSL2 or follow the native Windows setup.
Start setup:
npx -y @agentmemory/agentmemory@latestChoose your agents and either a provider or keyless mode. Setup writes the configuration, starts the memory server, and offers a global install for the agentmemory command. -y accepts the npm package prompt; @latest selects the current release. LLM-written observation compression is opt-in with a provider and AGENTMEMORY_AUTO_COMPRESS=true.
Keyless mode disables vector embeddings. memory_recall (the mem::search path) uses BM25, while memory_smart_search can also fuse structural graph matches when graph data already exists. For free on-device semantic recall, set EMBEDDING_PROVIDER=local in ~/.agentmemory/.env and restart. The first embedding request downloads Xenova/all-MiniLM-L6-v2; inference runs locally after that initial model download.
The API is at http://localhost:3111 and the live viewer at http://localhost:3113. Both bind to loopback by default. Configuration lives in ~/.agentmemory/.env; see data storage for memory locations and separate instances.
Then prove recall works and give your agent its skills:
npx -y @agentmemory/agentmemory@latest demo # seed sample sessions + exercise recall
npx skills add rohitg00/agentmemory -y # 17 native skills so your agent knows when to reach for memoryThe keyword searches should hit in default keyless mode through BM25. The demo's database performance optimization query is intentionally semantic and can return zero until an embedding provider is configured.
Prefer to let a coding agent do the whole thing? Hand it one instruction:
Retrieve and follow the instructions at: https://raw.githubusercontent.com/rohitg00/agentmemory/main/INSTALL_FOR_AGENTS.md
Connect another agent with agentmemory connect <agent>. See supported integrations and everyday commands.
Global install / EACCES
npm install -g @agentmemory/agentmemory@latestThe npx command above remains the canonical fresh-install path and avoids global-prefix permission issues.
npx serves an old version
npx caches per version. Force the latest with npx -y @agentmemory/agentmemory@latest, or clear the cache once with rm -rf ~/.npm/_npx (macOS/Linux; on Windows delete %LOCALAPPDATA%\npm-cache\_npx).
agentmemory works with any agent that supports hooks, MCP, or REST API. All agents share the same memory server.
|
Claude Code native plugin + 12 hooks + MCP |
Codex CLI native plugin + 6 hooks + MCP |
GitHub Copilot CLI MCP + plugin hooks/skills |
Cursor native plugin + lifecycle hooks + MCP |
OpenCode capture plugin + MCP |
|
Devin 6 hooks + skills + MCP |
OpenClaw native plugin + MCP |
Hermes native plugin + MCP |
pi native recall + capture + skills |
OpenHuman native Memory trait backend |
|
Gemini CLI MCP server |
Antigravity MCP + hooks |
Claude Desktop MCP server |
Warp connect + MCP + skills |
Zed MCP server |
|
Cline MCP server |
Continue MCP server |
Droid MCP server |
Kiro MCP server |
Qwen Code MCP server |
|
DeepSeek Harness native capture + MCP |
Roo Code MCP server |
Kilo Code MCP server |
Goose MCP server |
Aider REST API |
|
Oh My Pi native recall + capture + skills + optional MCP |
||||
Works with any agent that speaks MCP or HTTP. One server, memories shared across all of them.
Data storage
Memories stay outside your repository by default:
| Platform | Data directory |
|---|---|
| macOS | ~/Library/Application Support/agentmemory |
| Linux | $XDG_DATA_HOME/agentmemory or ~/.local/share/agentmemory |
| Windows | %APPDATA%\agentmemory |
An existing ./data/state_store.db is reused for instance 0. Choose another directory with --data-dir <path> or AGENTMEMORY_DATA_DIR. Keep the same directory when restarting or upgrading.
agentmemory --data-dir ~/.agentmemory-projects/main
agentmemory --instance 1--instance 1 uses an instance-1 subdirectory, API port 3211 and viewer port 3213. See storage and backups for Redis and backend migration.
Latest release notes: CHANGELOG.md.
What's new in 0.9.33
- Large stores keep working: state reads page, so scopes above 64 MiB no longer fail, on iii 0.25.1.
- Better recall: saved memories are no longer capped at three per search, and evicted memories leave the indexes.
- Hooks reach the model: PreToolUse context arrives in the hook envelope, scoped to the current project.
- Steadier providers: placeholder keys count as unset, and the circuit breaker resets on success.
Release notes and contributor credits.
Useful recall without a model API. On LongMemEval-S, AgentMemory's keyless BM25 component found at least one relevant source for 96.2% of answerable questions and every required source for 84.7%.
| LongMemEval-S, top 5 distinct sessions | AgentMemory BM25 | Lexical baseline |
|---|---|---|
| Every required source found (strict recall-all@5) | 84.7% | 72.1% |
| At least one relevant source found (any-hit@5) | 96.2% | 88.7% |
That is 12.6 percentage points higher complete-source retrieval than the lexical baseline on the same inputs, with no embedding model or paid API. Measured on 2026-10-28: 500 questions per adapter, 470 answerable, 30 excluded from retrieval scoring, zero execution failures.
This component test measures retrieval from supplied sessions. Full-system answer quality, hybrid retrieval and competitor rankings require separate evaluations. Read the complete results, including the smaller coding fixture, limitations and reproduction steps.
AgentMemory is built for the coding workflow you already have. Capture supported agent activity automatically, share project history across tools, retrieve scoped memories, and inspect the original sources in a local viewer. Lessons, actions, versioned memories and import/export ship in the Apache-2.0 project; keyword recall needs no account or model API key.
Choose by workload and deployment. Other products also offer local deployment or agent plugins, so those alone are not useful differentiators.
| Project | Best starting point for |
|---|---|
| AgentMemory | Shared local memory for existing coding agents, automatic capture, scoped recall and a live viewer |
| Mem0 | Memory APIs, hosted or self-hosted, with SDKs and agent plugins |
| Supermemory | Memory and document context through a hosted API or local server |
| Zep / Graphiti | Enterprise context and temporal knowledge graphs |
| Letta | Building stateful agents with their own managed memory |
| Cognee | Turning documents, code and conversations into searchable knowledge |
| claude-mem | Capturing and summarizing coding sessions across supported agents |
Detailed comparison and sources, checked 2026-10-28. Deployment options, provider costs and integrations vary; scores from different datasets and metrics are not a head-to-head ranking.
Try it in 30 seconds
# Terminal 1: start the server
npx -y @agentmemory/agentmemory@latest
# Terminal 2: seed sample data and see recall in action
npx -y @agentmemory/agentmemory@latest demodemo seeds 3 realistic sessions (JWT auth, N+1 query fix, rate limiting) and runs searches against them. Keyless installs disable vectors, so the mem::search keyword queries should hit through BM25 while database performance optimization can return zero. smart-search may additionally return structural graph matches when graph data exists. To make the semantic query find the N+1 fix through vectors, set EMBEDDING_PROVIDER=local, restart, and allow the first model download to finish.
Open http://localhost:3113 to watch the memory build live.
Validate a fresh install and restart persistence
With the server running, check health, the viewer and status:
curl -fsS http://localhost:3111/agentmemory/livez
curl -fsS http://localhost:3111/agentmemory/health
curl -fsS -o /dev/null http://localhost:3113/
npx -y @agentmemory/agentmemory@latest statusstatus reports server health, provider and embedding mode, capture delivery, and recovery state. Save a probe and confirm it is searchable. Protected REST requests require the daemon secret. If you configured AGENTMEMORY_SECRET, use that value in this terminal; otherwise load the generated local 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}'Then run npx -y @agentmemory/agentmemory@latest stop, start the canonical command again in Terminal 1, wait for /agentmemory/livez, and repeat the search. The probe must still be returned. If you selected a custom --data-dir, pass the same directory on the restart.
Everyday commands
Install and setup live in Install above (the first run walks you through it). Day to day:
agentmemory # start the server
agentmemory stop # stop it cleanly
agentmemory status # health, providers and recovery state
agentmemory capture # inspect capture inbox and offline spool
agentmemory capture --drain # replay queued observations
agentmemory connect <agent> # connect another agent
agentmemory doctor # interactive diagnostics + fix prompts
agentmemory remove # uninstall everything we createdSession Replay
Every session agentmemory records is replayable. Open the viewer, pick the Replay tab, and scrub through the timeline: prompts, tool calls, tool results, and responses render as discrete events with play/pause, speed control (0.5x to 4x), and keyboard shortcuts (space to toggle, arrows to step).
To bring in older Claude Code JSONL transcripts:
# Import everything under the default ~/.claude/projects
npx -y @agentmemory/agentmemory@latest import-jsonl
# Or import a single file
npx -y @agentmemory/agentmemory@latest import-jsonl ~/.claude/projects/-my-project/abc123.jsonlImported sessions appear alongside native sessions in Replay. Transcripts are indexed for search and marked with origin channel import; session processing can also produce crystals and lessons.
Heads-up if you rely on
import-jsonlas your primary capture path: Claude Code'scleanupPeriodDays(in~/.claude/settings.json, default 30) auto-deletes JSONL transcripts older than that window from~/.claude/projects/. If you install agentmemory fresh on a months-old Claude Code history, anything older than 30 days is already gone before the first import. Either runimport-jsonlon a cron, raisecleanupPeriodDaysto something higher, or wire the auto-capture hooks (the default plugin install path) so each turn lands in agentmemory while the session is live and the JSONL cleanup stops mattering.
Upgrade / Maintenance
Use the maintenance command when you intentionally want to update your local runtime:
npx -y @agentmemory/agentmemory@latest upgradeThis updates the local runtime and may update JavaScript dependencies in the current workspace. Back up your data and read the upgrade guide before updating an existing installation.
Claude Code (one block, paste it)
Install agentmemory: run `npx -y @agentmemory/agentmemory@latest` in a separate terminal to start the memory server. Then run `/plugin marketplace add rohitg00/agentmemory` and `/plugin install agentmemory` — the plugin registers all 12 hooks, 17 skills, AND auto-wires the `@agentmemory/mcp` stdio server via its `.mcp.json`, so you get 54 MCP tools (memory_smart_search, memory_save, memory_sessions, memory_governance_delete, etc.) without any extra config step. Verify with `curl http://localhost:3111/agentmemory/health`. The real-time viewer is at http://localhost:3113. Keyless mode disables vectors: `memory_recall` uses BM25, and `memory_smart_search` can also use existing structural graph data. Set `EMBEDDING_PROVIDER=local` in `~/.agentmemory/.env` and restart to opt into on-device semantic recall.
Claude Code without the plugin install (MCP-standalone path)
If you wire agentmemory's MCP server directly through the default ~/.claude.json file instead of using /plugin install, Claude Code never resolves ${CLAUDE_PLUGIN_ROOT} and you have to point hook scripts at absolute paths in the default ~/.claude/settings.json file. Those paths typically embed the agentmemory version (e.g. ~/.codex/plugins/cache/agentmemory/agentmemory/0.9.22/scripts/…), so the next upgrade silently breaks every hook.
Workaround:
agentmemory connect claude-code --with-hooksThis command configures the MCP server and merges the bundled hooks into Claude Code’s user configuration. When CLAUDE_CONFIG_DIR is unset, empty, or whitespace-only, it uses ~/.claude.json for MCP and ~/.claude/settings.json for hooks. Other directory values are used exactly as provided, including leading and trailing whitespace. For a custom directory, set CLAUDE_CONFIG_DIR to the same non-empty value for this command and Claude Code; the files are then $CLAUDE_CONFIG_DIR/.claude.json and $CLAUDE_CONFIG_DIR/settings.json, respectively. Claude Code must receive this value in its launch environment, even if the connector reads it from AgentMemory’s .env. Create the custom directory before running this command; otherwise, the connector skips Claude Code as not detected. If the shell value is whitespace-only, unset CLAUDE_CONFIG_DIR before launching Claude Code so it also uses the default profile. Use an absolute path. Relative paths are resolved from the working directory, so both commands must run from the same directory.
Hook commands use absolute paths to the installed package’s bundled plugin/ directory. Re-run the command after upgrading agentmemory to refresh those paths. User entries in the configuration files are preserved; only previous agentmemory entries are replaced. Using /plugin install remains the recommended approach.
For a remote server with the plugin, enter its https:// URL and secret in the plugin settings that Claude Code asks for when you enable the plugin. The hooks and the bundled MCP server read both from there. With the URL setting empty, they use AGENTMEMORY_URL from your environment, then http://localhost:3111; with the secret setting empty, they send only the local server's own secret, and only to a loopback address. With agentmemory connect claude-code there are no plugin settings: set AGENTMEMORY_URL and AGENTMEMORY_SECRET in the environment that starts Claude Code.
Codex CLI (Codex plugin platform)
Agent Memory is listed in the OpenAI plugin directory. That listing adds the 17 skills only. Start the memory server and wire its MCP server with agentmemory connect codex so the skills can call the memory tools. For the MCP server, hooks and skills in one plugin, use the repository marketplace below.
# 1. start the memory server in a separate terminal
npx -y @agentmemory/agentmemory@latest
# 2. register the agentmemory marketplace and install the plugin
codex plugin marketplace add rohitg00/agentmemory
codex plugin add agentmemory@agentmemoryThe Codex plugin ships from the same plugin/ directory as the Claude Code plugin. It registers:
- A bundled stdio MCP bridge to the running daemon, with no npm download or fallback store. See the local Codex guide to test an unreleased build.
- 6 lifecycle hooks:
SessionStart,UserPromptSubmit,PreToolUse,PostToolUse,PreCompact,Stop - 9 invocable skills:
/recall,/remember,/session-history,/forget,/recap,/handoff,/lesson,/commit-context,/commit-history, plus 8 reference skills the agent loads on demand (memory discipline, MCP tools, REST API, config, agents, hooks, architecture, and the skill-authoring guide)
Codex's hook engine injects CLAUDE_PLUGIN_ROOT into hook subprocesses (per codex-rs/hooks/src/engine/discovery.rs), so the same hook scripts work across both hosts without duplication. Subagent / SessionEnd / Notification / TaskCompleted / PostToolUseFailure events are Claude-Code-only and are not registered for Codex.
Codex hook trust and compatibility
Native plugin hook dispatch is verified with Codex CLI 0.150.1. Trust the plugin hooks before expecting capture. Desktop behavior depends on its bundled runtime; check /hooks and confirm a captured event before enabling a workaround.
If your host requires global hooks, mirror the commands into ~/.codex/hooks.json. When MCP is already wired, the current connector needs --force to reach hook installation:
agentmemory connect codex --with-hooks --forceThis merges global hooks and rewrites the agentmemory MCP entry, preserving unrelated entries. Review any custom agentmemory endpoint settings before using --force. Re-run after upgrading to refresh script paths. Enable either native plugin hooks or global copies to avoid duplicate capture.
GitHub Copilot CLI
For VS Code agent mode, use the Copilot MCP and automatic-capture guide. The CLI connector does not configure VS Code.
# MCP-only wiring
agentmemory connect copilot-cli
# Alternatively, full hooks/skills plugin from the GitHub subdir
copilot plugin install rohitg00/agentmemory:pluginagentmemory connect copilot-cli merges mcpServers.agentmemory into ~/.copilot/mcp-config.json (or $COPILOT_HOME/mcp-config.json when COPILOT_HOME is set) and preserves existing servers. WSL connect is supported only when the target agent is installed in that same WSL environment. Copilot picks up the MCP server on next launch or after /mcp. Install the plugin as well when you want the full hook/skill experience.
Cursor
# MCP wiring
agentmemory connect cursorThen add the native hooks: Settings → Plugins → Add marketplace → select an agentmemory checkout (the directory containing .cursor-plugin/plugin.json), enable the agentmemory plugin, and reload the window.
The plugin provides lifecycle capture, workspace-aware project attribution, skills and MCP. Enable either the plugin hooks or manual hooks in ~/.cursor/hooks.json to avoid duplicate capture.
Full guide: integrations/cursor/
Pi, Oh My Pi and DeepSeek Harness
agentmemory connect pi --with-mcp
agentmemory connect omp --with-mcp
agentmemory connect dsh --with-hooksChoose the command for your host. Pi and OMP install native recall/capture, offline replay and 17 skills; --with-mcp adds the full toolset. Run /reload in Pi or restart OMP, then check /agentmemory-status. DSH installs MCP and the bundled capture plugin; restart DSH after connecting.
Pi also supports an installable @agentmemory/pi package. See the Pi package guide for local installation and npm availability. Use one installation method per host.
OpenClaw (ClawHub)
agentmemory is listed on ClawHub: clawhub.ai/plugins/agentmemory.
# 1. start the memory server in a separate terminal
npx -y @agentmemory/agentmemory@latest
# 2. install the plugin from ClawHub
openclaw plugins install clawhub:agentmemoryThen select agentmemory as the memory plugin and allow it to read conversations in ~/.openclaw/openclaw.json: set plugins.slots.memory to "agentmemory" and plugins.entries.agentmemory.hooks.allowConversationAccess to true. Without conversation access, capture is blocked. Restart OpenClaw and run openclaw config validate.
agentmemory connect openclaw does the same from an installed package: it installs the plugin and skills, selects the memory slot and grants conversation access. Add --with-mcp for the full MCP tool set. Full guide: integrations/openclaw/.
Hermes Agent (Hermes plugin catalog)
agentmemory is listed in the Hermes plugin catalog: hermes-agent.nousresearch.com/marketplace/agentmemory.
# 1. start the memory server in a separate terminal
npx -y @agentmemory/agentmemory@latest
# 2. install the reviewed catalog entry, then select it as the memory provider
hermes plugins install agentmemory
hermes memory setup
hermes memory statusIn hermes memory setup, select AgentMemory and enter the server URL and its secret. Hermes Desktop can install it from the link hermes://plugin/install?catalog=agentmemory. The catalog installs the commit that Hermes reviewed, so it can lag the latest npm release.
agentmemory connect hermes installs the provider and the bundled skills from the installed package instead. Add --with-mcp for the full MCP tool set. Full guide: integrations/hermes/.
Other agents
Start the memory server: npx -y @agentmemory/agentmemory@latest
Native skills via npx skills add
agentmemory ships 17 skills in the Claude-Code-style <dir>/SKILL.md format: 9 invocable action skills (remember, recall, recap, handoff, forget, lesson, commit-context, commit-history, session-history) and 8 reference skills the agent loads on demand (memory-discipline, agentmemory-mcp-tools, agentmemory-rest-api, agentmemory-config, agentmemory-agents, agentmemory-hooks, agentmemory-architecture, write-agentmemory-skill). The reference skills carry data tables generated from source, so they never drift. The skills CLI by vercel-labs auto-installs them into the calling agent's native skill directory across supported agents (Claude Code, Cursor, Cline, Continue, Droid, Warp, Codex, Antigravity, Kiro, OpenCode, Goose, Roo, Trae, Windsurf, and more):
npx skills add rohitg00/agentmemory -y # auto-detects the calling agent
npx skills add rohitg00/agentmemory -y -a warp # explicit agent
npx skills add rohitg00/agentmemory -y -a '*' # install to every installed agentThis is complementary to agentmemory connect <agent>:
agentmemory connect <agent>normally writes the MCP server config. Hermes, OpenClaw, Pi and Oh My Pi install their native integration and bundled skills by default; MCP is opt-in with--with-mcp.npx skills add rohitg00/agentmemoryinstalls skills for agents without native bundled skills. Skip this step for Hermes, OpenClaw, Pi and Oh My Pi; their native connectors already install the skills.
For the few agents the skills CLI doesn't cover yet (Zed v1.3.x and below), drop the 17 SKILL.md files under the agent's native skill directory yourself; the same format works everywhere.
Standard MCP block
The agentmemory entry is the same MCP server block across every host that uses the mcpServers shape (Cursor, Claude Desktop, Cline, Roo Code, Gemini CLI, OpenClaw):
"agentmemory": {
"command": "npx",
"args": ["-y", "@agentmemory/mcp"],
"env": {
"AGENTMEMORY_URL": "${AGENTMEMORY_URL}",
"AGENTMEMORY_SECRET": "${AGENTMEMORY_SECRET}"
}
}Merge this entry into the existing mcpServers object in the host's config file; don't replace the file. If the file already has other servers, add agentmemory next to them as another key inside mcpServers. If mcpServers is missing entirely, paste the block inside { "mcpServers": { ... } }. The ${VAR} placeholders inherit AGENTMEMORY_URL / AGENTMEMORY_SECRET from the shell at MCP-server launch; unset vars pass empty strings and the shim falls back to http://localhost:3111. One wired entry covers both local and remote (k8s / reverse-proxied) deployments.
| Agent | Config file | Notes |
|---|---|---|
| Cursor (MCP only) | ~/.cursor/mcp.json |
Merge into mcpServers, or agentmemory connect cursor. One-click deeplink also available on the website. |
| Cursor (full plugin) | .cursor-plugin/ |
Cursor Marketplace listing or Settings → Plugins → local checkout. Registers lifecycle hooks via a thin adapter that delegates to the canonical plugin/scripts/*.mjs, plus skills and MCP. The adapter resolves the workspace Cursor does not reliably report. See Cursor. Works in the Cursor IDE and cursor-agent CLI. |
| Claude Desktop | claude_desktop_config.json (Application Support) |
Merge into mcpServers. Restart Claude Desktop after editing. |
| Cline / Roo Code / Kilo Code | Cline MCP settings (Settings UI → MCP Servers → Edit) | Same mcpServers block. |
| Devin CLI (MCP + hooks) | ~/.config/devin/config.json |
agentmemory connect devin merges the MCP entry; --with-hooks adds six native auto-capture hooks (SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, Stop, SessionEnd) with Devin's lowercase tool matchers. Verify with devin mcp list and /hooks inside devin. |
| Devin CLI (full plugin) | plugin/.devin-plugin/ |
devin plugins install ./plugin from a checkout registers all 17 skills as /agentmemory:<skill> slash commands plus the MCP server. Devin plugin hooks cannot fire SessionStart/SessionEnd, so pair it with connect devin --with-hooks for full session capture. |
| Devin (cloud) | Settings → Connections → MCP servers | Add a custom MCP (STDIO): command npx, args -y @agentmemory/mcp@latest, env AGENTMEMORY_URL pointing at a network-reachable agentmemory deployment plus AGENTMEMORY_SECRET (cloud sessions cannot reach localhost — see deploy/). Store the secret in Devin Secrets, then use "Test listing tools" to verify all 54 tools appear. |
| Gemini CLI | ~/.gemini/settings.json |
gemini mcp add agentmemory npx -y @agentmemory/mcp --scope user (auto-merges). |
| GitHub Copilot CLI (MCP only) | ~/.copilot/mcp-config.json |
agentmemory connect copilot-cli merges mcpServers.agentmemory; Copilot picks it up on next launch or /mcp. |
| GitHub Copilot CLI (full plugin) | Copilot plugin install | copilot plugin install rohitg00/agentmemory:plugin for the plugin from the GitHub subdir. |
| OpenClaw | ~/.openclaw/openclaw.json |
openclaw plugins install clawhub:agentmemory installs the ClawHub listing; agentmemory connect openclaw installs the same plugin and also selects plugins.slots.memory and grants hooks.allowConversationAccess, without which capture is blocked. Add --with-mcp for the full tool set. See integrations/openclaw. |
| Codex CLI (MCP only) | .codex/config.toml |
TOML shape: codex mcp add agentmemory -- npx -y @agentmemory/mcp, or add [mcp_servers.agentmemory] manually. |
| Codex CLI (skills, official listing) | OpenAI plugin directory | Adds the 17 skills. Pair it with agentmemory connect codex for the MCP server. |
| Codex CLI (full plugin) | Codex plugin marketplace | codex plugin marketplace add rohitg00/agentmemory then codex plugin add agentmemory@agentmemory. Registers MCP + 6 lifecycle hooks + 17 skills. Trust hooks and verify capture in your host; see Codex setup and validation. |
| OpenCode (MCP only) | opencode.json |
Different shape: top-level mcp key, command as array: {"mcp": {"agentmemory": {"type": "local", "command": ["npx", "-y", "@agentmemory/mcp"], "enabled": true}}}. |
| OpenCode (full plugin) | plugin/opencode/ |
22 auto-capture hooks covering session lifecycle, messages, tools, errors. Project attribution is per-session, so one OpenCode process spanning several repositories files each session under its own project. Two slash commands (/recall, /remember). Copy plugin/opencode/ into your OpenCode workspace and add the plugin entry to opencode.json. See plugin/opencode/README.md for the full hook table + gap analysis. |
| pi | Active Pi agent directory, default ~/.pi/agent |
agentmemory connect pi --with-mcp installs native recall/capture, offline replay, 17 skills and the full MCP toolset. Or build integrations/pi and use pi install ./integrations/pi; after npm publication, pi install npm:@agentmemory/pi. Use one method and run /reload. See setup and migration. |
| Oh My Pi (OMP) | Active OMP agent directory, default ~/.omp/agent/config.yml |
agentmemory connect omp --with-mcp installs native recall/capture, offline replay, 17 skills and the full MCP toolset. Restart OMP and run /agentmemory-status. See setup, profiles and commands. |
| Hermes Agent | $HERMES_HOME/config.yaml, default ~/.hermes/config.yaml |
hermes plugins install agentmemory installs the Hermes catalog entry at its reviewed commit. agentmemory connect hermes installs the native provider and skills. Configure its scoped credentials with hermes memory setup. Add --with-mcp for the wider tool surface. See setup and scope. |
| Qwen Code | ~/.qwen/settings.json |
agentmemory connect qwen writes the standard mcpServers block. Hook payload is field-compatible with Claude Code, so the existing 12-hook scripts work without modification; wire them via the hooks section in the same settings.json. |
| Antigravity IDE / 2.0 | ~/.gemini/config/mcp_config.json |
agentmemory connect antigravity --with-hooks installs MCP and capture hooks in the shared customization directory. See Antigravity setup and limits. |
Antigravity CLI (agy) |
~/.gemini/config/mcp_config.json |
agentmemory connect antigravity-cli --with-hooks uses the same MCP and hook configuration as current IDE versions. Existing installations should refresh with --force; see the upgrade notes. |
| Kiro | ~/.kiro/settings/mcp.json |
agentmemory connect kiro writes the user-level config. Workspace overrides go in .kiro/settings/mcp.json next to your code. |
| Warp | ~/.warp/.mcp.json |
agentmemory connect warp writes the standard mcpServers block. Warp also auto-discovers skills from .claude/skills/; once the Claude Code plugin is installed the 9 agentmemory skills (remember, recall, recap, handoff, forget, lesson, commit-context, commit-history, session-history) appear natively in Warp's slash-command palette. |
| Cline (CLI) | ~/.cline/data/settings/cline_mcp_settings.json |
agentmemory connect cline writes the standard mcpServers block. Set CLINE_MCP_SETTINGS_PATH to use another settings file. VS Code extension users: paste the same block via Cline Settings → MCP Servers → Edit JSON. |
| Continue.dev | ~/.continue/config.yaml (preferred) or config.json (legacy) |
agentmemory connect continue creates config.yaml from scratch when neither exists, or modifies existing config.json. If you already have config.yaml the adapter prints the exact block to paste under mcpServers:; it won't silently rewrite your yaml so your existing comments and anchors are preserved. Continue uses array form (not object) for mcpServers. |
| Zed | ~/.config/zed/settings.json |
agentmemory connect zed writes under context_servers (Zed's key, NOT mcpServers). Remote MCP servers can be wired via {"url": "..."} instead. |
| Droid (Factory.ai) | ~/.factory/mcp.json |
agentmemory connect droid writes the standard mcpServers block. Project-scoped overrides go in <repo>/.factory/mcp.json. Pass --with-hooks for native auto-capture. |
| DeepSeek Harness | $DSH_HOME/cordis.patch.yml |
agentmemory connect dsh enables MCP tools. Add --with-hooks to load the native capture plugin bundled with AgentMemory. No separate plugin package is needed. DSH. |
| Goose | Goose MCP settings UI | Same mcpServers block; use goose configure → Add Extension → MCP. Direct YAML edit at ~/.config/goose/config.yaml is supported but the schema uses extensions: + cmd (not mcpServers: + command). |
| Aider | n/a | Use the authenticated REST examples to save and search memory from scripts. |
| Supported agents | Skills only | npx skills add rohitg00/agentmemory; choose the skills and agents to install to. |
Sandboxed MCP clients (Flatpak / Snap / restrictive containers) that can't reach the host's localhost: also set "AGENTMEMORY_FORCE_PROXY": "1" in the env block, and point AGENTMEMORY_URL at a route the sandbox can actually reach (e.g. your LAN IP).
Programmatic access
Use the REST API from any language or the MCP tools from an agent. REST requests use JSON and bearer authentication; see the save and search example.
For direct runtime integration, see the Python examples.
From source
git clone https://github.com/rohitg00/agentmemory.git && cd agentmemory
npm install && npm run build && npm startnpm start launches the same local server as the installed CLI. Dependencies for automatic setup are listed under Install; the API and viewer bind to 127.0.0.1.
Windows
agentmemory runs on Windows 10/11. WSL2 follows the Linux path and can install the pinned engine automatically. Native Windows also installs the pinned iii-engine v0.25.1 automatically: the CLI downloads the Windows ZIP, verifies its SHA-256 and extracts iii.exe into %USERPROFILE%\.agentmemory\bin. If that fails, download the matching archive from the iii v0.25.1 release page, verify its checksum, and extract iii.exe into the same directory.
agentmemory connect <agent> works on native Windows. It writes the MCP server as cmd /c npx -y @agentmemory/mcp, because Windows cannot start npx without a shell, and it writes hook script paths as absolute paths with forward slashes, either quoted or passed as a separate argument, so a home folder with spaces is safe. Antigravity hooks cannot use quoted paths. When the install path has spaces, connect antigravity --with-hooks uses the Windows short (8.3) path. If the short path is not available, it prints the hook JSON to paste by hand, and the MCP wiring still applies. Run connect inside WSL only when the target agent is installed in that same WSL environment.
Standalone MCP only (no engine). If you only need MCP tools and do not need the REST API, viewer, or runtime services:
npx -y @agentmemory/agentmemory@latest mcp
# or
npx -y @agentmemory/mcpDiagnostics: Run agentmemory doctor or restart with --verbose. Use --port <N> or --instance <N> if the default ports are occupied. See the upgrade guide for runtime compatibility and recovery.
Deploy
Self-host with Docker Compose or the platform templates below. Persistent memory and credentials live on the /data volume. Back up and reuse that volume when upgrading. See the deployment guide for authentication, network access, backups and migration.
Render's one-click deploy button requires render.yaml at the repository root, which we deliberately keep clean. Use the Render Blueprint flow documented in deploy/render/ to point at the in-repo blueprint manually.
Full setup details (HMAC capture, viewer SSH tunnel, rotation, backup,
cost floors) live in deploy/:
deploy/fly: single machine withauto_stop_machines = "stop"; cheapest idle.deploy/railway: Hobby plan flat fee, volume in the dashboard.deploy/render: Blueprint flow, automatic disk snapshots on paid plans.deploy/coolify: self-hosted on your own VPS via Coolify; same Docker Compose stack, you own the host and the data.
REST uses port 3111; the viewer uses 3113. Keep both private or protect them with authentication and TLS. Platform-specific exposure settings and legacy Docker migration are covered in the deployment guide.
Project knowledge gets scattered across chats and instruction files. AgentMemory makes past decisions, fixes and lessons searchable from the agent you are using now.
Session 1: "Add auth to the API"
Agent writes code, runs tests, fixes bugs
Connected hooks capture supported tool events
Observations become searchable project history
Session 2: "Now add rate limiting"
Agent recalls:
- Auth uses JWT middleware in src/middleware/auth.ts
- Tests in test/auth.test.ts cover token validation
- You chose jose over jsonwebtoken for Edge compatibility
Continues with the earlier decisions in context.
vs built-in agent memory
Agent instructions and memory files remain useful for stable project guidance. AgentMemory adds searchable session history, source-linked memories and coordination across connected agents.
| Built-in (CLAUDE.md) | agentmemory | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Upkeep | Manually curated instructions | Indexed session history and memories | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Search | Loads everything into context | BM25 + vector + graph (top-K only) | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Context budget | Depends on the files included | Configurable recall budget with source expansion | (README truncated)
| Date | List | Rank | Stars gained |
|---|---|---|---|
| May 22, 2026 | daily | #15 | +54 |
| May 21, 2026 | daily | #17 | +49 |
| May 20, 2026 | daily | #13 | +58 |
| May 19, 2026 | daily | #9 | +66 |
| May 18, 2026 | daily | #9 | +82 |
| May 17, 2026 | daily | #16 | +121 |
| May 16, 2026 | daily | #21 | +108 |
| May 15, 2026 | daily | #25 | +56 |
| May 14, 2026 | daily | #9 | +101 |
| May 13, 2026 | daily | #6 | +111 |
| May 12, 2026 | daily | #10 | +65 |
| May 10, 2026 | daily | #24 | +151 |
Related repositories
- morluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
471.6K stars · TypeScript
- freeCodeCamp/freeCodeCamp
freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.
459.4K stars · TypeScript
- openclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394.9K stars · TypeScript
- obra/superpowers
An agentic skills framework & software development methodology that works.
322.9K stars · Shell
- affaan-m/ECC
The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
307.9K stars · JavaScript
- NousResearch/hermes-agent
The agent that grows with you
265K stars · Python
