What Is Human-in-the-Loop (HITL)?

Human-in-the-loop (HITL) is a design in which an AI system pauses at defined points and waits for a person to approve, edit or reject what it proposes before it continues. The person is part of the process, not a reviewer after the fact. In agent systems the usual trigger is any action that changes something outside the system: a payment, a record update, an email to a customer.

How It Works

  1. The agent prepares an action. It decides, for example, to issue a refund and fills in the amount and the order number.
  2. The run pauses. The orchestration layer saves the full state and stops before the action executes.
  3. A person decides. A reviewer sees the proposed action, the reason, and the sources behind it. They approve it, change it, or reject it.
  4. The run resumes. The decision is fed back into the saved state and the run continues from the same point.

LangGraph implements this with interrupts: a node calls an interrupt, the checkpointer saves the exact graph state, and the run resumes later on the same thread with the reviewer’s answer. Its documentation lists the standard patterns: approve or reject before a critical action, review and edit generated content, and approval inside a tool so the reviewer can change arguments before the call runs (LangGraph interrupts). See agent orchestration for the control layer that makes the pause possible.

Variants

VariantWhen the person actsTypical use
Approval gateBefore the actionPayments, record changes, outbound messages
Review and editBefore publishingDrafts, reports, replies to customers
EscalationOnly when confidence or rules requireSupport triage, exceptions
Human-on-the-loopAfter the fact, with a stop controlMonitoring high-volume, low-risk automation

Regulation

For high-risk AI systems, Article 14 of the EU AI Act requires that the system can be effectively overseen by people while in use. Overseers must be able to disregard, override or reverse the output, interrupt the system through a stop button or a similar procedure, and stay aware of automation bias, the tendency to over-rely on the system’s output (EU AI Act, Article 14). A system outside the high-risk categories is not bound by this article, but the same controls are good engineering for any agent that can change data. See the EU AI Act entry for scope.

Common Failure Modes

  • Rubber-stamping. Reviewers approve everything because most proposals are correct and the queue is long. Show the reason and the source with each request, sample approvals for audit, and track how often reviewers change what the agent proposed.
  • Too many gates. If every step needs approval, people stop reading. Gate actions with consequences, not every tool call.
  • Approval without context. “Approve refund? Yes / No” with no order history forces a guess.
  • Stale approvals. The data changed between the proposal and the approval. Check the preconditions again when the run resumes.

In Practice

In systems Alltegrio builds through its AI agent development and AI workflow automation services, a person approves any change to prices, records or settings. The agent proposes, tested code checks the proposal against business rules, and a named reviewer decides. Each approval request shows the action, the inputs, and the query or document the agent relied on, so the reviewer can verify it in seconds. Decisions are logged with who approved what and when. During rollout, every action starts gated; a gate is relaxed to sampling only after real decisions show the agent is consistently right for that action type, and the riskiest actions stay gated.

Back to Glossary

Let's talk about your project

We'll help you harness AI and ML technologies to create innovative software solutions

File requirements: pdf, doc, docx, rtf, ppt, pptx — max 15 MB

No file selected