Skip to content
BENIBIX Learn

Hermes Hooks

AI🪽 Hermes AgentHermes Tools

Also known as Hermes event hooks, Hermes shell hooks

Your own code that Hermes runs at set points, such as before a tool call.

Think of it like

It is like a doorbell that turns on a light when it rings.

Example

Leo adds a shell hook that runs before every tool call. If the command touches his .env file, the hook blocks it.

Why it matters

Hooks let you add your own rules and alerts without changing Hermes itself.

Definition

Hooks are bits of your own code that Hermes Agent runs at set points in its work. One point is just before a tool call, and another is when a message comes in. There are four kinds. Gateway hooks live in ~/.hermes/hooks, and plugins can carry hooks too. Shell hooks are set in config.yaml, and outbound webhooks send events to a web address. A shell hook that runs before a tool call can block it.

Common mistake

Thinking hooks only watch. Some can block a call or change what it does.

Key takeaways

  1. 1
    Four kinds. Gateway, plugin, shell, webhook.
  2. 2
    At set points. Before tools, on messages.
  3. 3
    Can block. Not only watch.