Skip to main content
POST
Chat

Path Parameters

session_id
string
required

Body

application/json

Assistant chat submit request payload.

headless
boolean
required

Whether a headless client (terminal or scripted) is driving the turn, as opposed to the browser assistant. Selects the agent configuration the turn runs on.

model
CustomProviderModelSelection · object
required

The model the client believes the session is set to. This is a precondition, not an instruction: the turn always runs on the session's persisted selection, and a mismatch is rejected with HTTP 409 and code agent_session_model_stale rather than silently running on — or switching to — an unexpected model. Change the session's model with PATCH .../agent_sessions/{session_id}.

id
string
required
contexts
(AppContext · object | ProjectContext · object | TraceContext · object | SessionContext · object | PromptContext · object | PromptVersionContext · object | AgentSpanContext · object | PlaygroundContext · object | CodeEvaluatorContext · object | LlmEvaluatorContext · object | DatasetContext · object | GraphQLContext · object | WebAccessContext · object | SubagentsContext · object)[]

Per-turn browser clock context for resolving relative time requests.

editPermission
enum<string>
default:manual
Available options:
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.

trigger
string
default:submit-message
Allowed value: "submit-message"
message
PhoenixUIMessage · object | null

The turn's new user message to append. May be omitted for client-tool continuation, where toolOutputs resolve the trailing assistant message's pending tool calls instead.

toolOutputs
(ToolOutputAvailablePart · object | ToolOutputErrorPart · object | DynamicToolOutputAvailablePart · object | DynamicToolOutputErrorPart · object)[]

Client-executed tool results for pending tool calls on the transcript's trailing assistant message, matched by toolCallId. Submitted alone they continue the assistant turn; submitted with message they resolve dangling tool calls before the new user turn runs.

Tool part in output-available state.

lastMessageId
string | null

The id of the last transcript message the client has rendered, used for optimistic concurrency. Omit when the session has no messages; required (and validated against the persisted transcript) once it does. On mismatch the server rejects the send with HTTP 409 and code agent_session_messages_stale — the client should refetch the session before retrying.

recordLocalTraces
boolean
default:false
exportRemoteTraces
boolean
default:false
instrumentUserId
boolean
default:false

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.

Response

Successful Response