Method: projects.locations.apps.chatAiAssistant

Runs Arc, the AI assistant, for the specified assistant session.

HTTP request

POST https://ces.googleapis.com/v1beta/{app=projects/*/locations/*/apps/*}:chatAiAssistant

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
app

string

Required. The app to run assistant for. Format: projects/{project}/locations/{location}/apps/{app}

Request body

The request body contains data with the following structure:

JSON representation
{
  "assistantSession": string,
  "message": string,
  "attachedGcsUris": [
    string
  ],
  "contextToken": string
}
Fields
assistantSession

string

Required. The assistant session to be used to run the assistant. Format: projects/{project}/locations/{location}/apps/{app}/assistantSessions/{assistantSession}

message

string

Required. The message to send to the assistant agent.

attachedGcsUris[]

string

Optional. Cloud Storage URIs for files uploaded by the user during this turn. Example: "gs://cxas-transient-uploads/uuid/prd.pdf"

contextToken

string

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.

Response body

Response message for AssistantService.ChatAiAssistant.

If successful, the response body contains data with the following structure:

JSON representation
{
  "eventId": string,
  "eventTime": string,
  "uiEvent": {
    object (UiEvent)
  },

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "textChunk": string,
  "statusMessage": string,
  "sessionCheckpoint": {
    object (SessionCheckpoint)
  }
  // End of mutually exclusive fields.
}
Fields
eventId

string

Unique identifier for the event.

eventTime

string (Timestamp format)

Timestamp when the event occurred.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

uiEvent

object (UiEvent)

Optional. UI event payload.

The event payload. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
textChunk

string

Text Token (for streaming Gemini responses word-by-word)

statusMessage

string

Simple status update

sessionCheckpoint

object (SessionCheckpoint)

Session checkpoint/compaction recap event containing user intent and rolling summary.

End of mutually exclusive fields.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/ces

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the app resource:

  • ces.apps.update

For more information, see the IAM documentation.