insideout Get Pro

10 · Traces you can debug from

Pro

Agents, lesson 10

Traces you can debug from

Record every step so a failed run can be explained.

You know the agent loop and the controls around it: retries ("When a tool call fails"), caps ("Knowing when to stop") and the tool gate ("Limits on what an agent may do").

Part 1. Why the final answer isn't enough

A customer was refunded $80 for a $40 order. The agent's final message says "Refunded the duplicate charge." Your server log has one line: refund issued: 80.00. Neither tells you why.

To find out, you need the whole run: what the model saw at each step, what it asked for, what came back. Laid out in order, it shows the cause at step 4. search_payments returned both the original charge and the duplicate, and the model added them up instead of picking one.

Your turn

Which record would have let you find that cause fastest?

The mistake happened in the model's reading of one tool result. Only a record of each step's input and output shows that. Final answers show the symptom, metrics show that something is off, and the step-by-step record shows where.

Trace

The full record of one run: every model call, tool call, retry and decision, in order and nested, with timings, inputs and outputs. It's the main tool for debugging an agent.

Part 2. Spans inside spans

Keep going with Pro

You've done the first part. Pro opens the rest of this lesson, and every other one.

Still to come
  1. Spans inside spans
  2. Reading a trace
  3. From one trace to a hundred
  4. What to keep, and what to leave out

Agents overviewSpotted a mistake? Tell us.