[ Web Proxy ]
URL:
Viewing: https://adk.dev/integrations/../../workflows/../../graphs/../../../api-reference/agentconfig/ [Back]  [Original]

AgentConfig

AgentConfig


The config for the YAML schema to create an agent.

Any of

LlmAgentConfig

Type: object

The config for the YAML schema of a LlmAgent.

No Additional Properties

agent_class

Agent Class

Type: enum (of string) Default: "LlmAgent"

The value is used to uniquely identify the LlmAgent class. If it is empty, it is by default an LlmAgent.

Must be one of:

  • "LlmAgent"
  • ""

name Required

Name

Type: string

Required. The name of the agent.

description

Description

Type: string Default: ""

Optional. The description of the agent.

sub_agents

Sub Agents

Default: null

Optional. The sub-agents of the agent.

Any of

Type: array
No Additional Items

Each item of this array must be:

before_agent_callbacks

Before Agent Callbacks

Default: null

Optional. The beforeagentcallbacks of the agent.

Example:

before_agent_callbacks:
  - name: my_library.security_callbacks.before_agent_callback

Any of

Type: array
No Additional Items

Each item of this array must be:

CodeConfig

Type: object

Code reference config for a variable, a function, or a class.

This config is used for configuring callbacks and tools.

No Additional Properties

after_agent_callbacks

After Agent Callbacks

Default: null

Optional. The afteragentcallbacks of the agent.

Any of

Type: array
No Additional Items

Each item of this array must be:

CodeConfig

Type: object

Code reference config for a variable, a function, or a class.

This config is used for configuring callbacks and tools.

Same definition as CodeConfig

model

Model

Default: null

Optional. LlmAgent.model. If not set, the model will be inherited from the ancestor.

instruction Required

Instruction

Type: string

Required. LlmAgent.instruction.

disallow_transfer_to_parent

Disallow Transfer To Parent

Default: null

Optional. LlmAgent.disallowtransferto_parent.

disallow_transfer_to_peers

Disallow Transfer To Peers

Default: null

Optional. LlmAgent.disallowtransferto_peers.

input_schema

Default: null

Optional. LlmAgent.input_schema.

Any of

CodeConfig

Type: object

Code reference config for a variable, a function, or a class.

This config is used for configuring callbacks and tools.

Same definition as CodeConfig

output_schema

Default: null

Optional. LlmAgent.output_schema.

Any of

CodeConfig

Type: object

Code reference config for a variable, a function, or a class.

This config is used for configuring callbacks and tools.

Same definition as CodeConfig

output_key

Output Key

Default: null

Optional. LlmAgent.output_key.

include_contents

Include Contents

Type: enum (of string) Default: "default"

Optional. LlmAgent.include_contents.

Must be one of:

  • "default"
  • "none"

tools

Tools

Default: null

Optional. LlmAgent.tools.

Examples:

For ADK built-in tools in google.adk.tools package, they can be referenced
directly with the name:

tools:
  - name: google_search
  - name: load_memory

For user-defined tools, they can be referenced with fully qualified name:

tools:
  - name: my_library.my_tools.my_tool

For tools that needs to be created via functions:

tools:
  - name: my_library.my_tools.create_tool
    args:
      - name: param1
        value: value1
      - name: param2
        value: value2

For more advanced tools, instead of specifying arguments in config, it's
recommended to define them in Python files and reference them. E.g.,

# tools.py
my_mcp_toolset = MCPToolset(
    connection_params=StdioServerParameters(
        command="npx",
        args=["-y", "@notionhq/notion-mcp-server"],
        env={"OPENAPI_MCP_HEADERS": NOTION_HEADERS},
    )
)

Then, reference the toolset in config:

tools:
  - name: tools.my_mcp_toolset

Any of

Type: array
No Additional Items

Each item of this array must be:

ToolConfig

Type: object

The configuration for a tool.

The config supports these types of tools:
1. ADK built-in tools
2. User-defined tool instances
3. User-defined tool classes
4. User-defined functions that generate tool instances
5. User-defined function tools

