Integrations / Pydantic AI

Trace Pydantic AI agents

To trace Pydantic AI with Tracify, wrap the agent run in trace_agent and record tools as steps, or send Pydantic AI's OpenTelemetry spans to Tracify over OTLP.

Your code

Pydantic AI

Tracify

One run.

  • 01One trace per agent run
  • 02Tool calls and validation failures
  • 03Model usage and cost
  • 04Retries in order

Setup

A few lines.

python
import tracify

@tracify.trace_agent(name="pydantic-agent")
async def ask(question: str):
    with tracify.span("agent-run", type="agent", input=question):
        result = await agent.run(question)
        return result.output

Full details in the documentation. All integrations are listed on the integrations page.

Will I see structured-output retries?
Yes. Each retry is a separate step inside the run, so you can see why validation failed.

Send your first trace.

Free to start.