Skip to content

Commit 2924b41

Browse files
authored
Merge branch 'main' into raflFaisal/generaliseContainerEnvForAgent
2 parents f8157ab + 8076b22 commit 2924b41

File tree

243 files changed

+10082
-3982
lines changed

Some content is hidden

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

243 files changed

+10082
-3982
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ assignees: ''
77

88
---
99

10-
** Please make sure you read the contribution guide and file the issues in the rigth place. **
10+
** Please make sure you read the contribution guide and file the issues in the right place. **
1111
[Contribution guide.](https://google.github.io/adk-docs/contributing-guide/)
1212

1313
**Describe the bug**

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ assignees: ''
77

88
---
99

10-
** Please make sure you read the contribution guide and file the issues in the rigth place. **
10+
** Please make sure you read the contribution guide and file the issues in the right place. **
1111
[Contribution guide.](https://google.github.io/adk-docs/contributing-guide/)
1212

1313
**Is your feature request related to a problem? Please describe.**

CHANGELOG.md

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

3+
## 1.0.0
4+
5+
### ⚠ BREAKING CHANGES
6+
7+
* Evaluation dataset schema is finalized with strong-type pydantic models.
8+
(previously saved eval file needs re-generation, for both adk eval cli and
9+
the eval tab in adk web UI).
10+
* `BuiltInCodeExecutor` (in code_executors package) replaces
11+
`BuiltInCodeExecutionTool` (previously in tools package).
12+
* All methods in services are now async, including session service, artifact
13+
service and memory service.
14+
* `list_events` and `close_session` methods are removed from session service.
15+
* agent.py file structure with MCP tools are now easier and simpler ([now](https://github.com/google/adk-python/blob/3b5232c14f48e1d5b170f3698d91639b079722c8/contributing/samples/mcp_stdio_server_agent/agent.py#L33) vs [before](https://github.com/google/adk-python/blob/a4adb739c0d86b9ae4587547d2653d568f6567f2/contributing/samples/mcp_agent/agent.py#L41)).
16+
Old format is not working anymore.
17+
* `Memory` schema and `MemoryService` is redesigned.
18+
* Mark various class attributes as private in the classes in the `tools` package.
19+
* Disabled session state injection if instruction provider is used.
20+
(so that you can have `{var_name}` in the instruction, which is required for code snippets)
21+
* Toolbox integration is revamped: tools/toolbox_tool.py → tools/toolbox_toolset.py.
22+
* Removes the experimental `remote_agent.py`. We'll redesign it and bring it back.
23+
24+
### Features
25+
26+
* Dev UI:
27+
* A brand new trace view for overall agent invocation.
28+
* A revamped evaluation tab and comparison view for checking eval results.
29+
* Introduced `BaseToolset` to allow dynamically add/remove tools for agents.
30+
* Revamped MCPToolset with the new BaseToolset interface.
31+
* Revamped GoogleApiTool, GoogleApiToolset and ApplicationIntegrationToolset with the new BaseToolset interface.
32+
* Resigned agent.py file structure when needing MCPToolset.
33+
* Added ToolboxToolset.
34+
* Redesigned strong-typed agent evaluation schema.
35+
* Allows users to create more cohesive eval sets.
36+
* Allows evals to be extended for non-text modality.
37+
* Allows for a structured interaction with the uber eval system.
38+
* Redesigned Memory schema and MemoryService interfaces.
39+
* Added token usage to LlmResponse.
40+
* Allowed specifying `--adk_version` in `adk deploy cloud_run` cli. Default is the current version.
41+
42+
### Bug Fixes
43+
44+
* Fixed `adk deploy cloud_run` failing bug.
45+
* Fixed logs not being printed due to `google-auth` library.
46+
47+
### Miscellaneous Chores
48+
49+
* Display full help text when adk cli receives invalid arguments.
50+
* `adk web` now binds `127.0.0.1` by default, instead of 0.0.0.0.
51+
* `InMemoryRunner` now takes `BaseAgent` in constructor.
52+
* Various docstring improvements.
53+
* Various UI tweaks.
54+
* Various bug fixes.
55+
* Update various contributing/samples for contributors to validate the implementation.
56+
57+
358
## 0.5.0
459

560
### ⚠ BREAKING CHANGES

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
<h3 align="center">
1515
Important Links:
1616
<a href="https://google.github.io/adk-docs/">Docs</a> &
17-
<a href="https://github.com/google/adk-samples">Samples</a>.
17+
<a href="https://github.com/google/adk-samples">Samples</a> &
18+
<a href="https://github.com/google/adk-java">Java ADK</a>.
1819
</h3>
1920
</html>
2021

@@ -152,18 +153,14 @@ for how they can work together.
152153

153154
## 🤝 Contributing
154155

155-
We welcome contributions from the community! Whether it's bug reports, feature requests, documentation improvements, or code contributions, please see our
156+
We welcome contributions from the community! Whether it's bug reports, feature requests, documentation improvements, or code contributions, please see our
156157
- [General contribution guideline and flow](https://google.github.io/adk-docs/contributing-guide/#questions).
157158
- Then if you want to contribute code, please read [Code Contributing Guidelines](./CONTRIBUTING.md) to get started.
158159

159160
## 📄 License
160161

161162
This project is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details.
162163

163-
## Preview
164-
165-
This feature is subject to the "Pre-GA Offerings Terms" in the General Service Terms section of the [Service Specific Terms](https://cloud.google.com/terms/service-terms#1). Pre-GA features are available "as is" and might have limited support. For more information, see the [launch stage descriptions](https://cloud.google.com/products?hl=en#product-launch-stages).
166-
167164
---
168165

169166
*Happy Agent Building!*
-50.2 KB
Loading

autoformat.sh

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#!/bin/bash
2+
# Copyright 2025 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
# Autoformat ADK codebase.
17+
18+
if ! command -v isort &> /dev/null
19+
then
20+
echo "isort not found, refer to CONTRIBUTING.md to set up dev environment first."
21+
exit
22+
fi
23+
24+
if ! command -v pyink &> /dev/null
25+
then
26+
echo "pyink not found, refer to CONTRIBUTING.md to set up dev environment first."
27+
exit
28+
fi
29+
30+
echo '---------------------------------------'
31+
echo '| Organizing imports for src/...'
32+
echo '---------------------------------------'
33+
34+
isort src/
35+
echo 'All done! ✨ 🍰 ✨'
36+
37+
echo '---------------------------------------'
38+
echo '| Organizing imports for tests/...'
39+
echo '---------------------------------------'
40+
41+
isort tests/
42+
echo 'All done! ✨ 🍰 ✨'
43+
44+
echo '---------------------------------------'
45+
echo '| Auto-formatting src/...'
46+
echo '---------------------------------------'
47+
48+
find -L src/ -type f -name "*.py" -exec pyink --config pyproject.toml {} +
49+
50+
echo '---------------------------------------'
51+
echo '| Auto-formatting tests/...'
52+
echo '---------------------------------------'
53+
54+
find -L tests/ -type f -name "*.py" -exec pyink --config pyproject.toml {} +

contributing/samples/application_integration_agent/agent.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
from google.adk.agents.llm_agent import LlmAgent
2121
from google.adk.tools.application_integration_tool import ApplicationIntegrationToolset
2222

23-
2423
# Load environment variables from .env file
2524
load_dotenv()
2625

@@ -29,12 +28,12 @@
2928
connection_location = os.getenv("CONNECTION_LOCATION")
3029

3130

32-
jira_tool = ApplicationIntegrationToolset(
31+
jira_toolset = ApplicationIntegrationToolset(
3332
project=connection_project,
3433
location=connection_location,
3534
connection=connection_name,
3635
entity_operations={"Issues": [], "Projects": []},
37-
tool_name="jira_issue_manager",
36+
tool_name_prefix="jira_issue_manager",
3837
)
3938

4039
root_agent = LlmAgent(
@@ -46,5 +45,5 @@
4645
If there is an error in the tool response, understand the error and try and see if you can fix the error and then and execute the tool again. For example if a variable or parameter is missing, try and see if you can find it in the request or user query or default it and then execute the tool again or check for other tools that could give you the details.
4746
If there are any math operations like count or max, min in the user request, call the tool to get the data and perform the math operations and then return the result in the response. For example for maximum, fetch the list and then do the math operation.
4847
""",
49-
tools=jira_tool.get_tools(),
48+
tools=[jira_toolset],
5049
)

contributing/samples/artifact_save_text/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ async def log_query(tool_context: ToolContext, query: str):
2424

2525

2626
root_agent = Agent(
27-
model='gemini-2.0-flash-exp',
27+
model='gemini-2.0-flash',
2828
name='log_agent',
2929
description='Log user query.',
3030
instruction="""Always log the user query and reploy "kk, I've logged."

contributing/samples/bigquery_agent/agent.py

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,32 +16,33 @@
1616

1717
from dotenv import load_dotenv
1818
from google.adk import Agent
19-
from google.adk.tools.google_api_tool import bigquery_tool_set
19+
from google.adk.tools.google_api_tool import BigQueryToolset
2020

2121
# Load environment variables from .env file
2222
load_dotenv()
2323

2424
# Access the variable
2525
oauth_client_id = os.getenv("OAUTH_CLIENT_ID")
2626
oauth_client_secret = os.getenv("OAUTH_CLIENT_SECRET")
27-
bigquery_tool_set.configure_auth(oauth_client_id, oauth_client_secret)
28-
29-
bigquery_datasets_list = bigquery_tool_set.get_tool("bigquery_datasets_list")
30-
bigquery_datasets_get = bigquery_tool_set.get_tool("bigquery_datasets_get")
31-
bigquery_datasets_insert = bigquery_tool_set.get_tool(
32-
"bigquery_datasets_insert"
27+
tools_to_expose = [
28+
"bigquery_datasets_list",
29+
"bigquery_datasets_get",
30+
"bigquery_datasets_insert",
31+
"bigquery_tables_list",
32+
"bigquery_tables_get",
33+
"bigquery_tables_insert",
34+
]
35+
bigquery_toolset = BigQueryToolset(
36+
client_id=oauth_client_id,
37+
client_secret=oauth_client_secret,
38+
tool_filter=tools_to_expose,
3339
)
3440

35-
bigquery_tables_list = bigquery_tool_set.get_tool("bigquery_tables_list")
36-
bigquery_tables_get = bigquery_tool_set.get_tool("bigquery_tables_get")
37-
bigquery_tables_insert = bigquery_tool_set.get_tool("bigquery_tables_insert")
38-
39-
4041
root_agent = Agent(
4142
model="gemini-2.0-flash",
4243
name="bigquery_agent",
4344
instruction="""
44-
You are a helpful Google BigQuery agent that help to manage users' data on Goolge BigQuery.
45+
You are a helpful Google BigQuery agent that help to manage users' data on Google BigQuery.
4546
Use the provided tools to conduct various operations on users' data in Google BigQuery.
4647
4748
Scenario 1:
@@ -73,12 +74,5 @@
7374
{userInfo?}
7475
</User>
7576
""",
76-
tools=[
77-
bigquery_datasets_list,
78-
bigquery_datasets_get,
79-
bigquery_datasets_insert,
80-
bigquery_tables_list,
81-
bigquery_tables_get,
82-
bigquery_tables_insert,
83-
],
77+
tools=[bigquery_toolset],
8478
)

0 commit comments

Comments
 (0)