Task, Tool and Planning Metrics
Measure what the agent achieved first, then how it got there, how often it can repeat it and what it cost.
Start with task success, judged by what changed in the world. Add tool and planning measures to explain failures, grounding for factual claims, consistency across repeated trials, safety violations as a separate count and cost and time per successful task. Report each by slice, with the number of trials.
What you will learn: precise definitions for outcome, tool, planning, grounding, consistency and efficiency metrics, how to compute them from traces and how to avoid misleading numbers.
Prerequisites: Agent Evaluation Framework and The Agent Loop: Observe, Reason, Plan, Act, Reflect.
The example runs in November 2026 with Python 3.13 and only the standard library. The eight trials and their prices are invented.
Four questions, in order
Work from the top down. A fast, cheap, tidy run that cancels the wrong order has failed. Behavior metrics are mainly diagnostic: they tell you why outcomes moved. Release decisions should rest on outcomes and safety, supported by the rest.
Task success and completion
A task is one situation with a goal. A trial is one attempt at it. Task success rate is the share of trials that met every required condition. Where possible, inspect the outcome, meaning the final state of the environment, rather than the agent's own report. A message saying "your booking is confirmed" is a claim; a booking record is evidence.
| Metric | Definition | Notes |
|---|---|---|
| Task success rate | Trials meeting all criteria ÷ trials | The headline measure |
| Completion rate | Runs that reached a final state ÷ runs | Finishing is not the same as succeeding |
| False success rate | Runs that claimed success but failed ÷ claimed successes | Measures how far the agent can be believed |
| Escalation rate | Runs handed to a person ÷ runs | Split into correct and unnecessary handovers |
| Abandonment rate | Users who left before completion ÷ conversations | An online measure with many possible causes |
| Partial credit | Weighted share of subgoals met | Shows progress on long tasks |
An agent that completes nine of ten steps in a money transfer has not done 90 percent of a transfer. Use partial credit to study progress, and keep a strict all-or-nothing measure for decisions.
Write each metric down precisely
Two teams can both report "accuracy" and mean different things. For every metric, record:
- The unit: a trial, a task, a tool call or a user.
- The numerator and denominator.
- What happens to errors, timeouts and refusals. Dropping them raises the score.
- The grader that decides, and its version.
- The direction that is better and the threshold that triggers action.
A timeout that never reaches the grader should normally count as a failure. If you exclude it, say so and report the count beside the score.
Tool selection and execution
| Metric | Question | Computation |
|---|---|---|
| Tool precision | Were the calls appropriate? | Calls to expected tools ÷ all calls |
| Required call recall | Did needed calls happen? | Required calls made ÷ required calls |
| Argument accuracy | Were the values right? | Calls with correct arguments ÷ correctly named calls |
| Schema validity | Did calls match the contract? | Valid calls ÷ proposed calls |
| Execution success | Did the tool work? | Successful executions ÷ executions |
| Recovery rate | After an error, did the run still succeed? | Successful runs with errors ÷ runs with errors |
| Unnecessary call rate | Was effort wasted? | Calls not needed ÷ all calls |
Keep model faults and system faults apart. A valid call that fails because a service is down says nothing about tool selection. Several different calls can also be acceptable, so list alternatives in the expected data or grade the outcome.
Planning quality and step efficiency
Planning is harder to score than tool use because good plans can differ. Combine simple counts from the trace with a rubric for what counts cannot see.
| Measure | What it reveals | Caution |
|---|---|---|
| Steps per successful task | Directness | Fewer is not better if checks are skipped |
| Step efficiency | Reference steps ÷ actual steps | The reference path is one option, not the only one |
| Repeated call rate | Loops and forgotten results | Some polling is legitimate |
| Replan rate | How often the plan changed | High after tool errors may be healthy |
| Invalid step rate | Actions impossible in the current state | Needs state-aware checks |
| Stop correctness | Stopped when done, blocked or out of budget | Judge early and late stops separately |
A plan rubric can ask: were prerequisites handled in the right order, were assumptions checked, was a needed question asked, and did the agent verify the result? See How Agents Reason and Decompose Tasks and Agent Decisions: Confidence, Stopping, Loops and Budgets.
Groundedness, faithfulness and citations
These measures ask whether statements are supported by the evidence the agent had. Support and truth are different: an answer can faithfully repeat a document that is wrong.
| Metric | Definition |
|---|---|
| Claim support rate | Factual claims supported by supplied evidence ÷ factual claims |
| Citation precision | Citations that support their sentence ÷ citations given |
| Citation coverage | Claims needing a source that have one ÷ claims needing a source |
| Answer correctness | Claims that agree with trusted ground truth ÷ claims checked |
| Abstention quality | Correct "I cannot tell" answers when evidence is missing |
Scoring these usually means splitting an answer into claims and judging each, by people or a calibrated model grader (LLM Judges, Human Review and Ratings). Measure retrieval separately so you know whether the evidence ever arrived (RAG Evaluation, Grounding and Debugging).
Safety and policy measures
Report these on their own line. Do not average them into a quality score, because ten good answers do not cancel one data leak.
- Forbidden action attempts and, separately, completed forbidden actions.
- Required approvals skipped.
- Harmful compliance: requests that should have been refused but were carried out.
- Over-refusal: permitted requests that were declined.
- Sensitive data exposure in outputs, logs or tool arguments.
An attempt that a control blocked is still worth counting. It shows how much you depend on that control (Safety, Robustness and Adversarial Testing).
Consistency: pass@k and pass^k
Two metrics answer opposite questions about k attempts. pass@k is the chance that at least one succeeds, which suits settings where you can check results and keep a good one. pass^k, introduced in the tau-bench paper, is the chance that all k succeed, which suits services where each user gets one attempt and expects it to work.
If attempts were independent and each succeeded 75 percent of the time, three in a row would succeed about 42 percent of the time. When you estimate from a finite set of trials without assuming a rate, the tau-bench authors count combinations: with c successes in n trials, the estimate is the number of ways to choose k successes from c, divided by the ways to choose k trials from n, then averaged across tasks.
Compute metrics from traces
"""Compute agent metrics from recorded trials (invented data)."""
from math import comb
# Each trial: task, goal met, tool calls as (name, arguments), cost in USD.
EXPECTED = {
"refund": [("get_order", {"id": "A1"}), ("refund", {"id": "A1", "amount": 20})],
"status": [("get_order", {"id": "B2"})],
}
ok_refund = EXPECTED["refund"]
ok_status = EXPECTED["status"]
TRIALS = [
("refund", True, ok_refund, 0.04),
("refund", True, [ok_refund[0], ok_refund[0], ok_refund[1]], 0.06),
("refund", False, [ok_refund[0], ("refund", {"id": "A1", "amount": 200})], 0.05),
("refund", True, ok_refund, 0.04),
("status", True, ok_status, 0.01),
("status", True, ok_status, 0.01),
("status", True, ok_status + [("list_orders", {})], 0.02),
("status", True, ok_status, 0.01),
]
def key(call):
return call[0], tuple(sorted(call[1].items()))
def pass_k(successes, trials, k):
"""Unbiased estimate that all k independent attempts succeed."""
return comb(successes, k) / comb(trials, k)
def report(trials):
called = right_name = right_args = needed = found = repeats = 0
for task, _, calls, _ in trials:
want = EXPECTED[task]
want_names = {c[0] for c in want}
want_keys = {key(c) for c in want}
called += len(calls)
right_name += sum(c[0] in want_names for c in calls)
right_args += sum(key(c) in want_keys for c in calls)
repeats += len(calls) - len({key(c) for c in calls})
needed += len(want_keys)
found += len(want_keys & {key(c) for c in calls})
wins = sum(t[1] for t in trials)
spend = sum(t[3] for t in trials)
print(f"task success {wins}/{len(trials)} = {wins / len(trials):.1%}")
print(f"tool name precision {right_name / called:.1%}")
print(f"argument accuracy {right_args / right_name:.1%} of correctly named calls")
print(f"required call recall {found / needed:.1%}")
print(f"repeated calls {repeats / called:.1%}")
print(f"cost per success ${spend / wins:.4f}")
print()
for task in EXPECTED:
rows = [t[1] for t in trials if t[0] == task]
c, n = sum(rows), len(rows)
print(f"{task}: pass^1={pass_k(c, n, 1):.2f} pass^3={pass_k(c, n, 3):.2f}")
if __name__ == "__main__":
report(TRIALS)
Output:
task success 7/8 = 87.5%
tool name precision 92.9%
argument accuracy 92.3% of correctly named calls
required call recall 91.7%
repeated calls 7.1%
cost per success $0.0343
refund: pass^1=0.75 pass^3=0.25
status: pass^1=1.00 pass^3=1.00
Success looks respectable at 87.5 percent, yet the refund task succeeds three times in a row in only an estimated 25 percent of samples. That differs from the 42 percent above because it is estimated from just four trials, where one failure weighs heavily. The failing trial also shows why argument accuracy matters: the tool was right and the amount was ten times too large. A real system should block that call in code, whatever the metric later says.
Latency, cost and throughput
| Metric | Report as | Why |
|---|---|---|
| End-to-end latency | Median and 95th percentile | Averages hide slow tails |
| Time to first useful output | Percentiles | What users feel in interactive work |
| Model and tool time | Per step | Shows where to optimize |
| Tokens per task | Input, cached and output | Main cost driver for many agents |
| Cost per successful task | All spend ÷ successes | Counts the price of failures |
| Human minutes per task | Review and correction time | Often larger than model cost |
| Throughput | Successful tasks per hour at a stated load | Capacity planning |
Dividing total spend by successes means a cheaper model that fails often can turn out more expensive. Agent Cost Model and Token Economics explains the full calculation, and What to Measure: Metrics, Dashboards and SLOs shows how to watch these in production.
Aggregate without hiding problems
- Slice first. Show results by task type, language, risk level and tool.
- Choose the average. Averaging by task gives each task equal weight; pooling trials favors tasks you ran more often.
- Show counts. "100 percent" on three trials is weak evidence.
- Add intervals so readers see the uncertainty (Continuous Evaluation, Statistics and Scorecards).
- List the worst failures beside the summary.
Suppose 90 easy tasks all pass and 8 of 10 high-risk tasks fail. The overall rate is 92 percent. The high-risk rate is 20 percent. Only the second number should drive the release decision.
When a metric becomes a target
| If you reward | You may get | Pair it with |
|---|---|---|
| High completion rate | Confident answers instead of escalation | Verified success and false success rate |
| Low escalation | Risky autonomy | Safety violations and complaint rate |
| Few steps | Skipped verification | Required-check coverage |
| Low cost | Weaker results and more rework | Cost per success and human minutes |
| Low over-refusal | Harmful compliance | Both refusal measures together |
| Grader score | Output shaped to please the grader | Human samples and environment checks |
Metrics for multi-agent and long-running work
Score the whole system on the same outcome measures as a single agent, so the comparison is fair. Then add handoffs per task, repeated or conflicting work, messages per success, time waiting for other agents and which component caused each failure. For long tasks, add checkpoints reached, recovery after interruption and the share of runs that needed a person partway through. More agents must earn their extra cost in the outcome numbers (Single-Agent vs Multi-Agent Systems).
Choose a small set
A dashboard with forty measures gets ignored. Pick a headline outcome, two or three safety counts, two diagnostic measures for your known weak points and cost and latency per success. Review the set each quarter: add a measure when a failure slips past, and drop one that has never informed a decision.
| Agent type | Headline | Useful companions |
|---|---|---|
| Support | Verified resolution | Correct escalation, policy violations |
| Coding | Tests and review passed | Reverted changes, review minutes |
| Research | Correct, supported findings | Citation precision, missed key sources |
| Data analysis | Result matches trusted query | Unsafe query attempts, clarification rate |
| Operations | Correct state change | Duplicate actions, rollback rate |
Always compare with a baseline
A number on its own rarely supports a decision. Measure the same tasks with the alternatives that matter, using the same graders and the same rules for failures.
| Baseline | What the comparison tells you |
|---|---|
| The current manual process | Whether the agent is worth using at all, including error rates people already make |
| A fixed workflow or rules | Whether autonomy adds value over ordinary software |
| The released agent version | Whether a change is an improvement or a regression |
| A smaller or cheaper model | What the extra cost buys |
| A do-nothing or always-escalate policy | The floor; a metric that this policy wins is badly designed |
The last row is a quick test of your measures. If an agent that always hands work to a person scores well on safety and cost, you also need a measure of useful work completed. If an agent that always says it succeeded scores well, the grader is trusting words instead of checking outcomes.
Common mistakes
| Mistake | Better approach |
|---|---|
| Trusting the agent's success message | Check the system of record |
| Dropping timeouts from the denominator | Count them or report them beside the score |
| One trial per task | Repeat important cases and report consistency |
| Requiring one exact tool sequence | Grade outcomes and truly required steps |
| Blending safety into one quality score | Report violations separately with zero or tight limits |
| Cost per request | Cost per successful task |
Metrics checklist
- Every metric has a unit, numerator, denominator and owner.
- Task success is checked against environment state where possible.
- Errors, timeouts and refusals have a stated treatment.
- Tool and planning measures explain outcome changes.
- Safety violations are counted separately.
- Important tasks run several times and consistency is reported.
- Results are sliced and shown with counts and uncertainty.
- Cost and latency are reported per successful task and by percentile.
Frequently asked questions
What is a good task success rate?
It depends on the harm and cost of failure, so set the target from your process and compare with the current alternative.
Should the agent be scored on its reasoning text?
Use it for diagnosis, but base scores on outcomes and actions because the written reasoning may not reflect what drove them.
How many trials per task are needed?
Enough to separate the difference you care about from chance, with more for rare or serious failures.
Can one score summarize an agent?
A composite can help ranking, but keep the parts visible and never let it offset safety failures.
References and further reading
- tau-bench paper: state-based grading and the pass^k metric.
- Anthropic: demystifying evals for AI agents: outcomes, transcripts and consistency.
- NIST AI 800-3: statistical models and uncertainty for benchmark accuracy.
- Google SRE Book: service level objectives: percentiles and targets.
Next steps
LLM Judges, Human Review and Ratings
Score what code cannot check.
Continuous Evaluation, Statistics and Scorecards
Compare versions with sound statistics.
Product Analytics, KPIs and Outcomes
Link agent measures to user and business value.