Human-in-the-Loop (HITL) in Workflows enables you to pause execution to collect user confirmation, input, or decisions. The workflow state is persisted, allowing you to resume execution after the user responds. Workflows support HITL at two levels:Documentation Index
Fetch the complete documentation index at: https://agno-v2-feat-executor-hitl-wf.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
- Step-level HITL — pauses before or after a workflow step executes. Configured on the workflow primitive (
Step,Loop,Router,Condition,Steps). - Executor-level HITL — pauses during step execution when an agent or team inside the step calls a tool that requires human approval. Configured on the tool itself (e.g.
@tool(requires_confirmation=True)). The pause propagates from the agent/team up to the workflow.
User input is currently supported for
Step (to collect parameters) and Router (to select routes). Other primitives (Condition, Loop, Steps) support confirmation only.Requirements
HITL workflows require a database to persist state between pauses:HumanReview Config
All HITL settings are grouped into a singleHumanReview object:
requires_confirmation=True, confirmation_message="...") still work for backward compatibility. See the HumanReview Config page for all fields and validation rules.
HITL Types
| Type | Use Case | Field |
|---|---|---|
| Confirmation | Approve/reject before step execution | requires_confirmation=True |
| User Input | Collect parameters before step execution | requires_user_input=True |
| Output Review | Review/edit/reject output after step execution | requires_output_review=True |
| Route Selection | User chooses which path(s) to execute | Router with requires_user_input=True |
| Iteration Review | Review output between loop iterations | requires_iteration_review=True |
| Timeout | Auto-resolve if no human response in time | timeout=300 |
| Error Handling | Retry or skip failed steps | on_error=OnError.pause |
Step-Level vs Executor-Level
| Aspect | Step-Level HITL | Executor-Level HITL |
|---|---|---|
| Configured on | The workflow primitive (Step, Loop, etc.) | The tool used by the agent/team |
| When it pauses | Before or after the step executes | During the step, when the agent calls the tool |
| Pause kind | pause_kind="step" | pause_kind="executor" |
| Pause event | StepPaused / RouterPaused / StepOutputReview | StepExecutorPaused |
| Continue event | StepContinued | StepExecutorContinued |
| Use case | Gate the whole step (“Run this step?”, “Pick a branch”, “Approve this output”) | Gate a specific tool call (“Approve sending money to X”, “Confirm this DB query”) |
| Resolved by | req.confirm(), req.set_user_input(...), req.select(...) on the step requirement | Confirming each executor_requirements[].tool_execution |
requires_confirmation=True on a Step (gate before the agent runs) + @tool(requires_confirmation=True) on the agent’s tool (gate the tool call). See Dual-level HITL.
Supported Primitives
Run Output Properties
When a workflow pauses, check these properties onWorkflowRunOutput:
| Property | Description |
|---|---|
is_paused | True if workflow is waiting for user action |
steps_requiring_confirmation | Steps needing confirm/reject |
steps_requiring_user_input | Steps needing user input values |
steps_requiring_output_review | Steps needing output review after execution |
steps_requiring_route | Routers needing route selection |
steps_with_errors | Steps that failed with on_error="pause" |
Confirmation
Pause before executing a step. User confirms to proceed or rejects to skip/cancel.User Input
Collect parameters from the user before step execution.Output Review
Pause after a step executes so the user can review the output. Supported on Step and Router. See the dedicated Output Review page for full details.on_reject=OnReject.retry, the step re-executes up to max_retries times. Pair with reject(feedback=...) to send feedback to the agent.
Iteration Review
Pause after each loop iteration for review. Supported on Loop only.Route Selection
Let users choose which path(s) a Router executes.Error Handling
Pause when a step fails, letting the user retry or skip.This is only at the Step level.
OnReject Behavior
Theon_reject parameter controls what happens when a user rejects a step:
| Value | Behavior |
|---|---|
OnReject.skip | Skip the step and continue with the next (default for most primitives) |
OnReject.cancel | Cancel the entire workflow |
OnReject.retry | Re-execute the step. Pair with reject(feedback=...) to send feedback to the agent. See Output Review |
OnReject.else_branch | For Condition only: execute else_steps (default for Condition) |
Timeout
Set a timeout for HITL pauses. If the user does not respond in time,on_timeout determines the action. See the dedicated Timeout page for full details.
OnTimeout Value | Behavior |
|---|---|
OnTimeout.approve | Auto-approve and continue |
OnTimeout.reject | Auto-reject |
OnTimeout.cancel | Cancel the workflow |
Streaming
HITL works with streaming workflows. Check for pauses in the event stream:The @pause Decorator
Mark custom function steps with HITL configuration using the@pause decorator:
Guides
HumanReview Config
All HITL settings in a single config object
Step HITL
Confirmation, user input, and output review on steps
Executor HITL
Tool-level HITL inside agents/teams that propagates to the workflow
Dual-level HITL
Combine step-level and executor-level HITL on the same step
Output Review
Review, edit, or reject output after step execution
Router HITL
Route selection, confirmation, and output review
Condition HITL
User-controlled branching decisions
Loop HITL
Start confirmation and per-iteration review
Steps HITL
Confirm before executing a pipeline
Timeout
Auto-resolve HITL pauses after a deadline
Error Handling
Retry or skip failed steps