[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75PF697WTMNZX6XV8TMME9H":3,"skill-same:01M75PF697WTMNZX6XV8TMME9H":56},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":31,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":34,"ownerDescription":6,"updatedAt":35,"install":36,"resources":49},"01M75PF697WTMNZX6XV8TMME9H","phoenix-cli",null,"Debug LLM applications using the Phoenix CLI (`px`, from @arizeai\u002Fphoenix-cli). Fetch traces, spans, and sessions, annotate them, analyze errors, measure how often a failure or pattern occurs across traces, inspect datasets, review experiments, query annotation configs, and use the GraphQL API. Use whenever the user works with a Phoenix instance from the terminal, or wants to measure or investigate something in Phoenix with the CLI.","stanfish06\u002Fskillquarium","stanfish06","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F93099613?v=4","01M75F1CK4ZW109ZK3T26VN52F","Zhiyuan","01M75F1CM53VH6F79DZ8GXKKES",12,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fphoenix-cli\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: phoenix-cli\ndescription: Debug LLM applications using the Phoenix CLI (`px`, from @arizeai\u002Fphoenix-cli). Fetch traces, spans, and sessions, annotate them, analyze errors, measure how often a failure or pattern occurs across traces, inspect datasets, review experiments, query annotation configs, and use the GraphQL API. Use whenever the user works with a Phoenix instance from the terminal, or wants to measure or investigate something in Phoenix with the CLI.\nlicense: Apache-2.0\ncompatibility: Requires Node.js (for npx) or global install of @arizeai\u002Fphoenix-cli. Optionally requires jq for JSON processing.\nmetadata:\n  author: arize-ai\n  version: \"3.5.0\"\n---\n\n# Phoenix CLI\n\n## Invocation\n\n```bash\npx \u003Cresource> \u003Caction>                          # if installed globally\nnpx @arizeai\u002Fphoenix-cli \u003Cresource> \u003Caction>    # no install required\n```\n\nThe CLI uses singular resource commands with subcommands like `list` and `get`:\n\n```bash\npx trace list\npx trace get \u003Ctrace-id>\npx trace annotate \u003Ctrace-id>\npx trace add-note \u003Ctrace-id>\npx trace delete \u003Ctrace-identifier>\npx trace-annotations delete\npx span list\npx span annotate \u003Cspan-id>\npx span add-note \u003Cspan-id>\npx span delete \u003Cspan-identifier>\npx span-annotations delete\npx session list\npx session get \u003Csession-id>\npx session annotate \u003Csession-id>\npx session add-note \u003Csession-id>\npx session delete \u003Csession-id>\npx session-annotations delete\npx dataset list\npx dataset get \u003Cname>\npx dataset delete \u003Cdataset-identifier>\npx experiment list\npx experiment get \u003Cid>\npx experiment delete \u003Cexperiment-id>\npx prompt list\npx prompt get \u003Cprompt-identifier>\npx prompt delete \u003Cprompt-identifier>\npx project list\npx project get \u003Cname>\npx project delete \u003Cproject-identifier>\npx annotation-config list\npx annotation-config get \u003Cidentifier>\npx annotation-config create\npx annotation-config update \u003Cidentifier>\npx annotation-config delete \u003Cid>\npx auth login\npx auth logout\npx auth status\npx profile list\npx profile show [name]\npx profile create \u003Cname>\npx profile use \u003Cname>\npx profile edit \u003Cname>\npx profile delete \u003Cname>\npx api graphql \u003Cquery>\npx docs fetch\npx setup\npx self update\n```\n\nEvery `delete` above is gated: it requires\n`PHOENIX_CLI_DANGEROUSLY_ENABLE_DELETES=true` in the environment and prompts for\nconfirmation unless `-y`\u002F`--yes` is passed (`px profile delete` is local-only and\ntakes `--yes` without the env gate). Without the env var the command exits\nwithout deleting anything.\n\n## Setup\n\n```bash\nexport PHOENIX_ENDPOINT=http:\u002F\u002Flocalhost:6006\nexport PHOENIX_PROJECT=my-project\nexport PHOENIX_API_KEY=your-api-key  # if auth is enabled\n```\n\n`PHOENIX_ENDPOINT` is the base URL for API access. It usually holds the same URL as `PHOENIX_COLLECTOR_ENDPOINT`; when only the collector variable is set, the CLI uses it for API access too.\n\nFor interactive local use, `px auth login` stores an OAuth session in the selected profile; the session acts with the permissions of the user who logged in. API keys take precedence over OAuth tokens when both are configured.\nOAuth access tokens are refreshed automatically for REST, GraphQL, and PXI\nrequests, and rotated tokens are persisted to the selected profile.\n\nAlways use `--format raw --no-progress` when piping to `jq`.\n\n### `px setup` — onboarding\n\n`px setup` connects the app in the current directory to a Phoenix deployment\nand writes `.env.phoenix` (mode 0600, gitignored). The interactive flow is for\nhumans — it prompts, launches coding agents, and polls for traces. **From an\nagent, always pass `--no-input`:**\n\n```bash\n# Register only: connection + .env.phoenix, no source changes.\npx setup --no-input --endpoint http:\u002F\u002Flocalhost:6006 --project my-app --format raw\n```\n\nHeadless requires a clean git repo and, by default, stops after writing the\nfiles — it will not touch source unless you ask. If auth is enabled, also set\n`PHOENIX_API_KEY`. The project doesn't need to exist — Phoenix creates it on\nfirst trace. Missing inputs exit `3` with exact remediation; cancel exits `2`.\n\nTo also instrument the app, name the lane — headless has no prompt to pick one\nfrom, so `--instrument` requires `--agent`:\n\n```bash\npx setup --no-input --instrument --agent claude --yolo --format raw\n```\n\n`--yolo` matters: a background agent has no terminal to approve its edits on,\nso without it the run stalls until trace verification times out. `--language\npython` skips the agent's language detection. `--docs-mcp` connects the\nPhoenix docs MCP server to the hand-off agent (`claude mcp add` for claude,\nconfig-file merge for cursor\u002Fopencode; codex unsupported) and skips the\n`.px\u002Fdocs` download — the agent searches docs on demand instead; any failure\nfalls back to the download. `--no-docs-mcp` suppresses the interactive offer.\n`--format raw` prints\n`{\"endpoint\",\"project\",\"files\",\"instrumentation\",\"tracesVerified\",\"tracesUrl\"}`\n— check `tracesVerified`, which is set only when the API confirmed a trace\narriving, not when the agent claims it finished.\n\nA run whose wait ran out with no trace exits `6`, not `0`: the configuration and\nedits are real, but tracing is not confirmed working. Treat that as a failure to\nreport, not a success — and do not substitute the hand-off agent's own exit code\nor summary for the verdict. Registering without `--instrument`, and a human\nanswering \"verify later\" at the timeout prompt, both exit `0`.\n\n`tracesVerified` is `false` for a registration-only run too, so it alone can't\ntell \"nothing to verify\" from \"no trace arrived\". Read `verification`\n(`verified` \u002F `notVerified` \u002F `deferred`, absent when there was nothing to\nverify) when you need the difference.\n\nRe-runnable slices, so an already-registered repo skips the questions:\n\n```bash\npx setup instrument --agent claude   # instrument + verify only\npx setup skills                      # install the Phoenix coding-agent skills\n```\n\n### `px setup mcp` — register the remote MCP server\n\nWire the Phoenix remote MCP server (`\u003Cendpoint>\u002Fmcp`) into a coding agent so it\ncan query Phoenix data. The endpoint is inferred from `--endpoint`, the active\nprofile, or `PHOENIX_ENDPOINT`. Bare command prompts for scope (global default) then\nagent; `--agent` skips both prompts.\n\n```bash\npx setup mcp --agent codex --no-input --format raw\npx setup mcp --agent claude --local            # write this repo's .mcp.json\n```\n\nAgents: `claude`, `codex`, `gemini`, `cursor`, `opencode`, `vscode`. Scope is\n`--global` (default) or `--local` (repo; Codex is global-only). Auth is OAuth by\ndefault (URL-only config, browser login on first use); pass `--header \"Name:\nvalue\"` (repeatable) for an API-key bearer fallback — for Codex a\n`Authorization: Bearer ${VAR}` header becomes `bearer_token_env_var`. `--format\nraw` prints `{\"endpoint\",\"url\",\"serverName\",\"agent\",\"scope\",\"auth\",\"file?\"}`.\n\n## Auth\n\n```bash\npx auth login                                 # browser-based OAuth login\npx auth login --no-browser                    # print URL for SSH\u002Fheadless use\npx auth logout                                # clear OAuth tokens; leaves API keys\npx auth status                                # check connection and authentication\npx auth status --endpoint http:\u002F\u002Fother:6006   # check a specific endpoint\npx auth status --profile staging              # check a named profile's connection\npx auth status --format raw                   # machine-readable credential source\n```\n\n`auth status` reports the credential source (`flag`, `env`, `profile-key`, `oauth`, or `none`). OAuth status includes the token expiry.\n\nWhen the stored credential source is `oauth` and the authenticated probe fails,\n`auth status` retries once without credentials and reports anonymous access only\nif the server explicitly says access is anonymous. This keeps a stale or expired\nprofile token from being reported as an auth failure against a deployment that\nhas since switched from OAuth to anonymous access.\n\n## Profiles\n\nNamed profiles let you switch between multiple Phoenix instances (local, staging, cloud) without juggling environment variables. Profiles are stored in `~\u002F.px\u002Fsettings.json` (or `$XDG_CONFIG_HOME\u002Fpx\u002Fsettings.json`).\n\nConfiguration priority (highest to lowest): CLI flags > env vars > active profile > nearest `.env.phoenix` file > built-in defaults.\n\nThe CLI also discovers the nearest `.env.phoenix` file at or above the current working directory (the same file `px setup` writes). Credentials are resolved as one group, so a process API key is never combined with file-provided headers. Set `PHOENIX_DISCOVER_CONFIG=false` to disable discovery.\n\n```bash\npx profile list                              # list all profiles (shows active profile)\npx profile show                              # show the active profile's settings\npx profile show staging                      # show a named profile's settings\npx profile create prod --endpoint https:\u002F\u002Fapp.phoenix.arize.com --api-key \u003Ckey> --activate\npx profile create local --endpoint http:\u002F\u002Flocalhost:6006 --project my-app\npx profile use prod                          # switch the active profile\npx profile edit prod                         # open profile JSON in $EDITOR (validates on save)\npx profile delete prod --yes                 # delete a profile (--yes skips confirmation)\n```\n\nUse `--profile \u003Cname>` on any command to target a specific profile without changing the active one:\n\n```bash\npx trace list --profile staging --limit 10 --format raw --no-progress | jq .\npx auth status --profile prod\n```\n\n`px profile create` options: `--endpoint \u003Curl>`, `--project \u003Cname>`, `--api-key \u003Ckey>`, `--header \u003Ckey=value>` (repeatable), `--activate`.\n\n## Projects\n\n```bash\npx project list                                            # list all projects (table view)\npx project list --format raw --no-progress | jq '.[].name' # project names as JSON\npx project list --name-contains prod                       # filter by name substring (case-insensitive)\npx project get my-project --format raw --no-progress       # single record by exact name\npx project get my-project --format raw --no-progress | jq -r '.id'  # extract project id\n```\n\n`project list` accepts `--limit \u003Cn>` (projects fetched per page) and\n`--name-contains \u003Cfilter>`, which filters server-side on a case-insensitive name\nsubstring. Use it instead of piping `list` through `grep` when you only know part\nof a project's name.\n\n`project get` exits with `ExitCode.FAILURE` (1) on a name miss and writes a `StructuredError` `{error, code: \"FAILURE\", hint}` to stderr in `--format json|raw`.\n\n## Traces\n\n```bash\npx trace list --limit 20 --format raw --no-progress | jq .\npx trace list --last-n-minutes 60 --limit 20 --format raw --no-progress | jq '.[] | select(.status == \"ERROR\")'\npx trace list --since 2025-01-15T00:00:00Z --limit 50 --format raw --no-progress | jq .\npx trace list --since 2025-01-15T00:00:00Z --until 2025-01-16T00:00:00Z --limit 50 --format raw --no-progress | jq .  # time range (until is exclusive)\npx trace list --format raw --no-progress | jq 'sort_by(-.duration) | .[0:5]'\npx trace list --include-notes --format raw --no-progress | jq '.[].notes'\npx trace get \u003Ctrace-id> --format raw | jq .\npx trace get \u003Ctrace-id> --format raw | jq '.spans[] | select(.status_code != \"OK\")'\npx trace get \u003Ctrace-id> --include-notes --format raw | jq '.notes'\npx trace annotate \u003Ctrace-id> --name reviewer --label pass\npx trace annotate \u003Ctrace-id> --name reviewer --score 0.9 --format raw --no-progress\npx trace annotate \u003Ctrace-id> --name reviewer --label pass --identifier \"\u003Ccoding-annotation-id>\"  # tag with a coding annotation identifier\npx trace add-note \u003Ctrace-id> --text \"needs follow-up\"\npx trace add-note \u003Ctrace-id> --text \"needs follow-up\" --identifier \"\u003Ccoding-annotation-id>\"  # tag + upsert on identifier\npx trace-annotations delete --identifier \"\u003Ccoding-annotation-id>\" --all -y            # nuke every annotation tied to this coding annotation identifier\n```\n\n`px \u003Centity>-annotations delete` requires `--all` or both `--start-time` and `--end-time` and emits `{deleted: true, target, filter}` on success.\n\n### Trace JSON shape\n\n```\nTrace\n  traceId, status (\"OK\"|\"ERROR\"), duration (ms), startTime, endTime\n  annotations[] (with --include-annotations, excludes note)\n    name, result { score, label, explanation }\n  notes[] (with --include-notes)\n    name=\"note\", result { explanation }\n  rootSpan  — top-level span (parent_id: null)\n  spans[]\n    name, span_kind (\"LLM\"|\"CHAIN\"|\"TOOL\"|\"RETRIEVER\"|\"EMBEDDING\"|\"AGENT\"|\"RERANKER\"|\"GUARDRAIL\"|\"EVALUATOR\"|\"DECISION\"|\"UNKNOWN\")\n    status_code (\"OK\"|\"ERROR\"|\"UNSET\"), parent_id, context.span_id\n    notes[] (with --include-notes)\n      name=\"note\", result { explanation }\n    attributes\n      input.value, output.value          — raw input\u002Foutput\n      llm.model_name, llm.provider\n      llm.token_count.prompt\u002Fcompletion\u002Ftotal\n      llm.token_count.prompt_details.cache_read\n      llm.token_count.completion_details.reasoning\n      llm.input_messages.{N}.message.role\u002Fcontent\n      llm.output_messages.{N}.message.role\u002Fcontent\n      llm.invocation_parameters          — JSON string (temperature, etc.)\n      exception.message                  — set if span errored\n```\n\n## Spans\n\n```bash\npx span list --limit 20                                    # recent spans (table view)\npx span list --last-n-minutes 60 --limit 50                # spans from last hour\npx span list --since 2025-01-15T00:00:00Z --limit 50       # spans since a timestamp\npx span list --since 2025-01-15T00:00:00Z --until 2025-01-16T00:00:00Z --limit 50  # time range (until is exclusive)\npx span list --span-kind LLM --limit 10                    # only LLM spans\npx span list --status-code ERROR --limit 20                # only errored spans\npx span list --name chat_completion --limit 10             # filter by span name\npx span list --trace-id \u003Cid> --format raw --no-progress | jq .   # all spans for a trace\npx span list --span-id \u003Cid> \u003Cid> --format raw --no-progress | jq .  # fetch specific spans by ID (server >= 19.6.0)\npx span list --parent-id null --limit 10                   # only root spans\npx span list --parent-id \u003Cspan-id> --limit 10              # only children of a span\npx span list --include-annotations --limit 10              # include annotation scores\npx span list --include-notes --limit 10                    # include span notes\npx span list --attribute llm.model_name:gpt-4 --limit 10  # filter by string attribute\npx span list --attribute llm.token_count.total:500 --limit 10  # filter by numeric attribute\npx span list --attribute 'user.id:\"12345\"' --limit 10     # force string match for numeric-looking value\npx span list --attribute session.id:sess:abc:123 --limit 20  # colon in value OK (split on first colon only)\npx span list --attribute llm.model_name:gpt-4 --attribute session.id:abc --limit 10  # AND multiple filters\npx span list output.json --limit 100                       # save to JSON file\npx span list --format raw --no-progress | jq '.[] | select(.status_code == \"ERROR\")'\npx span annotate \u003Cspan-id> --name reviewer --label pass\npx span annotate \u003Cspan-id> --name checker --score 1 --annotator-kind CODE\npx span annotate \u003Cspan-id> --name reviewer --label pass --identifier \"\u003Ccoding-annotation-id>\"  # tag with a coding annotation identifier\npx span add-note \u003Cspan-id> --text \"verified by agent\"\npx span add-note \u003Cspan-id> --text \"verified by agent\" --identifier \"\u003Ccoding-annotation-id>\"  # tag + upsert on identifier\npx span-annotations delete --identifier \"\u003Ccoding-annotation-id>\" --all -y           # nuke every annotation tied to this coding annotation identifier\n```\n\n`span list` orders by ingestion (newest first), not `start_time`; they diverge for late-arriving spans (backfills, replays). To sort by `start_time` (server >= 20.16.0), call REST and keep `sort`\u002F`order` fixed across `next_cursor` pages:\n\n```bash\ncurl -s -H \"Authorization: Bearer $PHOENIX_API_KEY\" \\\n  \"$PHOENIX_ENDPOINT\u002Fv1\u002Fprojects\u002Fmy-project\u002Fspans?sort=start_time&order=desc&limit=20\"\n```\n\n### Span JSON shape\n\n```\nSpan\n  name, span_kind (\"LLM\"|\"CHAIN\"|\"TOOL\"|\"RETRIEVER\"|\"EMBEDDING\"|\"AGENT\"|\"RERANKER\"|\"GUARDRAIL\"|\"EVALUATOR\"|\"DECISION\"|\"UNKNOWN\")\n  status_code (\"OK\"|\"ERROR\"|\"UNSET\"), status_message\n  context.span_id, context.trace_id, parent_id\n  start_time, end_time\n  attributes\n    input.value, output.value          — raw input\u002Foutput\n    llm.model_name, llm.provider\n    llm.token_count.prompt\u002Fcompletion\u002Ftotal\n    llm.input_messages.{N}.message.role\u002Fcontent\n    llm.output_messages.{N}.message.role\u002Fcontent\n    llm.invocation_parameters          — JSON string (temperature, etc.)\n    exception.message                  — set if span errored\n  annotations[] (with --include-annotations, excludes note)\n    name, result { score, label, explanation }\n  notes[] (with --include-notes)\n    name=\"note\", result { explanation }\n```\n\n## Sessions\n\n```bash\npx session list --limit 10 --format raw --no-progress | jq .\npx session list --order asc --format raw --no-progress | jq '.[].session_id'\npx session list --include-annotations --include-notes --format raw --no-progress | jq '.[].notes'\npx session get \u003Csession-id> --format raw | jq .\npx session get \u003Csession-id> --include-annotations --format raw | jq '.session.annotations'\npx session get \u003Csession-id> --include-notes --format raw | jq '.session.notes'\npx session annotate \u003Csession-id> --name reviewer --label pass\npx session annotate \u003Csession-id> --name reviewer --score 0.9 --format raw --no-progress\npx session annotate \u003Csession-id> --name reviewer --label pass --identifier \"\u003Ccoding-annotation-id>\"  # tag with a coding annotation identifier\npx session add-note \u003Csession-id> --text \"verified by agent\"\npx session add-note \u003Csession-id> --text \"verified by agent\" --identifier \"\u003Ccoding-annotation-id>\"  # tag + upsert on identifier\npx session-annotations delete --identifier \"\u003Ccoding-annotation-id>\" --all -y              # nuke every annotation tied to this coding annotation identifier\npx session delete \u003Csession-id> -y                                                        # requires PHOENIX_CLI_DANGEROUSLY_ENABLE_DELETES=true\n```\n\n`session list` has no filter flag. To select sessions by shape — error counts,\ntoken totals, tool use, annotation labels — use the session filter expression\nlanguage through GraphQL (see [Session filter expressions](#session-filter-expressions)).\n\n### Session JSON shape\n\n```\nSessionData\n  id, session_id, project_id\n  start_time, end_time\n  token_count_prompt, token_count_completion, token_count_total  — cumulative across all LLM spans in the session (int, default 0)\n  annotations[] (with --include-annotations, excludes note)\n    name, result { score, label, explanation }\n  notes[] (with --include-notes)\n    name=\"note\", result { explanation }\n  traces[]\n    id, trace_id, start_time, end_time\n```\n\n## Datasets \u002F Experiments \u002F Prompts\n\n```bash\npx dataset list --format raw --no-progress | jq '.[].name'\npx dataset get \u003Cname> --format raw | jq '.examples[] | {input, output: .expected_output}'\npx dataset get \u003Cname> --split train --format raw | jq .    # filter by split\npx dataset get \u003Cname> --version \u003Cversion-id> --format raw | jq .\npx experiment list --dataset \u003Cname> --format raw --no-progress | jq '.[] | {id, name, failed_run_count}'\npx experiment get \u003Cid> --format raw --no-progress | jq '.[] | select(.error != null) | {input, error}'\npx prompt list --format raw --no-progress | jq '.[].name'\npx prompt get \u003Cname> --format text --no-progress   # plain text, ideal for piping to AI\n```\n\n## Annotation Configs\n\nFull CRUD: `list`, `get`, `create`, `update`, `delete`. Types are `CATEGORICAL` (labels + optional scores), `CONTINUOUS` (numeric range), `FREEFORM` (free text).\n\n```bash\npx annotation-config list                                                # all configs (table view)\npx annotation-config list --format raw --no-progress | jq -r '.[].name' # config names as JSON\npx annotation-config get response-quality --format raw --no-progress     # one config by name or ID\n\n# create — categorical (scored labels), continuous (numeric range), or freeform (free text)\npx annotation-config create --type CATEGORICAL --name response-quality --value good=1 --value bad=0\npx annotation-config create --type CONTINUOUS --name confidence --lower-bound 0 --upper-bound 1\npx annotation-config create --type FREEFORM --name reviewer-notes --description 'Free-form reviewer feedback'\n\n# update by name or ID — only the fields you pass change; type is immutable\npx annotation-config update response-quality --name answer-quality --optimization-direction MAXIMIZE\npx annotation-config update response-quality --value good=1 --value acceptable=0.5 --value bad=0\npx annotation-config update response-quality --description \"Updated\" --format raw --no-progress | jq -r '.id'\n\n# delete by ID — requires PHOENIX_CLI_DANGEROUSLY_ENABLE_DELETES=true; --yes skips the prompt\npx annotation-config delete QW5ub3RhdGlvbkNvbmZpZzoxMjM= --yes\n```\n\nCategorical values are specified the same way in `create` and `update`: repeatable `--value label[=score]` (score optional), or a single `--values '\u003Cjson>'` payload — mutually exclusive. `update` fetches the existing config, merges your flags, and writes the full body back via `PUT \u002Fv1\u002Fannotation_configs\u002F{id}`; it requires at least one field flag. Other type-specific flags: `--lower-bound`\u002F`--upper-bound` (CONTINUOUS\u002FFREEFORM), `--threshold` (FREEFORM). Invalid input (bad flags, type mismatches, malformed values) exits `3` (`INVALID_ARGUMENT`) with a `{error, code, hint?}` JSON envelope on stderr in `raw`\u002F`json` mode. `get`\u002F`create`\u002F`update` output the config object (single object in `raw`\u002F`json`, not an array).\n\n## GraphQL\n\nFor ad-hoc queries not covered by the commands above. Output is `{\"data\": {...}}`.\n\n```bash\npx api graphql '{ projectCount datasetCount promptCount evaluatorCount }'\npx api graphql '{ projects { edges { node { name traceCount tokenCountTotal } } } }' | jq '.data.projects.edges[].node'\npx api graphql '{ datasets { edges { node { name exampleCount experimentCount } } } }' | jq '.data.datasets.edges[].node'\npx api graphql '{ evaluators { edges { node { name kind } } } }' | jq '.data.evaluators.edges[].node'\n# evaluator kind values: \"LLM\" | \"CODE\" | \"BUILTIN\"\n# CODE = server-side code evaluator running in a sandbox; BUILTIN = pre-built server evaluator\n\n# Introspect any type\npx api graphql '{ __type(name: \"Project\") { fields { name type { name } } } }' | jq '.data.__type.fields[]'\n```\n\nKey root fields: `projects`, `getProjectByName(name:)`, `datasets`, `prompts`, `evaluators`, `projectCount`, `datasetCount`, `promptCount`, `evaluatorCount`, `viewer`.\n\n`getProjectByName(name:)` targets one project; `projects(first: 1)` picks an\narbitrary one. There is no `traces` connection: to list traces, query `spans`\nwith `filterCondition: \"parent_span is None\"`, which keeps root spans, as the\nUI's traces table does. See [Filter expressions](#filter-expressions) below.\n\n### Filter expressions\n\n`spans`, `sessions`, and the project aggregates take filter conditions: Python\nboolean expressions compiled server-side. There are three languages, and the\nargument picks the language. Read\n[references\u002Ffilter-expressions.md](references\u002Ffilter-expressions.md) before\nwriting a condition; it has the full vocabulary, operators, and compiled\nexamples for each.\n\n| Argument | Matches | Names come from |\n| -------- | ------- | --------------- |\n| `filterCondition` | individual spans | the exhaustive table in the reference |\n| `traceFilterCondition` | whole traces | `traceFilterVocabulary` |\n| `sessionFilterCondition` | sessions | `sessionFilterVocabulary` |\n\n**Root spans.** There is no `traces` connection and no root-span argument.\n`filterCondition: \"parent_span is None\"` keeps root spans, including orphans\nwhose parent was never received, and is what the UI's traces table runs;\n`parent_id is None` keeps only spans with no parent id. A root span is usually\none per trace, and either clause composes with the rest of the filter:\n\n```bash\npx api graphql '{\n  getProjectByName(name: \"default\") { spans(\n    first: 20\n    filterCondition: \"parent_id is None and status_code == \\\"ERROR\\\"\"\n    sort: { col: startTime, dir: desc }\n  ) { edges { node { spanId name latencyMs } } } }\n}' | jq '.data.getProjectByName.spans.edges[].node'\n```\n\n**Annotations.** The accessor picks the level, and the wrong level matches\nnothing:\n\n| Accessor | Matches annotations on | Written by |\n| -------- | ---------------------- | ---------- |\n| `annotations[\"name\"]` | the span itself | `px span annotate`, `px span add-note` |\n| `trace_annotations[\"name\"]` | the span's parent trace | `px trace annotate`, `px trace add-note` |\n| `session_annotations[\"name\"]` | the session (session filter only) | `px session annotate`, `px session add-note` |\n\n```bash\npx api graphql '{\n  getProjectByName(name: \"default\") { spans(\n    first: 20\n    filterCondition: \"parent_id is None and trace_annotations[\\\"quality\\\"].label == \\\"poor\\\"\"\n  ) { edges { node { spanId name } } } }\n}' | jq '.data.getProjectByName.spans.edges[].node'\n```\n\n**Traces.** `traceFilterCondition` keeps the spans of matching traces and\ncomposes with `filterCondition`:\n\n```bash\npx api graphql '{\n  getProjectByName(name: \"default\") { spans(\n    first: 20\n    filterCondition: \"parent_id is None\"\n    traceFilterCondition: \"error_count > 0 and latency_ms > 1000\"\n  ) { edges { node { spanId name latencyMs } } } }\n}' | jq '.data.getProjectByName.spans.edges[].node'\n```\n\n**Sessions.** `px session list` has no filter flag, so selecting sessions by\nshape goes through GraphQL:\n\n```bash\npx api graphql '{\n  projects(first: 1) { edges { node { sessions(\n    first: 10\n    sessionFilterCondition: \"num_traces > 5 and any(span.status_code == \\\"ERROR\\\" for span in spans)\"\n  ) { edges { node { sessionId numTraces numTracesWithError } } } } } }\n}' | jq '.data.projects.edges[0].node.sessions.edges[].node'\n```\n\n**Discover names and validate.** The vocabularies are generated from the\ncompiler's own bindings, so they always match what compiles:\n\n```bash\npx api graphql '{ projects(first: 1) { edges { node { traceFilterVocabulary {\n  name type category description iterableName } } } } }' \\\n  | jq '.data.projects.edges[0].node.traceFilterVocabulary[] | {name, type, category}'\n\npx api graphql '{ projects(first: 1) { edges { node {\n  validateSpanFilterCondition(condition: \"parent_id is None\") { isValid errorMessage }\n  validateTraceFilterCondition(condition: \"error_count > 0\") { isValid errorMessage }\n  validateSessionFilterCondition(condition: \"num_traces > 5\") { isValid errorMessage }\n} } } }'\n```\n\nOn fields that accept both levels (e.g. `Project.recordCount`),\n`sessionFilterCondition` and `filterCondition` are mutually exclusive.\n\n## Docs\n\nDownload Phoenix documentation markdown for local use by coding agents.\n\n```bash\npx docs fetch                                # fetch default workflow docs to .px\u002Fdocs\npx docs fetch --workflow tracing             # fetch only tracing docs\npx docs fetch --workflow tracing --workflow evaluation\npx docs fetch --dry-run                      # preview what would be downloaded\npx docs fetch --refresh                      # clear .px\u002Fdocs and re-download\npx docs fetch --output-dir .\u002Fmy-docs         # custom output directory\n```\n\nKey options: `--workflow` (repeatable, values: `tracing`, `evaluation`, `datasets`, `prompts`, `integrations`, `sdk`, `self-hosting`, `all`), `--dry-run`, `--refresh`, `--output-dir` (default `.px\u002Fdocs`), `--workers` (default 10).\n","# Phoenix CLI\n\n## Invocation\n\n```bash\npx \u003Cresource> \u003Caction>                          # if installed globally\nnpx @arizeai\u002Fphoenix-cli \u003Cresource> \u003Caction>    # no install required\n```\n\nThe CLI uses singular resource commands with subcommands like `list` and `get`:\n\n```bash\npx trace list\npx trace get \u003Ctrace-id>\npx trace annotate \u003Ctrace-id>\npx trace add-note \u003Ctrace-id>\npx trace delete \u003Ctrace-identifier>\npx trace-annotations delete\npx span list\npx span annotate \u003Cspan-id>\npx span add-note \u003Cspan-id>\npx span delete \u003Cspan-identifier>\npx span-annotations delete\npx session list\npx session get \u003Csession-id>\npx session annotate \u003Csession-id>\npx session add-note \u003Csession-id>\npx session delete \u003Csession-id>\npx session-annotations delete\npx dataset list\npx dataset get \u003Cname>\npx dataset delete \u003Cdataset-identifier>\npx experiment list\npx experiment get \u003Cid>\npx experiment delete \u003Cexperiment-id>\npx prompt list\npx prompt get \u003Cprompt-identifier>\npx prompt delete \u003Cprompt-identifier>\npx project list\npx project get \u003Cname>\npx project delete \u003Cproject-identifier>\npx annotation-config list\npx annotation-config get \u003Cidentifier>\npx annotation-config create\npx annotation-config update \u003Cidentifier>\npx annotation-config delete \u003Cid>\npx auth login\npx auth logout\npx auth status\npx profile list\npx profile show [name]\npx profile create \u003Cname>\npx profile use \u003Cname>\npx profile edit \u003Cname>\npx profile delete \u003Cname>\npx api graphql \u003Cquery>\npx docs fetch\npx setup\npx self update\n```\n\nEvery `delete` above is gated: it requires\n`PHOENIX_CLI_DANGEROUSLY_ENABLE_DELETES=true` in the environment and prompts for\nconfirmation unless `-y`\u002F`--yes` is passed (`px profile delete` is local-only and\ntakes `--yes` without the env gate). Without the env var the command exits\nwithout deleting anything.\n\n## Setup\n\n```bash\nexport PHOENIX_ENDPOINT=http:\u002F\u002Flocalhost:6006\nexport PHOENIX_PROJECT=my-project\nexport PHOENIX_API_KEY=your-api-key  # if auth is enabled\n```\n\n`PHOENIX_ENDPOINT` is the base URL for API access. It usually holds the same URL as `PHOENIX_COLLECTOR_ENDPOINT`; when only the collector variable is set, the CLI uses it for API access too.\n\nFor interactive local use, `px auth login` stores an OAuth session in the selected profile; the session acts with the permissions of the user who logged in. API keys take precedence over OAuth tokens when both are configured.\nOAuth access tokens are refreshed automatically for REST, GraphQL, and PXI\nrequests, and rotated tokens are persisted to the selected profile.\n\nAlways use `--format raw --no-progress` when piping to `jq`.\n\n### `px setup` — onboarding\n\n`px setup` connects the app in the current directory to a Phoenix deployment\nand writes `.env.phoenix` (mode 0600, gitignored). The interactive flow is for\nhumans — it prompts, launches coding agents, and polls for traces. **From an\nagent, always pass `--no-input`:**\n\n```bash\n# Register only: connection + .env.phoenix, no source changes.\npx setup --no-input --endpoint http:\u002F\u002Flocalhost:6006 --project my-app --format raw\n```\n\nHeadless requires a clean git repo and, by default, stops after writing the\nfiles — it will not touch source unless you ask. If auth is enabled, also set\n`PHOENIX_API_KEY`. The project doesn't need to exist — Phoenix creates it on\nfirst trace. Missing inputs exit `3` with exact remediation; cancel exits `2`.\n\nTo also instrument the app, name the lane — headless has no prompt to pick one\nfrom, so `--instrument` requires `--agent`:\n\n```bash\npx setup --no-input --instrument --agent claude --yolo --format raw\n```\n\n`--yolo` matters: a background agent has no terminal to approve its edits on,\nso without it the run stalls until trace verification times out. `--language\npython` skips the agent's language detection. `--docs-mcp` connects the\nPhoenix docs MCP server to the hand-off agent (`claude mcp add` for claude,\nconfig-file merge for cursor\u002Fopencode; codex unsupported) and skips the\n`.px\u002Fdocs` download — the agent searches docs on demand instead; any failure\nfalls back to the download. `--no-docs-mcp` suppresses the interactive offer.\n`--format raw` prints\n`{\"endpoint\",\"project\",\"files\",\"instrumentation\",\"tracesVerified\",\"tracesUrl\"}`\n— check `tracesVerified`, which is set only when the API confirmed a trace\narriving, not when the agent claims it finished.\n\nA run whose wait ran out with no trace exits `6`, not `0`: the configuration and\nedits are real, but tracing is not confirmed working. Treat that as a failure to\nreport, not a success — and do not substitute the hand-off agent's own exit code\nor summary for the verdict. Registering without `--instrument`, and a human\nanswering \"verify later\" at the timeout prompt, both exit `0`.\n\n`tracesVerified` is `false` for a registration-only run too, so it alone can't\ntell \"nothing to verify\" from \"no trace arrived\". Read `verification`\n(`verified` \u002F `notVerified` \u002F `deferred`, absent when there was nothing to\nverify) when you need the difference.\n\nRe-runnable slices, so an already-registered repo skips the questions:\n\n```bash\npx setup instrument --agent claude   # instrument + verify only\npx setup skills                      # install the Phoenix coding-agent skills\n```\n\n### `px setup mcp` — register the remote MCP server\n\nWire the Phoenix remote MCP server (`\u003Cendpoint>\u002Fmcp`) into a coding agent so it\ncan query Phoenix data. The endpoint is inferred from `--endpoint`, the active\nprofile, or `PHOENIX_ENDPOINT`. Bare command prompts for scope (global default) then\nagent; `--agent` skips both prompts.\n\n```bash\npx setup mcp --agent codex --no-input --format raw\npx setup mcp --agent claude --local            # write this repo's .mcp.json\n```\n\nAgents: `claude`, `codex`, `gemini`, `cursor`, `opencode`, `vscode`. Scope is\n`--global` (default) or `--local` (repo; Codex is global-only). Auth is OAuth by\ndefault (URL-only config, browser login on first use); pass `--header \"Name:\nvalue\"` (repeatable) for an API-key bearer fallback — for Codex a\n`Authorization: Bearer ${VAR}` header becomes `bearer_token_env_var`. `--format\nraw` prints `{\"endpoint\",\"url\",\"serverName\",\"agent\",\"scope\",\"auth\",\"file?\"}`.\n\n## Auth\n\n```bash\npx auth login                                 # browser-based OAuth login\npx auth login --no-browser                    # print URL for SSH\u002Fheadless use\npx auth logout                                # clear OAuth tokens; leaves API keys\npx auth status                                # check connection and authentication\npx auth status --endpoint http:\u002F\u002Fother:6006   # check a specific endpoint\npx auth status --profile staging              # check a named profile's connection\npx auth status --format raw                   # machine-readable credential source\n```\n\n`auth status` reports the credential source (`flag`, `env`, `profile-key`, `oauth`, or `none`). OAuth status includes the token expiry.\n\nWhen the stored credential source is `oauth` and the authenticated probe fails,\n`auth status` retries once without credentials and reports anonymous access only\nif the server explicitly says access is anonymous. This keeps a stale or expired\nprofile token from being reported as an auth failure against a deployment that\nhas since switched from OAuth to anonymous access.\n\n## Profiles\n\nNamed profiles let you switch between multiple Phoenix instances (local, staging, cloud) without juggling environment variables. Profiles are stored in `~\u002F.px\u002Fsettings.json` (or `$XDG_CONFIG_HOME\u002Fpx\u002Fsettings.json`).\n\nConfiguration priority (highest to lowest): CLI flags > env vars > active profile > nearest `.env.phoenix` file > built-in defaults.\n\nThe CLI also discovers the nearest `.env.phoenix` file at or above the current working directory (the same file `px setup` writes). Credentials are resolved as one group, so a process API key is never combined with file-provided headers. Set `PHOENIX_DISCOVER_CONFIG=false` to disable discovery.\n\n```bash\npx profile list                              # list all profiles (shows active profile)\npx profile show                              # show the active profile's settings\npx profile show staging                      # show a named profile's settings\npx profile create prod --endpoint https:\u002F\u002Fapp.phoenix.arize.com --api-key \u003Ckey> --activate\npx profile create local --endpoint http:\u002F\u002Flocalhost:6006 --project my-app\npx profile use prod                          # switch the active profile\npx profile edit prod                         # open profile JSON in $EDITOR (validates on save)\npx profile delete prod --yes                 # delete a profile (--yes skips confirmation)\n```\n\nUse `--profile \u003Cname>` on any command to target a specific profile without changing the active one:\n\n```bash\npx trace list --profile staging --limit 10 --format raw --no-progress | jq .\npx auth status --profile prod\n```\n\n`px profile create` options: `--endpoint \u003Curl>`, `--project \u003Cname>`, `--api-key \u003Ckey>`, `--header \u003Ckey=value>` (repeatable), `--activate`.\n\n## Projects\n\n```bash\npx project list                                            # list all projects (table view)\npx project list --format raw --no-progress | jq '.[].name' # project names as JSON\npx project list --name-contains prod                       # filter by name substring (case-insensitive)\npx project get my-project --format raw --no-progress       # single record by exact name\npx project get my-project --format raw --no-progress | jq -r '.id'  # extract project id\n```\n\n`project list` accepts `--limit \u003Cn>` (projects fetched per page) and\n`--name-contains \u003Cfilter>`, which filters server-side on a case-insensitive name\nsubstring. Use it instead of piping `list` through `grep` when you only know part\nof a project's name.\n\n`project get` exits with `ExitCode.FAILURE` (1) on a name miss and writes a `StructuredError` `{error, code: \"FAILURE\", hint}` to stderr in `--format json|raw`.\n\n## Traces\n\n```bash\npx trace list --limit 20 --format raw --no-progress | jq .\npx trace list --last-n-minutes 60 --limit 20 --format raw --no-progress | jq '.[] | select(.status == \"ERROR\")'\npx trace list --since 2025-01-15T00:00:00Z --limit 50 --format raw --no-progress | jq .\npx trace list --since 2025-01-15T00:00:00Z --until 2025-01-16T00:00:00Z --limit 50 --format raw --no-progress | jq .  # time range (until is exclusive)\npx trace list --format raw --no-progress | jq 'sort_by(-.duration) | .[0:5]'\npx trace list --include-notes --format raw --no-progress | jq '.[].notes'\npx trace get \u003Ctrace-id> --format raw | jq .\npx trace get \u003Ctrace-id> --format raw | jq '.spans[] | select(.status_code != \"OK\")'\npx trace get \u003Ctrace-id> --include-notes --format raw | jq '.notes'\npx trace annotate \u003Ctrace-id> --name reviewer --label pass\npx trace annotate \u003Ctrace-id> --name reviewer --score 0.9 --format raw --no-progress\npx trace annotate \u003Ctrace-id> --name reviewer --label pass --identifier \"\u003Ccoding-annotation-id>\"  # tag with a coding annotation identifier\npx trace add-note \u003Ctrace-id> --text \"needs follow-up\"\npx trace add-note \u003Ctrace-id> --text \"needs follow-up\" --identifier \"\u003Ccoding-annotation-id>\"  # tag + upsert on identifier\npx trace-annotations delete --identifier \"\u003Ccoding-annotation-id>\" --all -y            # nuke every annotation tied to this coding annotation identifier\n```\n\n`px \u003Centity>-annotations delete` requires `--all` or both `--start-time` and `--end-time` and emits `{deleted: true, target, filter}` on success.\n\n### Trace JSON shape\n\n```\nTrace\n  traceId, status (\"OK\"|\"ERROR\"), duration (ms), startTime, endTime\n  annotations[] (with --include-annotations, excludes note)\n    name, result { score, label, explanation }\n  notes[] (with --include-notes)\n    name=\"note\", result { explanation }\n  rootSpan  — top-level span (parent_id: null)\n  spans[]\n    name, span_kind (\"LLM\"|\"CHAIN\"|\"TOOL\"|\"RETRIEVER\"|\"EMBEDDING\"|\"AGENT\"|\"RERANKER\"|\"GUARDRAIL\"|\"EVALUATOR\"|\"DECISION\"|\"UNKNOWN\")\n    status_code (\"OK\"|\"ERROR\"|\"UNSET\"), parent_id, context.span_id\n    notes[] (with --include-notes)\n      name=\"note\", result { explanation }\n    attributes\n      input.value, output.value          — raw input\u002Foutput\n      llm.model_name, llm.provider\n      llm.token_count.prompt\u002Fcompletion\u002Ftotal\n      llm.token_count.prompt_details.cache_read\n      llm.token_count.completion_details.reasoning\n      llm.input_messages.{N}.message.role\u002Fcontent\n      llm.output_messages.{N}.message.role\u002Fcontent\n      llm.invocation_parameters          — JSON string (temperature, etc.)\n      exception.message                  — set if span errored\n```\n\n## Spans\n\n```bash\npx span list --limit 20                                    # recent spans (table view)\npx span list --last-n-minutes 60 --limit 50                # spans from last hour\npx span list --since 2025-01-15T00:00:00Z --limit 50       # spans since a timestamp\npx span list --since 2025-01-15T00:00:00Z --until 2025-01-16T00:00:00Z --limit 50  # time range (until is exclusive)\npx span list --span-kind LLM --limit 10                    # only LLM spans\npx span list --status-code ERROR --limit 20                # only errored spans\npx span list --name chat_completion --limit 10             # filter by span name\npx span list --trace-id \u003Cid> --format raw --no-progress | jq .   # all spans for a trace\npx span list --span-id \u003Cid> \u003Cid> --format raw --no-progress | jq .  # fetch specific spans by ID (server >= 19.6.0)\npx span list --parent-id null --limit 10                   # only root spans\npx span list --parent-id \u003Cspan-id> --limit 10              # only children of a span\npx span list --include-annotations --limit 10              # include annotation scores\npx span list --include-notes --limit 10                    # include span notes\npx span list --attribute llm.model_name:gpt-4 --limit 10  # filter by string attribute\npx span list --attribute llm.token_count.total:500 --limit 10  # filter by numeric attribute\npx span list --attribute 'user.id:\"12345\"' --limit 10     # force string match for numeric-looking value\npx span list --attribute session.id:sess:abc:123 --limit 20  # colon in value OK (split on first colon only)\npx span list --attribute llm.model_name:gpt-4 --attribute session.id:abc --limit 10  # AND multiple filters\npx span list output.json --limit 100                       # save to JSON file\npx span list --format raw --no-progress | jq '.[] | select(.status_code == \"ERROR\")'\npx span annotate \u003Cspan-id> --name reviewer --label pass\npx span annotate \u003Cspan-id> --name checker --score 1 --annotator-kind CODE\npx span annotate \u003Cspan-id> --name reviewer --label pass --identifier \"\u003Ccoding-annotation-id>\"  # tag with a coding annotation identifier\npx span add-note \u003Cspan-id> --text \"verified by agent\"\npx span add-note \u003Cspan-id> --text \"verified by agent\" --identifier \"\u003Ccoding-annotation-id>\"  # tag + upsert on identifier\npx span-annotations delete --identifier \"\u003Ccoding-annotation-id>\" --all -y           # nuke every annotation tied to this coding annotation identifier\n```\n\n`span list` orders by ingestion (newest first), not `start_time`; they diverge for late-arriving spans (backfills, replays). To sort by `start_time` (server >= 20.16.0), call REST and keep `sort`\u002F`order` fixed across `next_cursor` pages:\n\n```bash\ncurl -s -H \"Authorization: Bearer $PHOENIX_API_KEY\" \\\n  \"$PHOENIX_ENDPOINT\u002Fv1\u002Fprojects\u002Fmy-project\u002Fspans?sort=start_time&order=desc&limit=20\"\n```\n\n### Span JSON shape\n\n```\nSpan\n  name, span_kind (\"LLM\"|\"CHAIN\"|\"TOOL\"|\"RETRIEVER\"|\"EMBEDDING\"|\"AGENT\"|\"RERANKER\"|\"GUARDRAIL\"|\"EVALUATOR\"|\"DECISION\"|\"UNKNOWN\")\n  status_code (\"OK\"|\"ERROR\"|\"UNSET\"), status_message\n  context.span_id, context.trace_id, parent_id\n  start_time, end_time\n  attributes\n    input.value, output.value          — raw input\u002Foutput\n    llm.model_name, llm.provider\n    llm.token_count.prompt\u002Fcompletion\u002Ftotal\n    llm.input_messages.{N}.message.role\u002Fcontent\n    llm.output_messages.{N}.message.role\u002Fcontent\n    llm.invocation_parameters          — JSON string (temperature, etc.)\n    exception.message                  — set if span errored\n  annotations[] (with --include-annotations, excludes note)\n    name, result { score, label, explanation }\n  notes[] (with --include-notes)\n    name=\"note\", result { explanation }\n```\n\n## Sessions\n\n```bash\npx session list --limit 10 --format raw --no-progress | jq .\npx session list --order asc --format raw --no-progress | jq '.[].session_id'\npx session list --include-annotations --include-notes --format raw --no-progress | jq '.[].notes'\npx session get \u003Csession-id> --format raw | jq .\npx session get \u003Csession-id> --include-annotations --format raw | jq '.session.annotations'\npx session get \u003Csession-id> --include-notes --format raw | jq '.session.notes'\npx session annotate \u003Csession-id> --name reviewer --label pass\npx session annotate \u003Csession-id> --name reviewer --score 0.9 --format raw --no-progress\npx session annotate \u003Csession-id> --name reviewer --label pass --identifier \"\u003Ccoding-annotation-id>\"  # tag with a coding annotation identifier\npx session add-note \u003Csession-id> --text \"verified by agent\"\npx session add-note \u003Csession-id> --text \"verified by agent\" --identifier \"\u003Ccoding-annotation-id>\"  # tag + upsert on identifier\npx session-annotations delete --identifier \"\u003Ccoding-annotation-id>\" --all -y              # nuke every annotation tied to this coding annotation identifier\npx session delete \u003Csession-id> -y                                                        # requires PHOENIX_CLI_DANGEROUSLY_ENABLE_DELETES=true\n```\n\n`session list` has no filter flag. To select sessions by shape — error counts,\ntoken totals, tool use, annotation labels — use the session filter expression\nlanguage through GraphQL (see [Session filter expressions](#session-filter-expressions)).\n\n### Session JSON shape\n\n```\nSessionData\n  id, session_id, project_id\n  start_time, end_time\n  token_count_prompt, token_count_completion, token_count_total  — cumulative across all LLM spans in the session (int, default 0)\n  annotations[] (with --include-annotations, excludes note)\n    name, result { score, label, explanation }\n  notes[] (with --include-notes)\n    name=\"note\", result { explanation }\n  traces[]\n    id, trace_id, start_time, end_time\n```\n\n## Datasets \u002F Experiments \u002F Prompts\n\n```bash\npx dataset list --format raw --no-progress | jq '.[].name'\npx dataset get \u003Cname> --format raw | jq '.examples[] | {input, output: .expected_output}'\npx dataset get \u003Cname> --split train --format raw | jq .    # filter by split\npx dataset get \u003Cname> --version \u003Cversion-id> --format raw | jq .\npx experiment list --dataset \u003Cname> --format raw --no-progress | jq '.[] | {id, name, failed_run_count}'\npx experiment get \u003Cid> --format raw --no-progress | jq '.[] | select(.error != null) | {input, error}'\npx prompt list --format raw --no-progress | jq '.[].name'\npx prompt get \u003Cname> --format text --no-progress   # plain text, ideal for piping to AI\n```\n\n## Annotation Configs\n\nFull CRUD: `list`, `get`, `create`, `update`, `delete`. Types are `CATEGORICAL` (labels + optional scores), `CONTINUOUS` (numeric range), `FREEFORM` (free text).\n\n```bash\npx annotation-config list                                                # all configs (table view)\npx annotation-config list --format raw --no-progress | jq -r '.[].name' # config names as JSON\npx annotation-config get response-quality --format raw --no-progress     # one config by name or ID\n\n# create — categorical (scored labels), continuous (numeric range), or freeform (free text)\npx annotation-config create --type CATEGORICAL --name response-quality --value good=1 --value bad=0\npx annotation-config create --type CONTINUOUS --name confidence --lower-bound 0 --upper-bound 1\npx annotation-config create --type FREEFORM --name reviewer-notes --description 'Free-form reviewer feedback'\n\n# update by name or ID — only the fields you pass change; type is immutable\npx annotation-config update response-quality --name answer-quality --optimization-direction MAXIMIZE\npx annotation-config update response-quality --value good=1 --value acceptable=0.5 --value bad=0\npx annotation-config update response-quality --description \"Updated\" --format raw --no-progress | jq -r '.id'\n\n# delete by ID — requires PHOENIX_CLI_DANGEROUSLY_ENABLE_DELETES=true; --yes skips the prompt\npx annotation-config delete QW5ub3RhdGlvbkNvbmZpZzoxMjM= --yes\n```\n\nCategorical values are specified the same way in `create` and `update`: repeatable `--value label[=score]` (score optional), or a single `--values '\u003Cjson>'` payload — mutually exclusive. `update` fetches the existing config, merges your flags, and writes the full body back via `PUT \u002Fv1\u002Fannotation_configs\u002F{id}`; it requires at least one field flag. Other type-specific flags: `--lower-bound`\u002F`--upper-bound` (CONTINUOUS\u002FFREEFORM), `--threshold` (FREEFORM). Invalid input (bad flags, type mismatches, malformed values) exits `3` (`INVALID_ARGUMENT`) with a `{error, code, hint?}` JSON envelope on stderr in `raw`\u002F`json` mode. `get`\u002F`create`\u002F`update` output the config object (single object in `raw`\u002F`json`, not an array).\n\n## GraphQL\n\nFor ad-hoc queries not covered by the commands above. Output is `{\"data\": {...}}`.\n\n```bash\npx api graphql '{ projectCount datasetCount promptCount evaluatorCount }'\npx api graphql '{ projects { edges { node { name traceCount tokenCountTotal } } } }' | jq '.data.projects.edges[].node'\npx api graphql '{ datasets { edges { node { name exampleCount experimentCount } } } }' | jq '.data.datasets.edges[].node'\npx api graphql '{ evaluators { edges { node { name kind } } } }' | jq '.data.evaluators.edges[].node'\n# evaluator kind values: \"LLM\" | \"CODE\" | \"BUILTIN\"\n# CODE = server-side code evaluator running in a sandbox; BUILTIN = pre-built server evaluator\n\n# Introspect any type\npx api graphql '{ __type(name: \"Project\") { fields { name type { name } } } }' | jq '.data.__type.fields[]'\n```\n\nKey root fields: `projects`, `getProjectByName(name:)`, `datasets`, `prompts`, `evaluators`, `projectCount`, `datasetCount`, `promptCount`, `evaluatorCount`, `viewer`.\n\n`getProjectByName(name:)` targets one project; `projects(first: 1)` picks an\narbitrary one. There is no `traces` connection: to list traces, query `spans`\nwith `filterCondition: \"parent_span is None\"`, which keeps root spans, as the\nUI's traces table does. See [Filter expressions](#filter-expressions) below.\n\n### Filter expressions\n\n`spans`, `sessions`, and the project aggregates take filter conditions: Python\nboolean expressions compiled server-side. There are three languages, and the\nargument picks the language. Read\n[references\u002Ffilter-expressions.md](references\u002Ffilter-expressions.md) before\nwriting a condition; it has the full vocabulary, operators, and compiled\nexamples for each.\n\n| Argument | Matches | Names come from |\n| -------- | ------- | --------------- |\n| `filterCondition` | individual spans | the exhaustive table in the reference |\n| `traceFilterCondition` | whole traces | `traceFilterVocabulary` |\n| `sessionFilterCondition` | sessions | `sessionFilterVocabulary` |\n\n**Root spans.** There is no `traces` connection and no root-span argument.\n`filterCondition: \"parent_span is None\"` keeps root spans, including orphans\nwhose parent was never received, and is what the UI's traces table runs;\n`parent_id is None` keeps only spans with no parent id. A root span is usually\none per trace, and either clause composes with the rest of the filter:\n\n```bash\npx api graphql '{\n  getProjectByName(name: \"default\") { spans(\n    first: 20\n    filterCondition: \"parent_id is None and status_code == \\\"ERROR\\\"\"\n    sort: { col: startTime, dir: desc }\n  ) { edges { node { spanId name latencyMs } } } }\n}' | jq '.data.getProjectByName.spans.edges[].node'\n```\n\n**Annotations.** The accessor picks the level, and the wrong level matches\nnothing:\n\n| Accessor | Matches annotations on | Written by |\n| -------- | ---------------------- | ---------- |\n| `annotations[\"name\"]` | the span itself | `px span annotate`, `px span add-note` |\n| `trace_annotations[\"name\"]` | the span's parent trace | `px trace annotate`, `px trace add-note` |\n| `session_annotations[\"name\"]` | the session (session filter only) | `px session annotate`, `px session add-note` |\n\n```bash\npx api graphql '{\n  getProjectByName(name: \"default\") { spans(\n    first: 20\n    filterCondition: \"parent_id is None and trace_annotations[\\\"quality\\\"].label == \\\"poor\\\"\"\n  ) { edges { node { spanId name } } } }\n}' | jq '.data.getProjectByName.spans.edges[].node'\n```\n\n**Traces.** `traceFilterCondition` keeps the spans of matching traces and\ncomposes with `filterCondition`:\n\n```bash\npx api graphql '{\n  getProjectByName(name: \"default\") { spans(\n    first: 20\n    filterCondition: \"parent_id is None\"\n    traceFilterCondition: \"error_count > 0 and latency_ms > 1000\"\n  ) { edges { node { spanId name latencyMs } } } }\n}' | jq '.data.getProjectByName.spans.edges[].node'\n```\n\n**Sessions.** `px session list` has no filter flag, so selecting sessions by\nshape goes through GraphQL:\n\n```bash\npx api graphql '{\n  projects(first: 1) { edges { node { sessions(\n    first: 10\n    sessionFilterCondition: \"num_traces > 5 and any(span.status_code == \\\"ERROR\\\" for span in spans)\"\n  ) { edges { node { sessionId numTraces numTracesWithError } } } } } }\n}' | jq '.data.projects.edges[0].node.sessions.edges[].node'\n```\n\n**Discover names and validate.** The vocabularies are generated from the\ncompiler's own bindings, so they always match what compiles:\n\n```bash\npx api graphql '{ projects(first: 1) { edges { node { traceFilterVocabulary {\n  name type category description iterableName } } } } }' \\\n  | jq '.data.projects.edges[0].node.traceFilterVocabulary[] | {name, type, category}'\n\npx api graphql '{ projects(first: 1) { edges { node {\n  validateSpanFilterCondition(condition: \"parent_id is None\") { isValid errorMessage }\n  validateTraceFilterCondition(condition: \"error_count > 0\") { isValid errorMessage }\n  validateSessionFilterCondition(condition: \"num_traces > 5\") { isValid errorMessage }\n} } } }'\n```\n\nOn fields that accept both levels (e.g. `Project.recordCount`),\n`sessionFilterCondition` and `filterCondition` are mutually exclusive.\n\n## Docs\n\nDownload Phoenix documentation markdown for local use by coding agents.\n\n```bash\npx docs fetch                                # fetch default workflow docs to .px\u002Fdocs\npx docs fetch --workflow tracing             # fetch only tracing docs\npx docs fetch --workflow tracing --workflow evaluation\npx docs fetch --dry-run                      # preview what would be downloaded\npx docs fetch --refresh                      # clear .px\u002Fdocs and re-download\npx docs fetch --output-dir .\u002Fmy-docs         # custom output directory\n```\n\nKey options: `--workflow` (repeatable, values: `tracing`, `evaluation`, `datasets`, `prompts`, `integrations`, `sdk`, `self-hosting`, `all`), `--dry-run`, `--refresh`, `--output-dir` (default `.px\u002Fdocs`), `--workers` (default 10).\n",{"name":5,"license":15,"metadata":24,"description":7,"compatibility":27},{"author":25,"version":26},"arize-ai","3.5.0","Requires Node.js (for npx) or global install of @arizeai\u002Fphoenix-cli. Optionally requires jq for JSON processing.","master","49e49abf2f670d429e0b7e2c0349739c3fdd5cbe","skills\u002Fphoenix-cli",5,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium","https:\u002F\u002Fgithub.com\u002Fstanfish06","https:\u002F\u002Fwww.stanfish.dev\u002F","2026-11-14 21:31:37",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add stanfish06\u002Fskillquarium --skill phoenix-cli",{"tool":42,"command":43},"bunx","bunx skills add stanfish06\u002Fskillquarium --skill phoenix-cli",{"tool":45,"command":46},"pnpm","pnpm dlx skills add stanfish06\u002Fskillquarium --skill phoenix-cli","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fphoenix-cli\u002FSKILL.md",true,[50],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"references\u002Ffilter-expressions.md","REFERENCE","参考文档",15264,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fphoenix-cli\u002Freferences\u002Ffilter-expressions.md",[57,65,73,80,87,94],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":61,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M76ZJTRVA456GD7K8Y3EP82H","zarr-python","Stores and queries chunked N-D scientific arrays with Zarr-Python 3, including codecs, sharding, S3\u002FGCS storage, and NumPy\u002FDask\u002FXarray integration. Use for array layout, bounded I\u002FO, format migration, or scientific metadata preservation.","MIT","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fzarr-python\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":69,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M76ZJQZ15Q1HKC5V85NHE325","yeet","Publish local changes to GitHub by confirming scope, committing intentionally, pushing the branch, and opening a draft PR through the GitHub app from this plugin, with `gh` used only as a fallback where connector coverage is insufficient.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fyeet\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fyeet\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M76ZJ8ASZ4QYQ70Y6SBA4Z4S","xarray","N-dimensional labeled arrays and datasets in Python. Built on top of NumPy and Dask. It introduces labels in the form of dimensions, coordinates, and attributes on top of raw NumPy-like arrays, making data analysis in physical sciences more intuitive and less error-prone. Use for working with multi-dimensional scientific data, NetCDF\u002FGRIB\u002FZarr files, climate\u002Fweather\u002Foceanographic datasets, remote sensing, geospatial imaging, large out-of-memory datasets with Dask, and labeled array operations.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fxarray\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":61,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M76ZHFBXD6VXPQ02VCEG202B","writing-mstest-tests","Use when asked to fix, rewrite, update, improve, modernize, show corrected code for, or explain existing MSTest tests or MSTest-specific configuration. Use for \"review\" when corrected code or edits are wanted, even for one pasted assertion or passing tests with bad failure output. Covers expected\u002Factual labels; generic Boolean, collection, string, numeric, null, identity, exception, hard-cast, and object[] checks; TestContext\u002Flifecycle; timeout\u002Fcancellation; OS\u002FCI conditions, retry, cleanup, parallelization, MSTest.Sdk project setup, and MSTESTxxxx. Honor the installed MSTest version. DO NOT USE to design new test cases (code-testing), perform report-only audits, create project files rather than explain MSTest setup, run tests, migrate frameworks, or handle non-MSTest\u002Fnon-.NET code.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwriting-mstest-tests\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":61,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M76ZDFDF4N88RH6HSYGS7GP2","wgs-prs","End-to-end WGS to polygenic risk score pipeline. Takes paired-end FASTQ files (or a pre-existing VCF) through nf-core\u002Fsarek for variant calling, applies VCF QC (normalisation, hard filtering, Ti\u002FTv and Het\u002FHom checks), then computes polygenic risk scores via the PGS Catalog. Fills the FASTQ to VCF gap upstream of the gwas-prs skill.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwgs-prs\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":98,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M76ZCC1SC68J42QK4MDC8RCG","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwebapp-testing\u002FSKILL.md",[],[]]