Interaction

Response for InteractionService.CreateInteraction.

JSON representation
{
  "id": string,
  "status": enum (Status),
  "created": string,
  "updated": string,
  "role": string,
  "outputs": [
    {
      object (Content)
    }
  ],
  "systemInstruction": string,
  "tools": [
    {
      object (Tool)
    }
  ],
  "usage": {
    object (Usage)
  },
  "responseModalities": [
    enum (ResponseModality)
  ],
  "responseMimeType": string,
  "previousInteractionId": string,
  "environmentId": string,
  "serviceTier": enum (ServiceTier),
  "steps": [
    {
      object (Step)
    }
  ],
  "safetySettings": [
    {
      object (SafetySetting)
    }
  ],
  "labels": {
    string: string,
    ...
  },
  "errors": [
    {
      object (Error)
    }
  ],

  // Union field input can be only one of the following:
  "contentList": {
    object (ContentList)
  },
  "stringContent": string,
  "turnList": {
    object (TurnList)
  },
  "stepList": {
    object (StepList)
  },
  "content": {
    object (Content)
  }
  // End of list of possible types for union field input.

  // Union field response_format_config can be only one of the following:
  "responseFormat": {
    object (Value)
  },
  "responseFormatList": {
    object (ResponseFormatList)
  },
  "responseFormatSingleton": {
    object (ResponseFormat)
  }
  // End of list of possible types for union field response_format_config.

  // Union field request_type can be only one of the following:
  "modelInteraction": {
    object (ModelInteraction)
  },
  "agentInteraction": {
    object (AgentInteraction)
  }
  // End of list of possible types for union field request_type.

  // Union field environment can be only one of the following:
  "envId": string,
  "remoteEnvironment": {
    object (EnvironmentConfig)
  },
  "localEnvironment": {
    object (LocalEnvironmentConfig)
  }
  // End of list of possible types for union field environment.
}
Fields
id

string

Required. Output only. A unique identifier for the interaction completion.

status

enum (Status)

Required. Output only. The status of the interaction.

created

string

Required. Output only. The time at which the response was created in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).

updated

string

Required. Output only. The time at which the response was last updated in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).

role
(deprecated)

string

Output only. The role of the interaction.

outputs[]
(deprecated)

object (Content)

Output only. Responses from the model.

systemInstruction

string

System instruction for the interaction.

tools[]

object (Tool)

A list of tool declarations the model may call during interaction.

usage

object (Usage)

Output only. Statistics on the interaction request's token usage.

responseModalities[]
(deprecated)

enum (ResponseModality)

The requested modalities of the response (TEXT, IMAGE, AUDIO).

responseMimeType
(deprecated)

string

The mime type of the response. This is required if responseFormat is set.

previousInteractionId

string

The id of the previous interaction, if any.

environmentId

string

Output only. The environment id for the interaction. Only populated if environment config is set in the request.

serviceTier

enum (ServiceTier)

The service tier for the interaction.

steps[]

object (Step)

Required. Output only. The steps that make up the interaction.

safetySettings[]

object (SafetySetting)

Safety settings for the interaction.

labels

map (key: string, value: string)

Optional. The labels with user-defined metadata for the request. It is used for billing and reporting only.

label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. International characters are allowed. label values are optional. label keys must start with a letter.

errors[]

object (Error)

Output only. Diagnostic faults / platform errors recorded on the interaction.

Union field input. The input for the interaction. input can be only one of the following:
contentList
(deprecated)

object (ContentList)

The inputs for the interaction.

stringContent

string

A string input for the interaction, it will be processed as a single text input.

turnList
(deprecated)

object (TurnList)

The turns for the interaction.

stepList

object (StepList)

Input only. The steps for the interaction.

content

object (Content)

The content for the interaction.

Union field response_format_config.

response_format_config can be only one of the following:

responseFormat
(deprecated)

object (Value)

Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field.

responseFormatList

object (ResponseFormatList)

responseFormatSingleton

object (ResponseFormat)

Union field request_type. The request type for the interaction. request_type can be only one of the following:
modelInteraction

object (ModelInteraction)

Interaction for generating the completion using models.

agentInteraction

object (AgentInteraction)

Interaction for generating the completion using agents.

Union field environment. The environment configuration for the interaction. environment can be only one of the following:
envId

string

The environment id for the interaction. Can be 'remote' for default environment.

remoteEnvironment

object (EnvironmentConfig)

localEnvironment

object (LocalEnvironmentConfig)

The agent's environment lives on the client connection: its built-in environment operations (filesystem ops and running commands) are yielded to the client to execute, instead of running in a server-managed sandbox. Mutually exclusive with remoteEnvironment. (Independent of any client-declared function tools, which are always executed on the client regardless of this field.)

TurnList

A list of Turns.

JSON representation
{
  "turns": [
    {
      object (Turn)
    }
  ]
}
Fields
turns[]

object (Turn)

Turn

