Skip to main content

Human-in-the-Loop (HITL)

Human-in-the-Loop enables workflows to pause and wait for human decisions, approvals, or input before continuing. Not everything should be fully automated -- HITL gives you the guardrails to keep humans in control of what matters.

Why Human-in-the-Loop?

  • High-stakes decisions -- Approve large purchases or sensitive operations
  • Quality control -- Review AI-generated content before publishing
  • Compliance -- Ensure human oversight for regulated processes
  • Exception handling -- Escalate edge cases that humans handle better
  • Training -- Improve AI by collecting human feedback on its output

How HITL Works

When a workflow reaches a Human node, execution pauses. A task is created and assigned to the designated approver(s). The assignee receives a notification, reviews the context, and responds. Once the human responds, the workflow continues with their input.

Workflow reaches Human node --> Task created & assigned --> Human reviews & responds --> Workflow continues

Task Lifecycle

StatusDescription
PendingWaiting for human response
ApprovedHuman approved the request
RejectedHuman rejected the request
ExpiredTimeout reached without response

When a task expires, it either auto-approves (for low-risk decisions) or fails the workflow (for high-stakes ones), depending on your configuration.

Timeout Handling

Timeouts prevent tasks from sitting indefinitely. You have three options:

StrategyWhen to UseBehavior
Auto-approve on timeoutLow-risk, routine approvalsWorkflow continues as if approved
Escalate on timeoutImportant but not criticalTask reassigned to backup approver
Fail on timeoutHigh-stakes, must-approve decisionsWorkflow stops with an error

Best Practices

Write Clear Prompts

"Approve expense report #1234 for $2,500 (Travel - Q4 Conference)" is actionable. "Please review" is not.

Provide Context

Include all relevant data from the workflow so reviewers can decide without hunting for information.

Use Reasonable Timeouts

24 hours for routine approvals, 1 hour for urgent matters, 7 days for complex compliance reviews.

Always Set Escalation

Do not let tasks sit indefinitely. Configure a backup approver or auto-approve for non-critical decisions.

Collect Feedback

Add a quality rating or feedback field alongside the approval. This data helps improve your AI agents over time.


Next: Learn about Agent-to-Agent Communication for building collaborative agent systems.