REST Resource: projects.locations.instances.labsExperiments.executions

Resource: LabsExperimentExecution

The experiment execution resource, contains execution context and results of an experiment.

JSON representation
{
  "name": string,
  "createTime": string,
  "endTime": string,
  "lastUpdateTime": string,
  "state": enum (State),
  "stateMessage": string,
  "context": {
    object (LabsExperimentExecutionContext)
  }
}
Fields
name

string

Identifier. The unique identifier of the ExperimentExecution. As this is a child of an Experiment, the name of the Experiment is included in the name. Format: projects/{project}/locations/{location}/instances/{instance}/labsExperiments/{labsExperiment}/executions/{labsExperimentExecution}

createTime

string (Timestamp format)

Output only. When the execution request was initially received by the Labs Service.

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

endTime

string (Timestamp format)

Output only. When the execution reached a terminal state (SUCCESS, FAILURE, TIMEOUT, etc.). nil if the execution is still in progress. Output only.

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

lastUpdateTime

string (Timestamp format)

Output only. When the execution state (status, message) was last modified. Useful for tracking progress and concurrency control.

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

state

enum (State)

Output only. The current lifecycle state of the execution.

stateMessage

string

Output only. An optional, user-friendly message describing the current state or progress. Example: "Processing step 2/3: Calling external API..."

context

object (LabsExperimentExecutionContext)

Output only. The final result payload if the execution completed successfully (state is SUCCESS). Stored as a generic Struct to accommodate varied structures from different experiments.

State

The status of the experiment execution.

Enums
STATE_UNSPECIFIED Default unspecified status.
QUEUED Execution is queued and waiting to be processed.
RUNNING Execution is actively being processed by a worker.
SUCCEEDED Execution completed successfully and produced a result.
FAILED Execution failed due to an error within the experiment logic or infrastructure issue.
TIMED_OUT Executin failed because it exceeded the configured timeout limit.
CANCELLED Execution was cancelled (e.g., by user request).

LabsExperimentExecutionContext

The execution context for an Experiment. Defines inputs, outputs, and other metadata for an Experiment execution.

JSON representation
{
  "stages": [
    {
      object (ExperimentExecutionStage)
    }
  ],
  "agenticContext": {
    object (AgenticContext)
  }
}
Fields
stages[]

object (ExperimentExecutionStage)

Output only. The stages of the execution. This is used when type is STANDARD.

agenticContext

object (AgenticContext)

Output only. Context for AGENTIC experiments. This is used when type isAGENTIC.

ExperimentExecutionStage

A definition of a stage in the execution.

JSON representation
{
  "name": string,
  "current": boolean,
  "inputs": {
    object
  },
  "outputs": [
    {
      object (ExperimentExecutionStageOutput)
    }
  ]
}
Fields
name

string

Required. The unique identifier of the stage.

current

boolean

Optional. Is the stage the current stage of the execution.

inputs

object (Struct format)

Required. Thze input payload of the stage.

outputs[]

object (ExperimentExecutionStageOutput)

Output only. The output payload of the stage.

ExperimentExecutionStageOutput

Defines the outputs of a stage.

JSON representation
{
  "renderType": enum (ExperimentExecutionStageRenderingType),
  "name": string,

  // Union field payload can be only one of the following:
  "text": string,
  "generativeUiSchema": {
    object
  }
  // End of list of possible types for union field payload.
}
Fields
renderType

enum (ExperimentExecutionStageRenderingType)

Output only. The type of the stage output.

name

string

Output only. The unique name/identifier for the output of the stage output.

Union field payload. The payload of the stage output. payload can be only one of the following:
text

string

Output only. The text payload of the stage output. Matches a markdown, Json, and code.

generativeUiSchema

object (Struct format)

Output only. A UI schema for a generative UI output. This is used to render the message in the UI.

ExperimentExecutionStageRenderingType

Defines the rendering type in the UI of a stage output. New values may be added in the future. Clients should be prepared to handle unknown enum values gracefully.

Enums
EXPERIMENT_EXECUTION_STAGE_RENDERING_TYPE_UNSPECIFIED Default unspecified stage output type.
MARKDOWN The stage output is a chat/conversation output.
CODE The stage output is a code output.
JSON The stage output is a JSON output.
GENERATIVE The stage output is a generative UI output.

AgenticContext

Context specific to AGENTIC experiments.

JSON representation
{
  "sessionId": string,
  "messages": [
    {
      object (LabsChatMessage)
    }
  ]
}
Fields
sessionId

string

Output only. Metadata related to the Agent Hub.

messages[]

object (LabsChatMessage)

Output only. The history of messages in the agentic session.

LabsChatMessage

Represents a single message in a chat conversation.

JSON representation
{
  "role": string,
  "text": string,
  "visibility": enum (Visibility),
  "generativeUiSchema": {
    object
  }
}
Fields
role

string

Output only. The role of the message sender. Allowed values are "user", and "agent".

text

string

Output only. The text content of the message.

visibility

enum (Visibility)

Output only. The visibility state of the message.

generativeUiSchema

object (Struct format)

Output only. Generative UI representation of the message. This is used to render the message in the UI.

Visibility

Controls the visibility of the message in the UI.

Enums
VISIBILITY_UNSPECIFIED Visibility is unspecified.
VISIBLE Message is fully shown.
HIDDEN Message is hidden from the UI.

Methods

get

Retrieves a specific LabsExperimentExecution resource.

list

Lists LabsExperimentExecution resources.

patch

Updates a LabsExperimentExecution.