agents/api
Production

Tracing, usage & debugging

Follow a session from live events to saved history, tool calls, subagent activity, and token usage.

Session ID
Live events
Saved turns & items
Usage review
Fix & evaluate

Start from a session ID

The Platform dashboard Agents logs let you inspect sessions, turns, tool calls, and subagents. Record session identifiers alongside application request identifiers so a user-reported issue can be traced to the correct work.

Distinguish history from live progress

Streams show current activity; saved items and turns describe work already recorded. After a disconnect, retrieve history instead of expecting a new stream to replay every prior event. Handle pagination when reviewing long sessions.

Account for delegated work

Inspect recorded usage for root and subagent turns. Avoid assuming a single visible final answer represents only one model call. Compare usage with actual task outcomes and preserve enough context to reproduce errors without logging secrets.

Know the tracing surface

The public beta documentation describes dashboard tracing. Trace retrieval and external trace exporters are not part of the public beta API. Do not assume Agents SDK tracing integrations are interchangeable with the managed API.

Read the official reference

Check the source for current API fields, account requirements, and service limits.

OpenAI: observability