By Naman Gundaniya

Designing Human-in-the-Loop Approvals for AI Agents

Human-in-the-loop AI means an agent proposes actions and a person approves, edits or rejects the risky ones before they run. Good designs sort actions into risk tiers, pause only where a mistake would be costly or hard to undo, show the reviewer exactly what will happen, store the paused state durably, and record every decision in an audit trail.

Flowchart on a blueprint grid: an agent's path runs to a gate where a large thumbs-up hand approves the action before the path continues to a completed task.

Teams usually arrive at this from one of two extremes. Either the agent asks permission for everything, and people start clicking "approve" without reading, or it asks for nothing, and the first wrong email to a customer ends the project. Neither is a design. This post covers the patterns I use to place approvals where they earn their cost.

What does human in the loop mean for an AI agent?

For an agent, human in the loop means specific actions cannot execute until a person has seen and decided on them. It is narrower than "a human is involved somewhere". The agent can read, search and draft freely; the gate sits in front of actions with consequences.

The idea is built into the standards and frameworks agents run on. The Model Context Protocol's tools specification says "there SHOULD always be a human in the loop with the ability to deny tool invocations", and that applications should present confirmation prompts. Anthropic's Building effective agents describes agents that "can then pause for human feedback at checkpoints or when encountering blockers."

Regulation points the same way for high-risk systems. Article 14 of the EU AI Act, as published on the AI Act Explorer, requires that people overseeing high-risk AI can decide not to use it, "disregard, override or reverse" its output, and stop it through a "'stop' button or a similar procedure". It also names "automation bias", the tendency to over-rely on output, as something overseers must stay aware of. I covered the wider obligations in the EU AI Act deadline post.

Which agent actions need human approval?

Actions need approval when a mistake would be expensive, visible to outsiders, or hard to reverse. I sort every tool an agent can call into tiers before writing any approval code.

TierExamplesPattern
Read onlySearch, look up a record, read a documentRun automatically, log it
Internal and reversibleDraft a reply, create a ticket, add a noteRun, then sample for review
External or costlySend an email, post publicly, issue a refund under a limitApprove before it runs
Irreversible or high valueDelete data, pay out, change permissionsApprove, with a second approver above a threshold

The tier belongs to the action and its arguments, not just the tool. A refund tool might run automatically below a small amount, need one approver above it and two above a higher one. Frameworks support this directly: the OpenAI Agents SDK lets needsApproval be an async function that receives the tool's parsed arguments and decides per call, according to its human-in-the-loop guide.

What are the main approval patterns?

There are five patterns I use, often several in one agent.

Flowchart of an approval gate. The agent proposes an action with its arguments. A policy check assigns a risk tier. Read-only actions run immediately and are logged. Reversible internal actions run and are sampled for later review. External or costly actions pause: the run state is saved durably and the reviewer sees the exact action, arguments, evidence and the agent's reason. The reviewer approves, edits or rejects. Approved and edited actions execute; rejected ones return a message to the agent so it can try another way. Every path writes to an audit log that records the proposal, the decision, who made it and what finally ran.
Tier the action, pause only the risky ones, and log every decision.
  • Approve before execution. The agent proposes; the run pauses; a person approves or rejects; the run resumes. This is the default for external actions.
  • Edit and approve. The reviewer changes the proposal, such as fixing the tone of an email or the amount of a refund, before approving. It turns a rejection into a correction and keeps the work moving.
  • Stage gates. In a multi-step pipeline, a person approves each stage's output before the next stage starts. My AgentOps project works this way: a request in Slack becomes a spec, then tickets, then a pull request and a preview, and nothing moves to the next stage without a person approving it, so an early mistake does not fan out into tickets and code.
  • Review after the fact. For low-risk reversible actions, let them run and review a sample. It catches drift without slowing anyone down.
  • Escalate on blockers. When the agent is stuck, missing information or outside its scope, it stops and asks rather than guessing.

Should approvals be based on the agent's confidence?

Use confidence thresholds only when the confidence comes from something you can check, not from the model rating itself. A model asked "how sure are you?" will produce a number, but that number is another generated output, not a measurement.

