POST /v1/projects/{projectsId}/locations/{locationsId}/apps/{appsId}/assistantSessions/{assistantSessionsId}:streamChatAiAssistant
Changed onRuns Arc, the AI assistant, for the specified assistant session in a streaming fashion.
Request
- Base URLhttps://ces.googleapis.com
- Auth
- OAuth 2 and OAuth 2Implicithttps://accounts.google.com/o/oauth2/authScopeshttps://www.googleapis.com/auth/cesAuthorization codehttps://accounts.google.com/o/oauth2/authToken URLhttps://accounts.google.com/o/oauth2/tokenScopeshttps://www.googleapis.com/auth/ces
- or OAuth 2 and OAuth 2Implicithttps://accounts.google.com/o/oauth2/authScopeshttps://www.googleapis.com/auth/cloud-platformAuthorization codehttps://accounts.google.com/o/oauth2/authToken URLhttps://accounts.google.com/o/oauth2/tokenScopeshttps://www.googleapis.com/auth/cloud-platform
Path parameters
Query parameters
V1 error format.
OAuth access token.
Data format for response.
JSONP
Selector specifying which fields to include in a partial response.
API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
OAuth 2.0 token for the current user.
Returns response with indentations and line breaks.
Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
Legacy upload protocol for media (e.g. "media", "multipart").
Upload protocol for media (e.g. "raw", "multipart").
Request body
Request message for SessionService.StreamChatAiAssistant.
Optional. Optional flag to attach to an existing in-flight turn without submitting a new message.
Optional. Cloud Storage URIs for files uploaded by the user during this turn. Example: "gs://cxas-transient-uploads/uuid/prd.pdf"
Optional. Response features this client can render. The server only emits events that need a capability (e.g. confirmation_request) when the capability is declared, so older clients never receive events they would silently drop.
The user's answer to an AssistantConfirmationRequest, sent on the next SessionService.StreamChatAiAssistant call to resume the paused agent.
Optional. Opaque onboarding context token returned by SessionService.GenerateOnboardingSuggestions. When set and still fresh, the server reuses the onboarding snapshot computed for the zero state instead of recomputing it for the first conversation turn.
Optional. The message to send to the assistant agent. May be empty when confirmation_response is set (answering a pending confirmation without adding a new message); at least one of the two must be provided.
Event sent by the client or background worker to resume an assistant session after an asynchronous Long-Running Operation (LRO) completes.
Optional. Optional cursor to resume and replay events from an in-flight or completed turn.
Response
Successful response
Response message for SessionService.StreamChatAiAssistant.
A streamed fragment of a document artifact (e.g. a markdown TDD) that the assistant is generating. Content deltas stream while the document is being written so clients can render a live preview; the FINALIZED chunk carries the Cloud Storage URI once the file has been persisted.
A blocking question or confirmation the assistant needs answered before an agent action can proceed. The requesting agent is paused and resumes only when the answer arrives on a later StreamChatAiAssistantRequest.confirmation_response.
Unique identifier for the event.
Timestamp when the event occurred.
Emitted before this task stops serving the stream mid-turn (e.g. a server restart). The turn's state is persisted; a reconnect carrying resume_from_sequence_number continues it on another task.
Structured clarification options the assistant asks the user to choose among, transduced server-side out of the model's turn (the option block is stripped from the streamed and persisted text). The console renders a keyboard-navigable option list docked above the composer.
A compacted replay of an in-flight turn: everything needed to render the turn's visible output so far, plus the position live events continue from.
Optional. Monotonically increasing sequence number for this session turn.
Session checkpoint containing inferred user intent for session title and UI.
The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide.
Text Token (for streaming Gemini responses word-by-word).
Thought text chunk (agent's reasoning before generating response).
Request for the client or the agent to execute the specified tool.
The execution result of a specific tool from the client or the agent.
Terminal event of a turn (see StreamChatAiAssistantResponse.turn_completed).
Optional. Indicates whether the turn is still actively running in the background.
Turn-level metadata and intent categorization.
Represents a UI event payload.
Changes
- info
the security scope
https://www.googleapis.com/auth/ceswas added to the endpoint's security schemeOauth2 - info
the security scope
https://www.googleapis.com/auth/ceswas added to the endpoint's security schemeOauth2c - info
the security scope
https://www.googleapis.com/auth/cloud-platformwas removed from the endpoint's security schemeOauth2
1 more change in this revision
- info