Install
Configure Environment
First, start Phoenix:- Self-Host
- Local
- Container
Run Phoenix on your own infrastructure, backed by PostgreSQL so traces persist beyond a single process. This is the option to reach for once Phoenix is shared across a team or environment.The self-hosting guide covers Kubernetes, Helm, Railway, AWS CloudFormation, Google Cloud Run, Azure, and Render, plus authentication and configuration.
.env file that points Mastra at it:
Setup
Initialize the Arize exporter inside your Mastra project. Zero-config setup (reads from environment variables automatically):Create Agents and Tools
From here you can use Mastra as normal. Create agents with tools and run them:Running Your Application
To test your application with Phoenix tracing:- Initialize the tracing SDK with your observability configuration
- Start the Mastra playground at
http://localhost:4111 - Enable trace export to Phoenix at
http://localhost:6006
- Via Playground: Navigate to
http://localhost:4111/playgroundto chat with agents - Via API: Make requests to the generated API endpoints
- Programmatically: Create test scripts that run within the Mastra dev environment
Observe
Now that you have tracing setup, all agent runs, tool calls, and model interactions will be streamed to your running Phoenix for observability and evaluation.

