Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Approval Workflow

Approval gates add human-in-the-loop oversight to sensitive agent actions.

Configure approval policy

In runtime.toml, enable approval for specific capabilities:

[[agents]]
name = "researcher"

[agents.capabilities]
http_fetch = true
spend = true

[agents.approval]
http_fetch = true   # Require approval for each HTTP request
spend = true        # Require approval for spend actions

When the agent invokes a gated capability, the action is paused until approved or denied.

Review pending approvals

Dashboard

The dashboard shows a notification badge when approvals are pending. Click to review each request with its details.

CLI

akshi status --approvals

API

curl -H "Authorization: Bearer $TOKEN" \
  http://127.0.0.1:3210/api/v1/approvals

Approve or deny

Single approval

curl -X POST -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"decision": "approve"}' \
  http://127.0.0.1:3210/api/v1/approvals/apr-001

Batch approval

Review grouped approvals and approve in bulk:

# View batched by agent and capability
curl -H "Authorization: Bearer $TOKEN" \
  http://127.0.0.1:3210/api/v1/approvals/batched

# Approve all in a batch
curl -X POST -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ids": ["apr-001","apr-002","apr-003"], "decision": "approve"}' \
  http://127.0.0.1:3210/api/v1/approvals/batch

Timeout behavior

If an approval is not decided within the configured timeout, the agent receives an approval_timeout error and can retry on the next tick.

[agents.approval]
timeout_secs = 300   # 5 minutes

Audit trail

All approval decisions are recorded in the audit log with the decision, timestamp, and the operator identity (if available).