For examples:

  1. For ADK built-in tool instances or classes in google.adk.tools package,
    they can be referenced directly with the name and optionally with
    args.

    tools:
      - name: google_search
      - name: AgentTool
        args:
          agent: ./another_agent.yaml
          skip_summarization: true
    
  2. For user-defined tool instances, the name is the fully qualified path
    to the tool instance.

    tools:
      - name: my_package.my_module.my_tool
    
  3. For user-defined tool classes (custom tools), the name is the fully
    qualified path to the tool class and args is the arguments for the tool.

    tools:
      - name: my_package.my_module.my_tool_class
        args:
          my_tool_arg1: value1
          my_tool_arg2: value2
    
  4. For user-defined functions that generate tool instances, the name is
    the fully qualified path to the function and args is passed to the
    function as arguments.

    tools:
      - name: my_package.my_module.my_tool_function
        args:
          my_function_arg1: value1
          my_function_arg2: value2
    

    The function must have the following signature:

    def my_function(args: ToolArgsConfig) -> BaseTool:
      ...
    
  5. For user-defined function tools, the name is the fully qualified path
    to the function.

    tools:
      - name: my_package.my_module.my_function_tool
    

    If the above use cases don't suffice, users can define a custom tool config
    by extending BaseToolConfig and override from_config() in the custom tool.

No Additional Properties

name Required

Name

Type: string

The name of the tool.

For ADK built-in tools, name is the name of the tool, e.g. google_search
or AgentTool.

For user-defined tools, the name is the fully qualified path to the tool, e.g.
my_package.my_module.my_tool.

args

Default: null

The args for the tool.

Any of

ToolArgsConfig

Type: object

Config to host free key-value pairs for the args in ToolConfig.

Additional Properties

Additional Properties of any type are allowed.

Type: object

before_model_callbacks

Before Model Callbacks

Default: null

Optional. LlmAgent.beforemodelcallbacks.

Example:

before_model_callbacks:
  - name: my_library.callbacks.before_model_callback

Any of

Type: array
No Additional Items

Each item of this array must be:

CodeConfig

Type: object

Code reference config for a variable, a function, or a class.

This config is used for configuring callbacks and tools.

Same definition as CodeConfig

after_model_callbacks

After Model Callbacks

Default: null

Optional. LlmAgent.aftermodelcallbacks.

Any of

Type: array
No Additional Items

Each item of this array must be:

CodeConfig

Type: object

Code reference config for a variable, a function, or a class.

This config is used for configuring callbacks and tools.

Same definition as CodeConfig

before_tool_callbacks

Before Tool Callbacks

Default: null

Optional. LlmAgent.beforetoolcallbacks.

Any of

Type: array
No Additional Items

Each item of this array must be:

CodeConfig

Type: object

Code reference config for a variable, a function, or a class.

This config is used for configuring callbacks and tools.

Same definition as CodeConfig

after_tool_callbacks

After Tool Callbacks

Default: null

Optional. LlmAgent.aftertoolcallbacks.

Any of

Type: array
No Additional Items

Each item of this array must be:

CodeConfig

Type: object

Code reference config for a variable, a function, or a class.

This config is used for configuring callbacks and tools.

Same definition as CodeConfig

generate_content_config

Default: null

Optional. LlmAgent.generatecontentconfig.

Any of

GenerateContentConfig

Type: object

Optional model configuration parameters.

For more information, see Content generation parameters <https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/content-generation-parameters>_.

No Additional Properties

httpOptions

Default: null

Used to override HTTP request options.

Any of

HttpOptions

Type: object

HTTP options to be used in each of the requests.

No Additional Properties

extraBody

Extrabody

Default: null

Extra parameters to add to the request body.
The structure must match the backend API's request structure.
- VertexAI backend API docs: https://cloud.google.com/vertex-ai/docs/reference/rest
- GeminiAPI backend API docs: https://ai.google.dev/api/rest

retryOptions

Default: null

HTTP retry options for the request.

Any of

HttpRetryOptions

Type: object

HTTP retry options to be used in each of the requests.

No Additional Properties

systemInstruction

Systeminstruction

Default: null

Instructions for the model to steer it toward better performance.
For example, "Answer as concisely as possible" or "Don't use technical
terms in your response".

Any of

Content

Type: object

Contains the multi-part content of a message.

No Additional Properties

parts

Parts

Default: null

List of parts that constitute a single message. Each part may have
a different IANA MIME type.

Any of

Type: array
No Additional Items

Each item of this array must be:

Part

Type: object

A datatype containing media content.

Exactly one field within a Part should be set, representing the specific type
of content being conveyed. Using multiple fields within the same Part
instance is considered invalid.

No Additional Properties

videoMetadata

Default: null

Metadata for a given video.

Any of

VideoMetadata

Type: object

Describes how the video in the Part should be used by the model.

No Additional Properties

inlineData

Default: null

Optional. Inlined bytes data.

Any of

Blob

Type: object

Content blob.

No Additional Properties

fileData

Default: null

Optional. URI based data.

Any of

FileData

Type: object

URI based data.

No Additional Properties

codeExecutionResult

Default: null

Optional. Result of executing the [ExecutableCode].

Any of

