Documentation
Docs
GUIDE

Human-in-the-Loop

Seamlessly integrate human approval steps into your AI agent workflows for high-stakes decisions.

Full autonomy isn't always desirable. Consonant allows you to inject human checkpoints anywhere in the workflow. These are typically triggered by policies.

Triggering Approvals

Approvals are triggered via OPA policies returning the require_approval decision.

rego
require_approval {
    input.capability == "delete_resource"
    input.parameters.environment == "production"
}

The Approval Workflow

1. Paused

Workflow suspends state. Resources are released.

2. Notified

Consonant sends a structured approval request event.

3. Resumed

On approval, the task executes with original context.

Managing Approvals

You can list, approve, or deny pending requests via CLI.

bash
# List pending approvals
consonant approvals list

# ID        WORKFLOW    AGENT         REASON
# app_123   run_892     db-agent      Production DB deletion attempt

# Approve
consonant approvals approve app_123 --comment "Authorized by DevOps lead"

# Deny
consonant approvals deny app_123 --comment "Too risky"
Denial Handling
If a request is denied, the workflow step fails with a POLICY_DENIED error. The planner may attempt to find an alternative route if one exists.