From 5115474f2b9e094959a21ecd0b677110e554f706 Mon Sep 17 00:00:00 2001 From: "Wei Sun (Jack)" Date: Mon, 19 May 2025 20:30:51 -0700 Subject: [PATCH] chore!: bump version to 1.0.0, updated changelog.md and removed src/google/adk/tools/built_in_code_execution_tool.py Mark src/google/adk/tools/_built_in_code_execution_tool.py as private and will be fully removed soon. PiperOrigin-RevId: 760889060 --- CHANGELOG.md | 55 +++++++++++++++++++ .../code_executors/built_in_code_executor.py | 1 - src/google/adk/runners.py | 2 +- src/google/adk/tools/__init__.py | 2 - ...ol.py => _built_in_code_execution_tool.py} | 4 +- src/google/adk/version.py | 2 +- 6 files changed, 59 insertions(+), 7 deletions(-) rename src/google/adk/tools/{built_in_code_execution_tool.py => _built_in_code_execution_tool.py} (93%) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae23e2e..b35f355 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,60 @@ # Changelog +## 1.0.0 + +### ⚠ BREAKING CHANGES + +* Evaluation dataset schema is finalized with strong-type pydantic models. + (previously saved eval file needs re-generation, for both adk eval cli and + the eval tab in adk web UI). +* `BuiltInCodeExecutor` (in code_executors package) replaces + `BuiltInCodeExecutionTool` (previously in tools package). +* All methods in services are now async, including session service, artifact + service and memory service. + * `list_events` and `close_session` methods are removed from session service. +* 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)). + Old format is not working anymore. +* `Memory` schema and `MemoryService` is redesigned. +* Mark various class attributes as private in the classes in the `tools` package. +* Disabled session state injection if instruction provider is used. + (so that you can have `{var_name}` in the instruction, which is required for code snippets) +* Toolbox integration is revamped: tools/toolbox_tool.py → tools/toolbox_toolset.py. +* Removes the experimental `remote_agent.py`. We'll redesign it and bring it back. + +### Features + +* Dev UI: + * A brand new trace view for overall agent invocation. + * A revamped evaluation tab and comparison view for checking eval results. +* Introduced `BaseToolset` to allow dynamically add/remove tools for agents. + * Revamped MCPToolset with the new BaseToolset interface. + * Revamped GoogleApiTool, GoogleApiToolset and ApplicationIntegrationToolset with the new BaseToolset interface. + * Resigned agent.py file structure when needing MCPToolset. + * Added ToolboxToolset. +* Redesigned strong-typed agent evaluation schema. + * Allows users to create more cohesive eval sets. + * Allows evals to be extended for non-text modality. + * Allows for a structured interaction with the uber eval system. +* Redesigned Memory schema and MemoryService interfaces. +* Added token usage to LlmResponse. +* Allowed specifying `--adk_version` in `adk deploy cloud_run` cli. Default is the current version. + +### Bug Fixes + +* Fixed `adk deploy cloud_run` failing bug. +* Fixed logs not being printed due to `google-auth` library. + +### Miscellaneous Chores + +* Display full help text when adk cli receives invalid arguments. +* `adk web` now binds `127.0.0.1` by default, instead of 0.0.0.0. +* `InMemoryRunner` now takes `BaseAgent` in constructor. +* Various docstring improvements. +* Various UI tweaks. +* Various bug fixes. +* Update various contributing/samples for contributors to validate the implementation. + + ## 0.5.0 ### ⚠ BREAKING CHANGES diff --git a/src/google/adk/code_executors/built_in_code_executor.py b/src/google/adk/code_executors/built_in_code_executor.py index 31f3703..a711c32 100644 --- a/src/google/adk/code_executors/built_in_code_executor.py +++ b/src/google/adk/code_executors/built_in_code_executor.py @@ -13,7 +13,6 @@ # limitations under the License. from google.genai import types -from pydantic import Field from typing_extensions import override from ..agents.invocation_context import InvocationContext diff --git a/src/google/adk/runners.py b/src/google/adk/runners.py index b01d87f..41887e2 100644 --- a/src/google/adk/runners.py +++ b/src/google/adk/runners.py @@ -41,7 +41,7 @@ from .sessions.base_session_service import BaseSessionService from .sessions.in_memory_session_service import InMemorySessionService from .sessions.session import Session from .telemetry import tracer -from .tools.built_in_code_execution_tool import built_in_code_execution +from .tools._built_in_code_execution_tool import built_in_code_execution logger = logging.getLogger('google_adk.' + __name__) diff --git a/src/google/adk/tools/__init__.py b/src/google/adk/tools/__init__.py index ef53301..4fb316c 100644 --- a/src/google/adk/tools/__init__.py +++ b/src/google/adk/tools/__init__.py @@ -16,7 +16,6 @@ from ..auth.auth_tool import AuthToolArguments from .apihub_tool.apihub_toolset import APIHubToolset from .base_tool import BaseTool -from .built_in_code_execution_tool import built_in_code_execution from .example_tool import ExampleTool from .exit_loop_tool import exit_loop from .function_tool import FunctionTool @@ -34,7 +33,6 @@ __all__ = [ 'APIHubToolset', 'AuthToolArguments', 'BaseTool', - 'built_in_code_execution', 'google_search', 'VertexAiSearchTool', 'ExampleTool', diff --git a/src/google/adk/tools/built_in_code_execution_tool.py b/src/google/adk/tools/_built_in_code_execution_tool.py similarity index 93% rename from src/google/adk/tools/built_in_code_execution_tool.py rename to src/google/adk/tools/_built_in_code_execution_tool.py index 296e1d7..0209cd1 100644 --- a/src/google/adk/tools/built_in_code_execution_tool.py +++ b/src/google/adk/tools/_built_in_code_execution_tool.py @@ -52,8 +52,8 @@ class BuiltInCodeExecutionTool(BaseTool): llm_request: LlmRequest, ) -> None: logger.warning( - 'BuiltInCodeExecutionTool is deprecated. Please use the new' - ' BuiltInCodeExecutor instead.' + 'BuiltInCodeExecutionTool is deprecated and will be removed in 1.1.0.' + ' Please use the new BuiltInCodeExecutor instead.' ) if llm_request.model and llm_request.model.startswith('gemini-2'): llm_request.config = llm_request.config or types.GenerateContentConfig() diff --git a/src/google/adk/version.py b/src/google/adk/version.py index 2cb50d5..eefe591 100644 --- a/src/google/adk/version.py +++ b/src/google/adk/version.py @@ -13,4 +13,4 @@ # limitations under the License. # version: date+base_cl -__version__ = "0.5.0" +__version__ = "1.0.0"