Skip to main content
Conditions support confirmation HITL, allowing users to decide which branch to execute at runtime. All HITL settings are configured via HumanReview. Conditions only support requires_confirmation. Passing unsupported fields (like requires_output_review) raises a ValueError.

User-Controlled Branching

When requires_confirmation=True, the condition pauses for a user decision:
  • Confirm: Execute the steps branch (if branch)
  • Reject: Behavior depends on on_reject setting

Parameters

OnReject Options

Branch Execution

Without else_steps

If no else_steps are defined and the user rejects with on_reject=OnReject.else_branch, the condition is skipped:

Combining with Evaluator

The evaluator defaults to True. Leave it unset with requires_confirmation=True and the user’s decision alone picks the branch:
Confirming resumes normal execution, and the evaluator still runs. A custom evaluator that returns False routes a confirmed condition to else_steps. Rejecting with on_reject=OnReject.else_branch skips evaluation and forces the else branch.

Streaming

Handle condition HITL in streaming workflows:

Developer Resources