Skip to main content

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. 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.
Install the skill once in your coding-agent environment:
Run the framework-specific prompt below from the application root. Review the resulting diff before deploying it.

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

Spans use OTel GenAI semconv (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 set LOGFIRE_TOKEN: that re-enables the hosted backend.

Verify

Run one agent.run_sync call, then open Events in Agnost AI. Confirm gen_ai.* and pydantic_ai.* attributes are present.

Troubleshooting

  • Keep send_to_logfire=False if you do not want dual-send to Logfire.
  • Do not set LOGFIRE_TOKEN unless you explicitly want hosted Logfire enabled.
  • Confirm OTEL_EXPORTER_OTLP_HEADERS contains X-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.