AI agent evaluation checks the whole path an agent took, not just its final answer: which tools it called and with what inputs, whether each step followed from the last, how it recovered when something failed, what it cost, and whether it stayed inside its limits. In a multi-agent system it also checks every handoff, because one agent's mistake becomes the next agent's input.
Single-turn LLM evaluation is well-understood. But agentic systems—which use tools, make multi-step decisions, and recover from failures—break traditional evaluation frameworks. This article presents a framework for evaluating AI agents in five dimensions, how to capture what an agent did, where to put checks in a multi-agent system, and how to benchmark and monitor agents in production.
Why Agents Are Different
Traditional LLM evaluation asks: "Is this response correct?" Agent evaluation must ask:
- • Did the agent choose the right tools?
- • Was the reasoning process sound?
- • Did it recover from tool failures gracefully?
- • Was the final answer reached efficiently?
- • Did it avoid harmful actions?
The Five Dimensions of Agent Evaluation
1. Tool Selection Accuracy
What it measures: Did the agent choose the right tools for the task?
Evaluation approach: Compare tool calls against expert-labeled optimal tool sequences. Measure:
- Precision: % of tool calls that were necessary
- Recall: % of necessary tools that were called
- Efficiency: Did it use the minimum number of tools needed?
2. Reasoning Coherence
What it measures: Is the agent's step-by-step reasoning logical and goal-directed?
Evaluation approach: Analyze the agent's chain-of-thought for:
- Logical consistency: Do conclusions follow from premises?
- Goal alignment: Does each step move toward the objective?
- Information integration: Does it properly use tool outputs?
3. Failure Recovery
What it measures: How does the agent handle tool failures, ambiguous results, or dead ends?
Evaluation approach: Inject failures and measure:
- Retry strategy: Does it retry intelligently or give up?
- Alternative approaches: Does it try different tools/strategies?
- Graceful degradation: Does it provide partial answers when full success isn't possible?
4. Efficiency & Cost
What it measures: Does the agent achieve goals with reasonable resource usage?
Evaluation approach: Track:
- Number of LLM calls
- Number of tool invocations
- Total latency
- Total cost
5. Safety & Constraints
What it measures: Does the agent respect boundaries and avoid harmful actions?
Evaluation approach: Verify:
- No unauthorized tool access
- Respects rate limits and quotas
- Doesn't expose sensitive data
- Stays within defined scope
Evaluation Architecture
Agent evaluation requires capturing the full execution trace, not just the final output:
interface AgentTrace {
task: string;
steps: Array<{
thought: string;
action: {
tool: string;
params: Record<string, any>;
};
observation: {
result: any;
success: boolean;
latency: number;
cost: number;
};
}>;
finalAnswer: string;
totalLatency: number;
totalCost: number;
}
async function evaluateAgent(trace: AgentTrace) {
return {
toolSelection: evaluateToolSelection(trace),
reasoning: evaluateReasoning(trace),
failureRecovery: evaluateFailureRecovery(trace),
efficiency: evaluateEfficiency(trace),
safety: evaluateSafety(trace),
finalAnswer: evaluateFinalAnswer(trace)
};
}Multi-Agent Systems: Check Every Handoff
In a multi-agent system, check each agent's output before the next agent uses it. A check on the final answer alone can't tell you which agent made the mistake, and by then later agents have built on it: a wrong figure from a research agent becomes a confident recommendation two steps later.
Why errors compound across handoffs
If each agent in a chain gets a share p of its outputs wrong, and the errors are independent, the chance that the final answer carries at least one error after n agents is 1 − (1 − p)n. With five agents that are each right 95% of the time, that is 1 − 0.955, about 23%.
| Error rate per agent | 3 agents | 5 agents | 8 agents |
|---|---|---|---|
| 2% | 5.9% | 9.6% | 14.9% |
| 5% | 14.3% | 22.6% | 33.7% |
| 10% | 27.1% | 41.0% | 57.0% |
The per-agent rates are examples, not measurements, and real errors aren't fully independent. A later agent sometimes catches an earlier mistake. More often it rewrites the mistake into fluent, well-organized text, which makes it harder to spot at the end.
Research on real systems points the same way. A 2025 study annotated more than 1,600 traces from 7 popular multi-agent frameworks and found 14 ways these systems fail, in three groups: system design, misalignment between agents, and task verification (Cemri et al., "Why Do Multi-Agent LLM Systems Fail?", 2025). Two of the misalignment failures happen at handoffs: an agent withholding information another agent needed, and an agent ignoring another agent's input. Their verdict on checking: "sole reliance on final-stage, low-level checks is inadequate." Systems with an explicit checker step generally failed less often, but a checker that only confirmed the code compiled still passed a chess program that failed when played, because nothing checked it against the actual rules of chess.
Anthropic's guide to building agents makes the same recommendation for chained steps: add programmatic checks, which it calls gates, on intermediate steps to keep the process on track. It also warns that an agent's autonomy brings "the potential for compounding errors" (Anthropic, "Building effective agents", December 2024).
Where to put the checks
Put a check at each point where one step's output becomes another step's input:
- After retrieval: did the agent find the right documents, and does its summary say only what they say? A dropped qualifier ("in a small pilot") turns into a firm claim downstream.
- Before a tool call: are the inputs valid? Check that the table and column exist, the date range makes sense and the account belongs to the user.
- After a tool call: does the result match what was asked? A query for the fourth quarter that returns last year's rows is real data, but the wrong data, and later agents will treat it as fact.
- Between agents: does the message keep the facts, caveats and constraints the next agent needs?
- Before the user: is the final answer correct, complete, safe and in the format you asked for?
Fast rule-based checks (a required field is present, the format is right, no personal data leaks) are cheap enough to run at every handoff. Save model-based scoring for the handoffs where facts are created or combined, usually retrieval into analysis and the final answer. The checker should be a different model from the agent it checks; a model grading its own work shares its own blind spots.
Set a bar for each agent
Agents don't all need the same bar. A retrieval agent must stay close to its sources. An agent that writes the facts a customer reads needs the strictest correctness and safety checks. An agent that only reformats or routes text can pass with a looser bar. Start with the riskiest handoffs, measure how often each check fails, and add checks where the failures cluster. An agent whose output fails often needs a better prompt, model or tool, not just more checks.
Fix the failing step, not the whole chain
When a handoff check fails, repair or regenerate that agent's output and continue from there, instead of rerunning every agent. Log each failure with the input, the output and the check it failed. Over time that log becomes a test set for each agent: rerun it whenever you change a model, prompt or tool, and you'll see a regression before your users do.
Benchmarking Agents
Create task-specific benchmarks that test different agent capabilities, and run each task more than once. One successful run proves little: in τ-bench, a benchmark of agents serving simulated customers under company rules, GPT-4o agents completed fewer than half the tasks, and in the retail domain they succeeded on all eight tries of the same task less than 25% of the time (Yao et al., June 2024). Measure how consistently an agent succeeds, not just whether it can.
Simple Tasks
Single tool, clear objective. Tests basic tool selection and execution.
Example: "Search for the current weather in San Francisco"
Multi-Step Tasks
Requires chaining multiple tools. Tests reasoning and information integration.
Example: "Find the CEO of the company that makes the iPhone, then search for their latest tweet"
Adversarial Tasks
Inject failures or ambiguity. Tests failure recovery and robustness.
Example: "Search for X" but the search tool returns an error
Open-Ended Tasks
Multiple valid solution paths. Tests creativity and efficiency.
Example: "Research the impact of AI on healthcare and write a summary"
Continuous Monitoring
In production, track these metrics over time:
- Success rate: % of tasks completed successfully
- Average steps to completion: Efficiency indicator
- Tool error rate: % of tool calls that fail
- Retry rate: How often does the agent need to retry?
- User intervention rate: How often do humans need to step in?
- Failures per handoff: Which agent's output fails its check most often?
For how to set alert thresholds and spot quality drift over time, see LLM monitoring and drift detection.
DeepRails for agent handoffs
DeepRails scores what each agent writes, at the handoff, with six guardrail metrics: correctness, completeness, instruction adherence, context adherence, ground truth adherence and comprehensive safety. Every score comes from two different models judging in parallel. In DeepRails Defend, give each agent role its own workflow, with its own metrics, thresholds and fix: FixIt repairs a failing output, ReGen writes a new one, and Do Nothing records the failure. A failing step can then be corrected before the next agent reads it. DeepRails Monitor scores live traffic without changing it; label each event with the agent's name to see which step's scores are slipping. DeepRails doesn't score tool choice or step order, so check those from your traces as described above.
Read the Defend docsConclusion
Agent evaluation is multi-dimensional by necessity. A correct final answer doesn't mean the agent performed well—it might have taken an inefficient path, made unnecessary tool calls, or gotten lucky despite poor reasoning.
Build evaluation systems that capture the full execution trace, measure each dimension independently, and benchmark against task-specific criteria. In a multi-agent system, check every handoff with a model other than the one that did the work, and fix the failing step before the next agent builds on it. For the wider set of protections around an AI system, see what LLM guardrails are and how to use them.
DeepRails scores every AI answer and corrects hallucinations before users see them. If you're building AI agents and working out where to check them, book a free call.
Book a free call
