Launch Phoenix
- Phoenix Cloud
- Command Line
- Docker
- Notebook
Sign up for Phoenix:Set your Phoenix endpoint and API Key:From your new Phoenix Space
- Sign up for an Arize Phoenix account at https://app.phoenix.arize.com/login
-
Click
Create Space, then follow the prompts to create and launch your space.
- Create your API key from the Settings page
-
Copy your
Hostnamefrom the Settings page - In your code, set your endpoint and API key:
Having trouble finding your endpoint? Check out Finding your Phoenix Endpoint
Install
Setup
Set up tracing using OpenTelemetry and the PydanticAI instrumentation:Basic Usage
Hereβs a simple example using PydanticAI with automatic tracing:Advanced Usage
Agent with System Prompts and Tools
Observe
Now that you have tracing setup, all PydanticAI agent operations will be streamed to your running Phoenix instance for observability and evaluation. Youβll be able to see:- Agent interactions: Complete conversations between your application and the AI model
- Structured outputs: Pydantic model validation and parsing results
- Tool usage: When agents call external tools and their responses
- Performance metrics: Response times, token usage, and success rates
- Error handling: Validation errors, API failures, and retry attempts
- Multi-agent workflows: Complex interactions between multiple agents

