Choose a setup method
Start with one method for a call path. Combining SDK tracking with framework
OpenTelemetry on the same call can create duplicate interactions.
Recommended: Agnost AI skill
Recommended. Choose this path when you want your coding agent to inspect the
project, select a supported transport, make the smallest instrumentation change,
send a test event, and verify that it reached Agnost AI.
Manual setup: Agnost AI SDK
Manual setup: OpenTelemetry
Pydantic AI uses Logfire for instrumentation. Point Logfire’s OTLP exporter at Agnost AI and disable its hosted backend.Install
Setup
gen_ai.input.messages, gen_ai.output.messages, gen_ai.tool.call.arguments, gen_ai.usage.*) plus pydantic_ai.all_messages. gen_ai.conversation.id is emitted natively when message history is provided to the agent.
Caveats
Do not setLOGFIRE_TOKEN: that re-enables the hosted backend.
Verify
Run oneagent.run_sync call, then open Events in Agnost AI. Confirm gen_ai.* and pydantic_ai.* attributes are present.
Troubleshooting
- Keep
send_to_logfire=Falseif you do not want dual-send to Logfire. - Do not set
LOGFIRE_TOKENunless you explicitly want hosted Logfire enabled. - Confirm
OTEL_EXPORTER_OTLP_HEADERScontainsX-Agnost-Org-ID=<your-org-id>.
References
Next steps
- Conversations: review the complete Pydantic AI interaction.
- Events: inspect agent, model, and tool activity.
- Intents: organize production conversations by what users wanted.