JSON representation
{
  "role": string,

  // Union field content can be only one of the following:
  "contentList": {
    object (ContentList)
  },
  "contentString": string
  // End of list of possible types for union field content.
}
Fields
role

string

The originator of this turn. Must be user for input or model for model output.

Union field content.

content can be only one of the following:

contentList

object (ContentList)

The content of the turn. An array of Content objects.

contentString

string

The content of the turn. A single string.

StepList

A list of Steps.

JSON representation
{
  "steps": [
    {
      object (Step)
    }
  ]
}
Fields
steps[]

object (Step)

The steps of the list.

ResponseFormatList

JSON representation
{
  "responseFormats": [
    {
      object (ResponseFormat)
    }
  ]
}
Fields
responseFormats[]

object (ResponseFormat)

ResponseFormat

JSON representation
{

  // Union field type can be only one of the following:
  "audio": {
    object (AudioResponseFormat)
  },
  "text": {
    object (TextResponseFormat)
  },
  "image": {
    object (ImageResponseFormat)
  },
  "video": {
    object (VideoResponseFormat)
  },
  "structValue": {
    object (Struct)
  }
  // End of list of possible types for union field type.
}
Fields

Union field type.

type can be only one of the following:

audio

object (AudioResponseFormat)

text

object (TextResponseFormat)

image

object (ImageResponseFormat)

video

object (VideoResponseFormat)

structValue

object (Struct)

Multi-discriminator values is already enabled in GAOS

AudioResponseFormat

Configuration for audio output format.

JSON representation
{
  "mimeType": enum (MimeType),
  "delivery": enum (Delivery),
  "sampleRate": integer,
  "bitRate": integer
}
Fields
mimeType

enum (MimeType)

The MIME type of the audio output.

delivery

enum (Delivery)

The delivery mode for the audio output.

sampleRate

integer

Sample rate in Hz.

bitRate

integer

Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).

MimeType

Supported MIME types for audio output.

Enums
TYPE_UNSPECIFIED Default value. This value is unused.
TYPE_MP3 MP3 audio format.
TYPE_OGG_OPUS OGG Opus audio format.
TYPE_L16 Raw PCM (L16) audio format.
TYPE_WAV WAV audio format.
TYPE_ALAW A-law audio format.
TYPE_MULAW Mu-law audio format.

Delivery

Delivery mode for audio output.

Enums
DELIVERY_UNSPECIFIED Default value. This value is unused.
INLINE Audio data is returned inline in the response.
URI Audio data is returned as a URI.

TextResponseFormat

Configuration for text output format.

JSON representation
{
  "mimeType": enum (MimeType),
  "schema": {
    object (Struct)
  }
}
Fields
mimeType

enum (MimeType)

The MIME type of the text output.

schema

object (Struct)

The JSON schema that the output should conform to. Only applicable when mimeType is application/json.

MimeType

Supported MIME types for text output.

Enums
TYPE_UNSPECIFIED Default value. This value is unused.
TYPE_APPLICATION_JSON JSON output format.
TYPE_TEXT_PLAIN Plain text output format.

ImageResponseFormat

Configuration for image output format.

JSON representation
{
  "mimeType": enum (MimeType),
  "delivery": enum (Delivery),
  "aspectRatio": enum (AspectRatio),
  "imageSize": enum (ImageSize)
}
Fields
mimeType

enum (MimeType)

The MIME type of the image output.

delivery

enum (Delivery)

The delivery mode for the image output.

aspectRatio

enum (AspectRatio)

The aspect ratio for the image output.

imageSize

enum (ImageSize)

The size of the image output.

MimeType

Supported MIME types for image output.

Enums
TYPE_UNSPECIFIED Default value. This value is unused.
TYPE_JPEG JPEG image format.

Delivery

Delivery mode for image output.

Enums
DELIVERY_UNSPECIFIED Default value. This value is unused.
INLINE Image data is returned inline in the response.
URI Image data is returned as a URI.

AspectRatio

Supported aspect ratios for image output.

Enums
ASPECT_RATIO_UNSPECIFIED Default value. This value is unused.
ASPECT_RATIO_ONE_BY_ONE 1:1 aspect ratio.
ASPECT_RATIO_TWO_BY_THREE 2:3 aspect ratio.
ASPECT_RATIO_THREE_BY_TWO 3:2 aspect ratio.
ASPECT_RATIO_THREE_BY_FOUR 3:4 aspect ratio.
ASPECT_RATIO_FOUR_BY_THREE 4:3 aspect ratio.
ASPECT_RATIO_FOUR_BY_FIVE 4:5 aspect ratio.
ASPECT_RATIO_FIVE_BY_FOUR 5:4 aspect ratio.
ASPECT_RATIO_NINE_BY_SIXTEEN 9:16 aspect ratio.
ASPECT_RATIO_SIXTEEN_BY_NINE 16:9 aspect ratio.
ASPECT_RATIO_TWENTY_ONE_BY_NINE 21:9 aspect ratio.
ASPECT_RATIO_ONE_BY_EIGHT 1:8 aspect ratio.
ASPECT_RATIO_EIGHT_BY_ONE 8:1 aspect ratio.
ASPECT_RATIO_ONE_BY_FOUR 1:4 aspect ratio.
ASPECT_RATIO_FOUR_BY_ONE 4:1 aspect ratio.

