From a87de4cba0481fd4d325b2ecd9035e5de0ec9a64 Mon Sep 17 00:00:00 2001 From: Juliet Shackell Date: Tue, 12 May 2026 11:10:50 -0700 Subject: [PATCH 1/2] fix: edit/embellish --help for new "agent trace X" commands --- messages/agent.trace.delete.md | 24 +++++++++-------- messages/agent.trace.list.md | 18 ++++++------- messages/agent.trace.read.md | 47 ++++++++++++++++++---------------- 3 files changed, 47 insertions(+), 42 deletions(-) diff --git a/messages/agent.trace.delete.md b/messages/agent.trace.delete.md index 32f23c6d..30cc334f 100644 --- a/messages/agent.trace.delete.md +++ b/messages/agent.trace.delete.md @@ -1,24 +1,26 @@ # summary -Delete agent preview trace files. +Delete trace files from an agent preview session. # description -Deletes trace files recorded during agent preview sessions. By default, shows a preview of what will be deleted and prompts for confirmation. Use --no-prompt to skip confirmation. +When you run an agent preview conversation (either interactive or programmatic), trace files are automatically recorded and saved in your local DX project. Use this command to delete some or all of the trace files. -Without filters, deletes all traces for all agents and sessions. Use flags to narrow the scope: filter by agent name (--agent), by session (--session-id), or by age (--older-than). +By default, this command shows a preview of what will be deleted and prompts for confirmation. Use --no-prompt to skip confirmation. + +Without filters, this comamnd deletes all trace files for all agents and sessions. Use flags to narrow the scope: filter by agent API name (--agent), by session (--session-id), or by age (--older-than). # flags.agent.summary -Only delete traces for this agent name (substring match). Matches against the name used when starting the session, whether that's an authoring bundle or a published agent API name. +API name of the agent used to filter the list of trace files you want to delete. Matches against the API name used when starting the session, either an authoring bundle or a published agent API name. # flags.session-id.summary -Only delete traces from this session ID. +Session ID used to filter the list of trace files you want to delete. Use the "agent preview sessions" CLI command to list all known agent preview sessions along with their session IDs. # flags.older-than.summary -Only delete traces older than this duration. Accepts a number followed by a unit: m/minutes, h/hours, d/days, w/weeks (e.g. 7d, 24h, 2w). +Duration used to filter the list of trace files; only files older than the duration are deleted. Accepts a number followed by a unit: m/minutes, h/hours, d/days, w/weeks. Examples: 7d, 24h, 2w. # flags.no-prompt.summary @@ -26,11 +28,11 @@ Skip the confirmation prompt and delete immediately. # error.invalidOlderThan -Invalid --older-than value: '%s'. Use a number followed by a unit: m/minutes, h/hours, d/days, w/weeks (e.g. 7d, 24h, 30m, 2w). +Invalid --older-than value: '%s'. Use a number followed by a unit: m/minutes, h/hours, d/days, w/weeks, Examples: 7d, 24h, 30m, 2w. # prompt.confirm -Delete %s trace file(s)? This cannot be undone. +Delete %s trace file(s)? This can't be undone. # output.noneFound @@ -62,7 +64,7 @@ Plan ID # examples -- Delete all traces for all agents and sessions (with confirmation prompt): +- Delete all traces for all agents and sessions; prompt for confirmation: <%= config.bin %> <%= command.id %> @@ -78,10 +80,10 @@ Plan ID <%= config.bin %> <%= command.id %> --older-than 7d -- Delete traces older than 24 hours for a specific agent, no prompt: +- Delete traces older than 24 hours for a specific agent; don't prompt for confirmation: <%= config.bin %> <%= command.id %> --agent My_Agent --older-than 24h --no-prompt -- Delete all traces without confirmation: +- Delete all traces for all agents and sessions; don't prompt for confirmation: <%= config.bin %> <%= command.id %> --no-prompt diff --git a/messages/agent.trace.list.md b/messages/agent.trace.list.md index 2ef4b3ea..78b81584 100644 --- a/messages/agent.trace.list.md +++ b/messages/agent.trace.list.md @@ -1,20 +1,20 @@ # summary -List the trace files that were recorded during all agent preview sessions. +List the available trace files that were recorded during all agent preview sessions. # description -Lists trace files recorded during agent preview sessions. By default, lists all traces for all agents and all of their sessions. Use flags to narrow results: filter by agent name (--agent), by session (--session-id), or by date (--since). +When you run an agent preview conversation (either interactive or programmatic), trace files are automatically recorded and saved in your local DX project. By default, this command lists all trace filess for all agents and all of their sessions. Use flags to narrow results: filter by agent name (--agent), by session (--session-id), or by date (--since). Each row in the output corresponds to one trace file, which in turn corresponds to one agent session. The Agent column shows the authoring bundle or API name used when starting the session. # flags.agent.summary -Only show traces for this agent name (substring match). Matches against the name used when starting the session, whether that's an authoring bundle or a published agent API name. +API name of the agent used to filter the list of available trace files. Matches against the API name used when starting the session, either an authoring bundle or a published agent API name. # flags.session-id.summary -Session ID used to filter the list of trace files. +Session ID used to filter the list of trace files. Use the "agent preview sessions" CLI command to list all known agent preview sessions along with their session IDs. # flags.since.summary @@ -58,23 +58,23 @@ Path # examples -- List all traces for all agents and sessions: +- List all trace files for all agents and sessions: <%= config.bin %> <%= command.id %> -- List all traces for a specific agent: +- List all trace files for a specific agent: <%= config.bin %> <%= command.id %> --agent My_Agent -- List traces for a specific session: +- List trace files for a specific session: <%= config.bin %> <%= command.id %> --session-id -- List traces recorded on or after April 20, 2026 (date-only, interpreted as UTC midnight): +- List trace files recorded on or after April 20, 2026 (date-only, interpreted as UTC midnight): <%= config.bin %> <%= command.id %> --since 2026-04-20 -- List traces recorded on or after a specific UTC time: +- List trace files recorded on or after a specific UTC time: <%= config.bin %> <%= command.id %> --since 2026-04-20T14:00:00Z diff --git a/messages/agent.trace.read.md b/messages/agent.trace.read.md index f6fb1de3..8d6796b4 100644 --- a/messages/agent.trace.read.md +++ b/messages/agent.trace.read.md @@ -1,64 +1,67 @@ # summary -Read and analyze trace files from an agent preview session. +Read trace files from an agent preview session. # description -Reads trace files recorded during an agent preview session and outputs them in one of three formats. +When you run an agent preview conversation (either interactive or programmatic), trace files are automatically recorded and saved in your local DX project. Each turn (utterance or response) of a conversation creates trace data. Use this command to view trace data for a specific preview session, so you can then analyze the trace data to observe, monitor, investigate, and troubleshoot agent events and behavior. -**--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. +Use the --format flag to specify one of these formats of the outputted trace data: -**--format detail**: Diagnostic drill-down into a specific dimension (--dimension required). Filters output to only the trace steps relevant to that dimension, minimizing noise. +- 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 preview session. +- detail: Diagnostic drill-down into a specific dimension. Filters output to only the trace steps relevant to that dimension, minimizing noise. +- raw: Unprocessed trace JSON. Use this as a fallback when the trace schema has changed or you need to perform custom analysis. -**--format raw**: Unprocessed trace JSON. Use this as a fallback when the trace schema has changed or you need to perform custom analysis. +If you specify "--format detail", you must also specify a dimension with the --dimension flag. Dimensions are a way to slice and analyze the agent execution trace from a specific angle or concern. Instead of looking at the raw sequence of everything that happened, each dimension filters and organizes the trace data to answer a specific type of question. These are the available dimensions and the information they provide: -Available dimensions for --format detail: actions, grounding, routing, errors. - -Use --turn N to scope output to a single conversation turn. +- actions: The actions the agent executed. Includes action name, input parameters, output, and latency. Use this dimension to understand what the agent actually did when answering an utterance in the preview session. +- grounding: The reasoning steps used by the LLM. Use this dimension to see how the agent "thought" about the problem - the AI reasoning that determined which actions to take. +- routing: How the agent navigated between subagents. Use this dimension to understand conversation flow - when and why the agent switched between different subagents or contexts during the conversation. +- errors: Aggregates all errors during the session. Use this dimension to quickly identify and debug issues across all steps. # flags.session-id.summary -Session ID to read traces for. +Session ID to read traces for. Use the "agent preview sessions" CLI command to list all known agent preview sessions along with their session IDs # flags.format.summary -Output format: summary (default), detail, or raw. Use detail with --dimension to drill into a specific aspect of the trace. +Output format of the trace data; specifies the level of detail you want in the trace files. # flags.dimension.summary -Dimension to drill into when using --format detail. One of: actions, grounding, routing, errors. Required when --format is detail. +Dimension to drill into when using "--format detail"; used to filter and organize the trace data to answer a specific type of question. # flags.turn.summary -Scope output to this conversation turn number. +Turn number for which you want trace data. A turn is a single utterance or response in a conversation, starting with 1. # error.detailRequiresDimension ---format detail requires --dimension. Specify one of: actions, grounding, routing, errors. +The "--format detail" flag requires --dimension. Specify one of: actions, grounding, routing, errors. # error.sessionNotFound -Session '%s' was not found in the local session cache. Run "sf agent trace list" to see available sessions. +Session '%s' wasn't found in the local session cache. Run "sf agent trace list" to see available sessions. # error.turnIndexNotFound -No turn index found for session '%s'. Cannot filter by --turn without a turn index. +No turn index found for session '%s'. Can't filter by --turn without a turn index. # error.turnNotFound -Turn %s was not found in session '%s'. +Turn %s wasn't found in session '%s'. # error.parseFailedAll -Trace parsing failed for all files: %s. The trace schema may have changed. Try --format raw to access unprocessed trace data. +Trace parsing failed for all files: %s. The trace schema may have changed. Try "--format raw" to access unprocessed trace data. # warn.dimensionIgnored ---dimension is ignored when --format is '%s'. Use --format detail to drill into a dimension. +The --dimension flag is ignored when --format is '%s'. Use "--format detail" to drill into a dimension. # warn.parseFailed -Trace parsing failed for some files (skipped): %s. Try --format raw to access unprocessed trace data. +Trace parsing failed for some files (skipped): %s. Try "--format raw" to access unprocessed trace data. # output.empty @@ -142,11 +145,11 @@ Message # examples -- Show a session summary (all turns): +- Show a session trace summary for all turns in the session with the specified ID: <%= config.bin %> <%= command.id %> --session-id -- Show summary for a single turn: +- Show a trace summary for the second turn (utterance or response) of the conversation: <%= config.bin %> <%= command.id %> --session-id --turn 2 @@ -154,7 +157,7 @@ Message <%= config.bin %> <%= command.id %> --session-id --format detail --dimension actions -- Drill into routing decisions for a specific turn: +- Drill into routing decisions for the first turn of the conversation: <%= config.bin %> <%= command.id %> --session-id --format detail --dimension routing --turn 1 From 9eafaec477a543d62cebd278daa91dee35227663 Mon Sep 17 00:00:00 2001 From: Esteban Romero Date: Tue, 12 May 2026 15:41:31 -0300 Subject: [PATCH 2/2] chore: fix typoe --- messages/agent.trace.list.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messages/agent.trace.list.md b/messages/agent.trace.list.md index 78b81584..87083486 100644 --- a/messages/agent.trace.list.md +++ b/messages/agent.trace.list.md @@ -4,7 +4,7 @@ List the available trace files that were recorded during all agent preview sessi # description -When you run an agent preview conversation (either interactive or programmatic), trace files are automatically recorded and saved in your local DX project. By default, this command lists all trace filess for all agents and all of their sessions. Use flags to narrow results: filter by agent name (--agent), by session (--session-id), or by date (--since). +When you run an agent preview conversation (either interactive or programmatic), trace files are automatically recorded and saved in your local DX project. By default, this command lists all trace files for all agents and all of their sessions. Use flags to narrow results: filter by agent name (--agent), by session (--session-id), or by date (--since). Each row in the output corresponds to one trace file, which in turn corresponds to one agent session. The Agent column shows the authoring bundle or API name used when starting the session.