跳到正文
Skillpedia
连接器(MCP)30k · #9342

agentmemory-hooks

它能做什么

这项技能说明 agentmemory 插件的钩子,它们会记录编程会话中发生的事情。它展示自动记录的工作方式,以及如何检查它是否正在记录。

适用场景

  • ✓当你希望编程会话的活动被自动记录,而不必逐条手动保存时。
  • ✓当你的记忆中似乎缺少某些观察内容时。
  • ✓当你想调整自动记录的内容时。

技能链接

https://github.com/rohitg00/agentmemory/blob/main/plugin/skills/agentmemory-hooks/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/rohitg00/agentmemory/blob/main/plugin/skills/agentmemory-hooks/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我的编程会话没有保存到 agentmemory。请检查记录钩子是否正常工作。”

每周 5 个新技能,1 分钟读完。

工作原理

插件会注册生命周期钩子,观察工具使用、提示和会话边界。它会自动写入观察内容,你可以在本地查看器中确认。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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 handoff resume it.
  • Tool-use hooks capture what changed and why, the raw material for recall and recap.
  • Prompt-submit captures intent. Pre-compact preserves context before the host trims it.
  • A post-commit hook links commits to sessions, which powers commit-context and commit-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.

常见问题

我必须自己保存笔记吗?

日常工作中不需要。钩子会自动记录观察内容。

为什么什么都没有被记录?

仅仅安装连接并不会开启自动记录,必须安装并加载钩子。

我如何查看记录了什么?

在浏览器中打开本地查看器,即可看到已记录的观察内容。

详情

作者的原始描述

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.

repo: rohitg00/agentmemory

热度

GitHub 星标
30k
排名
#9342
许可证
Apache-2.0
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能