Agent Trajectory Evaluation
Agent trajectory evaluation scores the whole run, not only the final answer: context, decisions, tool calls, observations, state writes, approvals, artifacts, costs, and final outcome.
Why final-output evals are not enough
A chat answer can be judged at the end. An agent changes the world on the way to its answer. It reads files, calls tools, edits code, spends money, writes memory, asks for approvals, and leaves artifacts. The final message can look correct while the trajectory is unsafe, wasteful, irreproducible, or impossible to debug.
The Eval Loop (Slop Is an Output Problem) captures the core Kevin thesis: slop is an output problem and quality needs measurement. Agent trajectory evaluation extends that loop to autonomous work. The unit of evaluation becomes the run, not the sentence.
What counts as a trajectory
| Trace element | Evaluation question |
|---|---|
| Initial task and constraints | Did the agent preserve the user's actual intent and scope? |
| Context selection | Did it read the right files/docs/state before acting? |
| Plan and decomposition | Was the route coherent, minimal, and recoverable? |
| Tool calls | Were tools necessary, correctly parameterized, and permissioned? |
| Observations | Did the agent interpret results accurately and avoid context flooding? |
| State writes | Did it update memory, logs, artifacts, or tickets correctly? |
| Approvals and cancels | Did it pause when side effects required human consent? |
| Artifacts | Are patches, screenshots, reports, or outputs valid and reviewable? |
| Verification | Did tests, doctors, evals, or manual checks prove the result? |
| Cost and latency | Was the run proportional to the task's value and urgency? |
| Recovery | Could the run resume after failure or context compaction? |
OpenAI's Agents SDK tracing maps directly onto this model: traces and spans capture agent runs, model generations, function calls, handoffs, guardrails, and custom events. Source: OpenAI Agents SDK tracing docs, https://openai.github.io/openai-agents-python/tracing/, 2026-06-18
Metric families
| Family | Examples |
|---|---|
| Task success | tests pass, issue fixed, user goal met, patch accepted |
| Path quality | minimal steps, correct tool choice, no unnecessary broad search |
| Tool correctness | valid args, safe retries, no hallucinated capabilities |
| Safety and policy | secrets not leaked, destructive ops approved, network scope respected |
| State quality | memory/logs updated, no stale facts introduced, resumable checkpoint written |
| Observability | trace complete enough to replay/debug, artifacts linked |
| Cost/latency | token spend, wall time, machine time, API spend within budget |
| Human factors | clear progress, interruption honored, uncertainty surfaced |
IRL benchmark map
| Benchmark / system | What it evaluates | Limitation |
|---|---|---|
| SWE-bench | Real GitHub issues, patch generation, tests | Strong for software repair, weaker for runtime behavior outside code patches. Source: SWE-bench, https://www.swebench.com/, 2026-06-18 |
| Terminal-Bench | End-to-end terminal tasks with environments and tests | Closer to agent trajectory because the terminal path matters, but still benchmark-shaped. Source: Terminal-Bench, https://www.tbench.ai/, 2026-06-18 |
| tau-bench | Tool-agent-user interaction in realistic domains with policies | Good for multi-turn tool/user dynamics, but domain reward design can dominate behavior. Source: tau-bench, https://github.com/sierra-research/tau-bench, 2026-06-18 |
| OpenEnv | Standardized agentic execution environments with reset(), step(), state(), rewards, done, and optional MCP-backed tool actions |
Promising as an interface layer, but still experimental; reward design, env quality, and trainer logic remain outside the standard. Source: Hugging Face docs, https://huggingface.co/docs/openenv/index, accessed 2026-06-20; Hugging Face, https://huggingface.co/docs/openenv/guides/mcp-environment-lifecycle, accessed 2026-06-20 |
| OpenAI Agents SDK tracing | Production trace capture for runs, tools, handoffs, guardrails | Instrumentation layer, not an eval rubric by itself. |
| LangSmith / LangGraph ecosystem | Trace, evaluate, debug, and deploy agent graphs | Strong when the runtime is already graph-oriented. |
The state of the art is moving from "did the final answer match?" toward "did the agent take a good path through a real environment?" SWE-bench, Terminal-Bench, and tau-bench all push in that direction by involving repositories, terminals, APIs, policies, and user interactions.
Evaluation loop
- Capture traces for real runs.
- Label failure modes from traces, not imagination.
- Convert recurring failures into rubric items and regression cases.
- Score both final outcome and path quality.
- Gate risky deploys or autonomous actions on the score.
- Feed production failures back into the suite.
This is the trajectory version of the The Eval Loop (Slop Is an Output Problem) compounding arrow.
For non-symbolic trace quality, use BINEVAL-style atomic questions over each trace element: "did the agent read the nearest instructions?", "did it preserve the user's latest constraint?", "did a destructive action have an approval?", "did the verification command prove the edited surface?" The binary verdicts make a failed trajectory easier to repair than a single opaque run score. Source: arXiv:2606.27226
For Kevin's own agents, Agent Self-Improvement Eval Library is the first concrete receipt schema. It records events, commands, touched files, promoted pages, and hardening notes so a run can be checked after context compaction. The receipt is not the whole trace; it is the reviewable minimum needed to prove the agent followed the brain-first, skill-first, artifact-promotion, and closeout rules.
Leo Di Donato's "point another Codex at its trace logs?" reply is the practical test for trajectory evidence: a trace is good only if an independent reviewer or second model can reconstruct the actions, source choices, edits, and verification from it. If the trace requires the original agent to narrate what happened, the evaluation surface is still too weak. Source: X/@leodido, 2026-06-26
Kevin-stack implication
For wiki and agent work, a "done" claim should have trajectory evidence:
- relevant wiki pages searched or read,
- sources verified when facts are current,
- edits linked to the right pages,
- doctors/index/qmd rebuilt,
- tests or checks run,
- log updated,
- residual risk stated.
For Agent Machines, trajectory evaluation should become a product surface: run traces, tool calls, skill invocations, approvals, machine lifecycle, artifacts, and cost should be first-class review data.
OpenEnv is relevant if that product surface needs train/eval compatibility rather than only observability. Its simulation mode keeps MCP-backed tool calls inside the step() loop, so rewards, termination, and trajectory logging stay attached to the same environment actions. Production mode then exposes MCP directly for live clients without publishing the simulation control surface. Source: Hugging Face, https://huggingface.co/docs/openenv/guides/simulation-vs-production, accessed 2026-06-20
Timeline
- 2026-07-04 | Added the independent trace-audit test: trajectory evidence should be clear enough for another model or reviewer to inspect the run without relying on the original agent's final summary. Source: X/@leodido, 2026-06-26
- 2026-06-29 | Added the local self-improvement receipt runner as the first concrete Kevin-stack trajectory fixture. Source:
scripts/run-agent-self-evals.ts; User request, 2026-06-29 - 2026-06-26 | Linked Awesome Evals as the external source map for trajectory/world-state grading, benchmark integrity, verifiers, pass@k/pass^k, and agent-eval infrastructure. Source: GitHub
benchflow-ai/awesome-evals, 2026-06-26 - 2026-06-28 | Added BINEVAL-style binary questions as the rubric decomposition method for non-symbolic agent trace quality. Source: arXiv:2606.27226
- 2026-06-20 | Added OpenEnv as a watchlist item for trajectory-compatible agentic RL/eval environments, especially the simulation-vs-production split around MCP tool calls. Source: User request, 2026-06-20; Hugging Face docs, https://huggingface.co/docs/openenv/guides/simulation-vs-production
- 2026-06-18 | Created as the missing bridge between eval-loop, observability, benchmarks, and concrete agent runtimes. Source: whole-wiki graph audit, 2026-06-18