ImageSize

Supported image sizes for image output.

Enums
IMAGE_SIZE_UNSPECIFIED Default value. This value is unused.
IMAGE_SIZE_FIVE_TWELVE 512px image size.
IMAGE_SIZE_ONE_K 1K image size.
IMAGE_SIZE_TWO_K 2K image size.
IMAGE_SIZE_FOUR_K 4K image size.

VideoResponseFormat

Configuration for video output format.

JSON representation
{
  "delivery": enum (Delivery),
  "gcsUri": string,
  "aspectRatio": enum (AspectRatio),
  "duration": string
}
Fields
delivery

enum (Delivery)

The delivery mode for the video output.

gcsUri

string

The GCS URI to store the video output. Required for Vertex if delivery mode is URI.

aspectRatio

enum (AspectRatio)

The aspect ratio for the video output.

duration

string (Duration format)

The duration for the video output.

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

Delivery

Delivery mode for video output.

Enums
DELIVERY_UNSPECIFIED Default value. This value is unused.
INLINE Video data is returned inline in the response.
URI Video data is returned as a URI.

AspectRatio

Supported aspect ratios for video output.

Enums
ASPECT_RATIO_UNSPECIFIED Default value. This value is unused.
ASPECT_RATIO_SIXTEEN_BY_NINE 16:9 aspect ratio.
ASPECT_RATIO_NINE_BY_SIXTEEN 9:16 aspect ratio.

ModelInteraction

Interaction for generating the completion using models.

JSON representation
{
  "model": string,
  "generationConfig": {
    object (GenerationConfig)
  }
}
Fields
model

string

The name of the Model used for generating the completion.

generationConfig

object (GenerationConfig)

Input only. Configuration parameters for the model interaction.

GenerationConfig

Configuration parameters for model interactions.

JSON representation
{
  "temperature": number,
  "topP": number,
  "seed": integer,
  "stopSequences": [
    string
  ],
  "thinkingLevel": enum (ThinkingLevel),
  "thinkingSummaries": enum (ThinkingSummaries),
  "maxOutputTokens": integer,
  "speechConfig": [
    {
      object (SpeechConfig)
    }
  ],
  "imageConfig": {
    object (ImageConfig)
  },
  "videoConfig": {
    object (VideoConfig)
  },
  "transcriptionConfig": {
    object (TranscriptionConfig)
  },

  // Union field tool_choice can be only one of the following:
  "toolChoiceMode": enum (ToolChoiceType),
  "toolChoiceConfig": {
    object (ToolChoiceConfig)
  }
  // End of list of possible types for union field tool_choice.
}
Fields
temperature

number

Controls the randomness of the output.

topP

number

The maximum cumulative probability of tokens to consider when sampling.

seed

integer

Seed used in decoding for reproducibility.

stopSequences[]

string

A list of character sequences that will stop output interaction.

thinkingLevel

enum (ThinkingLevel)

The level of thought tokens that the model should generate.

thinkingSummaries

enum (ThinkingSummaries)

Whether to include thought summaries in the response.

maxOutputTokens

integer

The maximum number of tokens to include in the response.

speechConfig[]

object (SpeechConfig)

Configuration for speech interaction.

imageConfig
(deprecated)

object (ImageConfig)

Configuration for image interaction.

videoConfig

object (VideoConfig)

Configuration for video generation.

transcriptionConfig

object (TranscriptionConfig)

Optional. Configuration for speech recognition (transcription). If present, ASR is enabled.

Union field tool_choice. The tool choice configuration. tool_choice can be only one of the following:
toolChoiceMode

enum (ToolChoiceType)

The mode of the tool choice.

toolChoiceConfig

object (ToolChoiceConfig)

The config for the tool choice.

ToolChoiceType

The type of tool choice.

Enums
TOOL_CHOICE_TYPE_UNSPECIFIED Default value. This value is unused.
AUTO Auto tool choice.
ANY Any tool choice.
NONE No tool choice.
VALIDATED Validated tool choice.

ToolChoiceConfig

The tool choice configuration containing allowed tools.

JSON representation
{
  "allowedTools": {
    object (AllowedTools)
  }
}
Fields
allowedTools

object (AllowedTools)

The allowed tools.

AllowedTools

The configuration for allowed tools.

JSON representation
{
  "mode": enum (ToolChoiceType),
  "tools": [
    string
  ]
}
Fields
mode

enum (ToolChoiceType)

The mode of the tool choice.

tools[]

string

The names of the allowed tools.

ThinkingLevel

The level of thought tokens that the model should generate.

