Quick Start: Pydantic AI Instrumentation
Installation & Setup
Basic Agent Usage Example
Here’s a simple example using Pydantic AI with automatic tracing for structured outputs:Advanced Pydantic AI Patterns
AI Agents with System Prompts and Tools
Build sophisticated AI agents with custom tools and system prompts:What gets instrumented
Arize provides complete visibility into your Pydantic AI agent operations with automatic tracing of all interactions. With the above setup, Arize captures:Core Agent Interactions
- Agent Conversations: Complete conversations between your application and AI models
- Structured Outputs: Pydantic model validation, parsing results, and type safety
- Input/Output Tracking: Detailed logging of all agent inputs and generated outputs
Advanced Agent Features
- Tool Usage: When agents call external tools, their parameters, and responses
- Multi-Agent Workflows: Complex interactions and data flow between multiple agents
- System Prompt Tracking: How system prompts influence agent behavior
Performance & Reliability Monitoring
- Performance Metrics: Response times, token usage, and throughput analytics
- Error Handling: Validation errors, API failures, retry attempts, and recovery
- Success Rates: Agent completion rates and quality metrics
Production Insights
- Usage Patterns: How agents are being used in production
- Cost Tracking: Token usage and API costs across different models
- Optimization Opportunities: Identify bottlenecks and improvement areas