To evaluate an AI agent, give it a set of realistic tasks with clear success criteria, run each task several times, and grade two things: the outcome it reached and the steps it took to get there. Graders can be code checks, human reviewers or another model acting as a judge. After release, keep running the same tasks and add new ones from production failures.
Agents are harder to test than a single model call. Anthropic's guide to agent evals points out that agents work over many turns, calling tools and changing state as they go, so mistakes can spread and compound. Their behavior also varies from one run to the next. Here's what to measure, where test cases come from, how to grade them, and what to watch after launch.
Grade the outcome first
The outcome is the state the agent leaves behind, not what it says about it. Anthropic's example is a flight-booking agent: it might end by saying the flight is booked, but the outcome is whether a reservation exists in the database. Outcome checks answer whether the work got done.
They are also less brittle. Agents often find valid paths the test designer didn't expect, and Anthropic warns that checking for a fixed sequence of tool calls tends to produce brittle tests. Its advice is to grade what the agent produced rather than the path it took, and to give partial credit when a task has several parts. A support agent that verifies the customer and finds the problem but fails to issue the refund did better than one that failed at the first step.
When to grade the steps
Step-level evaluation, also called trajectory evaluation, looks at the sequence of actions the agent took. It shows why an agent failed and catches wasteful or risky paths to a right answer. Google Cloud splits its Vertex AI agent metrics the same way, into final-response and trajectory metrics.
Its trajectory metrics run from strict to loose. An exact match requires the agent's actions to mirror a reference trajectory step for step. An in-order match requires every needed action in the right order but allows extra steps. An any-order match only requires that every needed action appears. Precision is the share of the agent's actions that appear in the reference, and recall is the share of reference actions the agent took.
Save strict matching for steps where order matters, such as verifying identity before changing an account. Elsewhere, looser matching with precision and recall won't punish a valid alternative.
Check every tool call
Tool calls are where an agent touches real systems, so they deserve their own checks. For each call, ask whether the agent picked the right tool, passed the right arguments and used the result correctly. Code can verify most of this. Anthropic lists tool-call checks, covering which tools were used and with which parameters, among its code-based graders, and its sample support task requires a refund call with an amount at or under a set limit.
Test both directions. Anthropic's team learned this building search evals: test only cases where a tool should be called, and you can get an agent that calls it for almost everything. Include cases where the right move is no tool call.
Build the test set from real production runs
You don't need hundreds of tasks to start. Anthropic suggests 20 to 50 simple tasks drawn from real failures, and points to bug trackers and support queues as sources once an agent is in production. Real runs carry the inputs and edge cases your users actually produce.
A production trace becomes a test case when you pair it with a judgment: a label, a rubric score, a parser result, an approval or a reviewer's note. Select with care, since logs include duplicates, stale prompts and partial failures, and keep some cases held out to tell whether a change really helped. Our guide How production traces become evals walks through the process.
Write each task so that two domain experts would independently reach the same pass or fail verdict, and keep a reference solution that passes every grader. If a strong model fails a task across many attempts, check the task and the grader before you blame the agent. Anthropic found that this pattern usually points to a broken task.
Pick a grader for each check
Most agent evals mix three kinds of grader. Code checks, such as string matches, schema validation, state checks and unit tests, are fast, cheap and repeatable, but they miss nuance. Review by subject-matter experts is the most trusted signal and the slowest. LLM-as-a-judge sits between them: a model scores outputs against a rubric, which handles open-ended work at scale but needs calibration against human grades.
Use code wherever a rule can decide, a model judge where it can't, and people to set the standard and spot-check the judge. The people who know the work best should write the rubric, as our post Domain experts, not ML teams, should define the reward signal argues.
Model judges have known failure modes. The MT-Bench study that helped popularize the method found that strong judges agreed with human preferences over 80% of the time, and it also documented position, verbosity and self-enhancement biases. Anthropic recommends grading each rubric dimension with a separate judge and letting the judge answer Unknown when it lacks information. Our sibling guides on LLM-as-a-judge and LLM evaluation go deeper on both.
Run each task more than once
Because agent behavior varies, one run per task can mislead. Anthropic describes two measures. pass@k is the chance of at least one success in k tries, which fits tools where one good answer is enough. pass^k is the chance that all k tries succeed, which matters for customer-facing agents. At a 75% success rate per try, the chance of passing three tries in a row is about 42%.
Keep measuring after release
No test set predicts every real input. Anthropic recommends production monitoring after launch to catch drift and unexpected failures, plus user feedback, regular transcript reading and occasional human studies to calibrate model judges. OpenAI's trace grading docs describe a related practice: score traces, then evaluate graded traces across many examples to spot regressions.
Once the agent passes a task reliably, move it into a regression suite that runs on every change. Re-run that suite whenever you change a prompt, a tool or the model, and turn each new production failure into a new test case.
Where Orchestra fits
Orchestra turns your team's definition of good into evals and runs them on your product's real work. It captures production requests along with the work each one produced, so test cases come from real runs. Prompts and other models are tested against that baseline before anything changes, and a change happens only after it passes your evals and you approve it. When the numbers justify it, Orchestra can train a specialist model on your own examples. See how the pieces connect on the platform page.
What is agent evaluation?
It's testing whether an AI agent completes its tasks correctly and reliably: running it on realistic tasks several times each, and grading both the final outcome and the steps it took, including tool calls.
What is the difference between outcome and trajectory evaluation?
Outcome evaluation checks the end result: did the agent get the job done, judged by the state it left behind. Trajectory evaluation checks the sequence of actions it took to get there. The first tells you whether it works; the second tells you why it failed.
How many test cases do I need to evaluate an agent?
Fewer than most teams expect. Anthropic suggests 20 to 50 simple tasks drawn from real failures as a good start, since early changes to an agent tend to have large, visible effects. More mature agents need larger and harder sets to detect smaller differences.
Can an LLM grade an agent's work?
Yes, for open-ended work that code can't check, as long as you calibrate it against human grades. In the MT-Bench study, strong model judges agreed with human preferences over 80% of the time, about as often as humans agree with each other, but the same study documented position, verbosity and self-enhancement biases.
How is agent evaluation different from LLM evaluation?
LLM evaluation usually grades a single response to a single prompt. Agent evaluation grades work done over many turns, with tools and changing state, so it adds outcome checks, step checks and repeated trials. As Anthropic puts it, when you evaluate an agent, you evaluate the model and its harness working together.
Do I still need evals after the agent is live?
Yes. Real inputs drift away from your test set over time. Keep the suite running on every prompt, tool or model change, monitor production for new failures, and turn those failures into new test cases.
Follow the evidence.
- Anthropic: Demystifying evals for AI agents (January 9, 2026)
- Google Cloud: Introducing agent evaluation in Vertex AI Gen AI evaluation service
- OpenAI: Trace grading
- Zheng et al.: Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena
- How production traces become evals
- Domain experts, not ML teams, should define the reward signal
- LLM-as-a-judge
- LLM evaluation
- Orchestra platform