CodeExecutionResult

Type: object

Result of executing the [ExecutableCode].

Only generated when using the [CodeExecution] tool, and always follows a
part containing the [ExecutableCode].

No Additional Properties

executableCode

Default: null

Optional. Code generated by the model that is meant to be executed.

Any of

ExecutableCode

Type: object

Code generated by the model that is meant to be executed, and the result returned to the model.

Generated when using the [CodeExecution] tool, in which the code will be
automatically executed, and a corresponding [CodeExecutionResult] will also be
generated.

No Additional Properties

functionCall

Default: null

Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values.

Any of

FunctionCall

Type: object

A function call.

No Additional Properties

functionResponse

Default: null

Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model.

Any of

FunctionResponse

Type: object

A function response.

No Additional Properties

willContinue

Willcontinue

Default: null

Signals that function call continues, and more responses will be returned, turning the function call into a generator. Is only applicable to NONBLOCKING function calls (see FunctionDeclaration.behavior for details), ignored otherwise. If false, the default, future responses will not be considered. Is only applicable to NONBLOCKING function calls, is ignored otherwise. If set to false, future responses will not be considered. It is allowed to return empty response with will_continue=False to signal that the function call is finished.

scheduling

Default: null

Specifies how the response should be scheduled in the conversation. Only applicable to NONBLOCKING function calls, is ignored otherwise. Defaults to WHENIDLE.

response

role

Role

Default: null

Optional. The producer of the content. Must be either 'user' or
'model'. Useful to set for multi-turn conversations, otherwise can be
empty. If role is not specified, SDK will determine the role.

Type: array
No Additional Items

Each item of this array must be:


Any of

File

Type: object

A file uploaded to the API.

No Additional Properties

name

Name

Default: null

The File resource name. The ID (name excluding the "files/" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end with a dash. If the name is empty on create, a unique name will be generated. Example: files/123-456

displayName

error

Default: null

Output only. Error status if File processing failed.

Any of

FileStatus

Type: object

Status of a File that uses a common error model.

No Additional Properties

Part

Type: object

A datatype containing media content.

Exactly one field within a Part should be set, representing the specific type
of content being conveyed. Using multiple fields within the same Part
instance is considered invalid.

Same definition as Part

Part

Type: object

A datatype containing media content.

Exactly one field within a Part should be set, representing the specific type
of content being conveyed. Using multiple fields within the same Part
instance is considered invalid.

Same definition as Part

temperature

Temperature

Default: null

Value that controls the degree of randomness in token selection.
Lower temperatures are good for prompts that require a less open-ended or
creative response, while higher temperatures can lead to more diverse or
creative results.

topP

Topp

Default: null

Tokens are selected from the most to least probable until the sum
of their probabilities equals this value. Use a lower value for less
random responses and a higher value for more random responses.

topK

Topk

Default: null

For each token selection step, the top_k tokens with the
highest probabilities are sampled. Then tokens are further filtered based
on top_p with the final token selected using temperature sampling. Use
a lower number for less random responses and a higher number for more
random responses.

stopSequences

Stopsequences

Default: null

List of strings that tells the model to stop generating text if one
of the strings is encountered in the response.

responseLogprobs

Responselogprobs

Default: null

Whether to return the log probabilities of the tokens that were
chosen by the model at each step.

logprobs

Logprobs

Default: null

Number of top candidate tokens to return the log probabilities for
at each generation step.

presencePenalty

Presencepenalty

Default: null

Positive values penalize tokens that already appear in the
generated text, increasing the probability of generating more diverse
content.

frequencyPenalty

Frequencypenalty

Default: null

Positive values penalize tokens that repeatedly appear in the
generated text, increasing the probability of generating more diverse
content.

seed

Seed

Default: null

When seed is fixed to a specific number, the model makes a best
effort to provide the same response for repeated requests. By default, a
random number is used.

responseMimeType

Responsemimetype

Default: null

Output response mimetype of the generated candidate text.
Supported mimetype:
- text/plain: (default) Text output.
- application/json: JSON response in the candidates.
The model needs to be prompted to output the appropriate response type,
otherwise the behavior is undefined.
This is a preview feature.

responseSchema

Responseschema

Default: null

The Schema object allows the definition of input and output data types.
These types can be objects, but also primitives and arrays.
Represents a select subset of an OpenAPI 3.0 schema
object
.
If set, a compatible responsemimetype must also be set.
Compatible mimetypes: application/json: Schema for JSON response.

Any of

Schema

Type: object

Schema is used to define the format of input/output data.

Represents a select subset of an OpenAPI 3.0 schema
object
. More fields may
be added in the future as needed.

No Additional Properties

defs

Defs

Default: null

Optional. A map of definitions for use by ref Only allowed at the root of the schema.

Any of

Type: object

Additional Properties

Each additional property must conform to the following schema

Schema

Type: object

Schema is used to define the format of input/output data.

Represents a select subset of an OpenAPI 3.0 schema
object
. More fields may
be added in the future as needed.

Same definition as Schema

ref

Ref

Default: null

Optional. Allows indirect references between schema nodes. The value should be a valid reference to a child of the root defs. For example, the following schema defines a reference to a schema node named "Pet": type: object properties: pet: ref: #/defs/Pet defs: Pet: type: object properties: name: type: string The value of the "pet" property is a reference to the schema node named "Pet". See details in https://json-schema.org/understanding-json-schema/structuring

anyOf

Anyof

Default: null

Optional. The value should be validated against any (one or more) of the subschemas in the list.

Any of

Type: array
No Additional Items

Each item of this array must be:

Schema

Type: object

Schema is used to define the format of input/output data.

Represents a select subset of an OpenAPI 3.0 schema
object
. More fields may
be added in the future as needed.

Same definition as Schema

enum

Enum

Default: null

Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]}

