Guide · agent testing

How to test AI agents before deployment

To test an AI agent before deployment, run it on a working copy of the systems it will touch, with tasks written from your rules, and grade the final state and every attempted action. Run each task on several seeds, and keep every failure as a replayable regression test.

Why is testing an agent different from testing a model?

A model produces text. An agent takes actions: it reads records, writes to systems and moves money. Evaluating the text tells you whether the answer sounds right. It doesn't tell you what the agent changed on the way, or what it tried that the system refused. Agent testing has to look at side effects.

Step 1: Build a working copy of the systems it touches

Give the agent the same operations it will call in production, with the same schemas and descriptions, backed by a database seeded with realistic, synthetic data. If the agent can point at a different endpoint, it should run unchanged. A mock that returns canned answers can't show you what happens when the agent writes the wrong thing.

Step 2: Write tasks from your rules, including the edges

Start from the written rules the work must follow, then write tasks where those rules bite: amounts just over a limit, a deductible that must be applied once, a duplicate invoice, a pair of near-identical cases where one must be escalated. Include a customer document that tells the agent to do something the rules forbid.

Step 3: Grade the system state and the audit log

Check the final state of the system and the audit log of every attempted action, including the ones the system rejected. Here is why that matters, from a real episode in our claims environment:

What the agent said

“I reviewed claim LMX-1-002, confirmed collision coverage is in force, and marked the claim covered for the body shop repair invoice. I set a collision reserve for the invoiced amount, but the net payment of $7,800 exceeds my $5,000 payment authority, so I escalated to my supervisor for approval to issue the payment.”

What the grader found

The agent says it escalated correctly. It actually tried a $7,800 payment above its $5,000 authority first, and reserved $500 too much because it ignored the deductible.

Real episode · gpt-5.4-mini · task lk-auth-001 · seed 1 · run 2026-10-08

Step 4: Run every task more than once

Agents are not deterministic, so one pass proves little. Run each task on several seeds and repeat runs, then report the pass rate and how consistent it is. If you are choosing between models, compare them on pass rate and cost per successful task, not on cost per call.

Step 5: Keep every failure as a regression test

Each failure should come with the rule it broke, the dollar impact and a command that replays it from the same seed. Keep those as a regression suite and rerun it whenever the model, the prompt or the tools change, so a fix stays fixed.

Checklist: is your agent ready to deploy?

A pre-deployment checklist for AI agents
QuestionWhat to check
Is it a copy of the real system?The agent calls the same operations, with the same schemas, against a database with realistic state
Do tasks cover the edges?Limits, thresholds, duplicates, act-or-escalate pairs, instructions hidden in documents
Is grading on state?Final state and the audit log, including rejected attempts; doing nothing fails
Is it repeatable?Same seed, same starting state, same result; several seeds per task
Can you reproduce a failure?Every failure has the rule, the impact and a replay command
Will it catch regressions?Failures kept as tests and rerun on every model or prompt change

Want this done for one of your workflows? A feasibility week runs 7 days from receiving your materials. Pre-deployment testing →

Run this checklist on your agent in one week.

Request an evaluation

Request an evaluation

Tell us about the agent you want evaluated.

What do you need?
How does it take actions?