trace

Writes a message to the execution trace that developers see when validating a draft. The command has no effect in production.

Value

ValueTypeDefaultDescription
the command's valuedynamic stringTraces execution. Shown when the agent is validated.

Example

"db": { "profile": "orders", "sql": "SELECT id FROM orders WHERE status = 'open'" },
"trace": "{ f'Found {len(result)} open orders' }"

Rules

  • The runtime already traces every command: the arguments, the result, tool calls and errors. Use trace for the values in between, which would otherwise be invisible.
  • The value is evaluated only when tracing is on, so an expensive expression here costs nothing in production.
  • Traces are not sent to the user and are not stored.