format

Format

Default: null

Optional. The format of the data. Supported formats: for NUMBER type: "float", "double" for INTEGER type: "int32", "int64" for STRING type: "email", "byte", etc

items

Default: null

Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY.

Any of

Schema

Type: object

Schema is used to define the format of input/output data.

Represents a select subset of an OpenAPI 3.0 schema
object
. More fields may
be added in the future as needed.

Same definition as Schema

properties

Properties

Default: null

Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT.

Any of

Type: object

Additional Properties

Each additional property must conform to the following schema

Schema

Type: object

Schema is used to define the format of input/output data.

Represents a select subset of an OpenAPI 3.0 schema
object
. More fields may
be added in the future as needed.

Same definition as Schema

propertyOrdering

type

Default: null

Optional. The type of the data.

Any of

Type

Type: enum (of string)

Optional. The type of the data.

Must be one of:

  • "TYPE_UNSPECIFIED"
  • "STRING"
  • "NUMBER"
  • "INTEGER"
  • "BOOLEAN"
  • "ARRAY"
  • "OBJECT"
  • "NULL"

responseJsonSchema

Responsejsonschema

Default: null

Optional. Output schema of the generated response.
This is an alternative to response_schema that accepts JSON
Schema
. If set, response_schema must be
omitted, but response_mime_type is required. While the full JSON Schema
may be sent, not all features are supported. Specifically, only the
following properties are supported: - $id - $defs - $ref - $anchor
- type - format - title - description - enum (for strings and
numbers) - items - prefixItems - minItems - maxItems - minimum -
maximum - anyOf - oneOf (interpreted the same as anyOf) -
properties - additionalProperties - required The non-standard
propertyOrdering property may also be set. Cyclic references are
unrolled to a limited degree and, as such, may only be used within
non-required properties. (Nullable properties are not sufficient.) If
$ref is set on a sub-schema, no other properties, except for than those
starting as a $, may be set.

routingConfig

Default: null

Configuration for model router requests.

Any of

GenerationConfigRoutingConfig

Type: object

The configuration for routing the request to a specific model.

No Additional Properties

autoMode

Default: null

Automated routing.

Any of

manualMode

Default: null

Manual routing.

modelSelectionConfig

safetySettings

Safetysettings

Default: null

Safety settings in the request to block unsafe content in the
response.

Any of

Type: array
No Additional Items

Each item of this array must be:

SafetySetting

Type: object

Safety settings.

No Additional Properties

method

Default: null

Determines if the harm block method uses probability or probability
and severity scores.

Any of

HarmBlockMethod

Type: enum (of string)

Optional.

Specify if the threshold is used for probability or severity score. If not
specified, the threshold is used for probability score.

Must be one of:

  • "HARM_BLOCK_METHOD_UNSPECIFIED"
  • "SEVERITY"
  • "PROBABILITY"

category

Default: null

Required. Harm category.

Any of

HarmCategory

Type: enum (of string)

Required. Harm category.

Must be one of:

  • "HARM_CATEGORY_UNSPECIFIED"
  • "HARM_CATEGORY_HATE_SPEECH"
  • "HARM_CATEGORY_DANGEROUS_CONTENT"
  • "HARM_CATEGORY_HARASSMENT"
  • "HARM_CATEGORY_SEXUALLY_EXPLICIT"
  • "HARM_CATEGORY_CIVIC_INTEGRITY"
  • "HARM_CATEGORY_IMAGE_HATE"
  • "HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT"
  • "HARM_CATEGORY_IMAGE_HARASSMENT"
  • "HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT"

