> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usegradient.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Results and traces

> Read a graded run by scenario and by node, and use native agent traces (transcript, spans, and rubric grade) to turn a failing rule into a fix with an address.

Every conversation Gradient runs (a redteam fork, a dashboard chat, a phone call, an API turn) is recorded as a trace, automatically. There is nothing to instrument. A trace is where a graded run stops being a number and becomes something you can act on.

## What a trace holds

Each conversation produces a transcript (every turn, every node swap, every tool call with its arguments and response) plus, for a redteam, the final state of its [fork](/evaluate/datasets). Both feed [evaluation](/evaluate/rubrics): the transcript answers "what did it say," the tool calls and fork state answer "what did it do."

A trace opens on three tabs.

<Tabs>
  <Tab title="Transcript">
    The conversation as it happened: caller and agent lines, each tool call with its input, output, duration, and status, and the conversation variables a turn changed. Every line is attributed to the node it ran under. For voice, the transcript also shows what the caller actually heard: the greeting, holding phrases, and backchannels the engine played.
  </Tab>

  <Tab title="Spans">
    The waterfall beneath the dialogue: each turn, the model calls inside it, and the tool calls beneath those, with duration, tokens, and status. Expand any span for its raw input, output, and attributes: the view to reach for when a single turn misbehaved.
  </Tab>

  <Tab title="Rubric">
    The grade, rule by rule. Whole-conversation rules first, then a group per node, each rule a **pass**, **fail**, or **skip** badge with the judge's reason. **Grade this trace** runs the [rubric](/evaluate/rubrics) on demand; earlier grades stay as history.
  </Tab>
</Tabs>

The header carries the facts you scan for first: which agent and published version served the call, its duration, the tool-call count and token total, whether it is still ongoing, and, for voice, whether the agent or the caller hung up.

<Note>
  Agent traces are kept for a rolling window of 14 days. Copy the rendered transcript or the raw spans straight from a trace to paste into an issue.
</Note>

## Reading a run

A single trace tells you what one conversation did. A run's value is in the aggregate, and it rolls up two ways.

<CardGroup cols={2}>
  <Card title="By scenario" icon="list-check">
    Where to spend the next iteration. "Follow-up visits pass 61%" names a definition of correct the agent is not yet meeting.
  </Card>

  <Card title="By node" icon="diagram-project">
    Which prompt to edit. "`patient_lookup` failed 4 rules" names one node in the graph.
  </Card>
</CardGroup>

The node axis is what closes the loop. A failing rule is not a vague quality complaint; it is a work item with an address. It names the node; you open that node in the [builder](/build/agents), fix the prompt, publish a new version, and the next run tells you whether the number moved.

```mermaid theme={null}
flowchart LR
    T["Trace + grade"] --> N["Failing rule<br/>on a node"]
    N --> B["Edit that node<br/>in the builder"]
    B --> P["Publish a<br/>new version"]
    P --> Rn["Re-run"]
    Rn --> T
```

Because the same rubric grades production and redteam, this is one loop, not two. A regression the redteam surfaces before you ship and a regression a real caller hits after you ship land on the same scenario and the same node, and get fixed the same way.

<CardGroup cols={2}>
  <Card title="Rubrics, scenarios, and rules" icon="list-check" href="/evaluate/rubrics">
    The definition of correct that every grade is measured against.
  </Card>

  <Card title="Agents" icon="diagram-project" href="/build/agents">
    Open the failing node in the builder and edit the prompt.
  </Card>
</CardGroup>
