Packages
The Phoenix TypeScript SDK consists of three main packages:@arizeai/phoenix-client
The core client library for interacting with Phoenix programmatically. Use this to:- Manage projects, datasets, and experiments
- Query and annotate traces and spans
- Create and version prompts
- Run evaluations and experiments
@arizeai/phoenix-otel
OpenTelemetry integration for automatic tracing of LLM applications. Use this to:- Enable OpenTelemetry-based instrumentation
- Configure trace export to Phoenix
- Set up batching and performance optimization
- Register custom instrumentations
@arizeai/phoenix-evals
Evaluation framework for assessing LLM outputs. Use this to:- Run LLM-based evaluations (hallucination, relevance, correctness, etc.)
- Create custom evaluators
- Integrate evaluations into your workflow
- Use built-in evaluation templates
Installation
Install the packages you need using npm, yarn, or pnpm:Quick Start
Here’s how the packages work together:Common Workflows
Development Workflow
- Instrument your app with
register()to capture traces - Run your application and generate traces automatically
- Review traces in the Phoenix UI
- Run evaluations to assess quality
- Iterate on prompts and configuration
Production Workflow
- Configure OTEL with batching for performance
- Set up continuous evaluation using the evals package
- Monitor metrics via the Phoenix UI
- Use the client for programmatic access to data
- Create datasets from production traces for testing
Environment Variables
Configure the SDK using environment variables:Phoenix server URL (default:
http://localhost:6006)API key for authentication with Phoenix Cloud
Base URL for Phoenix API client (default:
http://localhost:6006)TypeScript Support
All packages are written in TypeScript and provide full type definitions:Framework Compatibility
The Phoenix TypeScript SDK works with:- Node.js (v18+)
- Next.js
- Express
- Vercel AI SDK
- LangChain.js
- Any TypeScript/JavaScript environment
Next Steps
TypeScript Client
Interact with Phoenix programmatically
TypeScript OTEL
Set up OpenTelemetry tracing
TypeScript Evals
Evaluate LLM outputs