Skip to content

Commit 516412d

Browse files
authored
Merge branch 'main' into deploy-docker
2 parents ab384be + 47b88d2 commit 516412d

File tree

148 files changed

+5494
-627
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+5494
-627
lines changed

CHANGELOG.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,53 @@
11
# Changelog
22

3+
## 1.12.0 (2025-08-21)
4+
5+
### Features
6+
7+
**[Agent Config]** 🌟 **NEW FEATURE**: Support using config file (YAML) to author agents in addition to python code. See the [documentation](https://google.github.io/adk-docs/agents/config/) for details.
8+
* [Agent Config] Support deploying config agent to Agent Engine in CLI ([b3b7003](https://github.com/google/adk-python/commit/b3b70035c432670a5f0b5cdd1e9467f43b80495c))
9+
* [Tools] Add a dedicated Bigtable toolset to provide an easier, integrated way to interact
10+
with Bigtable for building AI Agent applications(experimental feature) ([a953807](https://github.com/google/adk-python/commit/a953807cce341425ba23e3f0a85eae58d6b0630f))
11+
* [Tools] Support custom tool_name_prefix in auto-generated GoogleApiToolset ([a2832d5](https://github.com/google/adk-python/commit/a2832d5ac7ba5264ee91f6d5a6a0058cfe4c9e8a)) See [oauth_calendar_agent](https://github.com/google/adk-python/tree/main/contributing/samples/oauth_calendar_agent) as an example.
12+
* [CLI] Add `build_image` option for `adk deploy cloud_run` CLI ([c843503](https://github.com/google/adk-python/commit/c84350345af0ea6a232e0818b20c4262b228b103))
13+
* [Services] Add setdefault method to the ADK State object ([77ed1f5](https://github.com/google/adk-python/commit/77ed1f5f15ed3f009547ed0e20f86d949de12ec2))
14+
15+
16+
### Bug Fixes
17+
18+
* Lazy load VertexAiCodeExecutor and ContainerCodeExecutor ([018db79](https://github.com/google/adk-python/commit/018db79d1354f93b8328abb8416f63070b25f9f1))
19+
* Fix the path for agent card in A2A demo ([fa64545](https://github.com/google/adk-python/commit/fa64545a9de216312a69f93126cfd37f1016c14b))
20+
* Fix the path for agent card in A2A demo ([a117cf0](https://github.com/google/adk-python/commit/a117cf0af335c5e316ae9d61336a433052316462))
21+
* litellm-test due to breaking change in dep library of extension extra ([004a0a0](https://github.com/google/adk-python/commit/004a0a0f2d9a4f7ae6bff42a7cad96c11a99acaf))
22+
* Using base event's invocation id when merge multiple function response event ([279e4fe](https://github.com/google/adk-python/commit/279e4fedd0b1c0d1499c0f9a4454357af7da490e))
23+
* Avoid crash when there is no candidates_token_count, which is Optional ([22f34e9](https://github.com/google/adk-python/commit/22f34e9d2c552fbcfa15a672ef6ff0c36fa32619))
24+
* Fix the packaging version comparison logic in adk cli ([a2b7909](https://github.com/google/adk-python/commit/a2b7909fc36e7786a721f28e2bf75a1e86ad230d))
25+
* Add Spanner admin scope to Spanner tool default Oauth scopes ([b66054d](https://github.com/google/adk-python/commit/b66054dd0d8c5b3d6f6ad58ac1fbd8128d1da614))
26+
* Fixes SequentialAgent.config_type type hint ([8a9a271](https://github.com/google/adk-python/commit/8a9a271141678996c9b84b8c55d4b539d011391c))
27+
* Fixes the host in the ansi bracket of adk web ([cd357bf](https://github.com/google/adk-python/commit/cd357bf5aeb01f1a6ae2a72349a73700ca9f1ed2))
28+
* Add spanner tool name prefix ([a27927d](https://github.com/google/adk-python/commit/a27927dc8197c391c80acb8b2c23d610fba2f887))
29+
30+
### Improvements
31+
32+
* Support `ADK_SUPPRESS_EXPERIMENTAL_FEATURE_WARNINGS` as environment variable to suppress experimental warnings ([4afc9b2](https://github.com/google/adk-python/commit/4afc9b2f33d63381583cea328f97c02213611529))
33+
* Uses pydantic `Field` for Agent configs, so that the generated AgentConfig.json json schema can carry field description ([5b999ed](https://github.com/google/adk-python/commit/5b999ed6fd23a0fc1da56ccff4c09621f433846b))
34+
* Update `openai` dependency version, based on correct OPENAI release ([bb8ebd1](https://github.com/google/adk-python/commit/bb8ebd15f90768b518cd0e21a59b269e30d6d944))
35+
* Add the missing license header for core_callback_config init file ([f8fd6a4](https://github.com/google/adk-python/commit/f8fd6a4f09ab520b8ecdbd8f9fe48228dbff7ebe))
36+
* Creates yaml_utils.py in utils to allow adk dump yaml in the same style ([1fd58cb](https://github.com/google/adk-python/commit/1fd58cb3633992cd88fa7e09ca6eda0f9b34236f))
37+
* Return explict None type for DELETE endpoints ([f03f167](https://github.com/google/adk-python/commit/f03f1677790c0a9e59b6ba6f46010d0b7b64be50))
38+
* Add _config suffix to all yaml-based agent examples ([43f302c](https://github.com/google/adk-python/commit/43f302ce1ab53077ee8f1486d5294540678921e6))
39+
* Rename run related method and request to align with the conventions ([ecaa7b4](https://github.com/google/adk-python/commit/ecaa7b4c9847b478c7cdc37185b1525f733bb403))
40+
* Update models in samples/ folder to be gemini 2.0+ ([6c217ba](https://github.com/google/adk-python/commit/6c217bad828edf62b41ec06b168f8a6cb7ece2ed))
41+
* Remove the "one commit" requirement from the contributing guide ([c32cb6e](https://github.com/google/adk-python/commit/c32cb6eef9ce320ea5a1f3845fc57b83762c237e))
42+
* Bump version to 1.11.0 ([8005270](https://github.com/google/adk-python/commit/80052700f6cee947322080ae6c415d3a428b6c91))
43+
44+
### Documentation
45+
46+
* Add contributing bigtable sample ([fef5318](https://github.com/google/adk-python/commit/fef5318a22f3dcaadb7ecb858725eb61a0350140))
47+
* Fix core_callback example ([ba6e85e](https://github.com/google/adk-python/commit/ba6e85eb3fb06f58ce9077574eac193298e18bea))
48+
* Adds a minimal sample to demo how to use Agent Config to create a multi-agent setup ([1328e6e](https://github.com/google/adk-python/commit/1328e6ef62e9e6260048c0078579edb85a0440bc))
49+
50+
351
## [1.11.0](https://github.com/google/adk-python/compare/v1.10.0...v1.11.0) (2025-08-14)
452

553
### Features

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ Agent Development Kit (ADK) is a flexible and modular framework for developing a
2727

2828
---
2929

30+
## ✨ What's new
31+
32+
- **Agent Config**: Build agents without code. Check out the
33+
[Agent Config](https://google.github.io/adk-docs/agents/config/) feature.
34+
3035
## ✨ Key Features
3136

3237
- **Rich Tool Ecosystem**: Utilize pre-built tools, custom functions,

autoformat.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,16 @@ echo '---------------------------------------'
5252
echo '| Auto-formatting src/...'
5353
echo '---------------------------------------'
5454

55-
find -L src/ -type f -name "*.py" -exec pyink --config pyproject.toml {} +
55+
find -L src/ -not -path "*/.*" -type f -name "*.py" -exec pyink --config pyproject.toml {} +
5656

5757
echo '---------------------------------------'
5858
echo '| Auto-formatting tests/...'
5959
echo '---------------------------------------'
6060

61-
find -L tests/ -type f -name "*.py" -exec pyink --config pyproject.toml {} +
61+
find -L tests/ -not -path "*/.*" -type f -name "*.py" -exec pyink --config pyproject.toml {} +
6262

6363
echo '---------------------------------------'
6464
echo '| Auto-formatting contributing/...'
6565
echo '---------------------------------------'
6666

67-
find -L contributing/ -type f -name "*.py" -exec pyink --config pyproject.toml {} +
67+
find -L contributing/ -not -path "*/.*" -type f -name "*.py" -exec pyink --config pyproject.toml {} +

contributing/samples/adk_pr_triaging_agent/agent.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"documentation": "polong-lin",
3333
"services": "DeanChensj",
3434
"tools": "seanzhou1023",
35+
"mcp": "seanzhou1023",
3536
"eval": "ankursharmas",
3637
"live": "hangfei",
3738
"models": "genquan9",
@@ -267,6 +268,7 @@ def add_comment_to_pr(pr_number: int, comment: str) -> dict[str, Any]:
267268
- If it's about model support(non-Gemini, like Litellm, Ollama, OpenAI models), label it with "models".
268269
- If it's about tracing, label it with "tracing".
269270
- If it's agent orchestration, agent definition, label it with "core".
271+
- If it's about Model Context Protocol (e.g. MCP tool, MCP toolset, MCP session management etc.), label it with "mcp".
270272
- If you can't find a appropriate labels for the PR, follow the previous instruction that starts with "IMPORTANT:".
271273
272274
Here is the contribution guidelines:

contributing/samples/adk_triaging_agent/agent.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"documentation": "polong-lin",
3232
"services": "DeanChensj",
3333
"question": "",
34+
"mcp": "seanzhou1023",
3435
"tools": "seanzhou1023",
3536
"eval": "ankursharmas",
3637
"live": "hangfei",
@@ -182,6 +183,7 @@ def change_issue_type(issue_number: int, issue_type: str) -> dict[str, Any]:
182183
- If it's about tracing, label it with "tracing".
183184
- If it's agent orchestration, agent definition, label it with "core".
184185
- If it's about agent engine, label it with "agent engine".
186+
- If it's about Model Context Protocol (e.g. MCP tool, MCP toolset, MCP session management etc.), label it with "mcp".
185187
- If you can't find a appropriate labels for the issue, follow the previous instruction that starts with "IMPORTANT:".
186188
187189
Call the `add_label_and_owner_to_issue` tool to label the issue, which will also assign the issue to the owner of the label.

contributing/samples/bigquery/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@ distributed via the `google.adk.tools.bigquery` module. These tools include:
2525

2626
Runs a SQL query in BigQuery.
2727

28+
1. `ask_data_insights`
29+
30+
Natural language-in, natural language-out tool that answers questions
31+
about structured data in BigQuery. Provides a one-stop solution for generating
32+
insights from data.
33+
34+
**Note**: This tool requires additional setup in your project. Please refer to
35+
the official [Conversational Analytics API documentation](https://cloud.google.com/gemini/docs/conversational-analytics-api/overview)
36+
for instructions.
37+
2838
## How to use
2939

3040
Set up environment variables in your `.env` file for using
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Bigtable Tools Sample
2+
3+
## Introduction
4+
5+
This sample agent demonstrates the Bigtable first-party tools in ADK,
6+
distributed via the `google.adk.tools.bigtable` module. These tools include:
7+
8+
1. `bigtable_list_instances`
9+
10+
Fetches Bigtable instance ids in a Google Cloud project.
11+
12+
1. `bigtable_get_instance_info`
13+
14+
Fetches metadata information about a Bigtable instance.
15+
16+
1. `bigtable_list_tables`
17+
18+
Fetches table ids in a Bigtable instance.
19+
20+
1. `bigtable_get_table_info`
21+
22+
Fetches metadata information about a Bigtable table.
23+
24+
1. `bigtable_execute_sql`
25+
26+
Runs a DQL SQL query in Bigtable database.
27+
28+
## How to use
29+
30+
Set up environment variables in your `.env` file for using
31+
[Google AI Studio](https://google.github.io/adk-docs/get-started/quickstart/#gemini---google-ai-studio)
32+
or
33+
[Google Cloud Vertex AI](https://google.github.io/adk-docs/get-started/quickstart/#gemini---google-cloud-vertex-ai)
34+
for the LLM service for your agent. For example, for using Google AI Studio you
35+
would set:
36+
37+
* GOOGLE_GENAI_USE_VERTEXAI=FALSE
38+
* GOOGLE_API_KEY={your api key}
39+
40+
### With Application Default Credentials
41+
42+
This mode is useful for quick development when the agent builder is the only
43+
user interacting with the agent. The tools are run with these credentials.
44+
45+
1. Create application default credentials on the machine where the agent would
46+
be running by following https://cloud.google.com/docs/authentication/provide-credentials-adc.
47+
48+
1. Set `CREDENTIALS_TYPE=None` in `agent.py`
49+
50+
1. Run the agent
51+
52+
### With Service Account Keys
53+
54+
This mode is useful for quick development when the agent builder wants to run
55+
the agent with service account credentials. The tools are run with these
56+
credentials.
57+
58+
1. Create service account key by following https://cloud.google.com/iam/docs/service-account-creds#user-managed-keys.
59+
60+
1. Set `CREDENTIALS_TYPE=AuthCredentialTypes.SERVICE_ACCOUNT` in `agent.py`
61+
62+
1. Download the key file and replace `"service_account_key.json"` with the path
63+
64+
1. Run the agent
65+
66+
### With Interactive OAuth
67+
68+
1. Follow
69+
https://developers.google.com/identity/protocols/oauth2#1.-obtain-oauth-2.0-credentials-from-the-dynamic_data.setvar.console_name.
70+
to get your client id and client secret. Be sure to choose "web" as your client
71+
type.
72+
73+
1. Follow https://developers.google.com/workspace/guides/configure-oauth-consent
74+
to add scope "https://www.googleapis.com/auth/bigtable.admin" and
75+
"https://www.googleapis.com/auth/bigtable.data" as declaration, this is used
76+
for review purpose.
77+
78+
1. Follow
79+
https://developers.google.com/identity/protocols/oauth2/web-server#creatingcred
80+
to add http://localhost/dev-ui/ to "Authorized redirect URIs".
81+
82+
Note: localhost here is just a hostname that you use to access the dev ui,
83+
replace it with the actual hostname you use to access the dev ui.
84+
85+
1. For 1st run, allow popup for localhost in Chrome.
86+
87+
1. Configure your `.env` file to add two more variables before running the
88+
agent:
89+
90+
* OAUTH_CLIENT_ID={your client id}
91+
* OAUTH_CLIENT_SECRET={your client secret}
92+
93+
Note: don't create a separate .env, instead put it to the same .env file that
94+
stores your Vertex AI or Dev ML credentials
95+
96+
1. Set `CREDENTIALS_TYPE=AuthCredentialTypes.OAUTH2` in `agent.py` and run the
97+
agent
98+
99+
## Sample prompts
100+
101+
* Show me all instances in the my-project.
102+
* Show me all tables in the my-instance instance in my-project.
103+
* Describe the schema of the my-table table in the my-instance instance in my-project.
104+
* Show me the first 10 rows of data from the my-table table in the my-instance instance in my-project.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
from . import agent
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
import os
16+
17+
from google.adk.agents.llm_agent import LlmAgent
18+
from google.adk.auth.auth_credential import AuthCredentialTypes
19+
from google.adk.tools.bigtable.bigtable_credentials import BigtableCredentialsConfig
20+
from google.adk.tools.bigtable.bigtable_toolset import BigtableToolset
21+
from google.adk.tools.bigtable.settings import BigtableToolSettings
22+
import google.auth
23+
24+
# Define an appropriate credential type
25+
CREDENTIALS_TYPE = AuthCredentialTypes.OAUTH2
26+
27+
28+
# Define Bigtable tool config with read capability set to allowed.
29+
tool_settings = BigtableToolSettings()
30+
31+
if CREDENTIALS_TYPE == AuthCredentialTypes.OAUTH2:
32+
# Initiaze the tools to do interactive OAuth
33+
# The environment variables OAUTH_CLIENT_ID and OAUTH_CLIENT_SECRET
34+
# must be set
35+
credentials_config = BigtableCredentialsConfig(
36+
client_id=os.getenv("OAUTH_CLIENT_ID"),
37+
client_secret=os.getenv("OAUTH_CLIENT_SECRET"),
38+
scopes=[
39+
"https://www.googleapis.com/auth/bigtable.admin",
40+
"https://www.googleapis.com/auth/bigtable.data",
41+
],
42+
)
43+
elif CREDENTIALS_TYPE == AuthCredentialTypes.SERVICE_ACCOUNT:
44+
# Initialize the tools to use the credentials in the service account key.
45+
# If this flow is enabled, make sure to replace the file path with your own
46+
# service account key file
47+
# https://cloud.google.com/iam/docs/service-account-creds#user-managed-keys
48+
creds, _ = google.auth.load_credentials_from_file("service_account_key.json")
49+
credentials_config = BigtableCredentialsConfig(credentials=creds)
50+
else:
51+
# Initialize the tools to use the application default credentials.
52+
# https://cloud.google.com/docs/authentication/provide-credentials-adc
53+
application_default_credentials, _ = google.auth.default()
54+
credentials_config = BigtableCredentialsConfig(
55+
credentials=application_default_credentials
56+
)
57+
58+
bigtable_toolset = BigtableToolset(
59+
credentials_config=credentials_config, bigtable_tool_settings=tool_settings
60+
)
61+
62+
# The variable name `root_agent` determines what your root agent is for the
63+
# debug CLI
64+
root_agent = LlmAgent(
65+
model="gemini-1.5-flash",
66+
name="bigtable_agent",
67+
description=(
68+
"Agent to answer questions about Bigtable database tables and"
69+
" execute SQL queries."
70+
), # TODO(b/360128447): Update description
71+
instruction="""\
72+
You are a data agent with access to several Bigtable tools.
73+
Make use of those tools to answer the user's questions.
74+
""",
75+
tools=[bigtable_toolset],
76+
)
File renamed without changes.

0 commit comments

Comments
 (0)