Enums
THINKING_LEVEL_UNSPECIFIED Default value. This value is unused.
THINKING_LEVEL_MINIMAL Little to no thinking.
THINKING_LEVEL_LOW Low thinking level.
THINKING_LEVEL_MEDIUM Medium thinking level.
THINKING_LEVEL_HIGH High thinking level.

ThinkingSummaries

Whether to include thought summaries in the response.

Enums
THINKING_SUMMARIES_UNSPECIFIED Default value. This value is unused.
THINKING_SUMMARIES_AUTO Auto thinking summaries.
THINKING_SUMMARIES_NONE No thinking summaries.

SpeechConfig

The configuration for speech interaction.

JSON representation
{
  "voice": string,
  "language": string,
  "speaker": string
}
Fields
voice

string

The voice of the speaker.

language

string

The language of the speech.

speaker

string

The speaker's name, it should match the speaker name given in the prompt.

ImageConfig

The configuration for image interaction.

JSON representation
{
  "aspectRatio": string,
  "imageSize": string
}
Fields
aspectRatio

string

The aspect ratio of the image to generate. Supported aspect ratios: 1:1, 2:3, 3:2, 3:4, 4:3, 9:16, 16:9, 21:9.

If not specified, the model will choose a default aspect ratio based on any reference images provided.

imageSize

string

Specifies the size of generated images. Supported values are 1K, 2K, 4K. If not specified, the model will use default value 1K.

VideoConfig

Configuration options for video generation.

JSON representation
{
  "task": enum (Task)
}
Fields
task

enum (Task)

Optional task mode for video generation. If not specified, the model automatically determines the appropriate mode based on the provided text prompt and input media.

Task

Supported video generation tasks.

Enums
TASK_UNSPECIFIED Unspecified task. The task is inferred from the input prompt and media.
TEXT_TO_VIDEO Generates video solely from a text prompt.
IMAGE_TO_VIDEO Generates video from one or two source images. The first image defines the starting frame, and the optional second image defines the ending frame.
REFERENCE_TO_VIDEO Generates video using reference media (such as images, audio, or video).
EDIT Modifies an existing input video.

TranscriptionConfig

Configuration for speech recognition (transcription).

JSON representation
{
  "timestampGranularities": [
    string
  ],
  "diarizationMode": string,
  "languageCodes": [
    string
  ],
  "adaptationPhrases": [
    string
  ],
  "customVocabulary": [
    string
  ]
}
Fields
timestampGranularities[]

string

Optional. The granularity of timestamps to include in the transcription output. Supported values: "word". If empty, no timestamps are generated.

diarizationMode

string

Optional. Configures speaker diarization. Supported values: "speaker".

languageCodes[]

string

Optional. BCP-47 language codes providing hints about the languages present in the audio. If omitted or empty, defaults to automatic language detection.

adaptationPhrases[]
(deprecated)

string

Optional. A list of phrases to bias the ASR model towards.

customVocabulary[]

string

Optional. A list of custom vocabulary phrases to bias the speech recognition model toward recognizing specific terms.

AgentInteraction

Interaction for generating the completion using agents.

JSON representation
{
  "agent": string,

  // Union field agent_config can be only one of the following:
  "dynamicConfig": {
    object (DynamicAgentConfig)
  },
  "deepResearchConfig": {
    object (DeepResearchAgentConfig)
  },
  "codeMenderConfig": {
    object (CodeMenderAgentConfig)
  },
  "antigravityConfig": {
    object (AntigravityAgentConfig)
  }
  // End of list of possible types for union field agent_config.
}
Fields
agent

string

The name of the Agent used for generating the completion.

Union field agent_config. Parameters for the agent interaction. agent_config can be only one of the following:
dynamicConfig

object (DynamicAgentConfig)

deepResearchConfig

object (DeepResearchAgentConfig)

codeMenderConfig

object (CodeMenderAgentConfig)

antigravityConfig

object (AntigravityAgentConfig)

Antigravity agent configuration. This configuration is session-level settings that are passed to the agent runtime on a per-request basis.

DynamicAgentConfig

Configuration for dynamic agents.

JSON representation
{
  "config": {
    object (Struct)
  }
}
Fields
config

object (Struct)

For agents that are not supported statically in the API definition.

DeepResearchAgentConfig

Configuration for the Deep Research agent.

JSON representation
{
  "thinkingSummaries": enum (ThinkingSummaries),
  "visualization": enum (VisualizationMode),
  "collaborativePlanning": boolean,
  "enableBigqueryTool": boolean
}
Fields
thinkingSummaries

enum (ThinkingSummaries)

Whether to include thought summaries in the response.

visualization

enum (VisualizationMode)

Whether to include visualizations in the response.

collaborativePlanning

boolean

Enables human-in-the-loop planning for the Deep Research agent. If set to true, the Deep Research agent will provide a research plan in its response. The agent will then proceed only if the user confirms the plan in the next turn.

