
agentmemory-hooks
The agentmemory plugin hooks that capture observations automatically across the agent session lifecycle. Use when explaining how memory gets captured without manual saves, when debugging missing observations, or when tuning what gets recorded.
- Installs
- 10.8K
- Last 24h
- +49
- Trending rank
- #3404
- Security
- Warn
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/rohitg00/agentmemory --skill agentmemory-hooks- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads agentmemory-hooks automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
Security audits
Independent scans of the skill's instructions and bundled files.
SKILL.md
The instructions your agent reads when the skill is triggered.
The agentmemory plugin registers lifecycle hooks so memory is captured automatically. You do not have to call memory_save for routine work; the hooks observe tool use, prompts, and session boundaries and write observations for you.
Quick start
For Claude Code, install its plugin:
/plugin marketplace add rohitg00/agentmemory
/plugin install agentmemory
For Devin CLI and Devin Desktop, install the plugin and start a new session:
devin plugins install rohitg00/agentmemory#plugin
Run /hooks inside Devin to confirm the agentmemory hooks are loaded. Plugin hooks run only in local Devin sessions, not in cloud sessions.
Pi and OMP install native recall and capture with agentmemory connect pi --with-mcp or agentmemory connect omp --with-mcp. Reload Pi or restart OMP, then inspect /agentmemory-status. DSH requires agentmemory connect dsh --with-hooks and a restart. Cursor lifecycle hooks come from its enabled plugin, separately from connect cursor's MCP setup.
Hermes and OpenClaw use their native integrations and lifecycle contracts. Follow the matching integration setup instructions and verify a real turn creates an observation. Installing shared skills or connecting MCP alone does not enable automatic capture. Watch recorded observations in the viewer at http://localhost:3113 when using the default port. A pending capture queue is not proof that the daemon stored the event.
What the hooks do
- Session start and end frame each unit of work and let
handoffresume it. - Tool-use hooks capture what changed and why, the raw material for
recallandrecap. - Prompt-submit captures intent. Pre-compact preserves context before the host trims it.
- A post-commit hook links commits to sessions, which powers
commit-contextandcommit-history.
Important
- The plugin hooks capture by default without an LLM. Per-observation LLM compression (
AGENTMEMORY_AUTO_COMPRESS) and hook context injection (AGENTMEMORY_INJECT_CONTEXT) are separate options. Session summaries can use a configured LLM provider independently of automatic observation compression. Native integrations have their own recall/capture settings; inspect the host configuration instead of assuming these flags control every plugin. - If observations are missing, confirm the plugin is enabled and the server is running. See TROUBLESHOOTING.md.
See also
- agentmemory-config for the capture and injection flags.
- The handoff, recap, and session-history skills consume what these hooks record.
Reference
The exact registered hook events live in REFERENCE.md, generated from plugin/hooks/hooks.json.
FAQ
What does the agentmemory-hooks skill do?
The agentmemory plugin hooks that capture observations automatically across the agent session lifecycle. Use when explaining how memory gets captured without manual saves, when debugging missing observations, or when tuning what gets recorded.
How do I install agentmemory-hooks?
Run npx skills add https://github.com/rohitg00/agentmemory --skill agentmemory-hooks in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/agentmemory-hooks/ (personal) or .claude/skills/agentmemory-hooks/ (project).
Which AI agents can use agentmemory-hooks?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is agentmemory-hooks safe to install?
Security partners have reviewed it: Gen Agent Trust Hub passed; Socket passed; Snyk flagged items to review. As with any skill, read the SKILL.md and bundled scripts before installing.
Who maintains agentmemory-hooks?
It is published by rohitg00 in rohitg00/agentmemory. It has 10,807 recorded installs.
More from rohitg00/agentmemory
remember
rohitg00/agentmemory
Save an insight, decision, or learning to agentmemory's long-term storage with searchable concept tags. Use when the user says "remember this", "save this", "note that", "don't forget", or wants to preserve knowledge for future sessions.
recall
rohitg00/agentmemory
Search agentmemory for past observations, sessions, and learnings about a topic using hybrid BM25 plus vector plus graph search. Use when the user says "recall", "what did we do about", "did we ever", "have we seen", or needs context from past sessions.
session-history
rohitg00/agentmemory
Show what happened in recent past sessions on this project as a clean timeline. Use when the user asks "what did we do last time", "session history", "past sessions", or wants an overview of previous work.
forget
rohitg00/agentmemory
Delete selected durable memories from agentmemory after showing them and getting explicit confirmation. Use when the user says "forget this", "delete memory", "remove that note", or wants to scrub specific data for privacy.
recap
rohitg00/agentmemory
Summarize the last N agent sessions for the current project, grouped by date, with highlight observations per session. Use when the user asks "recap", "what have we been doing", "today", "this week", or wants a rollup of recent work.
commit-context
rohitg00/agentmemory
Trace a file, function, or line back to the agent session that produced its current commit. Use when the user asks "why is this code here", "what was the agent doing when this changed", "who wrote this", or wants context on a specific location in the codebase.
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
handoff
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
domain-modeling
mattpocock/skills
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
codebase-design
mattpocock/skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.