Glossary
Human-in-the-loop
A design where an AI agent pauses at set points so a person can review, approve, edit or reject its work before an action takes effect.
Human-in-the-loop (HITL) is a design pattern in which an AI agent or model hands control to a person at set points, so that someone reviews, approves, edits or rejects its work before it takes effect. In agentic systems the person usually signs off on actions such as sending an email, changing a record or deleting files, while the agent handles the steps in between on its own.
How human-in-the-loop works
The agent runs its agent loop as normal until it reaches a checkpoint the developer has defined. There it stops, shows what it intends to do and why, and waits. The person approves the action, edits its arguments, or rejects it with a note the agent can use on its next attempt. Because a run may wait minutes or days for an answer, the agent’s state has to be saved and resumed later, which is why approval flows are often built on durable execution or checkpointing.
Checkpoints are usually tied to tool use. Each tool the agent can call through function calling is classed by risk, and only the risky ones wait for a person. Reading a document runs freely; issuing a refund waits for a click.
Pattern | When the person steps in | Typical use |
|---|---|---|
Approval gate | Before a specific action runs | Payments, outbound email, permanent deletions |
Review and edit | After the agent drafts, before anything is sent | Customer replies, contract redlines |
Escalation | When the agent is unsure or a rule is triggered | Support handoff to a person |
Post-hoc review | After the run, on a sample of outputs | Quality checks and agent evaluation |
Why teams use it
Human review catches errors a model cannot see in itself: a misread instruction, a confident hallucination, or an input carrying a prompt injection. It also gives a clear point of accountability in regulated work, where a named person has to own the decision. Most teams start with tight approval gates and relax them as confidence grows, moving up the agent autonomy levels one tool at a time and using agent evaluation to decide when a gate can go.
The term has an older meaning in machine learning, where people label data or rate outputs to train a model, as in RLHF. That kind of human feedback shapes a model’s weights. Agentic human-in-the-loop shapes a single run.
Where approval gates stop scaling
Approval works well for a handful of high-stakes actions and badly as a default for everything. An agent that asks before every write runs at the speed of its slowest reviewer, and people asked to approve dozens of similar actions start clicking yes without reading. At that point the review is a ritual and stops catching mistakes.
The usual answer is fewer approvals combined with other controls. Guardrails block clearly unsafe inputs and outputs automatically. Agent permissions and least privilege limit what the agent can touch in the first place. Agent observability and agent tracing let people review runs afterwards instead of during them. Agent rollback means a mistake can be found and reversed, so approval is only needed where an action cannot be undone. Human-in-the-loop doesn’t scale, rollback does makes this case in more detail.
Human-in-the-loop and Exabase
Exabase does not provide an approval workflow. The pause, the review screen and the resume logic sit in your agent or agent framework. What Exabase provides is the recovery side, which lets you keep approvals for the actions that matter most. Turn on filesystem snapshotting for a Base and Exabase records the state of every resource in it: name, location, description and deletion state. You can query the Base as it was before a run, compare it with now, and recover deleted resources from the bin for 30 days. Snapshots are hourly for the last 24 hours and in six-hour windows up to 7 days, they record metadata rather than file content, and they are included on paid plans. The agent undo solution walks through the pattern.
Snapshots cover what happens inside the Base. Emails sent, payments made and calls to third-party APIs stay done, so those are the actions that still deserve a human checkpoint; what can’t be undone lists the side effects to plan for. For scheduled jobs, Exabase Workers can be limited to specific tools and resources, and every run is recorded as a conversation showing each tool call, which makes post-hoc review practical. The agent context versioning use case shows how teams combine these.
FAQs
What is human-in-the-loop AI?
Human-in-the-loop AI is a design where a person reviews, approves, edits or rejects an AI system’s output at set points, so that important actions only take effect once someone has signed off.
What is the difference between human-in-the-loop and human-on-the-loop?
In human-in-the-loop, the agent waits for a person before acting. In human-on-the-loop, the agent acts on its own while a person monitors it and can step in or reverse what it did.
Which agent actions should need human approval?
Actions that are costly or impossible to reverse: payments, outbound messages, permanent deletions and changes in external systems. Reads and reversible writes usually do not need a gate.
Does human-in-the-loop make agents safe?
It reduces risk for the actions it covers, but reviewers miss things when they approve many similar requests. It works best alongside permissions, guardrails, monitoring and the ability to roll back.
How do you build a human-in-the-loop step?
Mark the tools that need approval, have the agent pause and save its state when it calls one, show the proposed action to a person, and resume the run with their decision. Most agent frameworks include an interrupt or approval primitive for this.
How does rollback reduce the need for approvals?
If a change can be inspected and reversed afterwards, it does not need approving in advance. Approval can then be kept for the side effects that cannot be undone, which keeps reviewers focused.
Does Exabase have an approval workflow?
No. Exabase provides the recovery layer: snapshotting for Bases, recoverable deletions and inspectable Worker runs. The approval step itself lives in your agent code.
Related pages: Agent rollback, Guardrails, Agent permissions, Agent autonomy levels, Snapshot, Snapshot vs backup, Agent undo solution, Read-only agents are a dead end, Exabase vs E2B, Background agents, Agent handoff, Voice agents