> ## Documentation Index
> Fetch the complete documentation index at: https://arizeai-433a7140-roger-ci-skip-release-prs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent-Assisted Setup

> Start Phoenix, then let your coding agent add tracing to your app with px setup.

The fastest way to add Phoenix tracing to your application. `px setup` hands the instrumentation to your coding agent and doesn't finish until a real trace arrives.

<Info>
  **Supported stacks:** Python and TypeScript/JavaScript. See the [full integration list](/docs/phoenix/integrations) for the LLM providers and frameworks Phoenix instruments.
</Info>

<Steps>
  <Step title={<span className="step-title">Start Phoenix</span>}>
    `px setup` needs a running Phoenix. Already have a deployment? Skip to the next step.

    <Card>
      <Tabs>
        <Tab title="Local">
          ```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
          uvx arize-phoenix serve
          ```

          No [uv](https://docs.astral.sh/uv/)? `pip install arize-phoenix && phoenix serve` does the same thing. See [Terminal setup](/docs/phoenix/environments#terminal) for customization.
        </Tab>

        <Tab title="Container">
          ```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
          docker run -p 6006:6006 -p 4317:4317 arizephoenix/phoenix:latest
          ```

          Images are published to [Docker Hub](https://hub.docker.com/r/arizephoenix/phoenix). See [Docker](/docs/phoenix/self-hosting/deployment-options/docker) for volumes, PostgreSQL, and other options.
        </Tab>

        <Tab title="Self-Host">
          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](/docs/phoenix/self-hosting) covers [Kubernetes](/docs/phoenix/self-hosting/deployment-options/kubernetes), [Helm](/docs/phoenix/self-hosting/deployment-options/kubernetes-helm), [Railway](/docs/phoenix/self-hosting/deployment-options/railway), [AWS CloudFormation](/docs/phoenix/self-hosting/deployment-options/aws-with-cloudformation), [Google Cloud Run](/docs/phoenix/self-hosting/deployment-options/google-cloud-run), [Azure](/docs/phoenix/self-hosting/deployment-options/azure), and [Render](/docs/phoenix/self-hosting/deployment-options/render), plus authentication and configuration.
        </Tab>
      </Tabs>

      Phoenix serves its UI and OTLP HTTP on port **6006**, and OTLP gRPC on port **4317**. For a local instance that's [http://localhost:6006](http://localhost:6006) — leave it running while you work.
    </Card>
  </Step>

  <Step title={<span className="step-title">Connect your app</span>}>
    From your app's root directory, run one of these:

    <CodeGroup>
      ```bash npx theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
      npx -y @arizeai/phoenix-cli setup
      ```

      ```bash Install theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
      npm i -g @arizeai/phoenix-cli && px setup
      ```
    </CodeGroup>

    `px setup` warns on a dirty git tree before it starts, so the agent's edits stay separate from your own work.
  </Step>
</Steps>

## Confirm traces are flowing

`px setup` verifies traces automatically. To check for yourself:

1. Run your application and trigger at least one LLM call.
2. Open the Phoenix UI (local: [http://localhost:6006](http://localhost:6006), or your deployment URL).
3. Open the **Traces** view and verify traces appear under your project.

If no traces appear, check the [Troubleshooting FAQ](/docs/phoenix/tracing/concepts-tracing/faqs-tracing).

## Re-run a single step

The connection questions only need answering once. On a repo that's already registered, re-run just the slice you need:

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
px setup instrument   # Instrument and verify traces again
px setup skills       # Install the coding-agent skills alone
px setup mcp          # Register the Phoenix MCP server with a coding agent
```

## Run non-interactively (CI or agents)

Pass flags instead of answering prompts:

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
# Connection only. Writes .env.phoenix, no source changes.
px setup --no-input --endpoint http://localhost:6006 --project my-app

# Instrument too. Requires --agent when there's no TTY to choose one.
px setup --no-input --instrument --agent claude --yolo --format raw
```

The documentation that the MCP server offers is interactive by default. Pass `--docs-mcp` to connect the
Phoenix docs MCP server to the coding agent without prompting, or `--no-docs-mcp`
to skip it — either keeps a non-interactive run from stalling on a question.

A run that instruments only succeeds if a trace actually arrived — the agent's
own claim that it finished doesn't count. **Exit code `6` means the wait ran out
with no trace**, so tracing isn't confirmed working even though the connection,
`.env.phoenix`, and the agent's edits are all in place. In a pipeline, treat `6`
as "configured but unverified" rather than a hard failure: re-run
`px setup instrument` or check the exporter. In `--format json|raw`, the
`verification` field carries the same verdict.

See the [CLI reference](/docs/phoenix/sdk-api-reference/typescript/arizeai-phoenix-cli#px-setup) for the full list of flags.

## Use an unsupported agent

`px setup` hands off to Claude Code, Codex, Cursor, and OpenCode. If your agent isn't one of those (Windsurf, Copilot, and others), paste this prompt into it instead:

```text theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
Follow the instructions from https://raw.githubusercontent.com/Arize-ai/phoenix/main/docs/PROMPT.md and ask me questions as needed.
```

For ongoing agent workflows beyond initial setup (CLI, MCP, and skills), see the [Coding Agents](/docs/phoenix/integrations/developer-tools/coding-agents) guide.
