Skip to main content
Agent evaluators work with agent_trace — a structured record of what your agent did. They’re framework-agnostic: works with LangChain, LlamaIndex, CrewAI, or any custom agent.

Setting up an agent trace

ToolCallAccuracy

Checks that the agent called the expected tools. By default, order doesn’t matter (set match). When to use: Regression testing — confirm that new model versions still call the right tools for standard tasks.
Score = fraction of expected tools that were called. When require_order=True, uses sequence alignment — partially correct order scores between 0 and 1. Requires case.agent_trace and case.expected_tool_calls.

ToolArgumentAccuracy

LLM judge that evaluates whether the arguments passed to tools were appropriate and well-formed. When to use: Catching argument-level bugs — wrong field names, missing required params, or semantically incorrect values — that tool call name checks miss.
Evaluates up to 8 tool calls. Requires case.agent_trace.

PlanQuality

LLM judge that evaluates the overall quality of the agent’s plan — logic, completeness, and efficiency. When to use: Evaluating the agent’s reasoning process, not just the outcome. Useful when debugging why an agent succeeds or fails on complex multi-step tasks.
Assesses:
  • Does the plan address the task?
  • Are the steps in a logical order?
  • Are there unnecessary or redundant steps?
  • Is anything missing?
Requires case.agent_trace.

TaskCompletion

LLM judge that evaluates whether the agent’s final output actually satisfies the original task. When to use: End-to-end success metric — the primary evaluator for whether the agent delivered. Use alongside trajectory evaluators to distinguish “right answer, bad process” from “wrong answer”.
Works with or without agent_trace — if no trace is attached, evaluates the final output alone.

StepFaithfulness

LLM judge that checks whether each step follows logically from the prior steps and the original task. When to use: Catching hallucinated reasoning steps — agents that invent observations, skip over failures, or take actions that contradict earlier tool results.
Evaluates up to 8 steps. Requires case.agent_trace.

ToolCallNecessity

Evaluates whether each tool call was actually needed, or if it was redundant given the context and what had already been done.
For each tool call, the judge sees all prior calls and asks: was this strictly necessary? Catches agents that over-call tools, re-fetch data they already have, or take “defensive” actions that add no value.

Scoring

Returns 1.0 if the agent made no tool calls. Capped at 8 tool calls per trace to control cost. Each tool call is evaluated independently with full prior-call context. The judge prompt is:
“Given what the agent already knows from prior tool calls, was calling {tool_name} with these arguments strictly necessary to make progress on the task?”

Example

TrajectoryEfficiency

Evaluates whether the agent took the most efficient path to the answer, and whether it recovered correctly from tool failures.

Scoring

Step 1 — Base score (average of 3 binary QAG questions): Each question is answered yes/no by an LLM judge. Base score = mean of the three answers (0.0–1.0). Step 2 — Error recovery penalty (runs only when failed tool calls are detected):
“Did the agent handle tool failures by retrying with different arguments, switching to an alternative approach, or signalling a clear failure — rather than silently continuing as if the call succeeded?”
If no: score = max(0.0, base_score - 0.2)

Example

AgentMemoryEval

Evaluates whether a multi-session agent uses prior context correctly — retrieving accurately, not hallucinating past context, and forgetting appropriately. When to use: Multi-session assistants, long-running agents, or any system that must carry state across separate conversations. Requires case.context (prior session summary or log) and case.input (current query that needs memory).
Assesses:
  • Does the response correctly use information from the prior context?
  • Does it avoid hallucinating facts not in the prior context?
  • Does it ignore superseded or stale information?
  • If expected_output is provided, does the response include it?
Aligned with AMA-Bench (2026), a benchmark for evaluating long-horizon memory in agentic applications.

Full agent eval example