Setup
- Python
Usage
Once initialized, all Pydantic AI agent runs and tool invocations are captured automatically:What Gets Captured
| Attribute | Description |
|---|---|
| Agent runs | Each agent.run() / agent.run_sync() / agent.run_stream() invocation |
| Tool calls | Each tool invocation with input arguments and results |
| LLM calls | Raw completion requests with input messages, output messages, and model name |
| Tokens & Cost | Input and output token counts per LLM call; cost calculated from model pricing |
| Cache tokens | Cache read and write token counts when reported by the provider |
| Latency | Duration per agent run and per span |
Run the example
Clone the repo and run a complete agent end-to-end.Python
Run the Python example