Human-in-the-Loop
- title
- Human-in-the-Loop
- type
- concept
- summary
- Design pattern where AI agents pause for human approval on sensitive operations
- tags
- ai-agents, ai-safety, design-patterns
- created
- 2026-04-06
- updated
- 2026-04-15
Human-in-the-loop (HITL) is a design pattern where an AI system pauses at certain points and waits for a human to review, approve, or correct before continuing. The core idea: not everything should be fully autonomous.
Why it exists
AI agents that can take actions โ calling APIs, writing to databases, sending emails, moving money โ need guardrails. The model might hallucinate a parameter, misunderstand intent, or confidently do exactly the wrong thing. HITL is the safety net: the agent does the thinking and proposes an action, but a human makes the final call on sensitive operations.
This isn't about distrusting the model on everything. Most agent actions are fine to run autonomously (reading data, formatting responses, searching). HITL targets the high-stakes subset where the cost of a mistake is disproportionate โ financial transactions, destructive database operations, sending communications on someone's behalf.
How it works in practice
The general pattern across frameworks:
- A tool or action is marked as requiring confirmation (in adk-go, this is the
RequireConfirmationflag) - When the agent decides to invoke that tool, execution pauses
- The proposed action and its parameters are presented to a human
- The human approves, rejects, or modifies the parameters
- Execution resumes (or doesn't) based on the human's decision
The pause can be synchronous (the user is sitting there in a chat interface) or asynchronous (a notification goes out, the agent waits hours or days for approval). The agent2agent-protocol explicitly supports long-running tasks for exactly this reason.
Levels of human involvement
Not all HITL is the same. From lightest to heaviest:
- Post-hoc review: the agent acts, a human reviews afterward. Cheapest, but damage is already done if something goes wrong.
- Approval gates: the agent proposes, the human approves. This is what most frameworks mean by HITL.
- Active steering: the human provides ongoing direction, the agent executes. More like a copilot than an autonomous agent.
- Active learning: the agent asks the human to label uncertain cases, using the answers to improve future decisions.
Most production agent frameworks (ADK Go, LangGraph, CrewAI) implement the approval gate pattern. It's the sweet spot between full autonomy and constant hand-holding.
When to use it
HITL makes sense when:
- The action is irreversible or expensive to undo
- The agent is operating in a domain where mistakes have real consequences
- Regulatory or compliance requirements demand human accountability
- You're still building trust in the agent's judgment for a particular task
It doesn't make sense when the overhead of human review exceeds the cost of occasional mistakes, or when latency requirements rule out waiting for a human.
AFK vs HITL classification
In ai-assisted-workflow, Barbero applies HITL at the task planning level. Each issue is classified as either AFK (AI can handle independently and merge without human interaction) or HITL (requires human decision during implementation). This shifts the HITL pattern from runtime tool invocation to upfront task breakdown โ you know before implementation starts which pieces need a human decision.
HITL as a consensus mechanism
In multi-agent systems, HITL serves a deeper role than just safety โ it acts as a byzantine-fault detector. When multiple LLM agents work in parallel and produce conflicting interpretations of a prompt, a human reviewer can break the tie and identify which agent diverged. This reframes HITL as a distributed-consensus oracle rather than just an approval gate. See log-distributed-llms for the full argument.
- AgentMail
- hazmat
- kanbots
- tilde-run
- ADK Go 1.0
- Agent2Agent Protocol (A2A)
- My AI-Assisted Workflow
- Eight Years of Wanting, Three Months of Building with AI
- Byzantine Fault
- Emotion Concepts in Claude
- The Cult of Vibe Coding Is Insane
- Multi-agentic Software Development is a Distributed Systems Problem
- Memory Conflict Detection
- Sandboxing AI Agents