Installation
- Plugin Marketplace (recommended)
- CLI
The plugin marketplace path gives you the full experience: 12 lifecycle hooks, 15 skills, and the MCP server wired together in two commands.
Start the memory server
In a separate terminal, start Agent Memory before launching Claude Code:The server starts on port 3111. Keep this terminal open.
Install the plugin inside Claude Code
Inside a Claude Code session, run:This single install registers all 12 hooks, 15 skills, and auto-wires the
@agentmemory/mcp server via the plugin’s .mcp.json — you get all 53 MCP tools without any extra configuration.Make sure
agentmemory is running before starting Claude Code. The plugin connects to it on session start.Install Native Skills (optional)
Run this after connecting to install 15 custom skills that let Claude Code trigger memory operations directly by name:- 8 action skills you can invoke directly:
/recall,/remember,/recap,/handoff,/forget,/commit-context,/commit-history,/session-history - 7 reference skills Claude Code loads on demand: MCP tools reference, REST API reference, config guide, agents guide, hooks guide, architecture overview, and a skill-authoring guide
How Hooks Work with Claude Code
When you install via the plugin marketplace, Agent Memory registers as a pre/post tool use hook inside Claude Code. Claude Code fires these hooks automatically around every tool call — you do nothing differently. Here is what gets captured without any manual effort:File reads and writes
Every
Read, Write, and Edit tool call is recorded with file path, project context, and the agent’s reasoning.Bash commands
Shell executions are captured with their output, so Agent Memory learns which commands you run for which tasks.
Web and codebase searches
Search queries and their results build a picture of what your agent looked for and what it found.
Conversation turns
Session start and end events create session boundaries, so memories are grouped by the work you were doing.
SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, PreCompact, Stop, SubagentStart, SubagentStop, Notification, TaskCompleted, PostToolUseFailure, and SessionEnd. Agent Memory listens to all of them.
CLAUDE_MEMORY_BRIDGE
Enable bi-directional sync between Agent Memory and yourCLAUDE.md file:
CLAUDE.md as they accumulate, and reads from it as additional context during recall. This means your CLAUDE.md stays current automatically instead of going stale.
Available MCP Tools
When connected via the plugin or~/.claude.json, Claude Code has access to these tools. It calls them automatically via hooks — or you can invoke them directly in your prompt:
| Tool | What it does |
|---|---|
memory_recall | Full-text and semantic search across all past observations |
memory_save | Explicitly save an insight, decision, or pattern |
memory_smart_search | Hybrid BM25 + embedding search with RRF fusion and reranking |
memory_file_history | Retrieve all past observations about a specific file |
memory_patterns | Surface recurring patterns across sessions |
memory_sessions | List recent sessions with summaries |
memory_timeline | Chronological view of observations |
memory_profile | Full project profile: key concepts, files, and patterns |
AGENTMEMORY_TOOLS=core when starting the server.
Hooks-Only Wiring (MCP-Standalone Path)
If you usedagentmemory connect claude-code instead of the plugin install, Claude Code cannot resolve ${CLAUDE_PLUGIN_ROOT} and hook scripts need absolute paths. Run this to wire hooks using absolute paths from the currently installed package:
~/.claude/settings.json with absolute paths. Re-run this command after upgrading Agent Memory to refresh the paths — user-defined hook entries in the file are preserved.
Verification
After connecting, open a new Claude Code session. You should see a line likeLoaded N memories in the session context. To confirm hooks are working:
http://localhost:3113.