Skip to content

Action Approvals

Certain actions have real-world side effects that cannot be undone — sending an email, posting to Slack, writing to a database. The Super Agent marks these as guarded actions and pauses execution pending your explicit approval.

Guarded Actions

Action Why Guarded
EMAIL_SEND Irreversible, sends to real recipients
SLACK_POST Posts to live channels, notifies team
WHATSAPP_SEND Sends to real phone numbers
SMS_SEND Incurs carrier charges
SQL_WRITE Modifies production database
WEBHOOK_TRIGGER Calls external endpoint with side effects
FILE_DELETE Permanent file deletion

The Approval Flow

Super Agent reaches guarded step
│
▼
Emit SSE event: approval.required
│
▼
UI renders ActionApprovalCard
(or webhook fires if configured)
│
┌──┴──┐
User │ │ User
Approves │ │ Rejects
▼ ▼
Step executes Step skipped
Plan continues Plan continues
(or aborted if
step is critical)

ActionApprovalCard

In the Zonrad web UI, guarded steps render an interactive card:

┌─────────────────────────────────────────────────┐
│ ⚠️ Approval Required │
│ │
│ Action: Send Email │
│ To: board@zonrad.ai │
│ Subject: Q3 Board Update │
│ │
│ Preview: │
│ "Hi team, here is the Q3 board update..." │
│ │
│ Expires in: 23h 59m │
│ │
│ [ Approve ] [ Reject ] [ Edit ] │
└─────────────────────────────────────────────────┘

The card shows a full preview of the action — the email body, SQL statement, Slack message, etc. — before you commit.

Approving via API

Terminal window
curl -X POST https://api.zonrad.ai/platform/v1/runs/{run_id}/approve \
-H "Authorization: Bearer zon_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"step_id": "step_abc123",
"decision": "approved"
}'

Webhook Notifications

Configure a webhook to receive approval.required events so your system can present approvals outside the Zonrad UI:

{
"event": "approval.required",
"run_id": "run_xyz789",
"step_id": "step_abc123",
"action": "EMAIL_SEND",
"preview": {
"to": "board@zonrad.ai",
"subject": "Q3 Board Update",
"body_html": "<p>Hi team...</p>"
},
"expires_at": "2024-01-16T10:30:00Z",
"approve_url": "https://api.zonrad.ai/platform/v1/runs/run_xyz789/approve"
}

See Webhooks for setup instructions and signature verification.

Disabling Approvals (Trusted Mode)

For fully automated pipelines, you can mark specific actions as pre-approved at the workspace level:

Terminal window
curl -X PATCH https://api.zonrad.ai/platform/v1/workspaces/{workspace_id} \
-H "Authorization: Bearer zon_live_YOUR_KEY" \
-d '{ "trusted_actions": ["SLACK_POST", "SQL_QUERY"] }'