enableBigqueryTool

boolean

Enables bigquery tool for the Deep Research agent.

VisualizationMode

Enum for visualization mode. Eventually we will support an interactive mode where the user can choose whether to include HTML visualizations in the response.

Enums
UNSPECIFIED The default visualization mode. Will default to AUTO.
OFF Do not include visualizations.
AUTO Automatically include visualizations.

CodeMenderAgentConfig

Configuration for the CodeMender agent.

JSON representation
{
  "sessionId": string,
  "sessionConfig": {
    object (SessionConfig)
  },
  "model": string,

  // Union field request can be only one of the following:
  "findRequest": {
    object (FindRequest)
  },
  "fixRequest": {
    object (FixRequest)
  }
  // End of list of possible types for union field request.
}
Fields
sessionId

string

Parameter for grouping multiple interactions that belong to the same CodeMender session.

sessionConfig

object (SessionConfig)

Optional session-specific configurations to override default agent behavior.

model

string

The name of the model to use for the CodeMender agent. One CodeMender session will only use one model.

Union field request. CodeMender's request type. Set exactly one of find_request/fix_request only on the first round to start a session; on subsequent rounds (e.g. submitting tool results), leave this unset and identify the session via session_id. This oneof is intentionally not a subtype_source discriminator so it can be omitted on resume rounds. request can be only one of the following:
findRequest

object (FindRequest)

Parameters for finding vulnerabilities.

fixRequest

object (FixRequest)

Parameters for fixing vulnerabilities.

FindRequest

Request parameters specific to FIND sessions, used for discovering vulnerabilities in a codebase.

JSON representation
{
  "sourceFiles": [
    {
      object (FileContent)
    }
  ],
  "findingId": string,
  "description": string,
  "mode": enum (Mode)
}
Fields
sourceFiles[]

object (FileContent)

A list of source files to provide as context for the scan.

findingId

string

The identifier of a specific finding to verify. This is primarily used in VERIFY mode to focus the agent's execution-based validation on a single vulnerability.

description

string

Additional context or custom instructions provided by the user to guide the vulnerability analysis.

mode

enum (Mode)

The mode of the find session.

FileContent

Content of a single file in the codebase.

JSON representation
{
  "path": string,
  "content": string
}
Fields
path

string

The relative path of the file from the project root.

content

string

The UTF-8 encoded text content of the file.

Mode

Defines the depth and thoroughness of the find session.

Enums
MODE_UNSPECIFIED Default value. This value is unused.
MODE_SCAN Fast scan using only the initial classifier.
MODE_VERIFY Performs classification followed by detailed investigation.

FixRequest

Request parameters specific to FIX sessions, used for generating and validating security patches.

JSON representation
{
  "sourceFiles": [
    {
      object (FileContent)
    }
  ],
  "findingId": string,
  "description": string
}
Fields
sourceFiles[]

object (FileContent)

A list of source files providing context for the remediation. These files are typically the ones containing the identified vulnerability.

findingId

string

The identifier of the specific security finding to be remediated. This id maps to a previously discovered vulnerability.

description

string

Additional context or custom instructions provided by the user to guide the patch generation process.

SessionConfig

The configuration of CodeMender sessions.

JSON representation
{
  "maxRounds": integer
}
Fields
maxRounds

integer

The maximum number of interaction rounds the agent is allowed to perform before reaching a timeout.

AntigravityAgentConfig

Configuration for the Antigravity agent runtime. Provides server-side control over the agent's execution environment and tool configuration.

JSON representation
{
  "model": string,
  "maxTotalTokens": string
}
Fields
model

string

The model to use for agent reasoning.

maxTotalTokens

string (int64 format)

Max total tokens for the agent run.

EnvironmentConfig

Configuration for a custom environment.

JSON representation
{
  "sources": [
    {
      object (Source)
    }
  ],
  "environmentId": string,

  // Union field network can be only one of the following:
  "networkAllowlist": {
    object (EnvironmentNetworkEgressAllowlist)
  },
  "networkMode": enum (NetworkMode)
  // End of list of possible types for union field network.
}
Fields
sources[]

object (Source)

environmentId

string

Optional. The environment id for the interaction. If specified, the request will update the existing environment instead of creating a new one.

Union field network. Network configuration for the environment. network can be only one of the following:
networkAllowlist

object (EnvironmentNetworkEgressAllowlist)

Allow only specific domains.

networkMode

enum (NetworkMode)

Network egress mode.

EnvironmentNetworkEgressAllowlist

Network egress configuration for the environment.

JSON representation
{
  "allowlist": [
    {
      object (EgressRule)
    }
  ]
}
Fields
allowlist[]

object (EgressRule)

List of allowed domains and their configurations.

EgressRule

A network egress rule that controls which external domains the environment is allowed to reach. Each rule identifies a target domain and, optionally, a set of HTTP headers to inject into every matching outbound request.