threshold

Default: null

Required. The harm block threshold.

Any of

HarmBlockThreshold

Type: enum (of string)

Required. The harm block threshold.

Must be one of:

  • "HARM_BLOCK_THRESHOLD_UNSPECIFIED"
  • "BLOCK_LOW_AND_ABOVE"
  • "BLOCK_MEDIUM_AND_ABOVE"
  • "BLOCK_ONLY_HIGH"
  • "BLOCK_NONE"
  • "OFF"

tools

Tools

Default: null

Code that enables the system to interact with external systems to
perform an action outside of the knowledge and scope of the model.

Any of

Type: array
No Additional Items

Each item of this array must be:


Any of

Tool

Type: object

Tool details of a tool that the model may use to generate a response.

No Additional Properties

functionDeclarations

Functiondeclarations

Default: null

List of function declarations that the tool supports.

Any of

Type: array
No Additional Items

Each item of this array must be:

FunctionDeclaration

Type: object

Defines a function that the model can generate JSON inputs for.

The inputs are based on OpenAPI 3.0 specifications <https://spec.openapis.org/oas/v3.0.3>_.

No Additional Properties

parameters

Default: null

Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1

parametersJsonSchema

Parametersjsonschema

Default: null

Optional. Describes the parameters to the function in JSON Schema format. The schema must describe an object where the properties are the parameters to the function. For example: { "type": "object", "properties": { "name": { "type": "string" }, "age": { "type": "integer" } }, "additionalProperties": false, "required": ["name", "age"], "propertyOrdering": ["name", "age"] } This field is mutually exclusive with parameters.

response

Default: null

Optional. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function.

retrieval

Default: null

Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation.

Any of

Retrieval

Type: object

Defines a retrieval tool that model can call to access external knowledge.

No Additional Properties

externalApi

Default: null

Use data source powered by external API for grounding.

Any of

ExternalApi

Type: object

Retrieve from data source powered by external API for grounding.

The external API is not owned by Google, but need to follow the pre-defined
API spec.

No Additional Properties

apiAuth

Default: null

The authentication config to access the API. Deprecated. Please use auth_config instead.

Any of

ApiAuth

Type: object

The generic reusable api auth config.

Deprecated. Please use AuthConfig (google/cloud/aiplatform/master/auth.proto)
instead.

No Additional Properties

apiKeyConfig

Default: null

The API secret.

Any of

ApiAuthApiKeyConfig

Type: object

The API secret.

No Additional Properties

authConfig

Default: null

The authentication config to access the API.

Any of

AuthConfig

Type: object

Auth configuration to run the extension.

No Additional Properties

apiKeyConfig

Default: null

Config for API key auth.

Any of

googleServiceAccountConfig

Default: null

Config for Google Service Account auth.

Any of

AuthConfigGoogleServiceAccountConfig

Type: object

Config for Google Service Account Authentication.

No Additional Properties

serviceAccount

Serviceaccount

Default: null

Optional. The service account that the extension execution service runs as. - If the service account is specified, the iam.serviceAccounts.getAccessToken permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified service account. - If not specified, the Vertex AI Extension Service Agent will be used to execute the Extension.

httpBasicAuthConfig

Default: null

Config for HTTP Basic auth.

Any of

AuthConfigHttpBasicAuthConfig

Type: object

Config for HTTP Basic Authentication.

No Additional Properties

credentialSecret

Credentialsecret

Default: null

Required. The name of the SecretManager secret version resource storing the base64 encoded credentials. Format: projects/{project}/secrets/{secrete}/versions/{version} - If specified, the secretmanager.versions.access permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource.

oauthConfig

Default: null

Config for user oauth.

Any of

AuthConfigOauthConfig

Type: object

Config for user oauth.

No Additional Properties

serviceAccount

Serviceaccount

Default: null

The service account used to generate access tokens for executing the Extension. - If the service account is specified, the iam.serviceAccounts.getAccessToken permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the provided service account.

oidcConfig

Default: null

Config for user OIDC auth.

Any of

AuthConfigOidcConfig

Type: object

Config for user OIDC auth.

No Additional Properties

serviceAccount

Serviceaccount

Default: null

