Digitorn
Digitorn
All terms
Runtime

Hooks

Declarative event handlers that fire at specific points in an agent's lifecycle (turn_start, tool_end, etc).

also known as: agent hooks, event hooks
In depth

Hooks are the YAML-native way to add cross-cutting behaviour: rate limiting, auto-summarising long tool output, redacting PII, capping cost, audit logging. Each hook declares an event (turn_start, tool_end, error), an optional condition, and an action. Most production patterns are 4-12 lines of YAML. The article linked below walks through seven of them.

Related concepts
Read the deep dive

Hooks: 4 production patterns we ship today on Digitorn

Read article
Newsletter

Get the next post in your inbox.

Engineering notes from the Digitorn team. No marketing, no launch announcements, no "10 prompts that will change your life". Just the things we write that we'd want to read.

One-click unsubscribe. We never share your address. Powered by our own infrastructure, not a tracker.

More in Runtime

Behaviour rules/glossary/behavior-rulesCron trigger/glossary/cron-triggerFilesystem module/glossary/filesystem-moduleHot reload/glossary/hot-reloadModule/glossary/moduleTriggers/glossary/triggers