JSON representation
{
  "domain": string,
  "transform": {
    string: string,
    ...
  }
}
Fields
domain

string

The domain pattern to match for this rule. Use an exact hostname (e.g., github.com), a wildcard prefix (e.g., *.googleapis.com), or * to match all domains.

transform

map (key: string, value: string)

headers to inject into requests matching this rule. Key: header name (e.g., "Authorization"). value: header value (e.g., "Bearer your-token").

NetworkMode

Network egress mode for non-allowlist configurations.

Enums
NETWORK_MODE_UNSPECIFIED Default value. Unused.
DISABLED All network egress is blocked.

Source

A source to be mounted into the environment.

JSON representation
{
  "type": enum (Type),
  "source": string,
  "target": string,
  "content": string,
  "encoding": string
}
Fields
type

enum (Type)

source

string

The source of the environment. For GCS, this is the GCS path. For GitHub, this is the GitHub path.

target

string

Where the source should appear in the environment.

content

string

The inline content if type is INLINE.

encoding

string

Optional encoding for inline content (e.g. base64).

Type

Enums
TYPE_UNSPECIFIED
GCS A GCS bucket.
INLINE Inline content.
REPOSITORY A generic repository. The protocol prefix in the source URL identifies the provider (e.g., github://, gcs://).
SKILL_REGISTRY A skill resource from the Skill Registry service. Skill: projects/{project}/locations/{location}/skills/{skill} SkillRevision: projects/{project}/locations/{location}/skills/{skill}/revisions/{revision} Support mounting all skills under a project: projects/{project}/locations/{location}/skills.

LocalEnvironmentConfig

This type has no fields.

Configuration for an environment that lives on the client connection rather than in a server-managed sandbox.

When set (via Interaction.local_environment), the agent's filesystem and shell are treated as living on the client: the agent's built-in environment operations (e.g. reading/listing/editing files and running commands) are suspended on the server and yielded back to the client to execute, with their results returned on a subsequent turn. This is mutually exclusive with a server-managed EnvironmentConfig (remoteEnvironment), since the environment is either on the client or in a server sandbox, never both.

This governs only the agent's built-in environment. client-declared function tools are always executed on the client regardless of this field.

Tool

A tool that can be used by the model.

JSON representation
{

  // Union field type can be only one of the following:
  "function": {
    object (Function)
  },
  "codeExecution": {
    object (CodeExecution)
  },
  "urlContext": {
    object (UrlContext)
  },
  "computerUse": {
    object (ComputerUse)
  },
  "mcpServer": {
    object (McpServer)
  },
  "googleSearch": {
    object (GoogleSearch)
  },
  "fileSearch": {
    object (FileSearch)
  },
  "googleMaps": {
    object (GoogleMaps)
  },
  "retrieval": {
    object (Retrieval)
  }
  // End of list of possible types for union field type.
}
Fields
Union field type. The tool to use. type can be only one of the following:
function

object (Function)

A function that can be used by the model.

codeExecution

object (CodeExecution)

A tool that can be used by the model to execute code.

urlContext

object (UrlContext)

A tool that can be used by the model to fetch URL context.

computerUse

object (ComputerUse)

Tool to support the model interacting directly with the computer.

mcpServer

object (McpServer)

A MCPServer is a server that can be called by the model to perform actions.

googleMaps

object (GoogleMaps)

A tool that can be used by the model to search Google Maps.

retrieval

object (Retrieval)

A tool that can be used by the model to retrieve files.

Function

A tool that can be used by the model.

JSON representation
{
  "name": string,
  "description": string,
  "parameters": {
    object (Value)
  }
}
Fields
name

string

The name of the function.

description

string

A description of the function.

parameters

object (Value)

The JSON Schema for the function's parameters.

CodeExecution

This type has no fields.

A tool that can be used by the model to execute code.

UrlContext

This type has no fields.

A tool that can be used by the model to fetch URL context.

ComputerUse

A tool that can be used by the model to interact with the computer.

JSON representation
{
  "environment": enum (Environment),
  "excludedPredefinedFunctions": [
    string
  ],
  "enablePromptInjectionDetection": boolean,
  "disabledSafetyPolicies": [
    enum (SafetyPolicy)
  ]
}
Fields
environment

enum (Environment)

The environment being operated.

excludedPredefinedFunctions[]

string

The list of predefined functions that are excluded from the model call.

enablePromptInjectionDetection

boolean

Whether enable the prompt injection detection check on computer-use request.

disabledSafetyPolicies[]

enum (SafetyPolicy)

Optional. disabled safety policies for computer use.

Environment

Represents the environment being operated, such as a web browser.

Enums
ENVIRONMENT_UNSPECIFIED Defaults to browser.
BROWSER Operates in a web browser.
MOBILE Operates in a mobile environment.
DESKTOP Operates in a desktop environment.

SafetyPolicy

Enums
SAFETY_POLICY_UNSPECIFIED Unspecified safety policy.
FINANCIAL_TRANSACTIONS Safety policy for financial transactions.
SENSITIVE_DATA_MODIFICATION Safety policy for sensitive data modification.
COMMUNICATION_TOOL Safety policy for communication tools (e.g. Gmail, Chat, Meet).
ACCOUNT_CREATION Safety policy for account creation.
DATA_MODIFICATION Safety policy for data modification.
LEGAL_TERMS_AND_AGREEMENTS Safety policy for legal terms and agreements.

McpServer

A MCPServer is a server that can be called by the model to perform actions.

JSON representation
{
  "name": string,
  "headers": {
    string: string,
    ...
  },
  "allowedTools": [
    {
      object (AllowedTools)
    }
  ],

  // Union field transport can be only one of the following:
  "url": string
  // End of list of possible types for union field transport.
}
Fields
name

string

The name of the MCPServer.

headers

map (key: string, value: string)

Optional: Fields for authentication headers, timeouts, etc., if needed.

allowedTools[]

object (AllowedTools)

The allowed tools.

Union field transport.

transport can be only one of the following:

url

string

The full URL for the MCPServer endpoint. Example: "https://api.example.com/mcp"

GoogleSearch

A tool that can be used by the model to search Google.

JSON representation
{
  "searchTypes": [
    enum (SearchType)
  ]
}
Fields
searchTypes[]

enum (SearchType)

The types of search grounding to enable.

FileSearch

A tool that can be used by the model to search files.

JSON representation
{
  "fileSearchStoreNames": [
    string
  ],
  "topK": integer,
  "metadataFilter": string
}
Fields
fileSearchStoreNames[]

string

The file search store names to search.

topK

integer

The number of semantic retrieval chunks to retrieve.

metadataFilter

string

metadata filter to apply to the semantic retrieval documents and chunks.

GoogleMaps

A tool that can be used by the model to call Google Maps.

JSON representation
{
  "enableWidget": boolean,
  "latitude": number,
  "longitude": number
}
Fields
enableWidget

boolean

Whether to return a widget context token in the tool call result of the response.

latitude

number

The latitude of the user's location.

longitude

number

The longitude of the user's location.

Retrieval

A tool that can be used by the model to retrieve files.

JSON representation
{
  "retrievalTypes": [
    enum (RetrievalType)
  ],
  "vertexAiSearchConfig": {
    object (VertexAISearchConfig)
  },
  "exaAiSearchConfig": {
    object (ExaAISearchConfig)
  },
  "parallelAiSearchConfig": {
    object (ParallelAISearchConfig)
  },
  "ragStoreConfig": {
    object (RagStoreConfig)
  }
}
Fields
retrievalTypes[]

enum (RetrievalType)

The types of file retrieval to enable.

vertexAiSearchConfig

object (VertexAISearchConfig)

Used to specify configuration for VertexAISearch.

exaAiSearchConfig

object (ExaAISearchConfig)

Used to specify configuration for ExaAISearch.

parallelAiSearchConfig

object (ParallelAISearchConfig)

Used to specify configuration for ParallelAISearch.

ragStoreConfig

object (RagStoreConfig)

Used to specify configuration for RagStore.

VertexAISearchConfig

Used to specify configuration for VertexAISearch.

JSON representation
{
  "engine": string,
  "datastores": [
    string
  ]
}
Fields
engine

string

Optional. Used to specify Vertex AI Search engine.

datastores[]

string

Optional. Used to specify Vertex AI Search datastores.

ExaAISearchConfig

Used to specify configuration for ExaAISearch.

JSON representation
{
  "apiKey": string,
  "customConfig": {
    object
  }
}
Fields
apiKey

string

Required. The API key for ExaAiSearch.

customConfig

object (Struct format)

Optional. This field can be used to pass any parameter from the Exa.ai Search API.

ParallelAISearchConfig

Used to specify configuration for ParallelAISearch.

JSON representation
{
  "apiKey": string,
  "customConfig": {
    object
  }
}
Fields
apiKey

string

Optional. The API key for ParallelAiSearch.

customConfig

object (Struct format)

Optional. Custom configs for ParallelAiSearch.

RagStoreConfig

Use to specify configuration for RAG Store.

JSON representation
{
  "ragResources": [
    {
      object (RagResource)
    }
  ],
  "similarityTopK": integer,
  "vectorDistanceThreshold": number,
  "ragRetrievalConfig": {
    object (RagRetrievalConfig)
  }
}
Fields
ragResources[]

object (RagResource)

Optional. The representation of the rag source.

similarityTopK
(deprecated)

integer

Optional. Number of top k results to return from the selected corpora.

vectorDistanceThreshold
(deprecated)

number

Optional. Only return results with vector distance smaller than the threshold.

ragRetrievalConfig

object (RagRetrievalConfig)

Optional. The retrieval config for the Rag query.

RagResource

The definition of the Rag resource.

JSON representation
{
  "ragCorpus": string,
  "ragFileIds": [
    string
  ]
}
Fields
ragCorpus

string

Optional. RagCorpora resource name.

ragFileIds[]

string

Optional. ragFileId. The files should be in the same ragCorpus set in ragCorpus field.

RagRetrievalConfig

Specifies the context retrieval config.

JSON representation
{
  "topK": integer,
  "hybridSearch": {
    object (HybridSearch)
  },
  "filter": {
    object (Filter)
  },
  "ranking": {
    object (Ranking)
  }
}
Fields
topK

integer

Optional. The number of contexts to retrieve.

filter

object (Filter)

Optional. Config for filters.

ranking

object (Ranking)

Optional. Config for ranking and reranking.

HybridSearch

Config for Hybrid Search.

JSON representation
{
  "alpha": number
}
Fields
alpha

number

Optional. Alpha value controls the weight between dense and sparse vector search results.

Filter

Config for filters.

JSON representation
{
  "metadataFilter": string,

  // Union field vector_db_threshold can be only one of the following:
  "vectorDistanceThreshold": number,
  "vectorSimilarityThreshold": number
  // End of list of possible types for union field vector_db_threshold.
}
Fields
metadataFilter

string

Optional. String for metadata filtering.

Union field vector_db_threshold. Filter contexts retrieved from the vector DB based on either vector distance or vector similarity. vector_db_threshold can be only one of the following:
vectorDistanceThreshold

number

Optional. Only returns contexts with vector distance smaller than the threshold.

vectorSimilarityThreshold

number

Optional. Only returns contexts with vector similarity larger than the threshold.

Ranking

Config for ranking and reranking.

JSON representation
{

  // Union field ranking_config can be only one of the following:
  "rankService": {
    object (RankService)
  }
  // End of list of possible types for union field ranking_config.
}
Fields
Union field ranking_config. Config options for ranking. ranking_config can be only one of the following:
rankService

object (RankService)

Optional. Config for Rank service.

RankService

Config for Rank service.

JSON representation
{
  "modelName": string
}
Fields
modelName

string

Optional. The model name of the rank service.

ServiceTier

The service tier of the interaction.

Enums
SERVICE_TIER_UNSPECIFIED Default service tier, which is standard.
SERVICE_TIER_FLEX Flex service tier.
SERVICE_TIER_STANDARD Standard service tier.
SERVICE_TIER_PRIORITY priority service tier.
SERVICE_TIER_DEFERRED Deferred service tier.

SafetySetting

A safety setting that affects the safety-blocking behavior.

A SafetySetting consists of a harm category and a threshold for that category.

JSON representation
{
  "type": enum (HarmCategory),
  "threshold": enum (HarmBlockThreshold),
  "method": enum (HarmBlockMethod)
}
Fields
type

enum (HarmCategory)

Required. The type of harm category to be blocked.

threshold

enum (HarmBlockThreshold)

Required. The threshold for blocking content. If the harm probability exceeds this threshold, the content will be blocked.

method

enum (HarmBlockMethod)

Optional. The method for blocking content. If not specified, the default behavior is to use the probability score.

HarmCategory

Harm categories that can be detected in user input and model responses.

Enums
HARM_CATEGORY_UNSPECIFIED Default value. This value is unused.
HARM_CATEGORY_HATE_SPEECH Content that promotes violence or incites hatred against individuals or groups based on certain attributes.
HARM_CATEGORY_DANGEROUS_CONTENT Content that promotes, facilitates, or enables dangerous activities.
HARM_CATEGORY_HARASSMENT Abusive, threatening, or content intended to bully, torment, or ridicule.
HARM_CATEGORY_SEXUALLY_EXPLICIT Content that contains sexually explicit material.
HARM_CATEGORY_CIVIC_INTEGRITY

Deprecated: Election filter is not longer supported. The harm category is civic integrity.

HARM_CATEGORY_IMAGE_HATE Images that contain hate speech.
HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT Images that contain dangerous content.
HARM_CATEGORY_IMAGE_HARASSMENT Images that contain harassment.
HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT Images that contain sexually explicit content.
HARM_CATEGORY_JAILBREAK Prompts designed to bypass safety filters.

HarmBlockThreshold

Thresholds for blocking content based on harm probability.

Enums
HARM_BLOCK_THRESHOLD_UNSPECIFIED The harm block threshold is unspecified.
BLOCK_LOW_AND_ABOVE Block content with a low harm probability or higher.
BLOCK_MEDIUM_AND_ABOVE Block content with a medium harm probability or higher.
BLOCK_ONLY_HIGH Block content with a high harm probability.
BLOCK_NONE Do not block any content, regardless of its harm probability.
OFF Turn off the safety filter entirely.

HarmBlockMethod

The method for blocking content.

Enums
HARM_BLOCK_METHOD_UNSPECIFIED The harm block method is unspecified.
SEVERITY The harm block method uses both probability and severity scores.
PROBABILITY The harm block method uses the probability score.