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
| Status | Description |
|---|---|
| Pending | Waiting for human response |
| Approved | Human approved the request |
| Rejected | Human rejected the request |
| Expired | Timeout 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:
| Strategy | When to Use | Behavior |
|---|---|---|
| Auto-approve on timeout | Low-risk, routine approvals | Workflow continues as if approved |
| Escalate on timeout | Important but not critical | Task reassigned to backup approver |
| Fail on timeout | High-stakes, must-approve decisions | Workflow stops with an error |
Best Practices
"Approve expense report #1234 for $2,500 (Travel - Q4 Conference)" is actionable. "Please review" is not.
Include all relevant data from the workflow so reviewers can decide without hunting for information.
24 hours for routine approvals, 1 hour for urgent matters, 7 days for complex compliance reviews.
Do not let tasks sit indefinitely. Configure a backup approver or auto-approve for non-critical decisions.
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.