# arize-ai/phoenix architecture

> Architecture diagram of the GitHub repository arize-ai/phoenix, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/arize-ai/phoenix
- Repository: https://github.com/arize-ai/phoenix

## Overview

Phoenix is an open-source AI observability platform for tracing, experimentation, evaluation, and troubleshooting. Its principal workflow is to send AI application telemetry to Phoenix, inspect and query traces, then use datasets and experiments to evaluate behavior and diagnose issues. The repository also contains SDKs, evaluation libraries, and agent tooling. The README excerpt documents the product’s broad capabilities; edges not directly supported by the excerpt or source index are omitted, so some subsystems are shown without inferred connections.

Main entry points: [`src/phoenix/server/app.py`](https://github.com/arize-ai/phoenix/blob/main/src/phoenix/server/app.py) (Server application), [`src/phoenix/db/models.py`](https://github.com/arize-ai/phoenix/blob/main/src/phoenix/db/models.py) (Data models), [`src/phoenix/db/engines.py`](https://github.com/arize-ai/phoenix/blob/main/src/phoenix/db/engines.py) (Database engines), [`src/phoenix/trace/dsl/query.py`](https://github.com/arize-ai/phoenix/blob/main/src/phoenix/trace/dsl/query.py) (Trace DSL query)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_server["Phoenix server"]
  node_server_app["Server application<br/>[app.py]"]
  node_config["Configuration<br/>[config.py]"]
  node_auth["Authentication<br/>[auth.py]"]
  node_ldap["LDAP<br/>[ldap.py]"]
  node_api_agents["Agent API<br/>[agents.py]"]
  node_db_engines["Database engines<br/>[engines.py]"]
  node_db_models[("Data models<br/>[models.py]")]
  node_db_helpers["Database queries<br/>[helpers.py]"]
  node_json["JSON utilities<br/>[json.py]"]
end

subgraph group_trace["Tracing and query"]
  node_trace_attrs["Trace attributes<br/>[attributes.py]"]
  node_trace_query["Trace DSL query<br/>[query.py]"]
  node_trace_filter["Trace filtering<br/>[filter.py]"]
end

subgraph group_eval["Evaluation workflows"]
  node_exp_runner["Experiment runner"]
  node_eval_lib["Evaluation library<br/>[llm.py]"]
  node_datasets["Datasets"]
  node_experiments["Experiments"]
end

subgraph group_client["Clients and agents"]
  node_client_py["Python client<br/>[client.py]"]
  node_harbor_chat["Agent chat client<br/>[chat_client.py]"]
end

subgraph group_platform["Product capabilities"]
  node_ui["Web interface<br/>[App.tsx]"]
  node_mcp["MCP server"]
end

node_user(("AI teams"))

node_user -->|"uses"| node_server_app
node_server_app -->|"uses models"| node_db_models
node_server_app -->|"uses queries"| node_db_helpers
node_server_app -->|"loads config"| node_config
node_server_app -->|"registers routes"| node_api_agents
node_db_engines -->|"initializes"| node_db_models
node_db_engines -->|"imports helpers"| node_db_helpers
node_db_engines -->|"reads settings"| node_config
node_db_models -->|"uses attributes"| node_trace_attrs
node_trace_query -->|"queries models"| node_db_models
node_trace_query -->|"uses queries"| node_db_helpers
node_trace_query -->|"uses filters"| node_trace_filter
node_client_py -->|"exposes resource"| node_datasets
node_client_py -->|"exposes resource"| node_experiments
node_user -->|"explores telemetry"| node_ui
node_user -->|"evaluates behavior"| node_eval_lib
node_user -->|"connects tools"| node_mcp

click node_server_app "https://github.com/arize-ai/phoenix/blob/main/src/phoenix/server/app.py"
click node_config "https://github.com/arize-ai/phoenix/blob/main/src/phoenix/config.py"
click node_auth "https://github.com/arize-ai/phoenix/blob/main/src/phoenix/auth.py"
click node_ldap "https://github.com/arize-ai/phoenix/blob/main/src/phoenix/server/ldap.py"
click node_api_agents "https://github.com/arize-ai/phoenix/blob/main/src/phoenix/server/api/routers/agents.py"
click node_db_engines "https://github.com/arize-ai/phoenix/blob/main/src/phoenix/db/engines.py"
click node_db_models "https://github.com/arize-ai/phoenix/blob/main/src/phoenix/db/models.py"
click node_db_helpers "https://github.com/arize-ai/phoenix/blob/main/src/phoenix/db/helpers.py"
click node_trace_attrs "https://github.com/arize-ai/phoenix/blob/main/src/phoenix/trace/attributes.py"
click node_trace_query "https://github.com/arize-ai/phoenix/blob/main/src/phoenix/trace/dsl/query.py"
click node_trace_filter "https://github.com/arize-ai/phoenix/blob/main/src/phoenix/trace/dsl/filter.py"
click node_exp_runner "https://github.com/arize-ai/phoenix/blob/main/src/phoenix/server/daemons/experiment_runner.py"
click node_eval_lib "https://github.com/arize-ai/phoenix/blob/main/packages/phoenix-evals/src/phoenix/evals/llm/llm.py"
click node_client_py "https://github.com/arize-ai/phoenix/blob/main/packages/phoenix-client/src/phoenix/client/client.py"
click node_harbor_chat "https://github.com/arize-ai/phoenix/blob/main/evals/harbor/agents/chat_client.py"
click node_datasets "https://github.com/arize-ai/phoenix/tree/main/packages/phoenix-client/src/phoenix/client/resources/datasets"
click node_experiments "https://github.com/arize-ai/phoenix/tree/main/packages/phoenix-client/src/phoenix/client/resources/experiments"
click node_ui "https://github.com/arize-ai/phoenix/blob/main/js/app/src/App.tsx"
click node_mcp "https://github.com/arize-ai/phoenix/tree/main/src/phoenix/server/mcp"
click node_json "https://github.com/arize-ai/phoenix/blob/main/src/phoenix/utilities/json.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_server_app,node_config,node_auth,node_ldap,node_api_agents,node_db_engines,node_db_models,node_db_helpers,node_json toneBlue
class node_trace_attrs,node_trace_query,node_trace_filter toneAmber
class node_exp_runner,node_eval_lib,node_datasets,node_experiments toneMint
class node_client_py,node_harbor_chat toneRose
class node_ui,node_mcp,node_user toneIndigo
```

## Components

### Phoenix server

- [Server application](https://github.com/arize-ai/phoenix/blob/main/src/phoenix/server/app.py): `src/phoenix/server/app.py`
- [Configuration](https://github.com/arize-ai/phoenix/blob/main/src/phoenix/config.py): `src/phoenix/config.py`
- [Authentication](https://github.com/arize-ai/phoenix/blob/main/src/phoenix/auth.py): `src/phoenix/auth.py`
- [LDAP](https://github.com/arize-ai/phoenix/blob/main/src/phoenix/server/ldap.py): `src/phoenix/server/ldap.py`
- [Agent API](https://github.com/arize-ai/phoenix/blob/main/src/phoenix/server/api/routers/agents.py): `src/phoenix/server/api/routers/agents.py`
- [Database engines](https://github.com/arize-ai/phoenix/blob/main/src/phoenix/db/engines.py): `src/phoenix/db/engines.py`
- [Data models](https://github.com/arize-ai/phoenix/blob/main/src/phoenix/db/models.py): `src/phoenix/db/models.py`
- [Database queries](https://github.com/arize-ai/phoenix/blob/main/src/phoenix/db/helpers.py): `src/phoenix/db/helpers.py`
- [JSON utilities](https://github.com/arize-ai/phoenix/blob/main/src/phoenix/utilities/json.py): `src/phoenix/utilities/json.py`

### Tracing and query

- [Trace attributes](https://github.com/arize-ai/phoenix/blob/main/src/phoenix/trace/attributes.py): `src/phoenix/trace/attributes.py`
- [Trace DSL query](https://github.com/arize-ai/phoenix/blob/main/src/phoenix/trace/dsl/query.py): `src/phoenix/trace/dsl/query.py`
- [Trace filtering](https://github.com/arize-ai/phoenix/blob/main/src/phoenix/trace/dsl/filter.py): `src/phoenix/trace/dsl/filter.py`

### Evaluation workflows

- [Experiment runner](https://github.com/arize-ai/phoenix/blob/main/src/phoenix/server/daemons/experiment_runner.py): `src/phoenix/server/daemons/experiment_runner.py`
- [Evaluation library](https://github.com/arize-ai/phoenix/blob/main/packages/phoenix-evals/src/phoenix/evals/llm/llm.py): `packages/phoenix-evals/src/phoenix/evals/llm/llm.py`
- [Datasets](https://github.com/arize-ai/phoenix/tree/main/packages/phoenix-client/src/phoenix/client/resources/datasets): `packages/phoenix-client/src/phoenix/client/resources/datasets`
- [Experiments](https://github.com/arize-ai/phoenix/tree/main/packages/phoenix-client/src/phoenix/client/resources/experiments): `packages/phoenix-client/src/phoenix/client/resources/experiments`

### Clients and agents

- [Python client](https://github.com/arize-ai/phoenix/blob/main/packages/phoenix-client/src/phoenix/client/client.py): `packages/phoenix-client/src/phoenix/client/client.py`
- [Agent chat client](https://github.com/arize-ai/phoenix/blob/main/evals/harbor/agents/chat_client.py): `evals/harbor/agents/chat_client.py`

### Product capabilities

- [Web interface](https://github.com/arize-ai/phoenix/blob/main/js/app/src/App.tsx): `js/app/src/App.tsx`
- [MCP server](https://github.com/arize-ai/phoenix/tree/main/src/phoenix/server/mcp): `src/phoenix/server/mcp`

### Other components

- **AI teams**

## Connections

- AI teams → Server application: uses (evidence: `README.md`)
- Server application → Data models: uses models (evidence: `src/phoenix/server/app.py`)
- Server application → Database queries: uses queries (evidence: `src/phoenix/server/app.py`)
- Server application → Configuration: loads config (evidence: `src/phoenix/server/app.py`)
- Server application → Agent API: registers routes (evidence: `src/phoenix/server/app.py`)
- Database engines → Data models: initializes (evidence: `src/phoenix/db/engines.py`)
- Database engines → Database queries: imports helpers (evidence: `src/phoenix/db/engines.py`)
- Database engines → Configuration: reads settings (evidence: `src/phoenix/db/engines.py`)
- Data models → Trace attributes: uses attributes (evidence: `src/phoenix/db/models.py`)
- Trace DSL query → Data models: queries models (evidence: `src/phoenix/trace/dsl/query.py`)
- Trace DSL query → Database queries: uses queries (evidence: `src/phoenix/trace/dsl/query.py`)
- Trace DSL query → Trace filtering: uses filters (evidence: `src/phoenix/trace/dsl/query.py`)
- Python client → Datasets: exposes resource (evidence: `packages/phoenix-client/src/phoenix/client/client.py`)
- Python client → Experiments: exposes resource (evidence: `packages/phoenix-client/src/phoenix/client/client.py`)
- AI teams → Web interface: explores telemetry (evidence: `README.md`)
- AI teams → Evaluation library: evaluates behavior (evidence: `README.md`)
- AI teams → MCP server: connects tools (evidence: `README.md`)
