Human-in-the-loop approval for AI agents means a risky action is held before it runs, and only goes ahead when an authorised person approves it. The approval should cover exactly one action with exactly those arguments, and should be recorded with who approved it and why. For the most sensitive actions, two different people must approve: the four-eyes principle.
What is human-in-the-loop for AI agents?
For a chatbot, "human in the loop" often means a person reviews an answer. For an agent, it means a person decides whether an action happens. The agent proposes a tool call, such as "transfer 12,000 euros" or "delete this database", and the call waits. A person sees what is about to happen and approves or denies it. If nobody decides in time, the call does not run.
Human oversight is also a regulatory theme. Article 14 of the EU AI Act sets human-oversight requirements for high-risk AI systems; see the EU AI Act and AI agents for what that means and what it does not.
Which AI agent actions should wait for human approval?
Approving everything trains people to click "approve" without reading. Hold the actions where a mistake is expensive or cannot be undone, and allow or deny the rest by rule:
- Destructive actions: deleting data, dropping tables, deleting cloud resources. See how to stop an AI agent deleting a production database.
- Money: payments, refunds or orders above a threshold.
- Messages in someone's name: email to customers, public posts.
- Permission changes: granting access, rotating keys, changing firewall rules.
- Data leaving: sending data to an external destination, especially after the agent has read untrusted content. See prompt injection in agent tool calls.
- Production, out of hours: a rule can allow a tool in working hours and hold it at night.
The best holds are narrow: not "every database call", but "delete_* where the namespace starts with prod".
Where should the approval step live?
Many agent frameworks can pause for human input inside the application. That is useful, but the pause runs in the same process as the agent. If the agent is manipulated, or the code path forgets to ask, the action goes ahead. A hold at a gateway in front of the tools is enforced outside the agent, applies to every agent the same way, and cannot be skipped by the agent.
| Pause inside the agent | Hold at the gateway | |
|---|---|---|
| Who enforces it | The agent's own code | A control point the agent cannot bypass |
| Consistency | Per application | One rule set for every agent |
| Bound to the exact call | Depends on the implementation | Can be bound to session, tool and argument hash |
| Separation of duties | Usually up to you | Enforced by the approval service |
| Evidence | Application logs | One record per decision, with the approvers |
What is maker-checker or four-eyes approval for AI agents?
Four-eyes approval, also called maker-checker or the two-person rule, means an action needs two different people to approve it. It is common in banking and operations for a simple reason: one person can make a mistake or be coerced; two independent people rarely are at the same time. For AI agents, the maker is the agent and the person it acts for, who propose the action; the checkers are independent approvers who decide whether it runs.
For agents, separation of duties has a specific twist. The person an agent acts for should not be able to approve that agent's risky calls. Otherwise anyone can tell their agent to do something dangerous and then approve it themselves. A sound system refuses a vote from the requester, refuses a second vote from the same person, can require approvers to come from named groups, and treats any single deny as final.
What is CIBA user approval?
Some actions should be confirmed by the person the agent acts for, not by an operations team: a payment from their account, or an email in their name. OpenID Client-Initiated Backchannel Authentication (CIBA) lets a system ask a user to confirm on their own device, through their identity provider. The user sees a short binding message on their phone or authenticator and approves or rejects. The identity provider returns a signed token that proves who confirmed.
What happens when an agent triggers a human-in-the-loop approval?
The sequence is much the same in any well-built system:
- The call is held, not run. A rule matches the tool and its arguments, so the control point stops the call before it reaches the tool.
- A request is created. It records the agent, the session, the person it acts for, the tool, the arguments (with secrets masked) and the rule that fired, and gets an ID.
- Approvers are told. The request appears wherever approvers work: a console, chat, a desktop notification or a CLI.
- The agent waits or comes back. Either the request is held open until someone decides, or the agent gets the ID at once and retries the identical call later.
- People decide. Enough independent approvers approve, or one denies, or nobody decides in time and the request expires as a denial.
- The exact call runs once, or not at all. An approval covers that call with those arguments, once, and the outcome is recorded with who decided and why.
In MAQPNA the gateway does each of these steps; the specifics are below.
What makes a good approval experience?
- Reach people where they are: chat buttons, a desktop notification or a CLI, not only a web page nobody watches.
- Show what will happen, safely: a preview of the tool and arguments with secrets masked.
- Bind to the exact call: approval covers that call, with those arguments, once. A changed argument needs a new approval.
- Time out: an undecided request expires and counts as a denial, so a held call never runs days later by surprise.
- Ask for a reason on deny, and record a note on approve, such as a ticket number.
- Record everything: who approved, when, under which rule, with which identity provider.
How does MAQPNA handle human approval for AI agent actions?
In MAQPNA, a policy rule with the action require_approval makes the gateway hold that tool call. The call can also be held by a budget or by a changed tool definition. Each request gets an ID and waits for a decision; approving lets exactly that call run once. The details, from the approvals docs:
- Binding and single use. An approval is bound to the session, server, tool and SHA-256 hash of the arguments, and can be consumed once.
- Four-eyes quorum. A rule can set
minApproversfrom 2 to 10 andapproverGroups; the strictest setting wins when several apply. - Separation of duties. No self-approval by the session's user or the agent, no double votes, any deny is final, and with OIDC the approver comes from the verified token. Admins are not approvers unless they hold the approver role.
- Timeouts. An undecided request expires after
approvalTimeoutSeconds(300 seconds by default) and counts as a denial. - Waiting. The gateway can hold the request open, or answer at once with an approval ID so the agent retries later.
- Where people decide. The CLI, the console, the MAQPNA Desk desktop app, and Slack or Microsoft Teams buttons. Approvers see a redacted argument preview by default.
- User approval. A rule can ask the person the agent acts for to confirm through CIBA, in poll mode, through your identity provider. Only that user can approve; approvers can still deny. See the user approval flow.
- Evidence. The ledger record names the rule, the approvers and their issuer, and the kill switch is checked again before the approved call runs.
One limit: model calls and browser egress cannot wait for approval in MAQPNA; a require_approval decision there is a denial. The full sequence is in the approval flow, and the task guide is human approvals.
Related: what is an MCP gateway, AI agent governance, the AI agent kill switch and tamper-evident audit trails.