agent_trace — a structured record of what your agent did. They’re framework-agnostic: works with LangChain, LlamaIndex, CrewAI, or any custom agent.
Development protocol: complete judgments
The unreleasedagent-judgments/v2 protocol requires a complete Yes/No verdict
for every requested criterion. An ambiguous response or provider failure leaves
the evaluation unmeasured; it cannot shrink the denominator or become a passing
vote. Unexpected grader exceptions remain evaluator errors. Reports retain the
attempted prompts, raw replies and verdicts in
metadata.evaluation_evidence, including on failed suite evaluations and saved
trials. These records can contain the task and tool results: apply your normal
report access controls. They do not capture provider requests, usage, hidden
SDK retries or process interruption.
All seven LLM agent evaluators accept judge=JudgeConfig(...). The three
itemwise graders (ToolArgumentAccuracy, ToolCallNecessity,
StepFaithfulness) accept max_items=8. A longer trace is skipped before
any judgment call; increase the limit deliberately to grade every item.
Required-check policies treat missing measurements as indeterminate.
A missing trace (None) is not evidence of no tool use. An observed empty
trace ([]) has no argument-quality or necessity denominator, so those checks
skip. To assert that no tools were called, use ToolCallAccuracy with
expected_tool_calls=[] and an observed trace.
These LLM scores are heuristics over supplied evidence. For industrial tool
workflows, validate tool arguments against the actual schema and verify final
state using environment outcome checks.
TaskCompletion alone cannot prove that a payment, database update or other
external action happened. Tool and memory evidence is passed without silent
prefix truncation; provider context limits still apply.
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.
When
require_order=True, the expected tools are matched as an ordered
subsequence. Unrelated calls may appear before, between, or after them; reversed
expected calls receive partial credit and still fail at the default threshold.
Set penalize_unexpected=True when extra calls should reduce the score.
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.max_items (default 8); skips longer traces. Requires a nonempty tool-call 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.- Does the plan address the task?
- Are the steps in a logical order?
- Are there unnecessary or redundant steps?
- Is anything missing?
case.agent_trace.
TaskCompletion
LLM judge that evaluates whether the agent’s final output actually satisfies the original task. When to use: A judge assessment of whether the supplied output addresses the task. Pair it with deterministic outcome checks when success depends on external state.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.max_items (default 8); skips longer traces. 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.Scoring
max_items (default 8).
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
Judge heuristic for redundant steps and recovery. It does not measure an optimal path or compare against an optimal controller.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 when a tool result contains the text
error (case insensitive). This heuristic can mistake a successful result for a failure or miss a failure without that word. An ambiguous recovery verdict invalidates the entire measurement.
“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. Requirescase.context (prior session summary or log) and case.input (current query that needs memory).
- 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_outputis provided, does the response include it?
This grader is a context-use heuristic. It does not implement or reproduce a published memory benchmark.

