What is Trajectory?

Observability
Definition

The complete sequence of steps an AI agent took to produce an outcome: every model call, tool invocation, retrieval, guardrail check, and decision, captured in order with inputs, outputs, latency, and cost per step. The trajectory, not the API call, is the unit of observation for agentic systems.

Why It Matters

A single API call tells you almost nothing about an agent. A request that returns 200 OK in four seconds can hide twelve model calls, four tool invocations, and two agent handoffs underneath it, any of which may have gone wrong while the aggregate looked healthy. When someone reports “the agent got stuck,” the logs say that it failed; only the trajectory says where.

This is the core difference between monitoring a web service and observing an agent: the interesting failures live between the API boundaries, in the steps the agent chose to take.

How It Works

A trajectory is captured as a tree of spans, one per step, under a single run. Each span records its kind (model call, tool call, retriever, reranker, guardrail, evaluator, or handoff), its inputs and outputs, and its latency and cost. Reads this way, a failed run stops being a mystery. You can see the span that went wrong, you can identify the step that produced the bad output, and the run’s cost is attributable instead of discovered on an invoice.

The vocabulary comes from OpenTelemetry’s GenAI conventions, so trajectories land in whatever observability stack a team already runs.

Where It Breaks

Trajectories fail in two ways. The first is sampling: teams drop telemetry to control cost and lose exactly the unusual runs they needed to inspect. The second is aggregation: dashboards that roll spans up into averages hide the individual runs where agents misbehave. A trajectory practice that keeps every run, with per-call cost attribution, avoids both. The evidence for a bad run has to exist before anyone goes looking for it.

How Flytebit Handles It

Full-trajectory tracing is the first thing we instrument in an observability engagement: every model call, tool call, retrieval, and decision captured as a readable run, with eval scores and cost bounds attached to it. The reasoning behind trajectory-first observability is laid out in Observability for Agentic AI Governance.

Reviewed by Jayaveer Bhupalam, Founder & CTO Last updated September 24, 2026