Method: projects.locations.apps.runAssistant

Runs the assistant agent for the specified assistant session.

HTTP request

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

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": {
    object (AssistantMessage)
  },
  "interactionType": enum (RunAssistantRequest.InteractionType)
}
Fields
assistantSession

string

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

message

object (AssistantMessage)

Required. The message to send to the assistant agent.

interactionType

enum (RunAssistantRequest.InteractionType)

Optional. Different interaction types for the assistant message.

Response body

Response message for AssistantService.RunAssistant.

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

JSON representation
{
  "output": {
    object (AssistantOutput)
  },
  "state": enum (AssistantSessionState)
}
Fields
output

object (AssistantOutput)

Required. The output from the assistant agent.

state

enum (AssistantSessionState)

Output only. The status of the assistant session.

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.

RunAssistantRequest.InteractionType

The type of interaction for the message sent to the assistant.

Enums
INTERACTION_TYPE_UNSPECIFIED The default value. This value is used if the type is not specified.
NEW_MESSAGE The message is a user input. User input is provided in the chunk list.
POLL The message is for polling the state of the assistant session.
DISMISS The message is to dismiss the assistant session pending review. This will change the state of the assistant session to idle.

AssistantOutput

The output from the assistant agent.

JSON representation
{
  "message": {
    object (AssistantMessage)
  },
  "userResponseSuggestions": {
    object (UserResponseSuggestions)
  }
}
Fields
message

object (AssistantMessage)

Required. The response from the assistant agent.

userResponseSuggestions

object (UserResponseSuggestions)

Output only. Suggested user responses from the assistant agent.