v51

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-01105276529.8 KB
chat

Run Server Agent

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.

post/agents/server/sessions/{session_id}/chat

Path parameters

session_idstring required

Request body

OR

Response

Successful Response

{"stackTrail":"paths:/agents/server/sessions/{session_id}/chat:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}