px setup hands the instrumentation to your coding agent and doesn’t finish until a real trace arrives.
Supported stacks: Python and TypeScript/JavaScript. See the full integration list for the LLM providers and frameworks Phoenix instruments.
1
Start Phoenix
px setup needs a running Phoenix. Already have a deployment? Skip to the next step.- Local
- Container
- Self-Host
pip install arize-phoenix && phoenix serve does the same thing. See Terminal setup for customization.2
Connect your app
From your app’s root directory, run one of these:
px setup warns on a dirty git tree before it starts, so the agent’s edits stay separate from your own work.Confirm traces are flowing
px setup verifies traces automatically. To check for yourself:
- Run your application and trigger at least one LLM call.
- Open the Phoenix UI (local: http://localhost:6006, or your deployment URL).
- Open the Traces view and verify traces appear under your project.
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:Run non-interactively (CI or agents)
Pass flags instead of answering prompts:--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 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:

