project-spans-traces
- `Project.spans(timeRange, first, after, sort: SpanSort, rootSpansOnly: Boolean, filterCondition: String)` → connection of `Span`. There is **no `traces` connection on `Project`** — use `spans(rootSpansOnly: true)` for root spans, which is usually one per trace though nothing
$ npx -y skills add arize-ai/phoenix --agent claude-codeHow it fires
How this agent gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
Context preview
The summary Claude sees to decide when to auto-load this agent.
- `Project.spans(timeRange, first, after, sort: SpanSort, rootSpansOnly: Boolean, filterCondition: String)` → connection of `Span`. There is **no `traces` connection on `Project`** — use `spans(rootSpansOnly: true)` for root spans, which is usually one per trace though nothing
Agent definition
project-spans-traces.mdProject, Span, Trace
Project
- `Project.spans(timeRange, first, after, sort: SpanSort, rootSpansOnly: Boolean, filterCondition: String)` → connection of `Span`. There is **no `traces` connection on `Project`** — use `spans(rootSpansOnly: true)` for root spans, which is usually one per trace though nothing enforces that -- fragmented traces can have several.
- `Project.trace(traceId: ID!)` → `Trace` — lookup by OTel hex trace id.
- Aggregates, most accepting `timeRange` and `filterCondition`: `traceCount`, `recordCount` (span count), `tokenCountTotal`, `tokenCountPrompt`, `tokenCountCompletion`, `costSummary`, `latencyMsQuantile(probability: Float!)`, `spanLatencyMsQuantile(probability: Float!)`.
- Discovery fields: `spanAnnotationNames`, `traceAnnotationsNames`, `spanAnnotationSummary`, `documentEvaluationNames` — check which evals/annotations exist before querying them.
- `validateSpanFilterCondition(condition: String!)` — check a filter string without running it.
Span
Key fields: `spanId` (OTel hex), `name`, `spanKind`, `statusCode`, `startTime`, `latencyMs`, `cumulativeTokenCountTotal`, `input { truncatedValue value }`, `output { truncatedValue value }`, `spanAnnotations { name label score }`, `trace { traceId }`. **`Span` has no `traceId` field** — read the OTel trace id via the nested `trace { traceId }`.
Trace
Key fields: `traceId`, `latencyMs`, `numSpans`, `rootSpan { ... }` (the entry span — use it for a one-line turn/trace summary), `spans(first, after)`, `projectSessionId`.
Examples
Recent root spans (one per trace), slowest first:
query RecentTraces($id: ID!, $first: Int = 20) {
node(id: $id) {
... on Project {
spans(first: $first, rootSpansOnly: true, sort: { col: latencyMs, dir: desc }) {
edges {
node {
spanId
name
latencyMs
statusCode
startTime
cumulativeTokenCountTotal
trace { traceId }
}
}
pageInfo { hasNextPage endCursor }
}
}
}
}Filtered spans (error LLM spans):
query ErrorSpans($id: ID!) {
node(id: $id) {
... on Project {
spans(first: 20, filterCondition: "span_kind == 'LLM' and status_code == 'ERROR'") {
edges { node { spanId name statusCode trace { traceId } } }
}
}
}
}Read more
Project, Span, Trace
Project
- `Project.spans(timeRange, first, after, sort: SpanSort, rootSpansOnly: Boolean, filterCondition: String)` → connection of `Span`. There is **no `traces` connection on `Project`** — use `spans(rootSpansOnly: true)` for root spans, which is usually one per trace though nothing enforces that -- fragmented traces can have several.
- `Project.trace(traceId: ID!)` → `Trace` — lookup by OTel hex trace id.
- Aggregates, most accepting `timeRange` and `filterCondition`: `traceCount`, `recordCount` (span count), `tokenCountTotal`, `tokenCountPrompt`, `tokenCountCompletion`, `costSummary`, `latencyMsQuantile(probability: Float!)`, `spanLatencyMsQuantile(probability: Float!)`.
- Discovery fields: `spanAnnotationNames`, `traceAnnotationsNames`, `spanAnnotationSummary`, `documentEvaluationNames` — check which evals/annotations exist before querying them.
- `validateSpanFilterCondition(condition: String!)` — check a filter string without running it.
Span
Key fields: `spanId` (OTel hex), `name`, `spanKind`, `statusCode`, `startTime`, `latencyMs`, `cumulativeTokenCountTotal`, `input { truncatedValue value }`, `output { truncatedValue value }`, `spanAnnotations { name label score }`, `trace { traceId }`. **`Span` has no `traceId` field** — read the OTel trace id via the nested `trace { traceId }`.
Trace
Key fields: `traceId`, `latencyMs`, `numSpans`, `rootSpan { ... }` (the entry span — use it for a one-line turn/trace summary), `spans(first, after)`, `projectSessionId`.
Examples
Recent root spans (one per trace), slowest first:
query RecentTraces($id: ID!, $first: Int = 20) {
node(id: $id) {
... on Project {
spans(first: $first, rootSpansOnly: true, sort: { col: latencyMs, dir: desc }) {
edges {
node {
spanId
name
latencyMs
statusCode
startTime
cumulativeTokenCountTotal
trace { traceId }
}
}
pageInfo { hasNextPage endCursor }
}
}
}
}Filtered spans (error LLM spans):
query ErrorSpans($id: ID!) {
node(id: $id) {
... on Project {
spans(first: 20, filterCondition: "span_kind == 'LLM' and status_code == 'ERROR'") {
edges { node { spanId name statusCode trace { traceId } } }
}
}
}
}Repo: arize-ai/phoenix
Other agents on phoenix.
- VENDOR
- Upstream: https://github.com/DougTrajano/pydantic-ai-skills - Original version: 0.10.1 (SHA `d1a19c8e6dbbee5e6726c8de70aadca2966fb190`) - Vendored: 2026-05-19 - License: MIT — preserved verbatim in [LICENSE](./LICENSE)
Open agent - annotations
Annotations are named labels/scores attached to spans, traces, or experiment runs by humans, code, or LLM judges.
Open agent - datasets
There is **no `getDatasetByName`** — fetch via `node(id:) { ... on Dataset { ... } }` or the `datasets(filter: DatasetFilter, sort)` connection.
Open agent - experiments
An experiment is one run of a prompt or pipeline over every example in a dataset.
Open agent - prompts
There is **no `getPromptByName`** — fetch via `node(id:)` or the `prompts(filter: PromptFilter, labelIds)` connection.
Open agent - sessions
A session groups the traces of one multi-turn conversation.
Open agent

