AgentConfig


The config for the YAML schema to create an agent.

LlmAgentConfig

Type: object

The config for the YAML schema of a LlmAgent.

No Additional Properties

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

Type: string

Required. The name of the agent.

Description

Type: string Default: ""

Optional. The description of the agent.

Sub Agents

Default: null

Optional. The sub-agents of the agent.

Type: array
No Additional Items

Each item of this array must be:

Before Agent Callbacks

Default: null

Optional. The beforeagentcallbacks of the agent.

Example:

before_agent_callbacks:
  - name: my_library.security_callbacks.before_agent_callback

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

Default: null

Optional. The afteragentcallbacks of the agent.

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

Default: null

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

Instruction

Type: string

Required. LlmAgent.instruction.

Disallow Transfer To Parent

Default: null

Optional. LlmAgent.disallowtransferto_parent.

Disallow Transfer To Peers

Default: null

Optional. LlmAgent.disallowtransferto_peers.

Default: null

Optional. LlmAgent.input_schema.

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

Default: null

Optional. LlmAgent.output_schema.

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

Default: null

Optional. LlmAgent.output_key.

Include Contents

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

Optional. LlmAgent.include_contents.

Must be one of:

  • "default"
  • "none"

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

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

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.

Default: null

The args for the tool.

ToolArgsConfig

Type: object

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

Additional Properties of any type are allowed.

Type: object

Before Model Callbacks

Default: null

Optional. LlmAgent.beforemodelcallbacks.

Example:

before_model_callbacks:
  - name: my_library.callbacks.before_model_callback

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

Default: null

Optional. LlmAgent.aftermodelcallbacks.

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

Default: null

Optional. LlmAgent.beforetoolcallbacks.

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

Default: null

Optional. LlmAgent.aftertoolcallbacks.

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

Default: null

Optional. LlmAgent.generatecontentconfig.

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

Default: null

Used to override HTTP request options.

HttpOptions

Type: object

HTTP options to be used in each of the requests.

No Additional Properties

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

Default: null

HTTP retry options for the request.

HttpRetryOptions

Type: object

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

No Additional Properties

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

Content

Type: object

Contains the multi-part content of a message.

No Additional Properties

Parts

Default: null

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

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

Default: null

Metadata for a given video.

VideoMetadata

Type: object

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

No Additional Properties

Default: null

Optional. Inlined bytes data.

Blob

Type: object

Content blob.

No Additional Properties

Default: null

Optional. URI based data.

FileData

Type: object

URI based data.

No Additional Properties

Default: null

Optional. Result of executing the [ExecutableCode].

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

Default: null

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

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

Default: null

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

FunctionCall

Type: object

A function call.

No Additional Properties

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.

FunctionResponse

Type: object

A function response.

No Additional Properties

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.

Default: null

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

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:


File

Type: object

A file uploaded to the API.

No Additional Properties

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

Default: null

Output only. Error status if File processing failed.

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

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

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

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

Default: null

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

Responselogprobs

Default: null

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

Logprobs

Default: null

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

Presencepenalty

Default: null

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

Frequencypenalty

Default: null

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

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

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

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.

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

Default: null

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

Type: object

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

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

Default: null

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

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

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

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

Default: null

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

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

Default: null

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

Type: object

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

Default: null

Optional. The type of the data.

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

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.

Default: null

Configuration for model router requests.

GenerationConfigRoutingConfig

Type: object

The configuration for routing the request to a specific model.

No Additional Properties

Default: null

Automated routing.

Default: null

Manual routing.

Safetysettings

Default: null

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

Type: array
No Additional Items

Each item of this array must be:

SafetySetting

Type: object

Safety settings.

No Additional Properties

Default: null

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

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"

Default: null

Required. Harm category.

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"

Default: null

Required. The harm block threshold.

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

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.

Type: array
No Additional Items

Each item of this array must be:


Tool

Type: object

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

No Additional Properties

Functiondeclarations

Default: null

List of function declarations that the tool supports.

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

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

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.

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.

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.

Retrieval

Type: object

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

No Additional Properties

Default: null

Use data source powered by external API for grounding.

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

Default: null

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

ApiAuth

Type: object

The generic reusable api auth config.

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

No Additional Properties

Default: null

The API secret.

ApiAuthApiKeyConfig

Type: object

The API secret.

No Additional Properties

Default: null

The authentication config to access the API.

AuthConfig

Type: object

Auth configuration to run the extension.

No Additional Properties

Default: null

Config for API key auth.

Default: null

Config for Google Service Account auth.

AuthConfigGoogleServiceAccountConfig

Type: object

Config for Google Service Account Authentication.

No Additional Properties

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.

Default: null

Config for HTTP Basic auth.

AuthConfigHttpBasicAuthConfig

Type: object

Config for HTTP Basic Authentication.

No Additional Properties

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.

Default: null

Config for user oauth.

AuthConfigOauthConfig

Type: object

Config for user oauth.

No Additional Properties

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.

Default: null

Config for user OIDC auth.

AuthConfigOidcConfig

Type: object

Config for user OIDC auth.

No Additional Properties

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

Default: null

Parameters for the elastic search API.

ExternalApiElasticSearchParams

Type: object

The search parameters to use for the ELASTIC_SEARCH spec.

No Additional Properties

Default: null

Set to use data source powered by Vertex AI Search.

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

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.

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