Overview
Human-in-the-loop (HITL) nodes pause agent execution to collect human input. This enables:- Approvals - High-stakes decisions requiring human sign-off
- Escalation - Complex cases beyond agent capabilities
- Quality Control - Spot-checking agent outputs
- Training Data - Collecting human feedback for improvement
Basic Configuration
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | Instructions/question for the human |
options | array | No | Predefined response choices |
timeout | string | No | Time limit (e.g., “1h”, “24h”, “7d”) |
escalation | string | No | Timeout action: auto_approve, auto_reject, escalate, retry |
assignee | string | No | User, role, or team to notify |
priority | string | No | low, medium, high, urgent |
context | object | No | Additional context to display |
Approval Patterns
Simple Approval
Binary approve/reject for high-stakes decisions:Multi-Level Approval
Chain multiple approval steps:Escalation Patterns
Confidence-Based Escalation
Escalate when agent confidence is low:Exception-Based Escalation
Escalate specific scenarios:Timeout Handling
Configure what happens when humans don’t respond:| Escalation Action | Behavior |
|---|---|
auto_approve | Automatically approve and continue |
auto_reject | Automatically reject and stop |
escalate | Notify next level / manager |
retry | Resend notification |
queue | Move to low-priority queue |
Escalation Chain
Context and Display
Provide rich context for human reviewers:Response Handling
Structured Responses
Collect structured data from humans:Response-Based Routing
Route based on human response:Assignment Strategies
Role-Based Assignment
Round-Robin
Load-Based
Best Practices
Clear Prompts
Provide all context needed for the human to make a decision
Reasonable Timeouts
Set timeouts based on urgency and expected response time
Graceful Escalation
Always have a fallback when humans don’t respond
Feedback Loops
Use human responses to improve agent performance over time