Hooks Overview
Hooks are decorator-based lifecycle handlers that let you observe and modify agent behavior at key execution points.Hook Categories
Egregore provides 5 hook categories:| Category | Purpose | Example |
|---|---|---|
| Tool | Tool execution lifecycle | Log tool calls, modify results |
| Context | Context tree operations | Validate changes, audit operations |
| Streaming | Real-time response streaming | Process chunks, filter content |
| Message | Message handling | Modify user/provider messages |
| Scaffold | Scaffold state changes | Track scaffold updates |

