How to Add Human Review and Approval Gates to AI Agent Actions

Some agent actions should not execute without a human.

10 min read
In short: An approval gate has three parts: a check at the action, a hold that persists the intent without executing, and a resolution path. Build all three in your code, where Arcjet's check returns ALLOW or DENY, or publish a Guard policy that returns Hold and let Arcjet route the action to the AI system's owner.

How do you add human review and approval gates to AI agent actions?

An approval gate has three parts. First, a policy check at the action that decides whether it may run. Then a hold that stores the intent without executing it, and a resolution path where a human approves, rejects, or lets it expire.

You can build all three in your own code, or let a published Guard policy do the first and route the rest. In your code, the check in this guide returns ALLOW or DENY; there is no NEEDS_APPROVAL conclusion. Your code can treat a deny, or an unconditional if, as a hold, and the queue and the approval interface are yours to build. A Guard policy that you publish to Arcjet can instead return a third outcome, Hold, which Arcjet routes to the owner of the AI system. Most of this guide is the build-it-yourself pattern. The owner routing section covers the managed Hold.

Actions that need a person

A few actions warrant human review:

  • Refunds above a threshold
  • Changes to payment details
  • Deletion of a customer record
  • Messages sent to every user on a list

For a small set of actions, the right control is not a better filter. It is a person. No detection model reaches the confidence you want before money moves irreversibly, and waiting for one to arrive is not a plan.

The engineering question is where the gate goes, and what decides that a given action needs one.

The pattern

PartWhat it doesWho builds it
Policy check at the action

Returns allow or deny; your code decides whether a deny (or an unconditional check) becomes a hold

Arcjet provides the allow/deny decision and the record
The hold

Stores the intended action and its arguments without executing, so that you can resume it later

You, in your own datastore
Resolution path

Approve, reject, or expire, plus the execution step that runs only on approval

You, in your own workflow and interface

Use a decision as the trigger

import { launchArcjet, tokenBucket } from "@arcjet/guard";
const arcjet = launchArcjet({ key: process.env.ARCJET_KEY! });
const refundVolume = tokenBucket({
refillRate: 5,
intervalSeconds: 3_600,
maxTokens: 10,
});
const decision = await arcjet.guard({
label: "tools.issue-refund",
actor: session.userId,
correlationId: workflowRunId,
rules: [refundVolume({ key: session.userId, requested: 1 })],
metadata: { amount_cents: amountCents, currency },
});
if (decision.hasFailedOpen()) {
throw new Error("Security check unavailable");
}
if (decision.conclusion === "DENY") {
// Do not execute. Persist the intent and hand it to a human.
return queueForHumanReview({
action: "issue-refund",
args: { amountCents, currency, invoiceId },
actor: session.userId,
workflowRunId,
decisionReason: decision.reason,
});
}

The check is not the gate. It returns allow or deny, and it leaves a record of the attempt with its label and metadata attached. Everything after the return is code that you write, including the decision to treat a deny as a hold rather than a hard stop.

For actions that always require approval regardless of volume or content, you do not need a rule at all. Use your own irreversibility classification and queue directly. You do not need to delegate every decision in your application to a policy engine. An unconditional gate expressed as a plain if is easier to review than one hidden in remote configuration.

Choose what to gate

Gate on consequence, not on model confidence. A confident agent doing something irreversible is more dangerous than an uncertain one doing something cheap.

Start with reversibility. Can this be undone cheaply? The usual candidates are money movement, changes to credentials and contact details, deletions, and anything that fans out to many recipients. Everything else can run, with enforcement and a record.

Keep the gated set small. An approval queue that nobody has time to clear is worse than no gate at all. It manufactures evidence of a review that did not happen. If your reviewers are approving more than a handful of items a day without reading them, the gate has stopped being a control and become a formality.

Design the expiry path deliberately

Every held action needs an answer to "what happens if nobody responds?"

Expiring to rejection is the safe default, and we recommend it for anything irreversible. Expiring to approval is occasionally correct for low-stakes actions where the cost of not acting exceeds the cost of acting. Make that a deliberate decision recorded in the code rather than an accident of a queue with no timeout.

Also decide what the agent tells the user while an action is held. A workflow that silently stalls looks like a bug and generates a support ticket. Returning "this needs approval, here is the reference" turns the gate into a visible product behavior.

Evidence for the review

Give the check a label that names the action. Pass metadata describing the context: the actor, the workflow run, and the server-controlled values that make the attempt legible, such as an amount or a target account identifier.

Keep user-authored free text out of metadata. It is customer-supplied and untrusted downstream. It is also the part of a record most likely to leak something, or to carry an injection payload into whatever reads it later.

