Skip to content

Guide · Agent skill

How to use the agentmemory Lifecycle Hooks agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The agentmemory-hooks skill explains and helps configure the lifecycle hooks in the agentmemory plugin. These hooks watch an AI agent's session, including tool use, prompts, session start and end, and commits, and save observations so the agent can recall them later. This guide is for developers and teams who want persistent agent memory without manually saving notes, and it shows you how to install the skill, trigger it, and check that capture is working.

agentmemory Lifecycle Hooksrohitg00/agentmemory · Apache-2.0

Quick start

  1. 1Install the agentmemory plugin. Add and install the agentmemory plugin for your host, such as the Claude Code marketplace commands or the Devin plugin install command.
  2. 2Start the local server. Make sure the agentmemory server is running locally. The viewer is at localhost:3113 by default.
  3. 3Download and unzip the skill. Download the ZIP from this page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder.
  4. 4Confirm hooks are loaded. In Devin, run /hooks. In Claude Code, check /plugin list and /mcp.
  5. 5Run a real turn. Do a normal piece of work with the agent so a session event fires.
  6. 6Check the viewer. Open http://localhost:3113 and confirm the observation appears.
  7. 7Debug or tune. If observations are missing, follow TROUBLESHOOTING.md. To change what is recorded, review the flags described in the configuration skill.

What an agent skill is and what this one does

An agent skill is a folder with a SKILL.md instruction file that an AI agent loads when a task matches it. This skill is about the agentmemory plugin's hooks. Once the plugin is installed and its server is running, routine work is remembered without the agent calling a save command: you do not have to call memory_save for normal work.

The hooks cover session start and end, which frame each unit of work and let handoff resume it; tool-use hooks, which capture what changed and why; prompt-submit, which captures intent; pre-compact, which preserves context before the host trims it; and a post-commit hook that links commits to sessions.

Install the agentmemory plugin for your host

For Claude Code, add the marketplace and install the plugin with the commands below. For Devin CLI and Devin Desktop, install the plugin and start a new session, then run /hooks inside Devin to confirm the hooks are loaded. Plugin hooks run only in local Devin sessions, not cloud sessions.

Pi and OMP use agentmemory connect commands with --with-mcp, DSH uses connect dsh --with-hooks, and Cursor's lifecycle hooks come from its enabled plugin. Hermes and OpenClaw follow their own integration setup instructions. Installing shared skills or connecting MCP alone does not enable automatic capture.

/plugin marketplace add rohitg00/agentmemory /plugin install agentmemory

Install the skill from the ZIP or the Claude apps

Download the ZIP for this skill from this page and unzip it into ~/.claude/skills/ for all your projects, or into a project's .claude/skills/ folder for one project only. In the Claude apps, you can instead upload the skill under Settings, then Capabilities, then Skills.

The skill folder contains SKILL.md, REFERENCE.md and TROUBLESHOOTING.md. Keep them together so the links between files work.

  • Personal: ~/.claude/skills/
  • Single project: .claude/skills/ inside the project
  • Claude apps: Settings, then Capabilities, then Skills

Trigger the skill with natural requests

The skill is set to user-invocable false, so you do not call it as a slash command. Instead, ask in plain language about the situation it covers. The skill description says it applies when explaining how memory gets captured without manual saves, when debugging missing observations, or when tuning what gets recorded.

Good requests name the symptom or the goal, and mention the host you use. The agent can then load the hook guidance and check your setup.

  • Explain how agentmemory captures my Claude Code session without manual saves.
  • My agentmemory observations are missing from yesterday's Devin session. Help me find out why.
  • Which lifecycle events does agentmemory record, and how can I stop it recording prompts?
  • Check whether the agentmemory hooks are loaded in my Devin CLI session.

Check that capture works and debug missing observations

Missing observations usually come from one of three things: the plugin is not enabled, the agentmemory server is not running, or the host is not loading the hooks. Confirm each one first. Open the viewer at http://localhost:3113 when using the default port and look for recorded observations after a real turn. A pending capture queue is not proof that the daemon stored the event.

If the problem persists, the TROUBLESHOOTING.md file in the skill covers missing tools, MCP connections and host-specific checks. In Claude Code, inspect /plugin list and /mcp. Restart or reload the host connection after configuration changes.

  • Confirm the plugin is enabled in your host.
  • Confirm the local agentmemory server is running.
  • Run one real prompt and check the viewer at localhost:3113.
  • Do not run another host's setup commands.

Tune what gets recorded

The plugin hooks capture by default without an LLM. Two separate options change behaviour: AGENTMEMORY_AUTO_COMPRESS, which compresses each observation with an LLM, and AGENTMEMORY_INJECT_CONTEXT, which injects context through hooks. Session summaries can use a configured LLM provider independently of automatic compression.

Native integrations have their own recall and capture settings, so inspect your host configuration rather than assuming these flags control every plugin. The agentmemory-config skill covers the capture and injection flags in more detail.

What people use it for

  • Keeping context from a debugging session in Claude Code so the next session can pick up where you stopped.
  • Finding out why last week's Devin CLI work does not show up in agent memory.
  • Recording commits against sessions so you can later review what changed and why.
  • Deciding with your team which prompts and tool use the agent should record and which it should leave out.

Frequently asked questions

How do I install the agentmemory hooks skill?

Download the skill ZIP from this page and unzip it into ~/.claude/skills/ for all projects or into a project's .claude/skills/ folder for one project. In the Claude apps you can upload it under Settings, then Capabilities, then Skills. The agentmemory plugin itself must also be installed for your host.

What does the agentmemory hooks skill require?

It needs the agentmemory plugin installed for your integration, such as Claude Code, Devin, Pi, OMP, DSH, Cursor, Hermes or OpenClaw. It also needs the local agentmemory server running, with the viewer at localhost:3113 by default, and a host agent such as Claude Code or Devin CLI or Desktop.

Is agentmemory free and what is its licence?

The source identifies the licence as Apache-2.0. The source does not describe pricing, so check the repository for any cost details.

Why are my agentmemory observations missing?

Check that the plugin is enabled, the server is running, and the host is loading the hooks. Open the viewer at localhost:3113 after a real turn. A pending capture queue does not prove the event was stored. TROUBLESHOOTING.md has the full recovery steps.

Does agentmemory need an LLM to capture memory?

No. The plugin hooks capture by default without an LLM. Per-observation compression with AGENTMEMORY_AUTO_COMPRESS is a separate, optional setting, and session summaries can use a configured LLM provider independently.

Does the skill work in Devin cloud sessions?

No. Plugin hooks run only in local Devin sessions, not in cloud sessions.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

This skill suits developers using Claude Code, Devin, Cursor, Pi or similar agents who want memory that persists across sessions without manual saves, and teams deciding what an agent should record. It is not a fit if you do not want an agent recording its tool use and prompts, since observations can include sensitive session content, or if you cannot run a local background server, because the hooks depend on it.

Download the skill