Agent Logs: Trace Tool Calls, Retries, and Outcomes
Connect agent runs to their tool calls, permissions, retries, parallel work, and final outcomes through a clear execution record.
Explore agent traces, tool attempts, authorization decisions, retry relationships, parallel branches, and verified execution outcomes.
An agent run can include model calls, several tools, parallel branches, and waiting periods. Give the run a stable identity and preserve the relationship between its logical steps. A tool call should have a distinct identifier, while each execution attempt should show whether it is an initial attempt, a retry, or later reconciliation work.
Use stable names for operations and safe resource references. Keep customer text and full arguments out of span names. Record which observable decision selected a branch or ended a step, using bounded reason codes and relevant configuration versions where they explain the application’s behavior.
Describe argument validation, authorization, execution, and result validation separately when their outcomes can differ. A requested action does not establish that it was permitted, and a successful transport response does not establish that the requested change occurred. Preserve the evidence the application used to make that determination.
For human review, connect the decision to the exact action version that was reviewed. Record declines and expiration as meaningful outcomes. After an uncertain remote result, use a reconciliation operation to establish what happened before treating a repeated change as safe.
Define terminal states for completed, partial, declined, cancelled, and unresolved runs. Record outstanding operation references when work continues or its outcome remains unknown. Parallel steps can overlap, so keep total run duration separate from the sum of individual operation durations.
Read the complete agent tool-tracing guide for retries, queues, permissions, and final run records. The suggested fields below help reconstruct a run; adapt them to the application’s actual execution and approval boundaries rather than treating them as a framework-independent specification.
Illustrative field suggestions for your own event contract. Adapt the names, values, and collection rules to your system.
| Field | What it helps explain |
|---|---|
run_id | Identify the overall application task. |
step_id | Connect a logical unit of work to its run. |
tool_call_id | Identify the intended operation across attempts. |
attempt_number | Distinguish an initial execution from a retry. |
authorization_outcome | Record the decision allowing or declining execution. |
execution_outcome | Preserve the confirmed or unresolved result. |