before_turn_start sees the
incoming user message. before_tool_call sees a tool name and input before
the tool runs. after_tool_result sees a result before the model does.
after_model_response sees the model’s reply before it’s saved.
A hook can only tighten things. It can’t turn on a tool the roles left out,
because role checks run first, and an after-the-fact hook can’t undo something
that already happened out in the world. If you want a hard boundary, leave the
tool out of the roles.
New profiles come with six removable approval hooks covering the destructive
things an agent could do on day one: deleting agents, creating roles, sending
Gmail, writing Calendar and Drive, and pointing a toolset at a URL. Send
hooks: [] if you don’t want them.
Belongs to a profile (≤ 16, in order) · Runs at one of four points ·
Processed by
client | url | agent · Decides allow | deny |
ask | deferRules
- Approving a hook grants nothing. See Rules.
- Hooks run in profile order; the first non-
deferdecision wins. - A
clienthook pauses the turn until someone resolves the wait.
API
- Points, processors, decisions, defaults: Hooks.
GET /v1/threads?state=waitinglists parked work;POST /v1/threads/{threadId}/waits/{waitId}/resolveclears one.