Development
Agent
sessions
A session groups the traces of one multi-turn conversation.
Claude Code
> /plugin marketplace add arize-ai/phoenix> /plugin install arize-phoenix@arize-phoenix
Cursor
Cursor also loads subagents from .claude/agents, so copy this file there to use it in Cursor.
Agent definition
sessions.mdProjectSession
A session groups the traces of one multi-turn conversation.
Reaching a session
- `Project.sessions(timeRange, first, after, sort, sessionFilterCondition)` → connection of `ProjectSession`. `sessionFilterCondition` is a session filter expression; discover its bindable names via `Project.sessionFilterVocabulary` and check one with `Project.validateSessionFilterCondition`. The user-facing grammar reference (aggregates, comprehensions, annotations, root-span access) is the [Filter Expressions](https://arize.com/docs/phoenix/tracing/how-to-tracing/filter-expressions) doc; the enforced grammar lives in `internal_docs/specs/session-filter-dsl.md`.
- `getProjectSessionById(sessionId: String!)` → `ProjectSession` — `sessionId` is the raw session string, not a global id.
Fields
- `sessionId`, `startTime`, `endTime`, `project`
- `numTraces`, `numTracesWithError`
- `firstInput { value }`, `lastOutput { value }`
- `tokenUsage { prompt completion total }` — each is a `Float`
- `costSummary { total { cost tokens } prompt { cost tokens } completion { cost tokens } }`, `costDetailSummaryEntries`
- `traceLatencyMsQuantile(probability: Float!)` — the percentile field (not `latency`)
- `traces(first, after)` — forward-only; `first` is effectively required. Summarize each turn via the trace's `rootSpan { name input { truncatedValue } output { truncatedValue } }`.
- `sessionAnnotations { name label score }`, `sessionAnnotationSummaries(filter)`
Example
One round trip: session rollups plus a per-turn summary read from each trace's root span.
query SessionDetail($id: ID!) {
node(id: $id) {
... on ProjectSession {
sessionId
numTraces
numTracesWithError
tokenUsage { total }
costSummary { total { cost tokens } }
p50: traceLatencyMsQuantile(probability: 0.5)
traces(first: 20) {
edges {
node {
traceId
latencyMs
numSpans
rootSpan {
spanId
name
statusCode
input { truncatedValue }
output { truncatedValue }
}
}
}
pageInfo { hasNextPage endCursor }
}
}
}
}Read more
ProjectSession
A session groups the traces of one multi-turn conversation.
Reaching a session
- `Project.sessions(timeRange, first, after, sort, sessionFilterCondition)` → connection of `ProjectSession`. `sessionFilterCondition` is a session filter expression; discover its bindable names via `Project.sessionFilterVocabulary` and check one with `Project.validateSessionFilterCondition`. The user-facing grammar reference (aggregates, comprehensions, annotations, root-span access) is the [Filter Expressions](https://arize.com/docs/phoenix/tracing/how-to-tracing/filter-expressions) doc; the enforced grammar lives in `internal_docs/specs/session-filter-dsl.md`.
- `getProjectSessionById(sessionId: String!)` → `ProjectSession` — `sessionId` is the raw session string, not a global id.
Fields
- `sessionId`, `startTime`, `endTime`, `project`
- `numTraces`, `numTracesWithError`
- `firstInput { value }`, `lastOutput { value }`
- `tokenUsage { prompt completion total }` — each is a `Float`
- `costSummary { total { cost tokens } prompt { cost tokens } completion { cost tokens } }`, `costDetailSummaryEntries`
- `traceLatencyMsQuantile(probability: Float!)` — the percentile field (not `latency`)
- `traces(first, after)` — forward-only; `first` is effectively required. Summarize each turn via the trace's `rootSpan { name input { truncatedValue } output { truncatedValue } }`.
- `sessionAnnotations { name label score }`, `sessionAnnotationSummaries(filter)`
Example
One round trip: session rollups plus a per-turn summary read from each trace's root span.
query SessionDetail($id: ID!) {
node(id: $id) {
... on ProjectSession {
sessionId
numTraces
numTracesWithError
tokenUsage { total }
costSummary { total { cost tokens } }
p50: traceLatencyMsQuantile(probability: 0.5)
traces(first: 20) {
edges {
node {
traceId
latencyMs
numSpans
rootSpan {
spanId
name
statusCode
input { truncatedValue }
output { truncatedValue }
}
}
}
pageInfo { hasNextPage endCursor }
}
}
}
} Stats
12,251
Stars
1,286
Forks
Active
Maintenance
Python
Language
Last commit
Created
12k10 skills18 agents1 MCP
Other agents on phoenix.
More agents from other plugins.
Auto-invoked
cavecrew-builder
AgentSurgical 1-2 file edit. Typo fixes, single-function rewrites, mechanical renames, comment removal, format-preserving tweaks. Hard…
Questions about sessions.
- Which coding agents can use sessions?
- sessions installs in Claude Code and Cursor: each loads subagents from .claude/agents, so copy the file there. Flowy's auto-invocation runs in Claude Code only.

