Human in the Loop Step
The Human in the Loop step pauses flow execution and requests manual approval or review from designated team members. Use it for high-stakes decisions, quality control, compliance requirements, or any situation where human judgment is required.Agent + Human Collaboration: Let agents handle routine decisions automatically, but pause for human review when decisions are critical, uncertain, or require empathy and judgment.
How It Works
Human in the Loop pauses the flow, sends notification to reviewers, waits for their decision, then continues based on their response:When to Use Human in the Loop
| Use When | Don’t Use When |
|---|---|
| High-stakes decisions (large refunds, deletions) | Routine, low-risk decisions |
| Compliance requirements (financial approvals) | High-volume operations |
| Low confidence from agent (< 70%) | Agent is consistently accurate |
| Customer complaints or escalations | Standard inquiries |
| Sensitive content (legal, medical, HR) | Generic content generation |
| Quality control on agent outputs | Agents have proven reliability |
| Edge cases outside normal rules | Common scenarios |
Configuration
Reviewers
Email addresses of people who can approveExamples:
Number of approvals required before continuingExamples:
1- Any single reviewer can approve (most common)2- Two reviewers must approveall- All reviewers must approve
Request Details
Short description of what needs approvalExamples:
- “Refund Request Approval”
- “Content Review Required”
- “High-Value Order Approval”
- “Customer Escalation Review”
Detailed context for reviewersCan include data from previous steps:
Structured data to display to reviewersExample:Displayed in structured format for easy review
Response Options
Custom approval optionsDefault: Approve or RejectCustom examples:
Let reviewers add commentsComments are included in the step output and can be used in subsequent steps.
Let reviewers edit the submitted dataUse when: Reviewers might need to modify details (e.g., adjust refund amount, edit generated content)
Timeout
How long to wait before auto-action (in hours)Examples:
24- Wait 24 hours72- Wait 3 days- No timeout - Wait indefinitely
What to do when timeout is reachedOptions:
auto_approve- Automatically approveauto_reject- Automatically rejectescalate- Send to escalation reviewersnotify- Send reminder notification
Response Structure
Human in the Loop returns the reviewer’s decision:Accessing Response
Reference in subsequent steps:Common Patterns
Confidence-Based Review
Confidence-Based Review
Review when agent confidence is lowUse when: Agent handles most cases, humans review uncertain ones
High-Value Approval
High-Value Approval
Require approval above thresholdUse when: Financial controls, spending limits
Quality Control
Quality Control
Review agent-generated content before sendingUse when: Customer-facing content, compliance requirements
Escalation Path
Escalation Path
Multi-tier approval for complex decisionsUse when: Risk-based escalation, org hierarchy
Compliance Review
Compliance Review
Required approval for regulated actionsUse when: GDPR, HIPAA, financial regulations
Customer Escalation
Customer Escalation
Human takeover for complex support issuesUse when: Complex issues, angry customers, ambiguous situations
Timeout with Escalation
Timeout with Escalation
Auto-escalate if not reviewed in timeUse when: Time-sensitive approvals, SLA requirements
Real-World Examples
Example 1: Refund Approval Workflow
Example 2: Marketing Content Review
Example 3: High-Value Sales Approval
Best Practices
Use Sparingly
Only require human approval when truly necessary. Over-use creates bottlenecks and reduces efficiency.
Provide Context
Give reviewers all information needed to make informed decisions. Include agent reasoning, data, and recommendations.
Set Reasonable Timeouts
Don’t let requests sit forever. Set timeouts with appropriate fallback actions.
Make It Easy
Simple approve/reject options work best. Complex choices slow decisions.
Notify Appropriately
Use email, Slack, or your team’s communication channel. Don’t rely on reviewers checking the platform.
Track and Optimize
Monitor approval rates and times. If humans always approve, consider removing the step.
Troubleshooting
Reviewers not receiving notifications
Reviewers not receiving notifications
Causes:
- Email address incorrect
- Notifications in spam
- Email service configuration issue
- Verify email addresses
- Check spam folders
- Add [email protected] to contacts
- Check notification settings
Flow stuck waiting for approval
Flow stuck waiting for approval
Causes:
- Reviewers haven’t responded
- No timeout set
- Notification not received
- Set reasonable timeouts
- Add reminder notifications
- Add multiple reviewers
- Contact reviewers directly
Can't access approval decision
Can't access approval decision
Causes:
- Wrong variable path
- Step not completed
- Use
${step_name.approved}or${step_name.decision} - Check step executed in logs
- Verify step name matches
Too many approval requests
Too many approval requests
Causes:
- Threshold too low
- Agent confidence not high enough
- Unnecessary approvals
- Raise approval threshold
- Improve agent prompts for higher confidence
- Review if approvals are truly needed
- Consider batch approvals for similar requests