AI Agent Evaluation Metrics: How to Measure an Agent Before and After Launch
AI agent evaluation metrics measure whether an agent finishes the task, picks the right tools, stays grounded in real data, and behaves safely, at an acceptable speed and cost. The core set is task success rate, tool-call accuracy, groundedness, latency, cost per task, escalation rate, and safety or refusal metrics. Evaluate with a fixed offline test set before launch, then keep watching the same metrics on live traffic after launch.
Quick answer
AI agent evaluation metrics measure whether an agent finishes the task, picks the right tools, stays grounded in real data, and behaves safely, at an acceptable speed and cost. The core set is task success rate, tool-call accuracy, groundedness, latency, cost per task, escalation rate, and safety or refusal metrics. Evaluate with a fixed offline test set before launch, then keep watching the same metrics on live traffic after launch.
AI agent evaluation metrics measure whether an agent actually finishes the job: did it complete the task, did it call the right tools with the right arguments, did its answer stay grounded in real data, and did it behave safely, all at a speed and cost you can live with. A chatbot only has to produce a fluent reply. An agent takes multi-step actions, looks up records, updates a deal, resolves a ticket, runs a report, so a single quality score is not enough. You need a small panel of numbers that each catch a different failure mode.
The seven metrics that matter for almost every production agent are task success rate, tool-call accuracy, groundedness (also called faithfulness), latency, cost per task, escalation rate, and safety or refusal behavior. The first three tell you if the work is correct. Latency and cost tell you if it is affordable to run. Escalation and safety tell you what happens when the agent should stop and hand off to a human.
There are two places you measure these. Offline, against a fixed test set, before you ship, so you can compare versions and catch regressions. Online, against live traffic, after you ship, because real users do things your test set never imagined. Most teams get burned by skipping one of the two. Offline-only looks great in a demo and breaks on day one. Online-only means every change is a roll of the dice. This guide walks through each metric, how to run both kinds of evaluation, where failures usually cluster, and a scorecard you can copy.
“An agent that writes beautifully but calls the wrong tool is still wrong. Evaluate the actions, not just the prose.”
Why agent evaluation is harder than model evaluation
When you evaluate a plain language model, you usually compare one input to one output. Easy to score, easy to repeat. An agent breaks that assumption. A single user request can fan out into a plan, four tool calls, a retry after a failed call, and a final summary. Any of those steps can be the thing that goes wrong, and the final answer can look fine even when the path to it was a mess.
This is why agent evaluation looks at the trajectory, not only the endpoint. Tool-selection accuracy asks whether the agent picked the correct tool for each sub-task. An agent that hits a web search API when it should have queried the internal CRM has a planning bug, even if it eventually stumbles into a passable answer. The reverse also happens: the right tools in the right order, but a hallucinated number slips into the summary.
There is also non-determinism. Run the same prompt twice and you can get two different tool orderings and two different phrasings. So a useful eval set runs each case several times and reports a rate, not a single pass or fail. And because grading open-ended work by hand does not scale, teams lean on LLM-as-judge scoring for the fuzzy qualities like usefulness and reasoning quality, calibrated against a smaller set of human-labeled examples.
The seven core AI agent evaluation metrics
Start with these seven. They are the smallest set that covers correctness, cost, and safety for a real agent. Each one catches a failure the others miss, which is the whole point of measuring more than one thing.
- Task success rate: the share of requests where the agent fully completed what the user asked. This is your headline number, and it needs either a ground-truth expected outcome or a judge prompt that scores against the original ask, not against a polished-sounding reply.
- Tool-call accuracy: did the agent choose the right tool and pass the right arguments? Split it into selection (correct tool) and argument correctness (correct fields and values), because a right tool with wrong arguments still corrupts a record.
- Groundedness or faithfulness: are the claims in the output actually supported by the data the agent retrieved or the tool results it got back? This is your hallucination guardrail, and it is the metric most likely to look fine in a demo and fail on edge cases.
- Latency: how long from request to finished result, measured at the tail (p95 and p99), not just the average, because the slow 5 percent is what users remember and what blocks a scheduled job from finishing on time.
- Cost per task: total model and tool spend to complete one request, so you can compare a cheaper model that retries twice against a pricier model that gets it in one pass. The cheap model is sometimes the expensive one.
- Escalation rate and safety: how often the agent correctly hands off to a human or refuses an out-of-scope or risky request. Too low means it is bulldozing through things it should not touch; too high means it is useless and dumping everything on your team.
“Pick the smallest panel of metrics that still catches every failure mode you care about. More dashboards do not equal more reliability.”
A worked example: scoring a support agent on one ticket
A support rep forwards a ticket to the agent: "Customer Maria Alvarez says her March invoice was double-charged, can you confirm and start a refund?" Walk through how each metric scores this single run, because the abstract definitions click once you see them applied.
The agent queries the billing system for Maria's account, finds two identical charges on March 14 for 240 dollars, and drafts a refund. Task success: it confirmed the double charge and prepared the refund, so this is a pass on the goal. Tool-call accuracy: it called the billing lookup with the correct customer ID and date range, then called the refund tool, so both selection and arguments are correct. Groundedness: the summary it posts says "two charges of 240 dollars on March 14," which matches the tool results exactly, so faithfulness is clean. No invented numbers.
Now the interesting part. A 240 dollar refund is a money-moving action, so the agent should not silently execute it. A well-governed agent pauses and posts an approval card to the rep before the refund goes through, which counts as a correct escalation, not a failure. Latency for the lookup and draft was eight seconds, well within budget. Cost was a few cents. So this run scores well across the board, and the one human touch is exactly where you want it: on the irreversible action, with an audit trail of who approved it.
Offline evaluation: build a test set before you launch
Offline evaluation runs your agent against a fixed dataset of inputs with known good outcomes, before any real user sees it. This is the repeatable, version-over-version foundation. Change the prompt, swap the model, add a tool, then re-run the same set and see whether your numbers went up or down. It is the cheapest place to catch a regression, because nobody is harmed by a bad answer in a test harness.
Build the set from real or realistic requests, not toy examples. Include the boring happy paths, but spend most of your effort on the slices that scare you: ambiguous asks, requests that should be refused, inputs designed to trick the agent into ignoring its instructions, and cases where a tool returns an error and the agent has to recover. The value of an offline set is concentrated in its edge cases. A set of 40 hard cases will teach you more than 400 easy ones.
The catch is realism. An offline set is always an approximation of production. It misses new user behaviors, drifts as your data changes, and cannot reproduce load-dependent latency. That is fine. It is not supposed to be reality, it is supposed to be a stable yardstick. Treat it as regression protection and a gate before launch, then let online evaluation cover the long tail you could not anticipate.
Online evaluation: keep watching after launch
Online evaluation scores the agent on live traffic, after launch, because real users surface inputs your test set never had. This is where you catch distribution shift, the slow creep of new question types, the latency spikes under load, and the genuinely novel ways people misuse a tool. You cannot pre-write every edge case, so you sample real runs and grade them continuously.
You will not hand-grade every production run, so two patterns do the heavy lifting. First, sample a percentage of live traffic and run automated judges over it for groundedness, tool-call correctness, and task success. Second, set alerts on the cheap-to-measure signals: latency above threshold, cost per task creeping up, escalation rate spiking (a sign something upstream broke), and a rising rate of judge-flagged ungrounded answers. When an alert fires, you pull the trace, see the exact tool calls and arguments, and feed the bad case back into your offline set so it can never regress again silently.
Online evaluation also picks up the signals only real users produce: thumbs-up and thumbs-down, the rate at which a human rejects an agent's proposed action at an approval step, and how often a conversation gets reopened because the first resolution did not stick. Those human signals are gold for calibrating your automated judges, because they tell you when the judge and the user disagree.
- 1
Build the offline set
Collect real and adversarial requests with known good outcomes, weighted toward edge cases.
- 2
Score before launch
Run the agent over the set, grade task success, tool-call accuracy, and groundedness, gate on the result.
- 3
Launch behind controls
Ship with approvals on risky actions and least-privilege access so failures stay contained.
- 4
Sample live traffic
Auto-judge a percentage of production runs and set alerts on latency, cost, and escalation rate.
- 5
Pull the trace
When an alert fires, inspect the exact tool calls and arguments to find the real cause.
- 6
Feed failures back
Add each new failure to the offline set so the next version cannot regress on it.
A practical loop: launch behind an offline gate, then monitor and feed failures back in.
An AI agent evaluation scorecard you can copy
Here is a scorecard that maps each metric to what it tells you, a sensible way to measure it, and a starting target. Treat the targets as a default to argue with, not gospel. A refund agent touching money should hold a far higher groundedness and approval bar than an internal agent that drafts meeting notes. Tune to the blast radius of being wrong.
| Metric | What it tells you | How to measure | Starting target |
|---|---|---|---|
| Task success rate | Did the agent finish the actual job | Ground truth or LLM-as-judge vs the original ask | 90 percent or higher |
| Tool-call accuracy | Right tool, right arguments | Compare calls to expected trajectory | 95 percent or higher |
| Groundedness | Claims supported by retrieved data | Judge each claim against tool results and sources | 95 percent or higher |
| Latency (p95) | Tail speed users actually feel | Time from request to finished result | Under your job or UX budget |
| Cost per task | Affordability at scale | Total model and tool spend per request | Within unit economics |
| Escalation rate | Correct hand-off to humans | Rate of pauses and approvals on risky actions | Right for the risk, not zero |
| Safety / refusal | Declines out-of-scope or unsafe asks | Adversarial and out-of-scope test slices | Near 100 percent on red-team set |
Where agent failures actually cluster
When teams trace their failed runs, the failures rarely spread evenly. They pile up in a few predictable spots, and knowing the shape of the distribution tells you where to spend your evaluation effort. The chart below shows a directional breakdown of where production agent failures tend to land. Your mix will differ, but the ranking is a useful prior.
Two patterns show up again and again. Tool problems, picking the wrong tool or passing wrong arguments, are usually the single largest bucket, because that is where the agent translates intent into action and small mistakes compound. Groundedness failures (confident, plausible, wrong) are the second danger zone, and they are the scariest because they pass a casual read. The rest, planning loops, unrecovered tool errors, and over-eager actions that should have escalated, fill out the long tail.
Directional, illustrative breakdown to guide where to focus evals. Your real distribution will vary by use case.
The practical takeaway: if you only have time to build evals for two things, build them for tool-call accuracy and groundedness. They cover well over half of real failures and they are the two most likely to look fine right up until they cost you a corrupted record or a wrong number in front of a customer.
Common mistakes when evaluating AI agents
Most evaluation programs fail in the same handful of ways. None of these are exotic. They are the defaults you fall into when you are in a hurry to ship.
- Scoring only the final answer. The summary can read perfectly while the agent called the wrong tool to produce it. Grade the trajectory, not just the last paragraph, or you will ship planning bugs you never saw.
- Running each case once. Agents are non-deterministic, so a single pass tells you almost nothing. Run each case several times and report a rate, otherwise a flaky failure hides behind a lucky run.
- An offline set made of easy questions. If your test set is all happy paths, a passing score means very little. Weight it toward the ambiguous, adversarial, and error-recovery cases that actually break agents.
- No online monitoring after launch. Offline numbers go stale the moment real traffic shifts. Without sampling and alerts on live runs, your first signal that something broke will be an angry customer, not a dashboard.
- An uncalibrated LLM judge. A judge model is convenient but it has its own opinions and blind spots. Check it against a set of human-labeled examples regularly, or you are scaling up a measurement you do not trust.
- Ignoring cost and latency until the bill arrives. A model that retries three times can quietly double your cost per task and blow your latency budget. Track both from day one, not after finance asks.
A decision framework: which metrics to prioritize
You cannot tune everything at once, and not every agent needs the same emphasis. Match your priority metrics to what the agent does and what it costs to be wrong.
Use task success rate and groundedness as your top two when the agent is informational: it answers questions, summarizes data, or drafts content from your systems. Here the worst outcome is a confident wrong answer, so faithfulness is the wall you defend. A read-only data agent lives or dies on these two.
Prioritize tool-call accuracy and escalation or safety metrics when the agent takes actions that change state: updating a CRM record, issuing a refund, closing a ticket, sending a message to a customer. The cost of a wrong action is far higher than a wrong sentence, so the bar for argument correctness and for correctly pausing on risky steps should be near-perfect. This is exactly where human-in-the-loop approvals, least-privilege access, and audit logs do double duty: they cap the damage of a failure and they give you the trace data your evals need.
Lean on latency and cost per task when the agent runs at high volume or on a schedule: a support triage agent handling thousands of tickets, or a reporting agent that has to finish before the 8 a.m. Slack delivery. At that scale, a small per-task cost or a tail-latency spike multiplies into a real number. Onpilot agents that deliver scheduled work to Slack, Teams, or email with approvals and audit logs make these signals easy to watch, because every run leaves a record you can sample and grade.
“Match the metric to the blast radius. Informational agents defend groundedness; action-taking agents defend tool accuracy and safe escalation.”
Turning evaluation into a habit, not a launch checklist
Evaluation is not a gate you pass once and forget. The model under your agent changes, your data changes, and your users change, so an agent that scored 92 percent at launch can drift to 80 percent in a quarter without a single line of your code changing. The teams that keep agents reliable treat evaluation as a standing process, not a pre-launch ritual.
The loop is simple to state and easy to skip. Keep a versioned offline set as your regression gate. Sample live traffic and auto-grade it. When something fails in production, pull the trace, fix the cause, and add that exact case to your offline set so it is covered forever. Over a few months your offline set stops being a guess and becomes a fingerprint of every way your agent has ever broken, which is the most valuable artifact your evaluation program produces.
Start small. You do not need a research-grade harness on day one. A few dozen real cases, the seven core metrics, multiple runs per case, and one alert on groundedness in production will already put you ahead of most teams shipping agents. Add depth where the failures cluster, and let your trace data tell you where to look next.
Frequently asked questions
What are the most important AI agent evaluation metrics?
+
The core seven are task success rate, tool-call accuracy, groundedness (faithfulness), latency, cost per task, escalation rate, and safety or refusal behavior. The first three tell you if the work is correct, latency and cost tell you if it is affordable, and escalation and safety tell you whether the agent hands off to a human when it should. Together they catch the main ways an agent fails.
What is the difference between offline and online agent evaluation?
+
Offline evaluation runs the agent against a fixed test set with known good outcomes, before launch, so you can compare versions and catch regressions. Online evaluation scores the agent on live traffic, after launch, by sampling real runs and setting alerts. Offline is your stable yardstick and pre-launch gate; online catches the edge cases and distribution shifts your test set could not anticipate.
What is tool-call accuracy and why does it matter?
+
Tool-call accuracy measures whether the agent chose the correct tool for a sub-task and passed the correct arguments to it. It splits into tool selection (right tool) and argument correctness (right fields and values). It matters because the right tool with wrong arguments can still corrupt a record or trigger a wrong action, and tool mistakes are usually the single largest cluster of agent failures.
What is groundedness or faithfulness in agent evaluation?
+
Groundedness, also called faithfulness, measures whether the claims in the agent's output are actually supported by the data it retrieved or the tool results it received. It is the main metric for catching hallucinations. A grounded answer cites or reflects real source data with no invented numbers, names, or facts, which is why it is the metric most likely to look fine in a demo and fail on harder edge cases.
How do you measure task success rate for an AI agent?
+
Task success rate is the share of requests where the agent fully completed the original ask. You measure it either by comparing the result to a ground-truth expected outcome, or by using an LLM-as-judge prompt that scores success against what the user actually requested rather than against a fluent-sounding reply. Because agents are non-deterministic, run each test case several times and report a rate instead of a single pass or fail.
What is LLM-as-a-judge and is it reliable?
+
LLM-as-a-judge uses a language model to score agent outputs on open-ended qualities like usefulness, reasoning quality, and groundedness, which do not have a single correct string to match against. It scales far better than hand-grading, but it has its own biases. To trust it, calibrate the judge against a set of human-labeled examples and re-check that agreement over time, especially for high-stakes use cases.
How often should you re-evaluate an AI agent after launch?
+
Continuously, not just once at launch. Keep a versioned offline set as a regression gate that you re-run whenever you change the prompt, model, or tools, and sample live traffic on an ongoing basis with alerts on latency, cost, escalation rate, and ungrounded answers. Agents drift as the underlying model, your data, and user behavior change, so a single launch checklist is not enough.
What is a good escalation rate for an AI agent?
+
There is no universal number; the right escalation rate depends on the risk of the actions the agent takes. An agent that moves money or changes records should escalate or pause for human approval on those steps almost every time, while a read-only informational agent may rarely need to. The goal is for escalation to track the blast radius of being wrong, not to drive the number to zero.
Related
Build agents you can actually measure
Onpilot agents take governed action across your tools and leave an audit trail on every run, so sampling and grading production behavior is straightforward. Start with the developer docs to wire up your first agent.
Read the developer docs