agent trace delete

Delete trace files from an agent preview session.

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.

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).

Flag Name (Long)Flag Name (Short)Description
‑‑agent‑aType: Value

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‑dirN/AType: Value

Import flag values from a directory.
‑‑jsonN/AType: Boolean

Format output as json.
‑‑no‑promptN/AType: Boolean

Skip the confirmation prompt and delete immediately.
‑‑older‑thanN/AType: Value

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.
‑‑session‑idN/AType: Value

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.

Delete all traces for all agents and sessions; prompt for confirmation:

Delete all traces for a specific agent:

Delete traces from a specific session:

Delete traces older than 7 days:

Delete traces older than 24 hours for a specific agent; don’t prompt for confirmation:

Delete all traces for all agents and sessions; don’t prompt for confirmation: