Method: labsExperiments.sendAgentMessage

Full name: projects.locations.instances.labsExperiments.sendAgentMessage

Sends an interactive message to an AI agent during a LabsExperiment execution. Use this method to continue a chat session or provide additional input to an agentic experimental feature.

HTTP request


POST https://chronicle.africa-south1.rep.googleapis.com/v1alpha/{name}:sendAgentMessage

Path parameters

Parameters
name

string

Required. The resource name of the LabsExperiment to which the message is sent. Format: projects/{project}/locations/{location}/instances/{instance}/labsExperiments/{labsExperiment}

Request body

The request body contains data with the following structure:

JSON representation
{
  "message": {
    object (LabsChatMessage)
  },
  "contextId": string,
  "agentId": string,
  "systemAgent": boolean,
  "options": {
    object (LabsOptions)
  }
}
Fields
message

object (LabsChatMessage)

Required. The message to send to the agent.

contextId

string

Optional. The context id of the message. This is optional and if set, the message will be associated with the given context.

agentId

string

Required. Agent ID.

systemAgent

boolean

Optional. Flag indicating if the target agent is a system agent.

options

object (LabsOptions)

Optional. Options for agent message request.

Response body

Response message for labsExperiments.sendAgentMessage method.

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

JSON representation
{
  "message": {
    object (LabsChatMessage)
  },
  "contextId": string
}
Fields
message

object (LabsChatMessage)

Output only. The message received from the agent.

contextId

string

Output only. The context id of the message. This is optional and if set, the message will be associated with the given context.

Authorization scopes

Requires one of the following OAuth scopes:

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

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • chronicle.labsExperiments.execute

For more information, see the IAM documentation.