How approvals work
1
A policy says which actions need a human
Match on the tool, the agent or the action, and add conditions on its arguments:
approvers is optional. It restricts who may decide. Each entry is a user id, a role or a key name, and it’s checked against the deciding key, not a name typed into a form.2
The agent's call is held
Nothing runs. The held action appears in the console with the tool, its arguments, and the agent that asked.
call() throws ApprovalRequiredError, or it waits if you pass waitForApproval:3
A reviewer decides
- Approved. The action runs once, and the waiting call resolves with its receipt. The receipt records who approved it and when, and it flags approvals made with the same key that asked.
- Rejected. The action never runs. A waiting call throws
DeniedError. - No decision in time. The approval expires, and the action never runs.
Approved means run as approved
Invoke runs the action exactly as the reviewer saw it. It doesn’t re-check the outside world after approval. If what the action depends on can change while it waits, such as a deploy status or an account owner, give the reviewer what they need to judge it, and check it withPOST /state/verify before the agent sends the call.
Approval outcomes
Next steps
- Slack Approvals: hold agent posts for a human
- Payments: approval above an amount
- TypeScript SDK:
waitForApprovalin full