> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Arize AX

> Use Arize AX (Phoenix) with PraisonAI TypeScript

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph LR
    U[Input] --> A[Agent]
    A --> O[Output]

    classDef agent fill:#8B0000,color:#fff
    classDef tool fill:#189AB4,color:#fff

    class A agent
    class U,O tool
```

# Arize AX Observability

## Install

Install the Arize OpenInference package alongside `praisonai` so the adapter can send traces to Arize AX (Phoenix).

<Tabs>
  <Tab title="npm">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    npm install praisonai @arizeai/openinference-core
    ```
  </Tab>

  <Tab title="pnpm">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    pnpm add praisonai @arizeai/openinference-core
    ```
  </Tab>

  <Tab title="yarn">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    yarn add praisonai @arizeai/openinference-core
    ```
  </Tab>
</Tabs>

<Warning>
  The package is `@arizeai/openinference-core` (npm scope `@arizeai`). Do not use `arize-phoenix` — that is the Python/PyPI package name and does not exist on npm. Without the correct package, `createObservabilityAdapter('arize')` falls back to the in-memory adapter and logs a warning, so no traces reach Arize.
</Warning>

## Environment Variables

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
export ARIZE_API_KEY=...
```

## Quick Start

<Steps>
  <Step title="Simple Usage">
    ```typescript theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    // Requires: npm install @arizeai/openinference-core
    import { Agent, setObservabilityAdapter } from 'praisonai';
    import { createObservabilityAdapter } from 'praisonai/observability';

    const obs = await createObservabilityAdapter('arize');
    setObservabilityAdapter(obs);

    const agent = new Agent({
      name: 'TracedAgent',
      instructions: 'You are helpful.',
      llm: 'openai/gpt-4o-mini'
    });

    await agent.chat('Hello!');
    await obs.flush();
    ```

    If the `@arizeai/openinference-core` package is not installed, the adapter falls back to the in-memory adapter and logs a warning.
  </Step>

  <Step title="With Configuration">
    Adjust observability adapter options and agent settings for production — see the sections above.
  </Step>
</Steps>

## Related

<CardGroup cols={2}>
  <Card title="Arize CLI Usage" icon="terminal" href="/docs/js/observability/arize-cli">
    Arize CLI Usage
  </Card>
</CardGroup>
