Read and analyze trace files from an agent preview session.
Reads trace files recorded during an agent preview session and outputs them in one of three formats.
--format summary (default): A per-turn narrative showing topic routing, actions executed, and the agent's response. Use this to quickly understand what happened in a session.
--format detail: Diagnostic drill-down into a specific dimension (--dimension required). Filters output to only the trace steps relevant to that dimension, minimizing noise.
--format raw: Unprocessed trace JSON. Use this as a fallback when the trace schema has changed or you need to perform custom analysis.
Available dimensions for --format detail: actions, grounding, routing, errors.
Use --turn N to scope output to a single conversation turn.
Session ID to read traces for.
Output format: summary (default), detail, or raw. Use detail with --dimension to drill into a specific aspect of the trace.
Dimension to drill into when using --format detail. One of: actions, grounding, routing, errors. Required when --format is detail.
Scope output to this conversation turn number.
--format detail requires --dimension. Specify one of: actions, grounding, routing, errors.
Session '%s' was not found in the local session cache. Run "sf agent trace list" to see available sessions.
No turn index found for session '%s'. Cannot filter by --turn without a turn index.
Turn %s was not found in session '%s'.
Trace parsing failed for all files: %s. The trace schema may have changed. Try --format raw to access unprocessed trace data.
--dimension is ignored when --format is '%s'. Use --format detail to drill into a dimension.
Trace parsing failed for some files (skipped): %s. Try --format raw to access unprocessed trace data.
No traces found for this session.
No '%s' data found in the traces for this session.
Turn
Topic
User Input
Agent Response
Actions Executed
Latency
Error
Action
Input
Output
Prompt
Response
Intent
From Topic
To Topic
Source
Error Code
Message
-
Show a session summary (all turns):
<%= config.bin %> <%= command.id %> --session-id <SESSION_ID>
-
Show summary for a single turn:
<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --turn 2
-
Drill into action execution across all turns:
<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --format detail --dimension actions
-
Drill into routing decisions for a specific turn:
<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --format detail --dimension routing --turn 1
-
Show all errors across the session:
<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --format detail --dimension errors
-
Output raw trace JSON for custom parsing:
<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --format raw
-
Return results as JSON:
<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --json