Method: labsExperiments.fetchAgentSession

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

Gets the session details for an AI agent during a LabsExperiment execution. Use this method to retrieve the history of events and messages in a specific agentic session.

HTTP request

GET https://{endpoint}/v1alpha/{name}:fetchAgentSession

Where {endpoint} is one of the supported service endpoints.

Path parameters

Parameters
name

string

Required. The resource name of the LabsExperiment for which the session is retrieved. Format: projects/{project}/locations/{location}/instances/{instance}/labsExperiments/{labsExperiment}

Query parameters

Parameters
sessionId

string

Required. The ID of the session to retrieve.

afterTimestamp

string (Timestamp format)

Optional. If set, only events after this timestamp will be returned.

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".

Request body

The request body must be empty.

Response body

Response message for labsExperiments.fetchAgentSession method.

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

JSON representation
{
  "sessionId": string,
  "events": [
    {
      object
    }
  ],
  "lastUpdateTime": string
}
Fields
sessionId

string

The ID of the session.

events[]

object (Struct format)

The events in the session.

lastUpdateTime

string (Timestamp format)

The time the session was last updated.

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".

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.get

For more information, see the IAM documentation.