Human-in-the-Loop for AI Agents
When should AI agents ask for permission? Implementation patterns for approval workflows, escalation rules, and oversight mechanisms.
The most effective AI agents know when to ask for help. Human-in-the-loop systems let agents operate autonomously while escalating important decisions.
When to Escalate
escalation_criteria.pypython
from veto import Veto, Policy
veto = Veto(api_key="veto_live_xxx")
# Define escalation rules
veto.register_policy(
name="approval_workflow",
policy=Policy(
tool="send_email",
rules=[
Policy.allow_if(recipients_lte=5),
Policy.require_approval_if(recipients_gt=5),
Policy.require_approval_if(domain="external"),
]
)
)
# Configure notification channels
veto.configure_notifications({
"email": "approvals@company.com",
"slack": "#agent-approvals",
})Approval Workflows
Veto supports multiple approval patterns:
- Single approver — Any authorized user can approve
- Multi-party approval — Requires N approvers for high-risk actions
- Time-based — Auto-deny if not approved within timeframe
Related posts
Ready to secure your agents?