Arcjet records the decision that triggered the hold, and the record is inspectable, so the review has context attached: what the agent tried, for whom, and which rule flagged it. That record is also what makes "we review high-risk agent actions" demonstrable rather than asserted. For more information about that evidence, see producing compliance evidence for AI agent activity.

How does Arcjet route a held action to its owner?

Arcjet routes a held action to the owner of the AI system that attempted it. An AI system is an application or agent together with the model providers and tools it uses, and each one in your Arcjet inventory has a named owner who is a member of your team. When a published Guard policy returns Hold, Arcjet routes the held action to that owner instead of to a shared queue.

Routing to the owner answers the question that a home-grown queue often leaves open: who is supposed to read this? A queue that goes to a shared channel is read by whoever has time. A Hold that goes to the named owner of the system reaches the person who declared what the system is for, so they can judge whether the action fits that purpose. If the owner leaves the team, the system reads as having no owner, which shows up on the evidence page and in the inventory's "No owner" filter before held actions pile up with nobody to resolve them.

The same design rules apply to a managed Hold as to the one you build. Keep the held set small and limited to actions that can't be undone, because an owner who approves dozens of items a day without reading them is a formality, not a control. The argument in human approval is not a security policy holds here too: the policy decides what is allowed, and the Hold is a second check on the few actions that remain, not a substitute for the policy.

Who approves a change to the policy itself?

A second person can. Arcjet can require a second approver to publish a Guard policy change, so the rules that decide which actions run, and which ones are held, can't be changed by one person alone. The policy's change history names the person behind each change, and a rule must still pass its test before it goes live.

This is the approval gate applied to the control instead of to the agent. A Hold covers one action. A second approver on publish covers every action the policy will decide from then on, which is why an auditor asking about change management reads the policy history rather than the approval queue. For more about the policy change record, see compliance evidence for AI agents, and for where both sit in a governance program, see what is AI governance.

What the build-it-yourself pattern does not give you

The SDK check in this guide returns allow or deny. It has no hosted queue, no approval interface, and no built-in resumption of a held workflow. If you build the gate in your own code, you are building those or adopting a workflow engine that provides them.

What you get from the runtime layer on that path is an allow or deny and a record of the attempt, retained according to your plan's log retention (longest on Enterprise), or longer with opt-in long-term retention. Treating a deny as a hold, and keeping a durable copy in your own store, is application code. If you want Arcjet to hold the action and route it, publish the rule as a Guard policy that returns Hold.

Where Arcjet fits

Approval workflows are usually built on a workflow engine or a task queue, and that is still true here.

Arcjet provides the decision and the record: allow or deny at the action that your code acts on. The decision carries a label naming the operation and metadata describing the context, and it is inspectable, so the review has evidence attached. Direct Guard fails open (allow with error codes). The preceding sample refuses to execute when hasFailedOpen() is true. Vercel AI SDK and LangChain wrappers fail closed unless you opt into continuing on error.

For held actions that a person should decide, a published Guard policy can return Hold, and Arcjet routes the action to the owner of the AI system. Arcjet can also require a second approver to publish a policy change. If you want allow or deny plus a decision record and you own the workflow yourself, the pattern in this guide is the way to build it. If you need multi-step sign-off or custom approval forms, build them in a workflow engine you run, on either path.

Learn more: Arcjet Guards

Frequently asked questions

How do I add human approval gates to AI agent actions?

Use three parts: a policy check at the action, a hold that persists the intended action without executing it, and a resolution path where a human approves, rejects, or lets it expire. In your own code, Arcjet's check returns ALLOW or DENY and your code may treat a deny as a hold. A published Guard policy can return Hold instead, and Arcjet routes the action to the AI system's owner.

Does Arcjet ship an approval-gate feature?

Yes, for published Guard policies. A policy can return Hold, and Arcjet routes the held action to the owner of the AI system. The SDK check you call in your own code returns ALLOW or DENY, so on that path the queue, the approval interface, and resuming the workflow are yours to build.

Which agent actions should require human approval?

Gate on consequence rather than model confidence, using irreversibility as the test. Money movement, credential and contact-detail changes, deletions, and anything fanning out to many recipients are the usual candidates. Keep the set small, because an approval queue nobody can clear becomes a rubber stamp.

Can one person change an agent's Guard policy alone?

Not when you require a second approver. Arcjet can require a second approver to publish a Guard policy change, and a rule must pass its test before it goes live. That puts an approval gate on the control itself, covering every action the policy decides afterwards.

What should happen if nobody responds to an approval?

Expiring to rejection is the safe default and should be the default for anything irreversible. Expiring to approval is occasionally correct for low-stakes actions, but it should be a deliberate decision in the code rather than an accident of a queue with no timeout.

AI runtime security in your code

Protect your AI agent workflows with Arcjet

Arcjet guards run inside the tool, so the allow or deny arrives before the side effect rather than after it.