---
title: 'Agent trajectory'
description: 'The ordered record of states, model outputs, actions, tool results, and transitions produced during an agent run.'
canonical_url: 'https://darkfactory.dev/glossary/trajectory'
markdown_url: 'https://darkfactory.dev/glossary/trajectory.md'
collection: glossary
date_published: '2026-08-03T00:00:00-04:00'
date_modified: '2026-08-26T00:00:00-04:00'
---

# Agent trajectory


## Definition

An agent trajectory is the ordered sequence of states, model outputs, actions, tool results, and transitions produced during a run. It captures the path to an outcome, including failed attempts and intermediate decisions that a final answer hides.

Trajectory evaluation can detect unsafe, wasteful, or lucky behavior. An agent may reach the right result after reading prohibited data, repeating expensive calls, or ignoring a failed verification step. Outcome-only scoring would count the run as a success.

Useful trajectory records include timestamps, model and harness versions, tool inputs and outputs, state changes, costs, errors, and approval events. Sensitive reasoning data and user information still need access controls and retention limits.

## Distinguish it from nearby terms

A trajectory is the behavior sequence. A trace is the observability record captured about that sequence. A rollout or episode often refers to a sampled trajectory used for training or evaluation.

## Check your understanding

An agent passes a task because its fifth unbounded retry happens to work, after four actions that would have modified production. The outcome is correct; the trajectory shows why the system is not ready.

## Also called

episode, rollout, tool-call trajectory, tool trajectory

## Related terms

- [Trace](https://darkfactory.dev/glossary/trace)
- [Verification loop](https://darkfactory.dev/glossary/verification-loop)

## Related factory areas

- [Orchestration, state, concurrency & recovery](https://darkfactory.dev/factory/orchestration-state)
- [Verification, evaluation & quality truth](https://darkfactory.dev/factory/verification)

## Evidence and further reading

- [Google Machine Learning Glossary](https://developers.google.com/machine-learning/glossary/)
- [Shepherd: A Runtime Substrate Empowering Meta-Agents with a Formalized Execution Trace](https://arxiv.org/abs/2605.10913)
- [The Art of Loop Engineering: How to Build Agents That Improve Over Time](https://www.youtube.com/watch?v=jPPiZ22DY3g)
