honeyhive and pydantic-ai, call HoneyHiveTracer.init(), run Agent.instrument_all(), and use your existing agent code unchanged. See the tracing quickstart and tracer initialization guides for setup details.
PydanticAI is a Python agent framework from the Pydantic team, built for type-safe LLM applications with dependency injection, structured outputs, and multi-agent support. HoneyHive integrates with PydanticAI via its native OpenTelemetry support, automatically capturing agent runs, tool calls, and LLM interactions.
How do I trace Pydantic AI with HoneyHive?
Last tested with
pydantic-ai 1.90.0 (May 2026). Requires PydanticAI 1.x (v3 OTel attributes) — earlier versions used different span attribute names and tool inputs/outputs will appear empty in the HoneyHive UI.What Gets Traced
The instrumentation automatically captures:- Agent runs - Every agent invocation with inputs and outputs
- LLM calls - Model requests, responses, and token usage
- Tool calls - Each tool execution with arguments and results
- Multi-turn conversations - Message history across turns
- Streaming - Streamed responses captured as complete traces
Example: Single Agent with Tools
Example: Multi-Agent Delegation
Troubleshooting
Traces not appearing
- Check environment variables — Ensure
HH_API_KEYis set - Call
instrument_all()before running agents — Instrumentation must be active before agent execution:
- Check your model provider — Ensure the API key for your chosen model provider is set (e.g.,
ANTHROPIC_API_KEY,OPENAI_API_KEY)
Related
Enrich Your Traces
Add user IDs and custom metadata to PydanticAI traces
Custom Spans
Create spans for business logic around agent calls
Distributed Tracing
Trace agents across service boundaries

