# Hermes Hooks

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

**Field:** Artificial Intelligence  
**Category:** Hermes Agent  
**Also known as:** Hermes event hooks, Hermes shell hooks

## Think of it like

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

## 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.

## 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.

## Common mistake

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

## Three principles

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

## Related terms

- [Claude Code Hook](https://learn.benibix.com/term/ai/claude-code-hook)
- [Webhook](https://learn.benibix.com/term/development/webhook)
- [Hermes Messaging Gateway](https://learn.benibix.com/term/ai/hermes-gateway)
- [Hermes Plugins](https://learn.benibix.com/term/ai/hermes-plugins)

---

Source: https://learn.benibix.com/term/ai/hermes-hooks
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
