annotations
Annotations are named labels/scores attached to spans, traces, sessions, or experiment runs by humans, code, or LLM judges. A **note** is an annotation with…
- `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
> /plugin marketplace add arize-ai/phoenix > /plugin install arize-phoenix@arize-phoenix
How it fires
How this agent gets triggered: by you, by Claude, or both.
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
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 }`.
Key fields: `traceId`, `latencyMs`, `numSpans`, `rootSpan { ... }` (the entry span — use it for a one-line turn/trace summary), `spans(first, after)`, `projectSessionId`.
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
Annotations are named labels/scores attached to spans, traces, sessions, or experiment runs by humans, code, or LLM judges. A **note** is an annotation with…
There is **no `getDatasetByName`** — fetch via `node(id:) { ... on Dataset { ... } }` or the `datasets(filter: DatasetFilter, sort)` connection.
An experiment is one run of a prompt or pipeline over every example in a dataset.
There is **no `getPromptByName`** — fetch via `node(id:)` or the `prompts(filter: PromptFilter, labelIds)` connection.
A session groups the traces of one multi-turn conversation.