---
title: "Run Server Agent"
method: POST
path: "/agents/server/sessions/{session_id}/chat"
tags: ["chat"]
---

# Run Server Agent

`POST /agents/server/sessions/{session_id}/chat`

Stream a chat turn from the GraphQL server agent.

This is the endpoint the PXI CLI talks to directly (no pre-configured
agent record): it builds a fresh server agent per request from the
caller-supplied model and contexts, then streams the reply back as
Vercel-AI chunks.

The request contexts gate capabilities — GraphQL mutations, web access,
and subagents — and mutations are refused for viewer users. When trace
recording is enabled (and permitted by system settings), the run is
traced; locally ingested traces are persisted to the agent's project
once the stream completes.

Returns ``403`` if agents or the server agent are disabled, or if a
viewer requests mutations.

## Path parameters

- `session_id` string, required

## Request body

- union — Discriminated union of chat request payloads.
  - ChatSubmitMessage — Submit message extended with Phoenix-specific fields.
    - `trigger` 'submit-message'
    - `id` string, required
    - `messages` PhoenixUIMessage[], required
      - `id` string, required
      - `role` 'system' | 'user' | 'assistant', required
      - `metadata` union
        - AssistantMessageMetadata — Wire schema for the chat stream's `message_metadata` payload.
          - `type` 'assistant'
          - `sessionId` string, required
          - `trace` AssistantMessageMetadataTraceIds
            - `traceId` string, required
            - `rootSpanId` string, required
          - `turnTraceContext` TurnTraceContext
            - `traceId` string, required
            - `rootSpanId` string, required
            - `startedAt` string, date-time, required
          - `usage` AssistantMessageMetadataUsage
            - `tokens` AssistantMessageMetadataUsageTokens, required
              - …
            - `promptDetails` AssistantMessageMetadataUsageTokenDetails
              - …
        - UserMessageMetadata — Wire schema for metadata the browser attaches to outgoing user messages.
          - `type` 'user'
          - `currentDateTime` string, required
          - `timeZone` string, required
      - `parts` union[], required
        - union
          - TextUIPart — A text part of a message.
            - `type` 'text'
            - `text` string, required
            - `state` 'streaming' | 'done', nullable
            - `providerMetadata` object, nullable
          - ReasoningUIPart — A reasoning part of a message.
            - `type` 'reasoning'
            - `text` string, required
            - `state` 'streaming' | 'done', nullable
            - `providerMetadata` object, nullable
          - ToolInputStreamingPart — Tool part in input-streaming state.
            - `type` string, required
            - `toolCallId` string, required
            - `title` string, nullable
            - `state` 'input-streaming'
            - `input` unknown
            - `providerExecuted` boolean, nullable
            - `callProviderMetadata` object, nullable
            - `approval` union
              - …
          - ToolInputAvailablePart — Tool part in input-available state.
            - `type` string, required
            - `toolCallId` string, required
            - `title` string, nullable
            - `state` 'input-available'
            - `input` unknown
            - `providerExecuted` boolean, nullable
            - `callProviderMetadata` object, nullable
            - `approval` union
              - …
          - ToolOutputAvailablePart — Tool part in output-available state.
            - `type` string, required
            - `toolCallId` string, required
            - `title` string, nullable
            - `state` 'output-available'
            - `input` unknown
            - `output` unknown
            - `providerExecuted` boolean, nullable
            - `callProviderMetadata` object, nullable
            - `preliminary` boolean, nullable
            - `approval` union
              - …
          - ToolOutputErrorPart — Tool part in output-error state.
            - `type` string, required
            - `toolCallId` string, required
            - `title` string, nullable
            - `state` 'output-error'
            - `input` unknown
            - `rawInput` unknown
            - `errorText` string, required
            - `providerExecuted` boolean, nullable
            - `callProviderMetadata` object, nullable
            - `approval` union
              - …
          - ToolApprovalRequestedPart — Tool part in approval-requested state (awaiting user decision).
            - `type` string, required
            - `toolCallId` string, required
            - `title` string, nullable
            - `state` 'approval-requested'
            - `input` unknown
            - `providerExecuted` boolean, nullable
            - `callProviderMetadata` object, nullable
            - `approval` union
              - …
          - ToolApprovalRespondedPart — Tool part in approval-responded state (user approved/denied, execution pending).
            - `type` string, required
            - `toolCallId` string, required
            - `title` string, nullable
            - `state` 'approval-responded'
            - `input` unknown
            - `providerExecuted` boolean, nullable
            - `callProviderMetadata` object, nullable
            - `approval` union
              - …
          - ToolOutputDeniedPart — Tool part in output-denied state (tool was denied, terminal state).
            - `type` string, required
            - `toolCallId` string, required
            - `title` string, nullable
            - `state` 'output-denied'
            - `input` unknown
            - `providerExecuted` boolean, nullable
            - `callProviderMetadata` object, nullable
            - `approval` union
              - …
          - DynamicToolInputStreamingPart — Dynamic tool part in input-streaming state.
            - `type` 'dynamic-tool'
            - `toolName` string, required
            - `toolCallId` string, required
            - `title` string, nullable
            - `state` 'input-streaming'
            - `input` unknown
            - `providerExecuted` boolean, nullable
            - `callProviderMetadata` object, nullable
            - `approval` union
              - …
          - DynamicToolInputAvailablePart — Dynamic tool part in input-available state.
            - `type` 'dynamic-tool'
            - `toolName` string, required
            - `toolCallId` string, required
            - `title` string, nullable
            - `state` 'input-available'
            - `input` unknown, required
            - `providerExecuted` boolean, nullable
            - `callProviderMetadata` object, nullable
            - `approval` union
              - …
          - DynamicToolOutputAvailablePart — Dynamic tool part in output-available state.
            - `type` 'dynamic-tool'
            - `toolName` string, required
            - `toolCallId` string, required
            - `title` string, nullable
            - `state` 'output-available'
            - `input` unknown, required
            - `output` unknown, required
            - `providerExecuted` boolean, nullable
            - `callProviderMetadata` object, nullable
            - `preliminary` boolean, nullable
            - `approval` union
              - …
          - DynamicToolOutputErrorPart — Dynamic tool part in output-error state.
            - `type` 'dynamic-tool'
            - `toolName` string, required
            - `toolCallId` string, required
            - `title` string, nullable
            - `state` 'output-error'
            - `input` unknown, required
            - `errorText` string, required
            - `providerExecuted` boolean, nullable
            - `callProviderMetadata` object, nullable
            - `approval` union
              - …
          - DynamicToolApprovalRequestedPart — Dynamic tool part in approval-requested state (awaiting user decision).
            - `type` 'dynamic-tool'
            - `toolName` string, required
            - `toolCallId` string, required
            - `title` string, nullable
            - `state` 'approval-requested'
            - `input` unknown, required
            - `providerExecuted` boolean, nullable
            - `callProviderMetadata` object, nullable
            - `approval` union
              - …
          - DynamicToolApprovalRespondedPart — Dynamic tool part in approval-responded state (user approved/denied, execution pending).
            - `type` 'dynamic-tool'
            - `toolName` string, required
            - `toolCallId` string, required
            - `title` string, nullable
            - `state` 'approval-responded'
            - `input` unknown, required
            - `providerExecuted` boolean, nullable
            - `callProviderMetadata` object, nullable
            - `approval` union
              - …
          - DynamicToolOutputDeniedPart — Dynamic tool part in output-denied state (tool was denied, terminal state).
            - `type` 'dynamic-tool'
            - `toolName` string, required
            - `toolCallId` string, required
            - `title` string, nullable
            - `state` 'output-denied'
            - `input` unknown, required
            - `providerExecuted` boolean, nullable
            - `callProviderMetadata` object, nullable
            - `approval` union
              - …
          - SourceUrlUIPart — A source part of a message.
            - `type` 'source-url'
            - `sourceId` string, required
            - `url` string, required
            - `title` string, nullable
            - `providerMetadata` object, nullable
          - SourceDocumentUIPart — A document source part of a message.
            - `type` 'source-document'
            - `sourceId` string, required
            - `mediaType` string, required
            - `title` string, required
            - `filename` string, nullable
            - `providerMetadata` object, nullable
          - FileUIPart — A file part of a message.
            - `type` 'file'
            - `mediaType` string, required
            - `filename` string, nullable
            - `url` string, required
            - `providerMetadata` object, nullable
          - DataUIPart — Data part with dynamic type based on data name.
            - `type` string, required
            - `id` string, nullable
            - `data` unknown, required
          - StepStartUIPart — A step boundary part of a message.
            - `type` 'step-start'
    - `ingestTraces` boolean
    - `exportRemoteTraces` boolean
    - `attachUserId` boolean — When true and the request is authenticated as a PhoenixUser, attaches the user's email as the OpenInference ``user.id`` span attribute on all traced work for this request.
    - `contexts` ChatContext[]
      - union — Discriminated union of every UI-state context the agent understands.
        - AppContext — Per-turn browser clock context for resolving relative time requests.
          - `type` 'app', required
          - `currentDateTime` string, required
          - `timeZone` string, required
        - ProjectContext — Project the user is currently viewing. ``span_filter`` carries the project-scoped span filter expression when the span filter field is mounted — empty string when the field is mounted with no condition applied, ``None`` when the field is not present at all. It describes the view in full, root-span scoping included (which is expressed within the filter DSL as ``parent_id is None``).
          - `type` 'project', required
          - `projectNodeId` string, required
          - `spanFilter` string, nullable
        - TraceContext
          - `type` 'trace', required
          - `projectNodeId` string, required
          - `otelTraceId` string, required
        - SessionContext — Session the user is currently viewing.
          - `type` 'session', required
          - `projectNodeId` string, required
          - `sessionNodeId` string, required
        - PromptContext — Prompt the user is currently viewing.
          - `type` 'prompt', required
          - `promptNodeId` string, required
        - PromptVersionContext — Prompt version the user is currently viewing.
          - `type` 'prompt_version', required
          - `promptNodeId` string, required
          - `promptVersionNodeId` string, required
        - AgentSpanContext — Span the user has selected. Exactly one of ``span_node_id`` (relay) or ``otel_span_id`` (OpenTelemetry hex) must be set. ``project_node_id`` is optional because a span can be selected from views outside a project route.
          - `type` 'span', required
          - `projectNodeId` string, nullable
          - `spanNodeId` string, nullable
          - `otelSpanId` string, nullable
        - PlaygroundContext — Playground prompt editor state mounted in the current browser route.
          - `type` 'playground', required
          - `recordExperiments` boolean
          - `repetitions` integer
          - `nextExperimentScaffold` PlaygroundExperimentScaffoldContext — Experiment name/description/metadata the user has staged for the playground's *next* dataset-backed run, before that run has started. The playground UI lets the user pre-set how the next recorded run's experiment will be named, described, and tagged (via the ``set_playground_experiment_recording`` tool or the recording form). That staged state is surfaced here so the agent can see what is already set and avoid re-staging it. Field semantics: - ``name`` / ``description``: the staged values, surfaced to the model verbatim, or ``None`` when the user has not staged them. - ``has_metadata``: a presence flag, not the value. Only *whether* metadata has been staged is model-relevant (so the agent knows not to re-attach it); the metadata object itself is deliberately kept out of the prompt. A field left unstaged (``None`` / ``False``) falls back to the server default when the run starts. The scaffold is consumed once that next run begins.
            - `name` string, nullable
            - `description` string, nullable
            - `hasMetadata` boolean
          - `instances` PlaygroundInstanceContext[]
            - `instanceId` integer, required
            - `model` union
              - …
            - `experimentId` string, nullable
          - `evaluators` PlaygroundEvaluatorContext[]
            - `datasetEvaluatorId` string, required
            - `name` string, required
            - `kind` 'LLM' | 'CODE' | 'BUILTIN', required
            - `isBuiltin` boolean, required
            - `isApplied` boolean, required
        - CodeEvaluatorContext — Code-evaluator create/edit form mounted in the current browser route.
          - `type` 'code_evaluator', required
          - `evaluatorNodeId` string, nullable
        - LlmEvaluatorContext — LLM-evaluator create/edit form mounted in the current browser route.
          - `type` 'llm_evaluator', required
          - `evaluatorNodeId` string, nullable
        - DatasetContext — Dataset the user is currently viewing or has bound to a workflow. Carries the dataset's relay node id and, when known, the active version node id. These IDs scope the create-form handoff link and the sampling of active dataset examples used as prompt context; the dataset schema itself is open.
          - `type` 'dataset', required
          - `datasetNodeId` string, required
          - `datasetVersionNodeId` string, nullable
        - GraphQLContext — GraphQL runtime state.
          - `type` 'graphql', required
          - `mutationsEnabled` boolean, required
        - WebAccessContext — User's per-turn request to expose web search / fetch tools.
          - `type` 'web_access', required
          - `enabled` boolean, required
        - SubagentsContext — User's per-turn request to expose the subagent-spawning tool.
          - `type` 'subagents', required
          - `enabled` boolean, required
    - `editPermission` 'manual' | 'bypass'
    - `requestedSkills` string[] — Skills the user explicitly requested via the prompt's slash-command affordance. The server force-loads each available skill by injecting a synthetic load_skill tool call/result at the tail of the message history. Unknown or context-unavailable names are ignored.
    - `model` union, required
      - CustomProviderModelSelection — Chat against a stored custom provider record.
        - `providerType` 'custom', required
        - `providerId` string, required
        - `modelName` string, required
      - BuiltInProviderModelSelection — Chat against a Phoenix built-in provider. Credentials and connection details (base URL, Azure endpoint, AWS region) are resolved from the secret store first and the process environment second. ``openai_api_type`` is honoured by the OpenAI and Azure OpenAI branches; other providers ignore it.
        - `providerType` 'builtin', required
        - `provider` 'OPENAI' | 'AZURE_OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'DEEPSEEK' | 'XAI' | 'OLLAMA' | 'AWS' | 'CEREBRAS' | 'FIREWORKS' | 'GROQ' | 'MOONSHOT' | 'PERPLEXITY' | 'TOGETHER', required
        - `modelName` string, required
        - `openaiApiType` 'chat_completions' | 'responses'
    - `turnTraceContext` TurnTraceContext
      - `traceId` string, required
      - `rootSpanId` string, required
      - `startedAt` string, date-time, required
  - ChatRegenerateMessage — Regenerate message extended with Phoenix-specific fields.
    - `trigger` 'regenerate-message', required
    - `id` string, required
    - `messages` PhoenixUIMessage[], required
      - `id` string, required
      - `role` 'system' | 'user' | 'assistant', required
      - `metadata` union
        - AssistantMessageMetadata — Wire schema for the chat stream's `message_metadata` payload.
          - `type` 'assistant'
          - `sessionId` string, required
          - `trace` AssistantMessageMetadataTraceIds
            - `traceId` string, required
            - `rootSpanId` string, required
          - `turnTraceContext` TurnTraceContext
            - `traceId` string, required
            - `rootSpanId` string, required
            - `startedAt` string, date-time, required
          - `usage` AssistantMessageMetadataUsage
            - `tokens` AssistantMessageMetadataUsageTokens, required
              - …
            - `promptDetails` AssistantMessageMetadataUsageTokenDetails
              - …
        - UserMessageMetadata — Wire schema for metadata the browser attaches to outgoing user messages.
          - `type` 'user'
          - `currentDateTime` string, required
          - `timeZone` string, required
      - `parts` union[], required
        - union
          - TextUIPart — A text part of a message.
            - `type` 'text'
            - `text` string, required
            - `state` 'streaming' | 'done', nullable
            - `providerMetadata` object, nullable
          - ReasoningUIPart — A reasoning part of a message.
            - `type` 'reasoning'
            - `text` string, required
            - `state` 'streaming' | 'done', nullable
            - `providerMetadata` object, nullable
          - ToolInputStreamingPart — Tool part in input-streaming state.
            - `type` string, required
            - `toolCallId` string, required
            - `title` string, nullable
            - `state` 'input-streaming'
            - `input` unknown
            - `providerExecuted` boolean, nullable
            - `callProviderMetadata` object, nullable
            - `approval` union
              - …
          - ToolInputAvailablePart — Tool part in input-available state.
            - `type` string, required
            - `toolCallId` string, required
            - `title` string, nullable
            - `state` 'input-available'
            - `input` unknown
            - `providerExecuted` boolean, nullable
            - `callProviderMetadata` object, nullable
            - `approval` union
              - …
          - ToolOutputAvailablePart — Tool part in output-available state.
            - `type` string, required
            - `toolCallId` string, required
            - `title` string, nullable
            - `state` 'output-available'
            - `input` unknown
            - `output` unknown
            - `providerExecuted` boolean, nullable
            - `callProviderMetadata` object, nullable
            - `preliminary` boolean, nullable
            - `approval` union
              - …
          - ToolOutputErrorPart — Tool part in output-error state.
            - `type` string, required
            - `toolCallId` string, required
            - `title` string, nullable
            - `state` 'output-error'
            - `input` unknown
            - `rawInput` unknown
            - `errorText` string, required
            - `providerExecuted` boolean, nullable
            - `callProviderMetadata` object, nullable
            - `approval` union
              - …
          - ToolApprovalRequestedPart — Tool part in approval-requested state (awaiting user decision).
            - `type` string, required
            - `toolCallId` string, required
            - `title` string, nullable
            - `state` 'approval-requested'
            - `input` unknown
            - `providerExecuted` boolean, nullable
            - `callProviderMetadata` object, nullable
            - `approval` union
              - …
          - ToolApprovalRespondedPart — Tool part in approval-responded state (user approved/denied, execution pending).
            - `type` string, required
            - `toolCallId` string, required
            - `title` string, nullable
            - `state` 'approval-responded'
            - `input` unknown
            - `providerExecuted` boolean, nullable
            - `callProviderMetadata` object, nullable
            - `approval` union
              - …
          - ToolOutputDeniedPart — Tool part in output-denied state (tool was denied, terminal state).
            - `type` string, required
            - `toolCallId` string, required
            - `title` string, nullable
            - `state` 'output-denied'
            - `input` unknown
            - `providerExecuted` boolean, nullable
            - `callProviderMetadata` object, nullable
            - `approval` union
              - …
          - DynamicToolInputStreamingPart — Dynamic tool part in input-streaming state.
            - `type` 'dynamic-tool'
            - `toolName` string, required
            - `toolCallId` string, required
            - `title` string, nullable
            - `state` 'input-streaming'
            - `input` unknown
            - `providerExecuted` boolean, nullable
            - `callProviderMetadata` object, nullable
            - `approval` union
              - …
          - DynamicToolInputAvailablePart — Dynamic tool part in input-available state.
            - `type` 'dynamic-tool'
            - `toolName` string, required
            - `toolCallId` string, required
            - `title` string, nullable
            - `state` 'input-available'
            - `input` unknown, required
            - `providerExecuted` boolean, nullable
            - `callProviderMetadata` object, nullable
            - `approval` union
              - …
          - DynamicToolOutputAvailablePart — Dynamic tool part in output-available state.
            - `type` 'dynamic-tool'
            - `toolName` string, required
            - `toolCallId` string, required
            - `title` string, nullable
            - `state` 'output-available'
            - `input` unknown, required
            - `output` unknown, required
            - `providerExecuted` boolean, nullable
            - `callProviderMetadata` object, nullable
            - `preliminary` boolean, nullable
            - `approval` union
              - …
          - DynamicToolOutputErrorPart — Dynamic tool part in output-error state.
            - `type` 'dynamic-tool'
            - `toolName` string, required
            - `toolCallId` string, required
            - `title` string, nullable
            - `state` 'output-error'
            - `input` unknown, required
            - `errorText` string, required
            - `providerExecuted` boolean, nullable
            - `callProviderMetadata` object, nullable
            - `approval` union
              - …
          - DynamicToolApprovalRequestedPart — Dynamic tool part in approval-requested state (awaiting user decision).
            - `type` 'dynamic-tool'
            - `toolName` string, required
            - `toolCallId` string, required
            - `title` string, nullable
            - `state` 'approval-requested'
            - `input` unknown, required
            - `providerExecuted` boolean, nullable
            - `callProviderMetadata` object, nullable
            - `approval` union
              - …
          - DynamicToolApprovalRespondedPart — Dynamic tool part in approval-responded state (user approved/denied, execution pending).
            - `type` 'dynamic-tool'
            - `toolName` string, required
            - `toolCallId` string, required
            - `title` string, nullable
            - `state` 'approval-responded'
            - `input` unknown, required
            - `providerExecuted` boolean, nullable
            - `callProviderMetadata` object, nullable
            - `approval` union
              - …
          - DynamicToolOutputDeniedPart — Dynamic tool part in output-denied state (tool was denied, terminal state).
            - `type` 'dynamic-tool'
            - `toolName` string, required
            - `toolCallId` string, required
            - `title` string, nullable
            - `state` 'output-denied'
            - `input` unknown, required
            - `providerExecuted` boolean, nullable
            - `callProviderMetadata` object, nullable
            - `approval` union
              - …
          - SourceUrlUIPart — A source part of a message.
            - `type` 'source-url'
            - `sourceId` string, required
            - `url` string, required
            - `title` string, nullable
            - `providerMetadata` object, nullable
          - SourceDocumentUIPart — A document source part of a message.
            - `type` 'source-document'
            - `sourceId` string, required
            - `mediaType` string, required
            - `title` string, required
            - `filename` string, nullable
            - `providerMetadata` object, nullable
          - FileUIPart — A file part of a message.
            - `type` 'file'
            - `mediaType` string, required
            - `filename` string, nullable
            - `url` string, required
            - `providerMetadata` object, nullable
          - DataUIPart — Data part with dynamic type based on data name.
            - `type` string, required
            - `id` string, nullable
            - `data` unknown, required
          - StepStartUIPart — A step boundary part of a message.
            - `type` 'step-start'
    - `messageId` string, nullable
    - `ingestTraces` boolean
    - `exportRemoteTraces` boolean
    - `attachUserId` boolean — When true and the request is authenticated as a PhoenixUser, attaches the user's email as the OpenInference ``user.id`` span attribute on all traced work for this request.
    - `contexts` ChatContext[]
      - union — Discriminated union of every UI-state context the agent understands.
        - AppContext — Per-turn browser clock context for resolving relative time requests.
          - `type` 'app', required
          - `currentDateTime` string, required
          - `timeZone` string, required
        - ProjectContext — Project the user is currently viewing. ``span_filter`` carries the project-scoped span filter expression when the span filter field is mounted — empty string when the field is mounted with no condition applied, ``None`` when the field is not present at all. It describes the view in full, root-span scoping included (which is expressed within the filter DSL as ``parent_id is None``).
          - `type` 'project', required
          - `projectNodeId` string, required
          - `spanFilter` string, nullable
        - TraceContext
          - `type` 'trace', required
          - `projectNodeId` string, required
          - `otelTraceId` string, required
        - SessionContext — Session the user is currently viewing.
          - `type` 'session', required
          - `projectNodeId` string, required
          - `sessionNodeId` string, required
        - PromptContext — Prompt the user is currently viewing.
          - `type` 'prompt', required
          - `promptNodeId` string, required
        - PromptVersionContext — Prompt version the user is currently viewing.
          - `type` 'prompt_version', required
          - `promptNodeId` string, required
          - `promptVersionNodeId` string, required
        - AgentSpanContext — Span the user has selected. Exactly one of ``span_node_id`` (relay) or ``otel_span_id`` (OpenTelemetry hex) must be set. ``project_node_id`` is optional because a span can be selected from views outside a project route.
          - `type` 'span', required
          - `projectNodeId` string, nullable
          - `spanNodeId` string, nullable
          - `otelSpanId` string, nullable
        - PlaygroundContext — Playground prompt editor state mounted in the current browser route.
          - `type` 'playground', required
          - `recordExperiments` boolean
          - `repetitions` integer
          - `nextExperimentScaffold` PlaygroundExperimentScaffoldContext — Experiment name/description/metadata the user has staged for the playground's *next* dataset-backed run, before that run has started. The playground UI lets the user pre-set how the next recorded run's experiment will be named, described, and tagged (via the ``set_playground_experiment_recording`` tool or the recording form). That staged state is surfaced here so the agent can see what is already set and avoid re-staging it. Field semantics: - ``name`` / ``description``: the staged values, surfaced to the model verbatim, or ``None`` when the user has not staged them. - ``has_metadata``: a presence flag, not the value. Only *whether* metadata has been staged is model-relevant (so the agent knows not to re-attach it); the metadata object itself is deliberately kept out of the prompt. A field left unstaged (``None`` / ``False``) falls back to the server default when the run starts. The scaffold is consumed once that next run begins.
            - `name` string, nullable
            - `description` string, nullable
            - `hasMetadata` boolean
          - `instances` PlaygroundInstanceContext[]
            - `instanceId` integer, required
            - `model` union
              - …
            - `experimentId` string, nullable
          - `evaluators` PlaygroundEvaluatorContext[]
            - `datasetEvaluatorId` string, required
            - `name` string, required
            - `kind` 'LLM' | 'CODE' | 'BUILTIN', required
            - `isBuiltin` boolean, required
            - `isApplied` boolean, required
        - CodeEvaluatorContext — Code-evaluator create/edit form mounted in the current browser route.
          - `type` 'code_evaluator', required
          - `evaluatorNodeId` string, nullable
        - LlmEvaluatorContext — LLM-evaluator create/edit form mounted in the current browser route.
          - `type` 'llm_evaluator', required
          - `evaluatorNodeId` string, nullable
        - DatasetContext — Dataset the user is currently viewing or has bound to a workflow. Carries the dataset's relay node id and, when known, the active version node id. These IDs scope the create-form handoff link and the sampling of active dataset examples used as prompt context; the dataset schema itself is open.
          - `type` 'dataset', required
          - `datasetNodeId` string, required
          - `datasetVersionNodeId` string, nullable
        - GraphQLContext — GraphQL runtime state.
          - `type` 'graphql', required
          - `mutationsEnabled` boolean, required
        - WebAccessContext — User's per-turn request to expose web search / fetch tools.
          - `type` 'web_access', required
          - `enabled` boolean, required
        - SubagentsContext — User's per-turn request to expose the subagent-spawning tool.
          - `type` 'subagents', required
          - `enabled` boolean, required
    - `editPermission` 'manual' | 'bypass'
    - `requestedSkills` string[] — Skills the user explicitly requested via the prompt's slash-command affordance. The server force-loads each available skill by injecting a synthetic load_skill tool call/result at the tail of the message history. Unknown or context-unavailable names are ignored.
    - `model` union, required
      - CustomProviderModelSelection — Chat against a stored custom provider record.
        - `providerType` 'custom', required
        - `providerId` string, required
        - `modelName` string, required
      - BuiltInProviderModelSelection — Chat against a Phoenix built-in provider. Credentials and connection details (base URL, Azure endpoint, AWS region) are resolved from the secret store first and the process environment second. ``openai_api_type`` is honoured by the OpenAI and Azure OpenAI branches; other providers ignore it.
        - `providerType` 'builtin', required
        - `provider` 'OPENAI' | 'AZURE_OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'DEEPSEEK' | 'XAI' | 'OLLAMA' | 'AWS' | 'CEREBRAS' | 'FIREWORKS' | 'GROQ' | 'MOONSHOT' | 'PERPLEXITY' | 'TOGETHER', required
        - `modelName` string, required
        - `openaiApiType` 'chat_completions' | 'responses'
    - `turnTraceContext` TurnTraceContext
      - `traceId` string, required
      - `rootSpanId` string, required
      - `startedAt` string, date-time, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/arize-ai/apis/arize-phoenix-rest-api.md) · [All operations](https://skmtc.net/arize-ai/apis/arize-phoenix-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/arize-ai/arize-phoenix-rest-api/versions/a14d8ad6f708/schema)
