Skip to content
Ona Docs

GetAgentExecution

client.Agents.GetExecution(ctx, body) (*AgentGetExecutionResponse, error)
POST/gitpod.v1.AgentService/GetAgentExecution

Gets details about a specific agent run, including its metadata, specification, and status (phase, error messages, and usage statistics).

Use this method to:

  • Monitor the run’s progress
  • Retrieve the agent’s conversation URL
  • Check if an agent run is actively producing output

Examples

  • Get agent run details by ID:

    agentExecutionId: "6fa1a3c7-fbb7-49d1-ba56-1890dc7c4c35"
ParametersExpand Collapse
body AgentGetExecutionParams
AgentExecutionID param.Field[string]Optional
formatuuid
ReturnsExpand Collapse
type AgentGetExecutionResponse struct{…}
AgentExecution AgentExecutionOptional
ID stringOptional

ID is a unique identifier of this agent run. No other agent run with the same name must be managed by this agent manager

Metadata AgentExecutionMetadataOptional

Metadata is data associated with this agent that’s required for other parts of Gitpod to function

Annotations map[string, string]Optional

annotations are key-value pairs for tracking external context.

CreatedAt TimeOptional

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
Creator SubjectOptional
ID stringOptional

id is the UUID of the subject

formatuuid
Principal PrincipalOptional

Principal is the principal of the subject

One of the following:
const PrincipalUnspecified Principal = "PRINCIPAL_UNSPECIFIED"
const PrincipalAccount Principal = "PRINCIPAL_ACCOUNT"
const PrincipalUser Principal = "PRINCIPAL_USER"
const PrincipalRunner Principal = "PRINCIPAL_RUNNER"
const PrincipalEnvironment Principal = "PRINCIPAL_ENVIRONMENT"
const PrincipalServiceAccount Principal = "PRINCIPAL_SERVICE_ACCOUNT"
const PrincipalRunnerManager Principal = "PRINCIPAL_RUNNER_MANAGER"
Description stringOptional
Name stringOptional
Role AgentExecutionMetadataRoleOptional

role is the role of the agent execution

One of the following:
const AgentExecutionMetadataRoleAgentExecutionRoleUnspecified AgentExecutionMetadataRole = "AGENT_EXECUTION_ROLE_UNSPECIFIED"
const AgentExecutionMetadataRoleAgentExecutionRoleDefault AgentExecutionMetadataRole = "AGENT_EXECUTION_ROLE_DEFAULT"
const AgentExecutionMetadataRoleAgentExecutionRoleWorkflow AgentExecutionMetadataRole = "AGENT_EXECUTION_ROLE_WORKFLOW"
UpdatedAt TimeOptional

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
WorkflowActionID stringOptional

workflow_action_id is set when this agent execution was created as part of a workflow. Used to correlate agent executions with their parent workflow execution action.

formatuuid
Spec AgentExecutionSpecOptional

Spec is the configuration of the agent that’s required for the runner to start the agent

AgentID stringOptional
formatuuid
CodeContext AgentCodeContextOptional
ContextURL AgentCodeContextContextURLOptional
EnvironmentClassID stringOptional
formatuuid
URL stringOptional
formaturi
EnvironmentID stringOptional
formatuuid
ProjectID stringOptional
formatuuid
PullRequest AgentCodeContextPullRequestOptional

Pull request context - optional metadata about the PR being worked on This is populated when the agent execution is triggered by a PR workflow or when explicitly provided through the browser extension

ID stringOptional