The service account used to generate an OpenID Connect (OIDC)-compatible JWT token signed by the Google OIDC Provider (accounts.google.com) for extension endpoint (https://cloud.google.com/iam/docs/create-short-lived-credentials-direct#sa-credentials-oidc). - The audience for the token will be set to the URL in the server url defined in the OpenApi spec. - If the service account is provided, the service account should grant iam.serviceAccounts.getOpenIdToken permission to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents).

elasticSearchParams

Default: null

Parameters for the elastic search API.

Any of

ExternalApiElasticSearchParams

Type: object

The search parameters to use for the ELASTIC_SEARCH spec.

No Additional Properties

vertexAiSearch

Default: null

Set to use data source powered by Vertex AI Search.

Any of

VertexAISearch

Type: object

Retrieve from Vertex AI Search datastore or engine for grounding.

datastore and engine are mutually exclusive. See
https://cloud.google.com/products/agent-builder

No Additional Properties

dataStoreSpecs

Datastorespecs

Default: null

Specifications that define the specific DataStores to be searched, along with configurations for those data stores. This is only considered for Engines with multiple data stores. It should only be set if engine is used.

Any of

Type: array
No Additional Items

Each item of this array must be:

VertexAISearchDataStoreSpec

Type: object

Define data stores within engine to filter on in a search call and configurations for those data stores.

For more information, see
https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#datastorespec

No Additional Properties

vertexRagStore

Default: null

Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService.

Any of

VertexRagStore

Type: object

Retrieve from Vertex RAG Store for grounding.

No Additional Properties

ragResources

Ragresources

Default: null

Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support.

Any of

Type: array
No Additional Items

Each item of this array must be:

VertexRagStoreRagResource

Type: object

The definition of the Rag resource.

No Additional Properties

ragRetrievalConfig

Default: null

Optional. The retrieval config for the Rag query.

Any of

RagRetrievalConfig

Type: object

Specifies the context retrieval config.

No Additional Properties

filter

Default: null

Optional. Config for filters.

Any of

RagRetrievalConfigFilter

Type: object

Config for filters.

No Additional Properties

hybridSearch

Default: null

Optional. Config for Hybrid Search.

Any of

RagRetrievalConfigHybridSearch

Type: object

Config for Hybrid Search.

No Additional Properties

ranking

Default: null

Optional. Config for ranking and reranking.

Any of

RagRetrievalConfigRanking

Type: object

Config for ranking and reranking.

No Additional Properties

llmRanker

Default: null

Optional. Config for LlmRanker.

Any of

RagRetrievalConfigRankingLlmRanker

Type: object

Config for LlmRanker.

No Additional Properties

rankService

Default: null

Optional. Config for Rank Service.

Any of

RagRetrievalConfigRankingRankService

Type: object

Config for Rank Service.

No Additional Properties

storeContext

Storecontext

Default: null

Optional. Currently only supported for Gemini Multimodal Live API. In Gemini Multimodal Live API, if store_context bool is specified, Gemini will leverage it to automatically memorize the interactions between the client and Gemini, and retrieve context when needed to augment the response generation for users' ongoing and future interactions.

googleSearch

Default: null

Optional. Google Search tool type. Specialized retrieval tool
that is powered by Google Search.

Any of

GoogleSearch

Type: object

Tool to support Google Search in Model. Powered by Google.

No Additional Properties

timeRangeFilter

Default: null

Optional. Filter search results to a specific time range.
If customers set a start time, they must set an end time (and vice versa).

Any of

Interval

Type: object

Represents a time interval, encoded as a start time (inclusive) and an end time (exclusive).

The start time must be less than or equal to the end time.
When the start equals the end time, the interval is an empty interval.
(matches no time)
When both start and end are unspecified, the interval matches any time.

No Additional Properties

googleSearchRetrieval

Default: null

Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search.

Any of

GoogleSearchRetrieval

Type: object

Tool to retrieve public web data for grounding, powered by Google.

No Additional Properties

dynamicRetrievalConfig

Default: null

Specifies the dynamic retrieval configuration for the given source.

Any of

DynamicRetrievalConfig

Type: object

Describes the options to customize dynamic retrieval.

No Additional Properties

enterpriseWebSearch

Default: null

Optional. Enterprise web search tool type. Specialized retrieval
tool that is powered by Vertex AI Search and Sec4 compliance.

codeExecution

Default: null

Optional. CodeExecution tool type. Enables the model to execute code as part of generation.

Any of

ToolCodeExecution

Type: object

Tool that executes code generated by the model, and automatically returns the result to the model.

See also [ExecutableCode]and [CodeExecutionResult] which are input and output
to this tool.

computerUse

Default: null

Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations.

Tool

Type: object

Definition for a tool the client can call.

annotations

Default: null

Any of

ToolAnnotations

Type: object

Additional properties describing a Tool to clients.

NOTE: all properties in ToolAnnotations are hints.
They are not guaranteed to provide a faithful description of
tool behavior (including descriptive properties like title).

Clients should never make tool use decisions based on ToolAnnotations
received from untrusted servers.

Additional Properties

toolConfig

Default: null

Associates model output to a specific function call.

Any of

ToolConfig

Type: object

Tool config.

This config is shared for all tools provided in the request.

No Additional Properties

functionCallingConfig

Default: null

Optional. Function calling config.

Any of

FunctionCallingConfig

Type: object

Function calling config.

No Additional Properties

retrievalConfig

Default: null

Optional. Retrieval config.

Any of

RetrievalConfig

Type: object

Retrieval config.

No Additional Properties

latLng

Default: null

Optional. The location of the user.

Any of

LatLng

Type: object

An object that represents a latitude/longitude pair.

This is expressed as a pair of doubles to represent degrees latitude and
degrees longitude. Unless specified otherwise, this object must conform to the
<a href="https://en.wikipedia.org/wiki/World_Geodetic_System#1984_version">
WGS84 standard</a>. Values must be within normalized ranges.

No Additional Properties

labels

Labels

Default: null

Labels with user-defined metadata to break down billed charges.

responseModalities

Responsemodalities

Default: null

The requested modalities of the response. Represents the set of
modalities that the model can return.

mediaResolution

Default: null

If specified, the media resolution specified will be used.

Any of

MediaResolution

Type: enum (of string)

The media resolution to use.

Must be one of:

  • "MEDIA_RESOLUTION_UNSPECIFIED"
  • "MEDIA_RESOLUTION_LOW"
  • "MEDIA_RESOLUTION_MEDIUM"
  • "MEDIA_RESOLUTION_HIGH"

speechConfig

Speechconfig

Default: null

The speech generation configuration.

Any of

SpeechConfig

Type: object

The speech generation configuration.

No Additional Properties

voiceConfig

Default: null

The configuration for the speaker to use.

Any of

VoiceConfig

Type: object

The configuration for the voice to use.

No Additional Properties

multiSpeakerVoiceConfig

Default: null

The configuration for the multi-speaker setup.
It is mutually exclusive with the voice_config field.

Any of

MultiSpeakerVoiceConfig

Type: object

The configuration for the multi-speaker setup.

No Additional Properties

speakerVoiceConfigs

Speakervoiceconfigs

Default: null

The configuration for the speaker to use.

Any of

Type: array
No Additional Items

Each item of this array must be:

SpeakerVoiceConfig

Type: object

The configuration for the speaker to use.

No Additional Properties

automaticFunctionCalling

Default: null

The configuration for automatic function calling.

Any of

AutomaticFunctionCallingConfig

Type: object

The configuration for automatic function calling.

No Additional Properties

maximumRemoteCalls

Maximumremotecalls

Default: 10

If automatic function calling is enabled,
maximum number of remote calls for automatic function calling.
This number should be a positive integer.
If not set, SDK will set maximum number of remote calls to 10.

ignoreCallHistory

Ignorecallhistory

Default: null

If automatic function calling is enabled,
whether to ignore call history to the response.
If not set, SDK will set ignorecallhistory to false,
and will append the call history to
GenerateContentResponse.automaticfunctioncalling_history.

thinkingConfig

Default: null

The thinking features configuration.

Any of

ThinkingConfig

Type: object

The thinking features configuration.

No Additional Properties

includeThoughts

LoopAgentConfig

Type: object

The config for the YAML schema of a LoopAgent.

No Additional Properties

agent_class

Agent Class

Type: const Default: "LoopAgent"

The value is used to uniquely identify the LoopAgent class.

Specific value: "LoopAgent"

name Required

Name

Type: string

Required. The name of the agent.

description

Description

Type: string Default: ""

Optional. The description of the agent.

sub_agents

Sub Agents

Default: null

Optional. The sub-agents of the agent.

Any of

Type: array
No Additional Items

Each item of this array must be:

AgentRefConfig

Type: object

The config for the reference to another agent.

Same definition as AgentRefConfig

before_agent_callbacks

Before Agent Callbacks

Default: null

Optional. The beforeagentcallbacks of the agent.

Example:

before_agent_callbacks:
  - name: my_library.security_callbacks.before_agent_callback

Any of

Type: array
No Additional Items

Each item of this array must be:

CodeConfig

Type: object

Code reference config for a variable, a function, or a class.

This config is used for configuring callbacks and tools.

Same definition as CodeConfig

after_agent_callbacks

After Agent Callbacks

Default: null

Optional. The afteragentcallbacks of the agent.

Any of

Type: array
No Additional Items

Each item of this array must be:

CodeConfig

Type: object

Code reference config for a variable, a function, or a class.

This config is used for configuring callbacks and tools.

Same definition as CodeConfig

max_iterations

Max Iterations

Default: null

Optional. LoopAgent.max_iterations.

ParallelAgentConfig

Type: object

The config for the YAML schema of a ParallelAgent.

No Additional Properties

agent_class

Agent Class

Type: const Default: "ParallelAgent"

The value is used to uniquely identify the ParallelAgent class.

Specific value: "ParallelAgent"

name Required

Name

Type: string

Required. The name of the agent.

description

Description

Type: string Default: ""

Optional. The description of the agent.

sub_agents

Sub Agents

Default: null

Optional. The sub-agents of the agent.

Any of

Type: array
No Additional Items

Each item of this array must be:

AgentRefConfig

Type: object

The config for the reference to another agent.

Same definition as AgentRefConfig

before_agent_callbacks

Before Agent Callbacks

Default: null

Optional. The beforeagentcallbacks of the agent.

Example:

before_agent_callbacks:
  - name: my_library.security_callbacks.before_agent_callback

Any of

Type: array
No Additional Items

Each item of this array must be:

CodeConfig

Type: object

Code reference config for a variable, a function, or a class.

This config is used for configuring callbacks and tools.

Same definition as CodeConfig

after_agent_callbacks

After Agent Callbacks

Default: null

Optional. The afteragentcallbacks of the agent.

Any of

Type: array
No Additional Items

Each item of this array must be:

CodeConfig

Type: object

Code reference config for a variable, a function, or a class.

This config is used for configuring callbacks and tools.

Same definition as CodeConfig

SequentialAgentConfig

Type: object

The config for the YAML schema of a SequentialAgent.

No Additional Properties

agent_class

Agent Class

Type: const Default: "SequentialAgent"

The value is used to uniquely identify the SequentialAgent class.

Specific value: "SequentialAgent"

name Required

Name

Type: string

Required. The name of the agent.

description

Description

Type: string Default: ""

Optional. The description of the agent.

sub_agents

Sub Agents

Default: null

Optional. The sub-agents of the agent.

Any of

Type: array
No Additional Items

Each item of this array must be:

AgentRefConfig

Type: object

The config for the reference to another agent.

Same definition as AgentRefConfig

before_agent_callbacks

Before Agent Callbacks

Default: null

Optional. The beforeagentcallbacks of the agent.

Example:

before_agent_callbacks:
  - name: my_library.security_callbacks.before_agent_callback

Any of

Type: array
No Additional Items

Each item of this array must be:

CodeConfig

Type: object

Code reference config for a variable, a function, or a class.

This config is used for configuring callbacks and tools.

Same definition as CodeConfig

after_agent_callbacks

After Agent Callbacks

Default: null

Optional. The afteragentcallbacks of the agent.

Any of

Type: array
No Additional Items

Each item of this array must be:

CodeConfig

Type: object

Code reference config for a variable, a function, or a class.

This config is used for configuring callbacks and tools.

Same definition as CodeConfig

BaseAgentConfig

Type: object

The config for the YAML schema of a BaseAgent.

Do not use this class directly. It's the base class for all agent configs.

agent_class

Agent Class

Default: "BaseAgent"

Required. The class of the agent. The value is used to differentiate among different agent classes.

Any of

Type: const
Specific value: "BaseAgent"

name Required

Name

Type: string

Required. The name of the agent.

description

Description

Type: string Default: ""

Optional. The description of the agent.

sub_agents

Sub Agents

Default: null

Optional. The sub-agents of the agent.

Any of

Type: array
No Additional Items

Each item of this array must be:

AgentRefConfig

Type: object

The config for the reference to another agent.

Same definition as AgentRefConfig

before_agent_callbacks

Before Agent Callbacks

Default: null

Optional. The beforeagentcallbacks of the agent.

Example:

before_agent_callbacks:
  - name: my_library.security_callbacks.before_agent_callback

Any of

Type: array
No Additional Items

Each item of this array must be:

CodeConfig

Type: object

Code reference config for a variable, a function, or a class.

This config is used for configuring callbacks and tools.

Same definition as CodeConfig

after_agent_callbacks

After Agent Callbacks

Default: null

Optional. The afteragentcallbacks of the agent.

Any of

Type: array
No Additional Items

Each item of this array must be:

CodeConfig

Type: object

Code reference config for a variable, a function, or a class.

This config is used for configuring callbacks and tools.

Same definition as CodeConfig

Additional Properties

Additional Properties of any type are allowed.

Type: object

Web Proxy Viewer  |  New URL  |  Original Page