Human-in-the-loop (HITL) is a design pattern where a person reviews, approves, or overrides an AI agent's actions at defined checkpoints — rather than letting the agent run fully autonomously.
Why HITL matters
Not every decision should be automated. Agents excel at interpretation and multi-step work, but they can hallucinate, misread urgency, or take irreversible actions. HITL puts humans where judgment, accountability, or legal liability require it.
Common HITL patterns
- Approval gates — Agent proposes an action; human must confirm before execution (e.g., sending a refund, dispatching a contractor)
- Escalation triggers — Agent handles routine cases; ambiguous or high-risk cases route to a person
- Review loops — Agent drafts output; human edits before it goes out
- Feedback collection — Human corrections improve future agent behavior
Designing HITL into architecture
HITL is not an afterthought. It belongs in the agent architecture from day one:
- Define which actions are autonomous, approval-required, or human-only
- Design the handoff UX — what context does the human see?
- Set timeout behavior — what happens if nobody responds?
- Track override rates — high override rates signal the agent needs improvement
Related reading
See Guardrails for the technical boundaries that complement human oversight.