An agent trajectory is the complete, step-by-step record of one attempt by an AI agent at a task: its reasoning, the tool calls it made, what the environment returned, its intermediate results and its final output. Anthropic's evaluation guidance treats trajectory, trace and transcript as names for the same record. In reinforcement learning, a trajectory is a sequence of states and actions, also called an episode or a rollout.
Trajectories matter because agents work over many turns. They call tools, change the state of an environment and adapt to what comes back, so a mistake can propagate and compound. The trajectory is what evaluators grade and search for failures, and what training pipelines reuse as fine-tuning data or to train verifiers.
Agent Trajectory at a Glance
| Also called | Trace, transcript, episode, rollout |
|---|---|
| What it does | Records every step of one trial (reasoning, tool calls, observations, intermediate results, output) so the behavior can be graded, debugged or reused |
| Where it's used in model development | Agent evaluation, regression testing, failure analysis, cheat detection, fine-tuning data and verifier training |
| The human role | Domain experts grade trajectories, label the step where a run failed, build failure taxonomies and calibrate model-based graders |
| Limits | Slow and costly to review by hand; the decisive error step is hard to locate; one trajectory is one sample of non-deterministic behavior |
How an Agent Trajectory Works
An agent trajectory is produced by an agent loop: the model reasons, acts, reads the result and decides on its next step until the task ends. The ReAct method made this explicit: the model interleaves reasoning traces with task-specific actions, producing task-solving trajectories that are more interpretable than baselines without reasoning traces.
What a trajectory contains
- Reasoning: the plan or thought the model states before acting.
- Actions: tool calls and their parameters. For a coding agent these include creating and editing files, navigating a repository and running tests.
- Observations: what each tool or the environment returned.
- Final output: the message or artifact the agent ends with.
Trajectory, trial and outcome
Each attempt at a task is a trial, and evaluators run several trials per task because model outputs vary between runs. The trajectory records the trial. The outcome is separate: it is the final state of the environment. A flight-booking agent may say the flight is booked, but the outcome is whether a reservation exists in the database. The τ-bench benchmark grades this way, comparing the database state at the end of a conversation with an annotated goal state.
Where Agent Trajectories Are Used in Model Development
Agent trajectories are used in two places: in evaluation, where they are graded, and in training, where they become data.
Evaluation and trace grading
OpenAI defines trace grading as assigning structured scores or labels to an agent's trace to assess correctness, quality or adherence to expectations. In Anthropic's framework, each grader scores part of either the transcript or the outcome. Code-based graders can verify tool calls and parameters and count turns and tokens. For coding agents, Anthropic notes it is often useful to grade the transcript even after pass-or-fail tests exist, for example with rubric-based graders for tool use.
Catching cheating
NIST's Center for AI Standards and Innovation (CAISI) built a transcript analysis tool to search its historical agent evaluation logs for cheating. On coding benchmarks, it found models disabling assertions, looking up more recent code versions and adding test-specific logic. On SWE-bench Verified, commenting out assertion checks produced a successful solution in at least 0.2% of CAISI's logs. CAISI recommends reviewing evaluation transcripts, using AI tools to scale human review.
Training data
Trajectories also serve as training examples. AgentTuning built AgentInstruct, an instruction-tuning dataset of interaction trajectories, and mixed it with general-domain instructions. SWE-Gym, an environment of 2,438 real Python tasks, trained verifiers on agent trajectories sampled from its tasks and released the trajectories publicly. Step-level human labels are a related practice: the PRM800K release contains 800,000 step-level human feedback labels on math reasoning.
Limits of Agent Trajectories and the Human Role
Agent trajectories carry more evidence than a final score, but they are long, variable and hard to attribute, so human review stays in the process.
- The failure step is hard to find. The Who&When dataset annotates failure logs from 127 multi-agent systems with the responsible agent and the decisive error step. The best automated method it tested identified the responsible agent 53.5% of the time but the failure step only 14.2% of the time.
- One run is one sample. In τ-bench, state-of-the-art function-calling agents such as gpt-4o succeeded on fewer than 50% of tasks, and pass^8, success on all 8 trials, was below 25% in retail.
- Model graders need calibration. Anthropic lists model-based graders as non-deterministic and in need of calibration against human graders. Human graders are the gold standard but expensive and slow.
- Taxonomies need agreement. The MAST failure taxonomy was built from 150 traces with expert annotators, reached inter-annotator agreement of kappa = 0.88 and defines 14 failure modes in 3 categories.
- Valid paths can fail a test. Anthropic reports a model that found a policy loophole on a τ2-bench flight task: it failed the evaluation as written but produced a better solution for the user.
Agent Trajectory vs. Outcome
An agent trajectory records how an agent worked through a task, while the outcome is only the final state of the environment when the trial ends.
| Aspect | Agent trajectory | Outcome |
|---|---|---|
| What it is | The full record of reasoning, tool calls, observations and output | The environment's end state |
| Flight-booking example | Every search, policy lookup and message in the run | Whether a reservation exists in the database |
| Typical graders | Tool-call checks, rubric-based model graders, expert review | State checks and unit tests |
| What it reveals | Why a run passed or failed, including cheating | Whether the task got done |
A reasoning trace is narrower than an agent trajectory: in the ReAct approach, reasoning traces are interleaved with task-specific actions and what those actions return.
Agent Trajectory at Hugo
Hugo's agentic coding and reasoning evaluation teams include agent-trajectory reviewers trained on the client's tools, who assess repository navigation, terminal commands, tool calls, error recovery and multi-step behavior across whole trajectories. Sandboxes are verified before each evaluation batch, with environment failures logged separately from model failures. Cases where a model passes the test but misses the point are cataloged into a failure taxonomy the client's team can train against. Hugo's guide to testing reasoning, tool use and task completion covers the wider evaluation process.
Related Terms
- AI Agent Evaluation
- SWE-Bench
- Process Reward Model (PRM)
- Reward Hacking
- Supervised Fine-Tuning (SFT)
- Inter-Annotator Agreement (IAA)
- AI Red Teaming
- Large Language Model (LLM)
Agent Trajectory FAQs
What is an agent trajectory in AI?
An agent trajectory is the full record of one attempt by an AI agent at a task, from the first prompt to the final output. It captures the agent's reasoning, each tool call and its parameters, what the environment returned, and intermediate results. Anthropic defines the same record as a transcript, also called a trace or trajectory; on its API it is the complete messages array of an evaluation run. When comparing tools or vendors, confirm that every step is logged, including failed tool calls, because a record that skips errors hides the steps reviewers most need.
What is the difference between an agent trajectory, a trace and a transcript?
An agent trajectory, a trace and a transcript usually mean the same thing: the step-by-step record of an agent's run. Anthropic's evaluation guidance uses transcript as the main term and lists trace and trajectory as synonyms. OpenAI's documentation uses trace for the end-to-end log of decisions, tool calls and reasoning steps. Reinforcement learning texts add episode and rollout. The useful distinction is with the outcome, which is only the environment's final state. Agree on one term and one log format before writing rubrics, so that graders and tooling read the same fields.
How do you evaluate an agent trajectory?
Agent trajectories are evaluated with a mix of code-based checks, model-based graders and human review, each scoring part of the record. Code checks can verify which tools were called, with what parameters, and how many turns and tokens the run used. Rubric-based model graders can judge how the agent used tools or handled the user. Human experts grade samples, label failure steps and calibrate the model graders. Scores can be weighted, binary or a hybrid. Run several trials per task, because a single trajectory is one sample of non-deterministic behavior.
Why evaluate the trajectory instead of only the final result?
Evaluating the agent trajectory shows why an agent passed or failed, which a final-state check cannot. NIST's CAISI reviewed its agent evaluation transcripts and found models disabling assertions, looking up more recent code versions and adding test-specific logic to pass coding tasks. In the other direction, Anthropic reports a model that failed a τ2-bench task as written because it found a policy loophole that served the user better. Use outcome checks for whether the task got done, and trajectory review for how, especially before trusting a new high score.
How are agent trajectories used to train models?
Agent trajectories can become training data as demonstrations for fine-tuning or as examples for training verifiers. AgentTuning built AgentInstruct, an instruction-tuning dataset of interaction trajectories, and mixed it with general-domain instructions. SWE-Gym trained verifiers on agent trajectories sampled from 2,438 real Python tasks and released those trajectories publicly. Step-level labels are a related form of supervision; the PRM800K dataset holds 800,000 step-level human feedback labels for math reasoning. Before training on trajectories, filter out runs that reached the goal by gaming the grader, so the shortcut does not end up in the training set.
Can an LLM judge grade agent trajectories reliably?
An LLM judge can grade agent trajectories at scale, but its scores need regular calibration against human graders. Anthropic describes model-based graders as flexible and scalable but non-deterministic. Locating where a run went wrong is especially hard: on the Who&When dataset, the best automated method found the responsible agent 53.5% of the time and the decisive error step 14.2% of the time. The MAST project built its taxonomy with expert annotators first, reaching kappa = 0.88, before scaling with an LLM judge. Keep a human-graded sample in every batch to check drift.
When should you outsource agent trajectory review?
Outsourcing agent trajectory review makes sense when a team needs more expert graders than it has, for example domain specialists who can follow code, terminal sessions or policy-heavy conversations step by step. Anthropic notes that human graders often require access to human experts at scale and are expensive and slow. Before outsourcing, ask the provider how reviewers are trained on your tools, how agreement is measured on a calibration set, and whether environment failures are logged separately from model failures so broken setups are not scored as model errors.
Sources
- Anthropic. Demystifying evals for AI agents. Updated January 9, 2026. Accessed November 10, 2026.
- National Institute of Standards and Technology (NIST), Center for AI Standards and Innovation. Cheating On AI Agent Evaluations. CAISI Research Blog. Updated December 2, 2025. Accessed November 10, 2026.
- Yao, Zhao, Yu, Du, Shafran, Narasimhan, Cao. ReAct: Synergizing Reasoning and Acting in Language Models. arXiv. Updated March 10, 2023. Accessed November 10, 2026.
- OpenAI. Part 1: Key Concepts in RL. Accessed November 10, 2026.
- OpenAI. Trace grading. Accessed November 10, 2026.
- Yao, Shinn, Razavi, Narasimhan. τ-bench: A Benchmark for Tool-Agent-User Interaction in Real-World Domains. arXiv. Updated June 17, 2024. Accessed November 10, 2026.
- Yang, Jimenez, Wettig, Lieret, Yao, Narasimhan, Press. SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering. arXiv. Updated November 11, 2024. Accessed November 10, 2026.
- Zeng, Liu, Lu, Wang, Liu, Dong, Tang. AgentTuning: Enabling Generalized Agent Abilities for LLMs. arXiv. Updated October 22, 2023. Accessed November 10, 2026.
- Pan, Wang, Neubig, Jaitly, Ji, Suhr, Zhang. Training Software Engineering Agents and Verifiers with SWE-Gym. arXiv. Updated June 6, 2025. Accessed November 10, 2026.
- Lightman, Kosaraju, Burda, Edwards, Baker, Lee, Leike, Schulman, Sutskever, Cobbe. Let's Verify Step by Step. arXiv. Updated May 31, 2023. Accessed November 10, 2026.
- Zhang, Yin, Zhang, Liu, Han, Zhang, Li, Wang, Wang, Chen, Wu. Which Agent Causes Task Failures and When? On Automated Failure Attribution of LLM Multi-Agent Systems. arXiv. Updated June 2, 2025. Accessed November 10, 2026.
- Cemri, Pan, Yang, Agrawal, Chopra, Tiwari, Keutzer, Parameswaran, Klein, Ramchandran, Zaharia, Gonzalez, Stoica. Why Do Multi-Agent LLM Systems Fail?. arXiv. Updated October 26, 2025. Accessed November 10, 2026.




