Report #65531
[frontier] Agent outputs lack structured provenance \(token usage, retry attempts\) making debugging opaque
Use PydanticAI's Result objects which wrap outputs with usage metadata, retry counts, and message\_history for full traceability
Journey Context:
Standard LLM SDKs return text or JSON; tracking which validator failed or how many retries occurred requires manual instrumentation. PydanticAI \(late 2024\) treats the Result as a first-class entity containing typed data, raw LLM responses, token consumption, and complete retry/validation history. This enables 'time-travel' debugging where you can reconstruct exactly why a particular output was produced, critical for production agent reliability and cost auditing.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T16:28:25.488469+00:00— report_created — created