Signals I trust more for routing:

  • Validation results. Did the output pass the schema, the business rules, the totals check?
  • Retrieval evidence. Was there a source document supporting the action, and does the agent cite it?
  • Business thresholds. Amount, number of recipients, customer tier, data sensitivity.
  • Novelty. Has this kind of action, for this kind of record, been approved before?
  • Agreement. Did two independent checks, such as a rule and a second model, agree?

Route to a human when any trusted signal is weak. Then track how often reviewers overturn auto-approved categories; if they never do, the threshold can loosen, and if they often do, it should tighten. My post on giving AI agents a way to check their work covers building those checks.

How do you implement a pause that survives hours or days?

Save the agent's full run state to durable storage when it pauses, and resume from that state when the decision arrives. Approvals rarely come back in seconds, so the pause cannot live in memory.

The main frameworks handle this the same way:

  • LangGraph pauses with interrupt() inside a node and resumes when you call the graph again with Command(resume=...) and the same thread_id. Its interrupts documentation recommends a "durable checkpointer in production", and warns that the node re-runs from its beginning on resume, so code before interrupt() executes again. Keep side effects after the interrupt, or make them idempotent.
  • OpenAI Agents SDK returns pending approvals in result.interruptions; you call result.state.approve(interruption) or reject, then resume with runner.run(agent, state). State serialises with result.state.toString() and restores with RunState.fromString().

That guide adds a warning worth repeating: RunState.fromString() "does not authenticate the snapshot or the person submitting it." For a web approval screen, it recommends keeping the full state on the server, sending the browser only display details and an opaque decision ID, authenticating the reviewer, and consuming each pending request once. In other words, the approval endpoint is a security boundary, and it needs the same care as a payments endpoint.

What should the reviewer see, and what should the audit trail record?

The reviewer should see exactly what will happen, why, and on what evidence, in a form they can judge in under a minute. Approval screens that show a vague summary teach people to click "approve" without reading, which is automation bias by design.

On the approval screen:

  • The action and its exact arguments: the recipient, the amount, the record ID.
  • A preview or diff of the change, not a description of it.
  • The evidence the agent used and its stated reason.
  • Approve, edit and reject, with a short reason required for rejection.
  • What happens if nobody responds, such as expiry after a set time.

In the audit trail:

  • The proposal as generated, and the action as executed, if different.
  • Who decided, when, and with what reason.
  • The model, prompt version and tool versions in use.
  • Links to the conversation or run that produced the proposal.

Rejections and edits are the best training data you have. Each one shows where the agent's judgement and yours differ; add them to your evaluation set, as I describe in hardening an AI feature for production.

How do you avoid approval fatigue?

Approve less, but better. If reviewers see dozens of trivial approvals a day, they stop reading them and the gate becomes theatre. Move actions down a tier once their overturn rate is consistently low, batch similar approvals into one screen, and keep the high-stakes ones rare enough that each gets real attention.

Work with me

I design and build agents with approval steps, risk tiers and audit trails, so teams can let them act without losing control. See AI agent development and workflow automation, or look at my work and book a call.

Frequently asked

What is human in the loop in AI?

Human in the loop is a design where an AI system proposes outputs or actions and a person reviews, approves, edits or rejects them before they take effect. For AI agents, it usually means pausing before external, costly or irreversible actions while letting low-risk actions run automatically.

When should an AI agent ask for human approval?

An agent should ask before actions that are expensive, visible to customers or the public, or hard to undo, such as sending messages, moving money or deleting data. Read-only and easily reversible internal actions can usually run automatically, with sampled review afterwards.

How do you build an approval step into an AI agent?

Mark the risky tools as needing approval, pause the run when one is called, save the run state durably, show a reviewer the exact action and evidence, and resume with their decision. Frameworks such as LangGraph and the OpenAI Agents SDK provide interrupt and approval primitives for this.

What should an AI agent audit trail include?

It should include the action the agent proposed, the action that actually ran, who approved or rejected it and why, the timestamp, and the model and prompt versions involved. That lets you explain any outcome later and learn from overturned decisions.

Sources

Related services

Building something like this?

Naman Gundaniya takes on full-stack and AI projects fixed quote after a free 30-minute scoping call, replies within 24 hours.

Get in touch