A call that answers approve waits for someone. verdict.decision.approve.by says who:
| by | Who | Comes from | How it is given |
|---|---|---|---|
| user | The person the agent works for | approval | Your UI: run.confirm(), or the framework's tool approval |
| reviewer | Someone else (a manager, an admin) | A permission that requires approval, through permissions | A Scute access request a reviewer approves |
The person confirms#
The model reads Confirm: <call> Ask them to confirm, then try again. Show the confirmation in your UI. When the person confirms:
await run.confirm("refund_invoice", { invoice_id: "INV-1", amount: 90 });The next call with the same tool and the same arguments passes approval, once. Key order does not matter; a different value does. The confirmation is stored in the run's state, so it works across requests.
With the Vercel AI SDK this is the SDK's tool approval: run.toolApproval answers user-approval, your chat UI shows the request, and the approval response lets the call through. See Vercel AI SDK.
A reviewer approves#
When Scute's engine answers allow_with_approval, permissions files an access request for the exact call:
- The request carries the arguments as details. Reviewers see them, and the approval only counts for a call with the same arguments. A call with other arguments is a new request.
- It is tagged with the agent and the task, with a reason like Support bot: refund_invoice (invoice_id INV-1, amount 90).
- The verdict carries approve.requestId and the request's say line. The model reads ... The request is filed (id <id>); tell the person it's pending and try again once it's approved.
- Filing is safe to repeat: Scute answers with the open request for the same call.
Check where it stands:
const approval = await run.approvalStatus(verdict.decision.approve!.requestId!);// { id, status: "pending", say: "...", details, permission, resource, expires_at }Once the status is approved, check the call again. The check sends the approval id with the call's arguments, the engine allows it, and the approval is spent. It is only sent on a call no other guard stopped, so a call budget or grounding refuses does not waste it.
Approval status values#
| Status | Meaning |
|---|---|
| pending | Waiting for a reviewer |
| approved | Approved; the next identical call goes through |
| denied | A reviewer refused it |
| cancelled | Withdrawn |
| expired | Not decided in time |
| used | Already spent on a call |
| not_needed | The engine allows the call without approval; nothing was filed |
| verify_first | The person has to verify before a request can be filed |
The engine's own answer decides whether a request is filed. A call the engine denies is refused with not_permitted (403).
File without the guard#
run.requestApproval(call) (Python and Ruby: request_approval) files the request for a call object, for custom guards. It is the same request permissions files.
/v1/auth/:app_id/agent/approvalsTask tokenBody: action, resource, reason, context, details. GET /v1/auth/:app_id/agent/approvals/:id returns the status.
Several calls at once#
When the agent knows its steps up front, one review can cover all of them. See plans.
Turning filing off#
permissions({ fileRequests: false }) returns the approve decision without filing anything. Requests are never filed in monitor or observe mode.