Human-in-the-Loop Design
Design approval steps, review queues, escalation and override paths so people stay in control of consequential AI actions.
Intermediate · about 4 hours · difficulty 3/5
Learn first: Designing Tools for Agents, Chat and Streaming Interfaces
Fully autonomous AI is rarely the right starting point. Human-in-the-loop (HITL) designs keep people in control where mistakes are costly, while still saving them most of the work.
Patterns
- Approve before acting: the agent proposes an action (send this email, issue this refund) with a clear preview; a person approves, edits or rejects. Common for any write action with external effects.
- Review queues: AI drafts, humans review a batch. Route low-confidence or high-risk items to review and let clear cases pass automatically.
- Escalation: a support bot hands off to a human agent with the full context and a summary when it is stuck, the user asks, or sentiment turns negative.
- Editable outputs: generated text, code or data is presented as a draft the user owns and can change.
Making approvals meaningful
If people approve hundreds of proposals a day without reading them, the control is theatre. Show diffs and key facts, highlight what is unusual, keep volumes manageable, and measure how often reviewers change things.
Technical requirements
Agents must be able to pause and resume while waiting for a human, which means persisted state and durable workflows. Record who approved what and when for audit.
Designing for uncertainty
Show sources, confidence cues and "why" explanations where possible. Make it easy to undo. Set expectations clearly about what the AI can and cannot do.
Good enough to move on
You can build an agent that pauses for approval before a write action, persists its state while waiting, resumes after approval and logs an audit trail.
Key concepts
- Approve-before-act flows
- Confidence-based review queues
- Escalation to humans
- Drafts users can edit
- Pause and resume agent state
- Audit trails
- Undo and expectation setting
Mini project
Build a refund assistant that drafts refund decisions with reasons, sends amounts above a threshold to a reviewer queue UI, resumes the agent after approval and stores an audit log of every decision.
Check yourself
What makes an approval step 'rubber stamping', and how would you detect it from your data?
Free resources
- LangGraph: human-in-the-loop (LangChain)
- Google PAIR Guidebook (Google)