Skip to main content
A hook interrupts a turn to approve, deny, or rewrite what happens next. Ask a person before sending a payment, say, or redact a result before the model reads it, or have another agent review a response before it’s saved. Hooks live on a profile, and every agent using that profile runs them.
There are four points where a hook can step in. 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 | defer

Rules

  • Approving a hook grants nothing. See Rules.
  • Hooks run in profile order; the first non-defer decision wins.
  • A client hook pauses the turn until someone resolves the wait.

API

  • Points, processors, decisions, defaults: Hooks.
  • GET /v1/threads?state=waiting lists parked work; POST /v1/threads/{threadId}/waits/{waitId}/resolve clears one.