Unique identifier from the source system (e.g., “123” for GitHub PR #123)

Author stringOptional

Author name as provided by the SCM system

Draft boolOptional

Whether this is a draft pull request

FromBranch stringOptional

Source branch name (the branch being merged from)

Repository AgentCodeContextPullRequestRepositoryOptional

Repository information

CloneURL stringOptional
Host stringOptional
Name stringOptional
Owner stringOptional
State StateOptional

Current state of the pull request

One of the following:
const StateUnspecified State = "STATE_UNSPECIFIED"
const StateOpen State = "STATE_OPEN"
const StateClosed State = "STATE_CLOSED"
const StateMerged State = "STATE_MERGED"
Title stringOptional

Pull request title

ToBranch stringOptional

Target branch name (the branch being merged into)

URL stringOptional

Pull request URL (e.g., “https://github.com/owner/repo/pull/123”)

DesiredPhase AgentExecutionSpecDesiredPhaseOptional

desired_phase is the desired phase of the agent run

One of the following:
const AgentExecutionSpecDesiredPhasePhaseUnspecified AgentExecutionSpecDesiredPhase = "PHASE_UNSPECIFIED"
const AgentExecutionSpecDesiredPhasePhasePending AgentExecutionSpecDesiredPhase = "PHASE_PENDING"
const AgentExecutionSpecDesiredPhasePhaseRunning AgentExecutionSpecDesiredPhase = "PHASE_RUNNING"
const AgentExecutionSpecDesiredPhasePhaseWaitingForInput AgentExecutionSpecDesiredPhase = "PHASE_WAITING_FOR_INPUT"
const AgentExecutionSpecDesiredPhasePhaseStopped AgentExecutionSpecDesiredPhase = "PHASE_STOPPED"
Limits AgentExecutionSpecLimitsOptional
MaxInputTokens stringOptional
MaxIterations stringOptional
MaxOutputTokens stringOptional
LoopConditions []AgentExecutionSpecLoopConditionOptional
ID stringOptional
Description stringOptional
Expression stringOptional
Session stringOptional
SpecVersion stringOptional

version of the spec. The value of this field has no semantic meaning (e.g. don’t interpret it as as a timestamp), but it can be used to impose a partial order. If a.spec_version < b.spec_version then a was the spec before b.

Status AgentExecutionStatusOptional

Status is the current status of the agent

CachedCreationTokensUsed stringOptional
CachedInputTokensUsed stringOptional
ContextWindowLength stringOptional
ConversationURL stringOptional

conversation_url is the URL to the conversation (all messages exchanged between the agent and the user) of the agent run.

CurrentActivity stringOptional

current_activity is the current activity description of the agent execution.

CurrentOperation AgentExecutionStatusCurrentOperationOptional

current_operation is the current operation of the agent execution.

Llm AgentExecutionStatusCurrentOperationLlmOptional
Complete boolOptional
Retries stringOptional

retries is the number of times the agent run has retried one or more steps

Session stringOptional
ToolUse AgentExecutionStatusCurrentOperationToolUseOptional
Complete boolOptional
ToolName stringOptional
minLength1
FailureMessage stringOptional

failure_message contains the reason the agent run failed to operate.

FailureReason AgentExecutionStatusFailureReasonOptional

failure_reason contains a structured reason code for the failure.

One of the following:
const AgentExecutionStatusFailureReasonAgentExecutionFailureReasonUnspecified AgentExecutionStatusFailureReason = "AGENT_EXECUTION_FAILURE_REASON_UNSPECIFIED"
const AgentExecutionStatusFailureReasonAgentExecutionFailureReasonEnvironment AgentExecutionStatusFailureReason = "AGENT_EXECUTION_FAILURE_REASON_ENVIRONMENT"
const AgentExecutionStatusFailureReasonAgentExecutionFailureReasonService AgentExecutionStatusFailureReason = "AGENT_EXECUTION_FAILURE_REASON_SERVICE"
const AgentExecutionStatusFailureReasonAgentExecutionFailureReasonLlmIntegration AgentExecutionStatusFailureReason = "AGENT_EXECUTION_FAILURE_REASON_LLM_INTEGRATION"
const AgentExecutionStatusFailureReasonAgentExecutionFailureReasonInternal AgentExecutionStatusFailureReason = "AGENT_EXECUTION_FAILURE_REASON_INTERNAL"
const AgentExecutionStatusFailureReasonAgentExecutionFailureReasonAgentExecution AgentExecutionStatusFailureReason = "AGENT_EXECUTION_FAILURE_REASON_AGENT_EXECUTION"
InputTokensUsed stringOptional
Iterations stringOptional
Judgement stringOptional

judgement is the judgement of the agent run produced by the judgement prompt.

McpIntegrationStatuses []AgentExecutionStatusMcpIntegrationStatusOptional

mcp_integration_statuses contains the status of all MCP integrations used by this agent execution

ID stringOptional

id is the unique name of the MCP integration

FailureMessage stringOptional

failure_message contains the reason the MCP integration failed to connect or operate

Name stringOptional

name is the unique name of the MCP integration (e.g., “linear”, “notion”)

Phase AgentExecutionStatusMcpIntegrationStatusesPhaseOptional

phase is the current connection/health phase

One of the following:
const AgentExecutionStatusMcpIntegrationStatusesPhaseMcpIntegrationPhaseUnspecified AgentExecutionStatusMcpIntegrationStatusesPhase = "MCP_INTEGRATION_PHASE_UNSPECIFIED"
const AgentExecutionStatusMcpIntegrationStatusesPhaseMcpIntegrationPhaseInitializing AgentExecutionStatusMcpIntegrationStatusesPhase = "MCP_INTEGRATION_PHASE_INITIALIZING"
const AgentExecutionStatusMcpIntegrationStatusesPhaseMcpIntegrationPhaseReady AgentExecutionStatusMcpIntegrationStatusesPhase = "MCP_INTEGRATION_PHASE_READY"
const AgentExecutionStatusMcpIntegrationStatusesPhaseMcpIntegrationPhaseFailed AgentExecutionStatusMcpIntegrationStatusesPhase = "MCP_INTEGRATION_PHASE_FAILED"
const AgentExecutionStatusMcpIntegrationStatusesPhaseMcpIntegrationPhaseUnavailable AgentExecutionStatusMcpIntegrationStatusesPhase = "MCP_INTEGRATION_PHASE_UNAVAILABLE"
WarningMessage stringOptional

warning_message contains warnings (e.g., rate limiting, degraded performance)

Mode AgentModeOptional

mode is the current operational mode of the agent execution. This is set by the agent when entering different modes (e.g., Ralph mode via /ona:ralph command).

One of the following:
const AgentModeUnspecified AgentMode = "AGENT_MODE_UNSPECIFIED"
const AgentModeExecution AgentMode = "AGENT_MODE_EXECUTION"
const AgentModePlanning AgentMode = "AGENT_MODE_PLANNING"
const AgentModeRalph AgentMode = "AGENT_MODE_RALPH"
const AgentModeSpec AgentMode = "AGENT_MODE_SPEC"
Outputs map[string, AgentExecutionStatusOutput]Optional

outputs is a map of key-value pairs that can be set by the agent during execution. Similar to task execution outputs, but with typed values for structured data.

BoolValue boolOptional
FloatValue float64Optional
formatdouble
IntValue stringOptional
StringValue stringOptional
maxLength4096
OutputTokensUsed stringOptional
Phase AgentExecutionStatusPhaseOptional
One of the following:
const AgentExecutionStatusPhasePhaseUnspecified AgentExecutionStatusPhase = "PHASE_UNSPECIFIED"
const AgentExecutionStatusPhasePhasePending AgentExecutionStatusPhase = "PHASE_PENDING"
const AgentExecutionStatusPhasePhaseRunning AgentExecutionStatusPhase = "PHASE_RUNNING"
const AgentExecutionStatusPhasePhaseWaitingForInput AgentExecutionStatusPhase = "PHASE_WAITING_FOR_INPUT"
const AgentExecutionStatusPhasePhaseStopped AgentExecutionStatusPhase = "PHASE_STOPPED"
Session stringOptional
StatusVersion stringOptional

version of the status. The value of this field has no semantic meaning (e.g. don’t interpret it as as a timestamp), but it can be used to impose a partial order. If a.status_version < b.status_version then a was the status before b.

SupportedModel AgentExecutionStatusSupportedModelOptional

supported_model is the LLM model being used by the agent execution.

One of the following:
const AgentExecutionStatusSupportedModelSupportedModelUnspecified AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_UNSPECIFIED"
const AgentExecutionStatusSupportedModelSupportedModelSonnet3_5 AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_SONNET_3_5"
const AgentExecutionStatusSupportedModelSupportedModelSonnet3_7 AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_SONNET_3_7"
const AgentExecutionStatusSupportedModelSupportedModelSonnet3_7Extended AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_SONNET_3_7_EXTENDED"
const AgentExecutionStatusSupportedModelSupportedModelSonnet4 AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_SONNET_4"
const AgentExecutionStatusSupportedModelSupportedModelSonnet4Extended AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_SONNET_4_EXTENDED"
const AgentExecutionStatusSupportedModelSupportedModelSonnet4_5 AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_SONNET_4_5"
const AgentExecutionStatusSupportedModelSupportedModelSonnet4_5Extended AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_SONNET_4_5_EXTENDED"
const AgentExecutionStatusSupportedModelSupportedModelSonnet4_6 AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_SONNET_4_6"
const AgentExecutionStatusSupportedModelSupportedModelSonnet4_6Extended AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_SONNET_4_6_EXTENDED"
const AgentExecutionStatusSupportedModelSupportedModelOpus4 AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_OPUS_4"
const AgentExecutionStatusSupportedModelSupportedModelOpus4Extended AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_OPUS_4_EXTENDED"
const AgentExecutionStatusSupportedModelSupportedModelOpus4_5 AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_OPUS_4_5"
const AgentExecutionStatusSupportedModelSupportedModelOpus4_5Extended AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_OPUS_4_5_EXTENDED"
const AgentExecutionStatusSupportedModelSupportedModelOpus4_6 AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_OPUS_4_6"
const AgentExecutionStatusSupportedModelSupportedModelOpus4_6Extended AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_OPUS_4_6_EXTENDED"
const AgentExecutionStatusSupportedModelSupportedModelHaiku4_5 AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_HAIKU_4_5"
const AgentExecutionStatusSupportedModelSupportedModelOpenAI4O AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_OPENAI_4O"
const AgentExecutionStatusSupportedModelSupportedModelOpenAI4OMini AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_OPENAI_4O_MINI"
const AgentExecutionStatusSupportedModelSupportedModelOpenAIO1 AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_OPENAI_O1"
const AgentExecutionStatusSupportedModelSupportedModelOpenAIO1Mini AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_OPENAI_O1_MINI"
TranscriptURL stringOptional

transcript_url is the URL to the LLM transcript (all messages exchanged between the agent and the LLM) of the agent run.

UsedEnvironments []AgentExecutionStatusUsedEnvironmentOptional

used_environments is the list of environments that were used by the agent execution.

CreatedByAgent boolOptional
EnvironmentID stringOptional
formatuuid
WarningMessage stringOptional

warning_message contains warnings, e.g. when the LLM is overloaded.

GetAgentExecution

package main

import (
  "context"
  "fmt"

  "github.com/gitpod-io/gitpod-sdk-go"
  "github.com/gitpod-io/gitpod-sdk-go/option"
)

func main() {
  client := gitpod.NewClient(
    option.WithBearerToken("My Bearer Token"),
  )
  response, err := client.Agents.GetExecution(context.TODO(), gitpod.AgentGetExecutionParams{
    AgentExecutionID: gitpod.F("6fa1a3c7-fbb7-49d1-ba56-1890dc7c4c35"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.AgentExecution)
}
{
  "agentExecution": {
    "id": "id",
    "metadata": {
      "annotations": {
        "foo": "string"
      },
      "createdAt": "2019-12-27T18:11:19.117Z",
      "creator": {
        "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "principal": "PRINCIPAL_UNSPECIFIED"
      },
      "description": "description",
      "name": "name",
      "role": "AGENT_EXECUTION_ROLE_UNSPECIFIED",
      "sessionId": "sessionId",
      "updatedAt": "2019-12-27T18:11:19.117Z",
      "workflowActionId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
    },
    "spec": {
      "agentId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "codeContext": {
        "contextUrl": {
          "environmentClassId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
          "url": "https://example.com"
        },
        "environmentId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "projectId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "pullRequest": {
          "id": "id",
          "author": "author",
          "draft": true,
          "fromBranch": "fromBranch",
          "repository": {
            "cloneUrl": "cloneUrl",
            "host": "host",
            "name": "name",
            "owner": "owner"
          },
          "state": "STATE_UNSPECIFIED",
          "title": "title",
          "toBranch": "toBranch",
          "url": "url"
        }
      },
      "desiredPhase": "PHASE_UNSPECIFIED",
      "limits": {
        "maxInputTokens": "maxInputTokens",
        "maxIterations": "maxIterations",
        "maxOutputTokens": "maxOutputTokens"
      },
      "loopConditions": [
        {
          "id": "id",
          "description": "description",
          "expression": "expression"
        }
      ],
      "session": "session",
      "specVersion": "specVersion"
    },
    "status": {
      "cachedCreationTokensUsed": "cachedCreationTokensUsed",
      "cachedInputTokensUsed": "cachedInputTokensUsed",
      "contextWindowLength": "contextWindowLength",
      "conversationUrl": "conversationUrl",
      "currentActivity": "currentActivity",
      "currentOperation": {
        "llm": {
          "complete": true
        },
        "retries": "retries",
        "session": "session",
        "toolUse": {
          "complete": true,
          "toolName": "x"
        }
      },
      "failureMessage": "failureMessage",
      "failureReason": "AGENT_EXECUTION_FAILURE_REASON_UNSPECIFIED",
      "inputTokensUsed": "inputTokensUsed",
      "iterations": "iterations",
      "judgement": "judgement",
      "loopConditionResults": [
        {
          "conditionId": "conditionId",
          "iteration": 0,
          "lastEvaluatedAt": "2019-12-27T18:11:19.117Z",
          "met": true
        }
      ],
      "mcpIntegrationStatuses": [
        {
          "id": "id",
          "failureMessage": "failureMessage",
          "name": "name",
          "phase": "MCP_INTEGRATION_PHASE_UNSPECIFIED",
          "warningMessage": "warningMessage"
        }
      ],
      "mode": "AGENT_MODE_UNSPECIFIED",
      "outputs": {
        "foo": {
          "boolValue": true,
          "floatValue": 0,
          "intValue": "intValue",
          "stringValue": "stringValue"
        }
      },
      "outputTokensUsed": "outputTokensUsed",
      "phase": "PHASE_UNSPECIFIED",
      "session": "session",
      "statusVersion": "statusVersion",
      "supportBundleUrl": "supportBundleUrl",
      "supportedModel": "SUPPORTED_MODEL_UNSPECIFIED",
      "terminalId": "terminalId",
      "transcriptUrl": "transcriptUrl",
      "usedEnvironments": [
        {
          "createdByAgent": true,
          "environmentId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
        }
      ],
      "waitingInfo": {
        "interests": [
          {
            "id": "id",
            "environment": {
              "environmentId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
              "phase": ""
            },
            "subAgent": {
              "executionId": "executionId"
            },
            "timer": {
              "cron": "cron",
              "duration": "duration",
              "firesAt": "2019-12-27T18:11:19.117Z"
            },
            "userMessage": {}
          }
        ],
        "waitId": "waitId",
        "waitingSince": "2019-12-27T18:11:19.117Z"
      },
      "warningMessage": "warningMessage"
    }
  }
}
Returns Examples
{
  "agentExecution": {
    "id": "id",
    "metadata": {
      "annotations": {
        "foo": "string"
      },
      "createdAt": "2019-12-27T18:11:19.117Z",
      "creator": {
        "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "principal": "PRINCIPAL_UNSPECIFIED"
      },
      "description": "description",
      "name": "name",
      "role": "AGENT_EXECUTION_ROLE_UNSPECIFIED",
      "sessionId": "sessionId",
      "updatedAt": "2019-12-27T18:11:19.117Z",
      "workflowActionId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
    },
    "spec": {
      "agentId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "codeContext": {
        "contextUrl": {
          "environmentClassId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
          "url": "https://example.com"
        },
        "environmentId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "projectId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "pullRequest": {
          "id": "id",
          "author": "author",
          "draft": true,
          "fromBranch": "fromBranch",
          "repository": {
            "cloneUrl": "cloneUrl",
            "host": "host",
            "name": "name",
            "owner": "owner"
          },
          "state": "STATE_UNSPECIFIED",
          "title": "title",
          "toBranch": "toBranch",
          "url": "url"
        }
      },
      "desiredPhase": "PHASE_UNSPECIFIED",
      "limits": {
        "maxInputTokens": "maxInputTokens",
        "maxIterations": "maxIterations",
        "maxOutputTokens": "maxOutputTokens"
      },
      "loopConditions": [
        {
          "id": "id",
          "description": "description",
          "expression": "expression"
        }
      ],
      "session": "session",
      "specVersion": "specVersion"
    },
    "status": {
      "cachedCreationTokensUsed": "cachedCreationTokensUsed",
      "cachedInputTokensUsed": "cachedInputTokensUsed",
      "contextWindowLength": "contextWindowLength",
      "conversationUrl": "conversationUrl",
      "currentActivity": "currentActivity",
      "currentOperation": {
        "llm": {
          "complete": true
        },
        "retries": "retries",
        "session": "session",
        "toolUse": {
          "complete": true,
          "toolName": "x"
        }
      },
      "failureMessage": "failureMessage",
      "failureReason": "AGENT_EXECUTION_FAILURE_REASON_UNSPECIFIED",
      "inputTokensUsed": "inputTokensUsed",
      "iterations": "iterations",
      "judgement": "judgement",
      "loopConditionResults": [
        {
          "conditionId": "conditionId",
          "iteration": 0,
          "lastEvaluatedAt": "2019-12-27T18:11:19.117Z",
          "met": true
        }
      ],
      "mcpIntegrationStatuses": [
        {
          "id": "id",
          "failureMessage": "failureMessage",
          "name": "name",
          "phase": "MCP_INTEGRATION_PHASE_UNSPECIFIED",
          "warningMessage": "warningMessage"
        }
      ],
      "mode": "AGENT_MODE_UNSPECIFIED",
      "outputs": {
        "foo": {
          "boolValue": true,
          "floatValue": 0,
          "intValue": "intValue",
          "stringValue": "stringValue"
        }
      },
      "outputTokensUsed": "outputTokensUsed",
      "phase": "PHASE_UNSPECIFIED",
      "session": "session",
      "statusVersion": "statusVersion",
      "supportBundleUrl": "supportBundleUrl",
      "supportedModel": "SUPPORTED_MODEL_UNSPECIFIED",
      "terminalId": "terminalId",
      "transcriptUrl": "transcriptUrl",
      "usedEnvironments": [
        {
          "createdByAgent": true,
          "environmentId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
        }
      ],
      "waitingInfo": {
        "interests": [
          {
            "id": "id",
            "environment": {
              "environmentId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
              "phase": ""
            },
            "subAgent": {
              "executionId": "executionId"
            },
            "timer": {
              "cron": "cron",
              "duration": "duration",
              "firesAt": "2019-12-27T18:11:19.117Z"
            },
            "userMessage": {}
          }
        ],
        "waitId": "waitId",
        "waitingSince": "2019-12-27T18:11:19.117Z"
      },
      "warningMessage": "warningMessage"
    }
  }
}