Approval Queue¶
When OPA policy returns requires_human: true, the action is enqueued for human review instead of being executed immediately.
How It Works¶
- Agent submits a tool call via
POST /mcp/tools/call - OPA policy evaluates and returns
requires_human: true - The action is placed in the approval queue (HTTP 202 returned to caller)
- A human reviews the action in the dashboard or via API
- On approval, the action executes. On rejection, it's discarded.
No execution without approval
Actions in the queue are held, not executed. The agent receives a pending_approval status and must poll or wait for a webhook notification.
Endpoints¶
List Pending Actions¶
Returns all actions awaiting human review:
{
"pending": [
{
"action_id": "550e8400-...",
"agent_id": "my-agent-v1",
"tool": "stripe",
"method": "create_transfer",
"params": {"amount": 5000, "destination": "acct_xyz"},
"queued_at": "2026-04-08T10:00:00Z",
"opa_result": {
"requires_human": true,
"violations": [],
"severity": "none"
}
}
]
}
Approve an Action¶
Response:
Reject an Action¶
Response:
Approval History¶
View past approval and rejection decisions with timestamps and notes.
When Actions Get Escalated¶
Actions are escalated to human review when:
- The OPA policy explicitly sets
requires_human: true(e.g., financial template: transactions above approval threshold) - The action triggers a template-specific approval rule (e.g., CRM exports, bulk operations)
- The dependency failure mode is set to
fail_to_queueand a dependency is down
See Policy Templates for which actions trigger approval in each template.