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 |
Configuring Human Nodes
In Workflows
Add a Human node to your workflow from the Visual Builder or via the workflow definition. Configure these properties:
| Property | Description | Required |
|---|---|---|
| Prompt | Question or instruction for the reviewer | Yes |
| Approvers | Email addresses of people who can respond | Yes |
| Input Fields | Data to collect from the human | Yes |
| Timeout | How long to wait before timeout action | No |
| Auto-Approve on Timeout | Whether to auto-approve if no response | No |
| Escalate To | Backup approvers on timeout | No |
Input Field Types
You can collect various types of data from the reviewer:
| Field Type | Description |
|---|---|
| Boolean | Yes/No toggle |
| Text | Free-text input |
| Number | Numeric input with optional min/max bounds |
| Select | Single-choice dropdown |
| Multi-select | Multi-choice selection |
| Date | Date picker |
Context Passing
Pass workflow data to help humans make informed decisions. Map fields from previous workflow nodes to the context that the reviewer sees. For example, show the customer name, order total, refund amount, and reason so the reviewer has everything needed to decide.
The reviewer sees the prompt, all mapped context, and the input fields in a clean approval interface.
Multi-Level Approvals
Create approval chains by adding multiple Human nodes in sequence. Combine them with Condition nodes for threshold-based escalation:
- Team lead approves all requests
- Manager approves only if amount exceeds a threshold
- Finance approves only if amount exceeds a higher threshold
This keeps routine approvals fast while adding oversight for larger decisions.
Managing Human Tasks
From the Dashboard
- Go to Tasks > Pending to see all tasks awaiting your response
- Click a task to view the full context and attached artifacts
- Fill in the required fields
- Click Approve or Reject
Notifications
Configure how you receive task notifications:
- Email notifications
- Slack integration
- In-app notifications
- Webhook to an external system
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.