Ingenious AI

Guides · AI operations

Pre-deployment testing for AI agents

Agents are usually launched the way features are launched — it worked in the demo, so it ships. But an agent is not a feature; it is an actor with tools, and its failure modes only appear under realistic inputs, hostile content and real permissions. This guide defines the pre-deployment gate: the test layers an agent must pass, in order, before it touches production — and the evidence a go/no-go decision should rest on.

By the Ingenious AI team · Published 14 November 2026 · Reviewed 14 November 2026

The short answer

Gate an AI agent's launch on five layers, in order: functional evaluation on real tasks (it does the job correctly), adversarial testing (it resists injection, extraction and manipulation), permission verification (it cannot exceed its scope even when misled), shadow mode (it runs against live inputs without acting, and its proposed actions are scored against what humans did), and a canary rollout (a small slice of real traffic with tight monitoring and a tested rollback). Launch when the evidence from all five says so — not when the demo looks good.

Try it free: EvalScope — run structured evaluations of agents and models before they meet production traffic.

What is agent acceptance testing?

the structured verification an AI agent passes before production release: correctness on representative tasks, robustness against adversarial inputs, confinement within its permissions, and safe behaviour at increasing levels of real-world exposure. It exists because agent failures are behavioural — they emerge from inputs and interactions — so testing must be behavioural too, not just code-level unit tests of the surrounding software.

Layer 1: Functional evaluation on real tasks

Assemble the task set from the agent's actual job: the frequent requests, the valuable ones, the ambiguous ones, and the ones where a wrong action is expensive. Score end-to-end outcomes — not 'did it reply nicely' but 'did the correct thing happen in the connected systems'. Include the null cases: requests it should decline, escalate or ask about. An agent that handles 95% of the happy path and none of the refusals correctly is not 95% ready; the missing 5% is where its incidents live.

Layer 2: Adversarial testing

Run the attack families against the configured agent — with its real tools and permissions, because that is the system you are launching: direct and indirect injection, tool-call hijack, exfiltration through allowed channels, cross-user data attempts, multi-turn manipulation. Score by achieved impact and record transcripts. Every success becomes either a fix or an explicitly accepted risk signed by a person with the authority to accept it. 'We will monitor it in production' is not an acceptance; it is a deferral with extra steps.

Layer 3: Permission and boundary verification

Independently of the model's behaviour, prove the fences: attempt (as a tester, through the agent and around it) the actions the agent must never perform — out-of-scope tools, over-limit amounts, unlisted destinations, other users' data — and confirm the architecture refuses them. This layer tests your gateway, allowlists and scopes, not the model's intentions, and it must pass at 100%: a single reachable forbidden action fails the gate regardless of how the model behaved elsewhere.

Layer 4: Shadow mode against live inputs

Run the agent on real production inputs with its actions recorded but not executed; score its proposed actions against what actually happened (human decisions, correct outcomes). Shadow mode catches the distribution reality no test set fully captures — the phrasing, messiness and volume of real work — and it produces the numbers your launch thresholds need (proposed-action accuracy, escalation rate, refusal appropriateness). Run it long enough to see a full business cycle of the agent's work, including the weird week, not just the calm one.

Layer 5: Canary rollout with a tested rollback

Launch to a small, observable slice: a percentage of traffic, one location, one customer segment — with tightened limits (budgets, approval rates) and a dashboard a human actually watches for the first days. The rollback (previous version, or agent-off with graceful human fallback) must be executed once in rehearsal, not merely documented. Expand the slice as evidence accumulates; contract it automatically on defined triggers (error or refusal spikes, budget anomalies). A canary without triggers is just a slow launch.

The go/no-go record

Close the gate with a decision document: the eval scores, the adversarial findings and their dispositions, the permission-verification results, the shadow-mode numbers, the canary plan and its triggers, and the name of the person who said go. This record is what turns launch from folklore into governance — and when the first incident arrives, it is the baseline that tells you whether the agent regressed or the gate missed something, which are very different problems.

Your 5-action checklist

  1. Build the functional eval from real tasks including refusals and escalations; score outcomes in connected systems.
  2. Run adversarial suites against the fully configured agent; fix or formally accept every success.
  3. Verify permissions architecturally — forbidden actions must be refused at 100%, independent of the model.
  4. Run shadow mode over a full business cycle and score proposed actions against reality.
  5. Canary with tightened limits, watched dashboards, defined contraction triggers and a rehearsed rollback — then sign the go/no-go record.

Worked example: Northbeam Freight Brokers (Returns)

Northbeam Freight Brokers — the fictional logistics firm from our buyer's guide — gated its quoting agent through all five layers. The functional eval: 94% correct end-to-end. Adversarial: two successes, both fixed architecturally (an egress hole and a missing approval on non-standard lanes). Permission verification: 100% refusals. Shadow mode over five weeks: proposed quotes matched human decisions 91% of the time, with the misses concentrated in one lane type that was then carved out of the agent's scope. The canary ran at 10% of quote volume with halved budgets. Total gate time: about seven weeks — which the operations director defended to the board with one sentence after the first quarter's clean run: 'We did not spend seven weeks testing; we spent seven weeks not having the incident.' The go/no-go record is now the template for every agent the firm deploys.

Sources

Frequently asked questions

How long should pre-deployment testing take?

Proportional to blast radius. A read-only internal agent might pass the gate in days; a customer-facing agent with payment tools deserves weeks, including a shadow period over a full business cycle. The expensive version of testing is the incident — schedule accordingly.

Can we skip shadow mode if the eval scores are high?

You can, and teams do — usually the ones whose test sets turned out not to resemble their users. Shadow mode exists to test the test set. For low-risk agents the trade may be reasonable; for agents that act on customers or money, shadow evidence is the cheapest truth you will ever buy.

Who should sign the go decision?

The person accountable for the agent in production — typically the business owner of the process, informed by the technical evidence. Separating 'built it' from 'accepts the risk' is deliberate: the signer should be the one who will own the incident call.

What if the agent fails the gate near a deadline?

Reduce scope until it passes: read-only mode, human approval on all actions, a narrower task set. A smaller agent that passes its gate beats a grand one launched on hope — and the gate record shows exactly which capability to re-test for the next expansion.

How does this relate to ordinary software QA?

It includes it — the surrounding code gets normal unit, integration and security testing — and adds the behavioural layers (functional eval, adversarial, shadow) that agent behaviour requires. Code tests prove the harness works; the gate proves the actor behaves.

Related guides and tools