What is human-in-the-loop AI?
Human-in-the-loop AI is a design in which a person reviews or approves an AI system's output before it takes effect. In AI agents this usually means approval gates on risky or irreversible actions, such as refunds, record changes or deploys, while routine steps run on their own. Gates are removed one at a time as evals earn trust.
The phrase is older than AI agents. In machine learning it meant people labelling or correcting data so a model could learn from it. In an agent that takes actions, it has a narrower and more practical meaning: the agent may plan and prepare anything, but certain actions only happen after a named person says yes.
This article covers which actions need that yes, how an approval gate works in production, and how to decide when a gate can come off.
Why AI agents still need a human in the loop
An agent chains decisions. Each step can be right most of the time and the whole run can still go wrong, because small error rates compound across many steps. Anthropic's guidance on building agents names this directly: autonomy brings higher costs and the potential for compounding errors.
The second reason is what the agent can touch. An agent with write access to a CRM, a payment system or a production environment can do real damage with one wrong call. OWASP lists this as excessive agency, one of the top risks for LLM applications: an agent given more functionality, permissions or autonomy than the task needs.
The third is change you don't control. A model update can shift an agent's answers overnight. A human approval step catches the first wrong action after that shift, before it becomes the hundredth.
Which actions need an approval gate
Gate actions by what happens if they are wrong. How often the agent gets them right matters less, because a rare mistake on a refund still costs money. A simple three-tier split covers most agents:
| Tier | Examples | Control |
| Read only | Searching records, summarising a case, drafting a reply that isn't sent | No gate. Log the run. |
| Reversible writes | Updating a field, tagging a ticket, creating a draft order | No gate, but sample and review a share of runs, and keep an undo path. |
| Irreversible or high-stakes | Refunds and discounts, emails to customers, contract or deal changes, deletes, deploys | Approval gate. A named person approves, edits or rejects before it runs. |
In Salesforce, for example, the line usually falls at anything that writes to a customer, opportunity or contract record. That is where a wrong answer becomes a wrong record, which is why our Agentforce work puts approval gates on those writes by default.
How an approval gate works in production
A gate is more than a confirmation button. In production it needs five parts:
- A proposal. The agent prepares the full action, with the values it will write and the reason, so the approver can judge it without re-doing the work.
- A durable wait. Approvals can take minutes or days. The run has to pause without holding a process open, and survive a restart while it waits. With durable execution on Temporal, a workflow can wait for a human decision for hours or days at no cost, then continue from exactly where it stopped. Our comparison of Temporal, Airflow and LangGraph covers how each handles these waits.
- Approve, edit or reject. Editing matters: an approver who can fix the discount from 25% to 15% teaches you more than one who can only say no.
- A timeout and an escalation. Decide what happens if nobody answers: escalate to a second person, or cancel safely. A gate with no timeout quietly becomes a queue nobody owns.
- An audit trail. Record who approved what, when, and what the agent proposed. It is the only way to prove, after the fact, that a person signed off.
Pair the gate with a circuit breaker: a rule that stops the agent altogether when it starts failing in a recognisable pattern, such as repeated errors or a spike in cost, instead of sending a stream of bad proposals to the approver.
When to remove a gate
Moving toward autonomy is a sequence of small, reversible decisions about single actions. Remove a gate when three things are true:
- The evals pass. The action has been tested against a set of known correct cases, and it passes at the level you agreed in advance.
- The approvals have gone quiet. Over a meaningful run of real cases, approvers are approving without edits. If they still edit one in ten, the agent isn't ready.
- A mistake is affordable. The cost of the occasional wrong action, and of undoing it, is acceptable without a person in front of it.
Remove gates one action at a time, never all at once, and keep monitoring after each one. When the model or the prompt changes, put the gate back until the evals pass again. Some actions, such as large refunds or contract changes, may never lose their gate, and that is a reasonable outcome.
Human-in-the-loop, human-on-the-loop and full autonomy
| Model | What the person does | Fits |
| Human in the loop | Approves each gated action before it runs | Irreversible, financial or customer-facing actions; new agents |
| Human on the loop | Watches runs and can stop or correct them, but doesn't approve each one | Reversible actions with a proven track record |
| Full autonomy | Reviews reports and exceptions after the fact | Low-risk, well-tested actions with an undo path |
Most production agents run all three at once, for different actions. That is the point of gating by action: the agent can be autonomous for searching and drafting while a person still signs off on refunds.
Common mistakes
- Gates added after launch. Retrofitting approvals means redesigning how the agent stores its progress. Build them in from the first version, as our guide on how to build an AI agent describes.
- Rubber-stamping. If approvers click yes on everything, the gate gives false comfort. Show them the proposal in a form they can judge quickly, and track how often they edit.
- Waits that hold a process open. If the agent waits for approval inside a running process, a restart loses the job. The wait has to be durable.
- No record of who approved. Without an audit trail, a disputed action can't be traced to a decision.
If you already have an agent in production and aren't sure which of its actions should be gated, a reliability audit maps them and ranks the risk in one to two weeks.
Frequently Asked Questions
What is human-in-the-loop AI?
Human-in-the-loop AI is a design in which a person reviews or approves an AI system's output before it takes effect. In AI agents it usually means approval gates on risky or irreversible actions, such as refunds, record changes, customer emails or deploys, while routine steps like searching and drafting run on their own. The agent prepares the action and a named person approves, edits or rejects it. Gates are removed one action at a time as evals and a record of clean approvals show the agent can be trusted.
What is the difference between human-in-the-loop and human-on-the-loop?
In human-in-the-loop, a person approves each gated action before it runs, so nothing in that category happens without a yes. In human-on-the-loop, the agent acts on its own while a person watches the runs and can stop or correct them, without approving each one. In-the-loop suits irreversible, financial or customer-facing actions and new agents. On-the-loop suits reversible actions that already have a good track record. Most production agents use both, for different actions, and move an action from in-the-loop to on-the-loop only once its evals and approval history support it.
Which AI agent actions need human approval?
Gate actions by what happens if they are wrong. Actions that can't be undone or that commit money or reputation need approval: refunds and discounts, emails or messages sent to customers, changes to contracts, deals or customer records, deletes, payments and production deploys. Reversible writes, such as tagging a ticket or updating an internal field, can usually run without a gate if a share of runs is reviewed and there is an undo path. Read-only actions only need logging, so you can see what the agent looked at.
Does human-in-the-loop slow AI agents down?
Only for the gated actions, and only if the wait is designed badly. The agent still does the searching, reasoning and drafting at machine speed, and a person reviews a prepared proposal instead of doing the work. The real slowdowns come from approvals with no timeout, proposals that are hard to judge, and waits that hold a process open and fail on restart. A durable wait with a clear proposal and an escalation rule keeps the delay to the approver's response time.
How do you know when an AI agent can run without approval?
Look for three signals on a single action. The action passes its evals against known correct cases at the level you agreed in advance. Approvers have been approving it without edits across a meaningful number of real cases. And the cost of an occasional wrong action, including undoing it, is acceptable. Remove that one gate, keep monitoring, and put it back whenever the model or prompt changes until the evals pass again. High-value irreversible actions may keep their gate permanently.



