Tracing records model calls, tool calls, handoffs and guardrails, and the traces appear in the OpenAI dashboard. A trace is the log for an agent run: it shows what the agent did, in order, so a wrong answer can be traced back to the step that produced it.
Before you start
You need a working OpenAI Agents SDK agent and access to the OpenAI dashboard. Pick one run where the answer matters, not a test greeting.
Run the agent and open its trace
Run the agent with a question that needs a tool, then open the trace for that run in the dashboard. The trace lists the model calls, the tool calls with their arguments, any handoffs, and any guardrail checks, in the order they happened.
Match each fact in the reply to a trace step
Take the final reply and match each fact in it to a tool call in the trace. A fact with no matching tool call is a guess, even if it happens to be right. If a tool was called with the wrong arguments, fix the tool description or the instructions, not the model.
Worked example: One traced run for a fictional support agent
Northwind Support is a fictional help desk. One agent run answered a question about order 1042. The table is the trace.
| Step | What the trace shows |
|---|---|
| 1 | Model call: reads the question about order 1042 |
| 2 | Tool call: order lookup for 1042 |
| 3 | Tool result: order 1042 is out for delivery |
| 4 | Model call: writes the reply |
Expected result (UNTESTED): the trace shows the order lookup before the reply, and the reply matches the returned status. We checked the OpenAI Agents SDK guides, which describe tracing as the record of every step, but we did not open a live trace.
Limits
A trace shows what happened, not why the model chose it. A missing call can mean the model decided against the tool, or that the tool description was unclear, and the trace alone cannot tell those apart. Keep traces for a week so a bad answer can be checked after the fact.
