A human-in-the-loop AI agent pauses before certain actions, shows a person exactly what it wants to do, and only continues once that person approves; if they reject it, the agent is told and adjusts. The skill is choosing which actions wait. Approve everything and the agent is a slow form; approve nothing and one bad output can send a refund, a wrong quote or a bulk email. Our rule is to gate by blast radius: reads run freely, reversible internal changes run and are logged, and anything customer-facing, costly or irreversible waits for a person until the agent has earned more trust. This guide covers the tiers, how to build the approval step in n8n and in code, and how to loosen it safely.
What human-in-the-loop means for an AI agent
An agent works by calling tools: look up a contact, check a calendar, send an email, issue a refund. Human-in-the-loop puts a checkpoint in front of chosen tools. When the agent tries to use one, the run pauses and a person sees the tool name and the exact values the agent chose. Approve, and the tool runs with those values. Reject, and the action is cancelled and the agent is told, so it can try another route or hand over.
This is different from reviewing work after the fact. The point is to catch the action before it reaches a customer, a bank account or your CRM. Anthropic's guidance on building agents describes the same pattern: agents can pause for human feedback at checkpoints or when they hit a blocker, and should carry stopping conditions such as a maximum number of iterations.
Why approvals matter: excessive agency
OWASP's Top 10 for LLM applications lists Excessive Agency as LLM06:2025: an agent able to take damaging actions in response to unexpected, ambiguous or manipulated model output. It names three root causes. Excessive functionality means the agent has tools it does not need. Excessive permissions means those tools can reach more than the task requires. Excessive autonomy means high-impact actions run without anyone checking them.
OWASP's mitigations start with the first two: give the agent fewer tools and narrower permissions. For the actions that remain high-impact, it recommends human-in-the-loop control so a person approves them before they happen. That is the same order we follow, and it is why our guide to agentic AI vs AI automation starts with scope before guardrails.
Which actions need approval
Sort every tool the agent can call by what happens if it gets it wrong, not by how clever the task is. A hard research task with read-only tools is safer than an easy one that can issue refunds.
- Read-only, such as searching the CRM or checking availability: no approval
- Reversible internal writes, such as adding a note, a tag or a draft: no approval, but log every call
- Customer-facing messages, especially anything with a price, a promise or a first contact: approve until the agent has a track record
- Money and anything irreversible, such as refunds, discounts, payments, deleting records or bulk sends: always approve
How to build the approval step in n8n
n8n has human review built into its AI Agent node. You add a review step in the agent's tools and connect the tools that need approval, either all of them or only the risky ones; it also works when a sub-agent is used as a tool. When the agent calls a gated tool, the workflow pauses and sends an approval request showing the tool and its parameters.
Approvals can go out through n8n's own chat, Slack, Microsoft Teams, Discord, Telegram, Gmail, Outlook, Google Chat or WhatsApp Business Cloud, and the approval channel does not have to match the one customers use. A common setup is an agent that chats with leads on the website while refund or discount requests go to a Slack channel for the team. Our step-by-step guide to building an AI agent in n8n covers the rest of the build.
How to build it in code
If the agent is custom-built, the major SDKs support the same pattern. In the OpenAI Agents SDK you mark a tool as needing approval, either always or through a function that decides per call, for example only for refunds above a set amount. When the agent calls it, the run stops and returns the pending tool calls with their names and arguments. Your app shows them to a person, records approve or reject on the saved run state, and resumes the run.
The run state can be saved and reloaded, so an approval can arrive hours later without keeping anything running. Two cautions from the SDK documentation are worth building around: a saved state is not authenticated on its own, so check who is approving, and approval does not guarantee the tool runs exactly once. Make every gated action idempotent, keyed on a stable ID, as in our guide to connecting a CRM with n8n.
Design requests people can approve in seconds
An approval step only works if the person can decide quickly. A request that says 'Agent wants to call refund_tool' gets rubber-stamped or ignored. Write the request for the approver, not the developer.
Decide what happens when nobody answers. Neither n8n's nor OpenAI's documentation sets a timeout for a pending approval, so build one: after a set time, treat silence as a rejection, tell the customer a person will follow up, and alert the owner.
- What the agent wants to do, in plain words, with the exact values
- Why: the customer message or record that led to it
- Who it affects and how much it costs
- One-tap approve and reject, routed to the person who owns that decision
Loosen the loop as the agent earns trust
Approval is a starting point, not a permanent state. Anthropic's February 2026 study of millions of agent interactions found that new Claude Code users turned on full auto-approve in about 20% of sessions, rising to over 40% as they gained experience, and that only 0.8% of tool calls on its public API appeared irreversible. Its conclusion was not to approve every action forever, but to make sure people can monitor the agent and step in.
We track the approval rate per tool. When a tool's requests are approved unchanged for several weeks, it moves from approve-first to notify-and-log, with a daily summary someone actually reads. Money and irreversible actions stay gated. Pair this with a step and spend limit per task, which also keeps the bill predictable, as our guide to AI agent costs explains.
Frequently asked questions
What is a human-in-the-loop AI agent?
It is an AI agent that pauses before chosen actions and waits for a person to approve them. The person sees the action and the exact values the agent picked, then approves it to run or rejects it, in which case the agent is told and adjusts. Low-risk actions such as reading data run without a pause.
Which AI agent actions should need human approval?
Anything costly, customer-facing or hard to undo. That means refunds, discounts, payments, deleting records, bulk sends and messages that quote a price or make a promise. Read-only lookups and reversible internal changes such as notes and tags can run without approval as long as every call is logged.
Does human approval make an AI agent too slow?
Not if only the risky actions are gated. Most of an agent's work is reading and drafting, which runs straight through. Clear approval requests sent to the right person in Slack or Teams usually get answered in minutes, and tools that are approved unchanged for weeks can move to notify-only.
How do you add human approval to an n8n AI agent?
Add a human review step to the AI Agent node's tools and connect the tools that need approval. When the agent calls one, the workflow pauses and sends an approval request through a channel such as Slack, Microsoft Teams, Telegram, Gmail or n8n's own chat. Approved calls run with the agent's values and rejected calls are cancelled.
What happens if nobody approves the request?
That is up to you, because n8n and the OpenAI Agents SDK do not set an approval timeout. We treat no answer after a set time as a rejection, let the customer know a person will follow up, and alert the owner of that decision so nothing waits silently.
Sources
- LLM06:2025 Excessive Agency, OWASP Gen AI Security Project
- Human-in-the-loop for tools, n8n Docs
- Human-in-the-loop, OpenAI Agents SDK
- Building effective agents, Anthropic
- Measuring AI agent autonomy in practice, Anthropic

