From 7dc6adf4e563330a09e4cf28d2b1994c24b007d1 Mon Sep 17 00:00:00 2001 From: Google Team Member Date: Fri, 16 Jan 2026 08:26:57 -0800 Subject: [PATCH 01/50] feat: migrate `ToolboxToolset` to use `toolbox-adk` and align validation ### Description of Change **Problem:** The `ToolboxToolset` was relying on the legacy `toolbox-core` package. Users wanting to use the Toolbox features were forced to install the heavy `[extensions]` group, lacking a granular installation option. Additionally, `ToolboxToolset` had a validation check enforcing either `toolset_name` or `tool_names` to be present, preventing the default behavior of loading all tools (which `toolbox-adk` supports). **Solution:** * Refactored `ToolboxToolset` to delegate to `toolbox-adk`. * Added a new `toolbox` optional dependency group in `pyproject.toml`. * Users can now run `pip install google-adk[toolbox]` to install only the necessary dependencies. * Updated the `extensions` dependency group to replace `toolbox-core` with `toolbox-adk`. * This ensures existing users of `[extensions]` are not broken upon upgrade. * Removed the restrictive validation check to allow default loading of all tools. * Updated the `ImportError` message to guide users toward the new granular installation command. ### Testing Plan **Unit Tests:** - [x] I have added or updated unit tests for my change. - [x] All unit tests pass locally. **Manual End-to-End (E2E) Tests:** - Verified that the sample agent runs correctly with `toolbox-adk` locally. - Verified that `ToolboxToolset` can now be instantiated without arguments to load all tools. ### Checklist - [x] I have read the [CONTRIBUTING.md](https://github.com/google/adk-python/blob/main/CONTRIBUTING.md) document. - [x] I have performed a self-review of my own code. - [x] I have commented my code, particularly in hard-to-understand areas. - [x] I have added tests that prove my fix is effective or that my feature works. - [x] New and existing unit tests pass locally with my changes. - [x] I have manually tested my changes end-to-end. - [x] Any dependent changes have been merged and published in downstream modules. PiperOrigin-RevId: 857171811 --- contributing/samples/toolbox_agent/README.md | 4 +- pyproject.toml | 3 +- src/google/adk/tools/toolbox_toolset.py | 58 ++++++++++---------- 3 files changed, 32 insertions(+), 33 deletions(-) diff --git a/contributing/samples/toolbox_agent/README.md b/contributing/samples/toolbox_agent/README.md index 1c94731ac57..56a4fe089ef 100644 --- a/contributing/samples/toolbox_agent/README.md +++ b/contributing/samples/toolbox_agent/README.md @@ -26,10 +26,10 @@ Install SQLite from [https://sqlite.org/](https://sqlite.org/) ### 3. Install Required Python Dependencies -**Important**: The ADK's `ToolboxToolset` class requires the `toolbox-core` package, which is not automatically installed with the ADK. Install it using: +**Important**: The ADK's `ToolboxToolset` class requires the `toolbox-adk` package, which is not automatically installed with the ADK. Install it using: ```bash -pip install toolbox-core +pip install google-adk[toolbox] ``` ### 4. Create Database (Optional) diff --git a/pyproject.toml b/pyproject.toml index f612ef4df2a..1af967046fd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -157,11 +157,12 @@ extensions = [ "llama-index-readers-file>=0.4.0", # For retrieval using LlamaIndex. "llama-index-embeddings-google-genai>=0.3.0", # For files retrieval using LlamaIndex. "lxml>=5.3.0", # For load_web_page tool. - "toolbox-adk>=0.1.0", # For tools.toolbox_toolset.ToolboxToolset + "toolbox-adk>=0.5.7, <0.6.0", # For tools.toolbox_toolset.ToolboxToolset ] otel-gcp = ["opentelemetry-instrumentation-google-genai>=0.3b0, <1.0.0"] +toolbox = ["toolbox-adk>=0.5.7, <0.6.0"] [tool.pyink] # Format py files following Google style-guide diff --git a/src/google/adk/tools/toolbox_toolset.py b/src/google/adk/tools/toolbox_toolset.py index 73f27f3fc26..e1e7e576d6a 100644 --- a/src/google/adk/tools/toolbox_toolset.py +++ b/src/google/adk/tools/toolbox_toolset.py @@ -35,19 +35,9 @@ class ToolboxToolset(BaseToolset): """A class that provides access to toolbox toolsets. - This class acts as a bridge to the `toolbox-adk` package. - You must install `toolbox-adk` to use this class. - Example: ```python - from toolbox_adk import CredentialStrategy - - toolbox_toolset = ToolboxToolset( - server_url="http://127.0.0.1:5000", - # toolset_name and tool_names are optional. If omitted, all tools are - loaded. - credentials=CredentialStrategy.toolbox_identity() - ) + toolbox_toolset = ToolboxToolset("http://127.0.0.1:5000") ``` """ @@ -64,29 +54,37 @@ def __init__( additional_headers: Optional[Mapping[str, str]] = None, **kwargs, ): - """Args: - - server_url: The URL of the toolbox server. - toolset_name: The name of the toolbox toolset to load. - tool_names: The names of the tools to load. - auth_token_getters: (Deprecated) Map of auth token getters. - bound_params: Parameters to bind to the tools. - credentials: (Optional) toolbox_adk.CredentialConfig object. - additional_headers: (Optional) Static headers dictionary. - **kwargs: Additional arguments passed to the underlying - toolbox_adk.ToolboxToolset. + """Initializes the ToolboxToolset. + + Args: + server_url: The URL of the toolbox server. + toolset_name: (Optional) The name of the toolbox toolset to load. + tool_names: (Optional) The names of the tools to load. + auth_token_getters: (Optional) A mapping of authentication service names + to callables that return the corresponding authentication token. see: + https://github.com/googleapis/mcp-toolbox-sdk-python/tree/main/packages/toolbox-core#authenticating-tools + for details. + bound_params: (Optional) A mapping of parameter names to bind to specific + values or callables that are called to produce values as needed. see: + https://github.com/googleapis/mcp-toolbox-sdk-python/tree/main/packages/toolbox-core#binding-parameter-values + for details. + credentials: (Optional) toolbox_adk.CredentialConfig object. + additional_headers: (Optional) Static headers mapping. + **kwargs: Additional arguments passed to the underlying + toolbox_adk.ToolboxToolset. + + The resulting ToolboxToolset will contain both tools loaded by tool_names + and toolset_name. + + Note: toolset_name and tool_names are optional. + If both are omitted, all tools are loaded. """ - if not toolset_name and not tool_names: - raise ValueError( - "Either 'toolset_name' or 'tool_names' must be provided." - ) - try: from toolbox_adk import ToolboxToolset as RealToolboxToolset # pylint: disable=import-outside-toplevel except ImportError as exc: raise ImportError( "ToolboxToolset requires the 'toolbox-adk' package. " - "Please install it using `pip install toolbox-adk`." + "Please install it using `pip install google-adk[toolbox]`." ) from exc super().__init__() @@ -95,10 +93,10 @@ def __init__( server_url=server_url, toolset_name=toolset_name, tool_names=tool_names, + auth_token_getters=auth_token_getters, + bound_params=bound_params, credentials=credentials, additional_headers=additional_headers, - bound_params=bound_params, - auth_token_getters=auth_token_getters, **kwargs, ) From f92d4e397f37445fe9032a95ce26646a3a69300b Mon Sep 17 00:00:00 2001 From: Google Team Member Date: Fri, 16 Jan 2026 10:40:25 -0800 Subject: [PATCH 02/50] fix: Make all parts of a thought event be marked as thought PiperOrigin-RevId: 857218905 --- src/google/adk/agents/remote_a2a_agent.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/google/adk/agents/remote_a2a_agent.py b/src/google/adk/agents/remote_a2a_agent.py index 23a9b47554e..0ac47c02362 100644 --- a/src/google/adk/agents/remote_a2a_agent.py +++ b/src/google/adk/agents/remote_a2a_agent.py @@ -443,7 +443,8 @@ async def _handle_a2a_response( and event.content is not None and event.content.parts ): - event.content.parts[0].thought = True + for part in event.content.parts: + part.thought = True elif ( isinstance(update, A2ATaskStatusUpdateEvent) and update.status From 5923da786eb1aaef6f0bcbc6adc906cbc8bf9b36 Mon Sep 17 00:00:00 2001 From: Peter Kaplan Date: Fri, 16 Jan 2026 10:40:26 -0800 Subject: [PATCH 03/50] feat: Add `is_computer_use` field to agent information in adk-web server PiperOrigin-RevId: 857218915 --- src/google/adk/cli/adk_web_server.py | 1 + src/google/adk/cli/utils/agent_loader.py | 6 ++ tests/unittests/cli/test_fast_api.py | 3 + .../unittests/cli/utils/test_agent_loader.py | 67 ++++++++++++++++++- 4 files changed, 76 insertions(+), 1 deletion(-) diff --git a/src/google/adk/cli/adk_web_server.py b/src/google/adk/cli/adk_web_server.py index 0f0657ee0cf..752af89c344 100644 --- a/src/google/adk/cli/adk_web_server.py +++ b/src/google/adk/cli/adk_web_server.py @@ -330,6 +330,7 @@ class AppInfo(common.BaseModel): root_agent_name: str description: str language: Literal["yaml", "python"] + is_computer_use: bool = False class ListAppsResponse(common.BaseModel): diff --git a/src/google/adk/cli/utils/agent_loader.py b/src/google/adk/cli/utils/agent_loader.py index d6965e5bbb2..5b86adeffa4 100644 --- a/src/google/adk/cli/utils/agent_loader.py +++ b/src/google/adk/cli/utils/agent_loader.py @@ -32,6 +32,7 @@ from ...agents import config_agent_utils from ...agents.base_agent import BaseAgent from ...apps.app import App +from ...tools.computer_use.computer_use_toolset import ComputerUseToolset from ...utils.feature_decorator import experimental from .base_agent_loader import BaseAgentLoader @@ -358,12 +359,17 @@ def list_agents_detailed(self) -> list[dict[str, Any]]: agent = loaded language = self._determine_agent_language(agent_name) + is_computer_use = any( + isinstance(t, ComputerUseToolset) + for t in getattr(agent, "tools", []) + ) app_info = { "name": agent_name, "root_agent_name": agent.name, "description": agent.description, "language": language, + "is_computer_use": is_computer_use, } apps_info.append(app_info) diff --git a/tests/unittests/cli/test_fast_api.py b/tests/unittests/cli/test_fast_api.py index b7a97730721..6a98f75a884 100755 --- a/tests/unittests/cli/test_fast_api.py +++ b/tests/unittests/cli/test_fast_api.py @@ -201,6 +201,7 @@ def list_agents_detailed(self): "root_agent_name": "test_agent", "description": "A test agent for unit testing", "language": "python", + "is_computer_use": False, }] return MockAgentLoader(".") @@ -735,6 +736,8 @@ def test_list_apps_detailed(test_app): assert "description" in app assert "language" in app assert app["language"] in ["yaml", "python"] + assert "isComputerUse" in app + assert not app["isComputerUse"] logger.info(f"Listed apps: {data}") diff --git a/tests/unittests/cli/utils/test_agent_loader.py b/tests/unittests/cli/utils/test_agent_loader.py index 4950fecbd3d..130fd72229a 100644 --- a/tests/unittests/cli/utils/test_agent_loader.py +++ b/tests/unittests/cli/utils/test_agent_loader.py @@ -20,6 +20,7 @@ import sys import tempfile from textwrap import dedent +from unittest import mock from google.adk.cli.utils import agent_loader as agent_loader_module from google.adk.cli.utils.agent_loader import AgentLoader @@ -49,7 +50,8 @@ def create_agent_structure( Args: temp_dir: The temporary directory to create the agent in agent_name: Name of the agent - structure_type: One of 'module', 'package_with_root', 'package_with_agent_module' + structure_type: One of 'module', 'package_with_root', + 'package_with_agent_module' """ if structure_type == "module": # Structure: agents_dir/agent_name.py @@ -928,3 +930,66 @@ def test_yaml_config_agents_dir_parameter(self): # Verify they are different agents assert default_agent.name != custom_agent.name assert explicit_agent.name == default_agent.name + + def test_list_agents_detailed_identifies_computer_use(self): + """Test that list_agents_detailed correctly identifies computer use capability.""" + with tempfile.TemporaryDirectory() as temp_dir: + temp_path = Path(temp_dir) + agent_name = "computer_use_agent" + + agent_dir = temp_path / agent_name + agent_dir.mkdir() + + (agent_dir / "__init__.py").write_text(dedent(f""" + from typing import Any + from unittest.mock import MagicMock + from google.adk.agents.base_agent import BaseAgent + from google.adk.tools.computer_use.computer_use_toolset import ComputerUseToolset + from google.adk.tools.computer_use.base_computer import BaseComputer + + class {agent_name.title()}Agent(BaseAgent): + tools: list[Any] = [] + + def __init__(self): + super().__init__(name="{agent_name}") + self.tools = [ComputerUseToolset(computer=MagicMock(spec=BaseComputer))] + + root_agent = {agent_name.title()}Agent() + """)) + + loader = AgentLoader(str(temp_path)) + detailed_list = loader.list_agents_detailed() + + assert len(detailed_list) == 1 + assert detailed_list[0]["name"] == agent_name + assert detailed_list[0]["is_computer_use"] + + def test_list_agents_detailed_detects_no_computer_use(self): + """Test that list_agents_detailed sets is_computer_use to False when toolset is absent.""" + with tempfile.TemporaryDirectory() as temp_dir: + temp_path = Path(temp_dir) + agent_name = "standard_agent" + + agent_dir = temp_path / agent_name + agent_dir.mkdir() + + (agent_dir / "__init__.py").write_text(dedent(f""" + from typing import Any + from google.adk.agents.base_agent import BaseAgent + + class {agent_name.title()}Agent(BaseAgent): + tools: list[Any] = [] + + def __init__(self): + super().__init__(name="{agent_name}") + self.tools = [] + + root_agent = {agent_name.title()}Agent() + """)) + + loader = AgentLoader(str(temp_path)) + detailed_list = loader.list_agents_detailed() + + assert len(detailed_list) == 1 + assert detailed_list[0]["name"] == agent_name + assert not detailed_list[0]["is_computer_use"] From ea0934b9934c1fefd129a1026d6af369f126870e Mon Sep 17 00:00:00 2001 From: Joseph Pagadora Date: Fri, 16 Jan 2026 11:05:27 -0800 Subject: [PATCH 04/50] feat: Update adk eval cli to consume custom metrics by adding CustomMetricEvaluator Co-authored-by: Joseph Pagadora PiperOrigin-RevId: 857229167 --- src/google/adk/cli/cli_eval.py | 16 ++++ src/google/adk/cli/cli_tools_click.py | 24 +++++ .../adk/evaluation/custom_metric_evaluator.py | 79 +++++++++++++++++ src/google/adk/evaluation/eval_config.py | 87 ++++++++++++++----- .../evaluation/metric_evaluator_registry.py | 9 +- .../unittests/evaluation/test_eval_config.py | 14 ++- 6 files changed, 201 insertions(+), 28 deletions(-) create mode 100644 src/google/adk/evaluation/custom_metric_evaluator.py diff --git a/src/google/adk/cli/cli_eval.py b/src/google/adk/cli/cli_eval.py index 7176199b9f1..2555f3429bc 100644 --- a/src/google/adk/cli/cli_eval.py +++ b/src/google/adk/cli/cli_eval.py @@ -34,6 +34,9 @@ from ..evaluation.eval_case import get_all_tool_calls from ..evaluation.eval_case import IntermediateDataType from ..evaluation.eval_metrics import EvalMetric +from ..evaluation.eval_metrics import Interval +from ..evaluation.eval_metrics import MetricInfo +from ..evaluation.eval_metrics import MetricValueInfo from ..evaluation.eval_result import EvalCaseResult from ..evaluation.eval_sets_manager import EvalSetsManager from ..utils.context_utils import Aclosing @@ -70,6 +73,19 @@ def _get_agent_module(agent_module_file_path: str): return _import_from_path(module_name, file_path) +def get_default_metric_info( + metric_name: str, description: str = "" +) -> MetricInfo: + """Returns a default MetricInfo for a metric.""" + return MetricInfo( + metric_name=metric_name, + description=description, + metric_value_info=MetricValueInfo( + interval=Interval(min_value=0.0, max_value=1.0) + ), + ) + + def get_root_agent(agent_module_file_path: str) -> Agent: """Returns root agent given the agent module.""" agent_module = _get_agent_module(agent_module_file_path) diff --git a/src/google/adk/cli/cli_tools_click.py b/src/google/adk/cli/cli_tools_click.py index 241c696351f..0875f2523d4 100644 --- a/src/google/adk/cli/cli_tools_click.py +++ b/src/google/adk/cli/cli_tools_click.py @@ -712,8 +712,11 @@ def cli_eval( logs.setup_adk_logger(getattr(logging, log_level.upper())) try: + import importlib + from ..evaluation.base_eval_service import InferenceConfig from ..evaluation.base_eval_service import InferenceRequest + from ..evaluation.custom_metric_evaluator import _CustomMetricEvaluator from ..evaluation.eval_config import get_eval_metrics_from_config from ..evaluation.eval_config import get_evaluation_criteria_or_default from ..evaluation.eval_result import EvalCaseResult @@ -723,9 +726,11 @@ def cli_eval( from ..evaluation.local_eval_set_results_manager import LocalEvalSetResultsManager from ..evaluation.local_eval_sets_manager import load_eval_set_from_file from ..evaluation.local_eval_sets_manager import LocalEvalSetsManager + from ..evaluation.metric_evaluator_registry import DEFAULT_METRIC_EVALUATOR_REGISTRY from ..evaluation.simulation.user_simulator_provider import UserSimulatorProvider from .cli_eval import _collect_eval_results from .cli_eval import _collect_inferences + from .cli_eval import get_default_metric_info from .cli_eval import get_root_agent from .cli_eval import parse_and_get_evals_to_run from .cli_eval import pretty_print_eval_result @@ -818,11 +823,30 @@ def cli_eval( ) try: + metric_evaluator_registry = DEFAULT_METRIC_EVALUATOR_REGISTRY + if eval_config.custom_metrics: + for ( + metric_name, + config, + ) in eval_config.custom_metrics.items(): + if config.metric_info: + metric_info = config.metric_info.model_copy() + metric_info.metric_name = metric_name + else: + metric_info = get_default_metric_info( + metric_name=metric_name, description=config.description + ) + + metric_evaluator_registry.register_evaluator( + metric_info, _CustomMetricEvaluator + ) + eval_service = LocalEvalService( root_agent=root_agent, eval_sets_manager=eval_sets_manager, eval_set_results_manager=eval_set_results_manager, user_simulator_provider=user_simulator_provider, + metric_evaluator_registry=metric_evaluator_registry, ) inference_results = asyncio.run( diff --git a/src/google/adk/evaluation/custom_metric_evaluator.py b/src/google/adk/evaluation/custom_metric_evaluator.py new file mode 100644 index 00000000000..1eb8666db8e --- /dev/null +++ b/src/google/adk/evaluation/custom_metric_evaluator.py @@ -0,0 +1,79 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from __future__ import annotations + +import importlib +import inspect +from typing import Callable +from typing import Optional + +from typing_extensions import override + +from .eval_case import ConversationScenario +from .eval_case import Invocation +from .eval_metrics import EvalMetric +from .eval_metrics import EvalStatus +from .evaluator import EvaluationResult +from .evaluator import Evaluator + + +def _get_metric_function( + custom_function_path: str, +) -> Callable[..., EvaluationResult]: + """Returns the custom metric function from the given path.""" + try: + module_name, function_name = custom_function_path.rsplit(".", 1) + module = importlib.import_module(module_name) + metric_function = getattr(module, function_name) + return metric_function + except (ImportError, AttributeError, ValueError) as e: + raise ImportError( + f"Could not import custom metric function from {custom_function_path}" + ) from e + + +def _get_eval_status(score: Optional[float], threshold: float) -> EvalStatus: + if score is None: + return EvalStatus.NOT_EVALUATED + return EvalStatus.PASSED if score >= threshold else EvalStatus.FAILED + + +class _CustomMetricEvaluator(Evaluator): + """Evaluator for custom metrics.""" + + def __init__(self, eval_metric: EvalMetric, custom_function_path: str): + self._eval_metric = eval_metric + self._metric_function = _get_metric_function(custom_function_path) + + @override + async def evaluate_invocations( + self, + actual_invocations: list[Invocation], + expected_invocations: Optional[list[Invocation]], + conversation_scenario: Optional[ConversationScenario] = None, + ) -> EvaluationResult: + if inspect.iscoroutinefunction(self._metric_function): + eval_result = await self._metric_function( + actual_invocations, expected_invocations, conversation_scenario + ) + else: + eval_result = self._metric_function( + actual_invocations, expected_invocations, conversation_scenario + ) + + eval_result.overall_eval_status = _get_eval_status( + eval_result.overall_score, self._eval_metric.threshold + ) + return eval_result diff --git a/src/google/adk/evaluation/eval_config.py b/src/google/adk/evaluation/eval_config.py index 92b61ac57c6..3cc5672ca98 100644 --- a/src/google/adk/evaluation/eval_config.py +++ b/src/google/adk/evaluation/eval_config.py @@ -28,12 +28,46 @@ from ..agents.common_configs import CodeConfig from ..evaluation.eval_metrics import EvalMetric from .eval_metrics import BaseCriterion +from .eval_metrics import MetricInfo from .eval_metrics import Threshold from .simulation.user_simulator import BaseUserSimulatorConfig logger = logging.getLogger("google_adk." + __name__) +class CustomMetricConfig(BaseModel): + """Configuration for a custom metric.""" + + model_config = ConfigDict( + alias_generator=alias_generators.to_camel, + populate_by_name=True, + ) + + code_config: CodeConfig = Field( + description=( + "Code config for the custom metric, used to locate the custom metric" + " function." + ) + ) + metric_info: Optional[MetricInfo] = Field( + default=None, + description="Metric info for the custom metric.", + ) + description: str = Field( + default="", + description="Description for the custom metric info.", + ) + + @model_validator(mode="after") + def check_code_config_args(self) -> "CustomMetricConfig": + """Checks that the code config does not have args.""" + if self.code_config.args: + raise ValueError( + "args field in CodeConfig for custom metric is not supported." + ) + return self + + class EvalConfig(BaseModel): """Configurations needed to run an Eval. @@ -74,24 +108,43 @@ class EvalConfig(BaseModel): """, ) - custom_metrics: Optional[dict[str, CodeConfig]] = Field( + custom_metrics: Optional[dict[str, CustomMetricConfig]] = Field( default=None, - description="""A dictionary mapping custom metric names to CodeConfig -objects, which specify the path to the function for each custom metric. + description="""A dictionary mapping custom metric names to +a CustomMetricConfig object. If a metric name in `criteria` is also present in `custom_metrics`, the -corresponding `CodeConfig`'s `name` field will be used to locate the custom -metric implementation. The `name` field should contain the fully qualified -path to the custom metric function, e.g., `my.custom.metrics.metric_function`. +`code_config` in `CustomMetricConfig` will be used to locate the custom metric +implementation. + +The `metric` field in `CustomMetricConfig` can be used to provide metric +information like `min_value`, `max_value`, and `description`. If `metric` +is not provided, a default `MetricInfo` will be created, using +`description` from `CustomMetricConfig` if provided, and default values +for `min_value` (0.0) and `max_value` (1.0). Example: { "criteria": { - "my_custom_metric": 0.5 + "my_custom_metric": 0.5, + "my_simple_metric": 0.8 }, "custom_metrics": { + "my_simple_metric": { + "code_config": { + "name": "path.to.my.simple.metric.function" + } + }, "my_custom_metric": { - "name": "path.to.my.custom.metric.function" + "code_config": { + "name": "path.to.my.custom.metric.function" + }, + "metric": { + "metric_name": "my_custom_metric", + "min_value": -10.0, + "max_value": 10.0, + "description": "My custom metric." + } } } } @@ -103,17 +156,6 @@ class EvalConfig(BaseModel): description="Config to be used by the user simulator.", ) - @model_validator(mode="after") - def check_custom_metrics_code_config_args(self) -> "EvalConfig": - if self.custom_metrics: - for metric_name, metric_config in self.custom_metrics.items(): - if metric_config.args: - raise ValueError( - f"args field in CodeConfig for custom metric '{metric_name}' is" - " not supported." - ) - return self - _DEFAULT_EVAL_CONFIG = EvalConfig( criteria={"tool_trajectory_avg_score": 1.0, "response_match_score": 0.8} @@ -144,11 +186,10 @@ def get_eval_metrics_from_config(eval_config: EvalConfig) -> list[EvalMetric]: if eval_config.criteria: for metric_name, criterion in eval_config.criteria.items(): custom_function_path = None - if ( - eval_config.custom_metrics - and metric_name in eval_config.custom_metrics + if eval_config.custom_metrics and ( + config := eval_config.custom_metrics.get(metric_name) ): - custom_function_path = eval_config.custom_metrics[metric_name].name + custom_function_path = config.code_config.name if isinstance(criterion, float): eval_metric_list.append( diff --git a/src/google/adk/evaluation/metric_evaluator_registry.py b/src/google/adk/evaluation/metric_evaluator_registry.py index 9e1fc6c23b5..c1010e5ddfd 100644 --- a/src/google/adk/evaluation/metric_evaluator_registry.py +++ b/src/google/adk/evaluation/metric_evaluator_registry.py @@ -18,6 +18,7 @@ from ..errors.not_found_error import NotFoundError from ..utils.feature_decorator import experimental +from .custom_metric_evaluator import _CustomMetricEvaluator from .eval_metrics import EvalMetric from .eval_metrics import MetricInfo from .eval_metrics import PrebuiltMetrics @@ -62,7 +63,13 @@ def get_evaluator(self, eval_metric: EvalMetric) -> Evaluator: if eval_metric.metric_name not in self._registry: raise NotFoundError(f"{eval_metric.metric_name} not found in registry.") - return self._registry[eval_metric.metric_name][0](eval_metric=eval_metric) + evaluator_type = self._registry[eval_metric.metric_name][0] + if issubclass(evaluator_type, _CustomMetricEvaluator): + return evaluator_type( + eval_metric=eval_metric, + custom_function_path=eval_metric.custom_function_path, + ) + return evaluator_type(eval_metric=eval_metric) def register_evaluator( self, diff --git a/tests/unittests/evaluation/test_eval_config.py b/tests/unittests/evaluation/test_eval_config.py index fd1a7938eb8..54f22b50663 100644 --- a/tests/unittests/evaluation/test_eval_config.py +++ b/tests/unittests/evaluation/test_eval_config.py @@ -109,8 +109,12 @@ def test_get_eval_metrics_from_config_with_custom_metrics(): }, }, custom_metrics={ - "custom_metric_1": {"name": "path/to/custom/metric_1"}, - "custom_metric_2": {"name": "path/to/custom/metric_2"}, + "custom_metric_1": { + "code_config": {"name": "path/to/custom/metric_1"}, + }, + "custom_metric_2": { + "code_config": {"name": "path/to/custom/metric_2"}, + }, }, ) eval_metrics = get_eval_metrics_from_config(eval_config) @@ -128,10 +132,12 @@ def test_get_eval_metrics_from_config_with_custom_metrics(): def test_custom_metric_code_config_with_args_raises_error(): with pytest.raises(ValueError): - eval_config = EvalConfig( + _ = EvalConfig( criteria={"custom_metric": 1.0}, custom_metrics={ - "custom_metric": {"name": "name", "args": [{"value": 1}]} + "custom_metric": { + "code_config": {"name": "name", "args": [{"value": 1}]}, + } }, ) From c222a45ef74f7b55c48dc151ba98cd8c30a15c57 Mon Sep 17 00:00:00 2001 From: Ankur Sharma Date: Fri, 16 Jan 2026 12:09:36 -0800 Subject: [PATCH 05/50] chore: Making the regex to catch cli reference strict by adding word boundary anchor Right now the regex is over-matching and is returning true for references like these: from ..utils._client_labels_utils import EVAL_CLIENT_LABEL Co-authored-by: Ankur Sharma PiperOrigin-RevId: 857255767 --- .github/workflows/check-file-contents.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-file-contents.yml b/.github/workflows/check-file-contents.yml index 6c02d904c78..974f3816a14 100644 --- a/.github/workflows/check-file-contents.yml +++ b/.github/workflows/check-file-contents.yml @@ -96,7 +96,7 @@ jobs: echo "" set +e - FILES_WITH_FORBIDDEN_IMPORT=$(grep -lE '^from.*cli.*import.*$' $CHANGED_FILES) + FILES_WITH_FORBIDDEN_IMPORT=$(grep -lE '^from.*\bcli\b.*import.*$' $CHANGED_FILES) GREP_EXIT_CODE=$? set -e From 7d4326c3606a7ff2ba3c0fdef08d4f6af52ee71e Mon Sep 17 00:00:00 2001 From: ShaharKatz Date: Fri, 16 Jan 2026 22:35:08 +0200 Subject: [PATCH 06/50] Handle None inferences in eval results for issue #2729 (#3805) * fixed CR comments * formatted via isort --------- Co-authored-by: Ankur --- .../adk/evaluation/local_eval_service.py | 41 +++++ .../evaluation/test_local_eval_service.py | 163 ++++++++++++++++++ 2 files changed, 204 insertions(+) diff --git a/src/google/adk/evaluation/local_eval_service.py b/src/google/adk/evaluation/local_eval_service.py index 7031266e279..5b8cd21690f 100644 --- a/src/google/adk/evaluation/local_eval_service.py +++ b/src/google/adk/evaluation/local_eval_service.py @@ -268,6 +268,22 @@ async def _evaluate_single_inference_result( else 'test_user_id' ) + if ( + inference_result.status == InferenceStatus.FAILURE + or inference_result.inferences is None + ): + logger.error( + 'Evaluation attempted on failed inference for eval case `%s`.' + ' Error: %s', + inference_result.eval_case_id, + inference_result.error_message, + ) + eval_case_result = await self._build_not_evaluated_eval_case_result( + inference_result=inference_result, + user_id=user_id, + ) + return (inference_result, eval_case_result) + if eval_case.conversation_scenario is None and len( inference_result.inferences ) != len(eval_case.conversation): @@ -464,6 +480,31 @@ def _generate_final_eval_status( return final_eval_status + async def _build_not_evaluated_eval_case_result( + self, + *, + inference_result: InferenceResult, + user_id: str, + ) -> EvalCaseResult: + """Constructs an EvalCaseResult for cases that could not be evaluated.""" + session_details = await self._session_service.get_session( + app_name=inference_result.app_name, + user_id=user_id, + session_id=inference_result.session_id, + ) + + return EvalCaseResult( + eval_set_file=inference_result.eval_set_id, + eval_set_id=inference_result.eval_set_id, + eval_id=inference_result.eval_case_id, + final_eval_status=EvalStatus.NOT_EVALUATED, + overall_eval_metric_results=[], + eval_metric_result_per_invocation=[], + session_id=inference_result.session_id, + session_details=session_details, + user_id=user_id, + ) + async def _perform_inference_single_eval_item( self, app_name: str, diff --git a/tests/unittests/evaluation/test_local_eval_service.py b/tests/unittests/evaluation/test_local_eval_service.py index 08ef2aa8b0b..4ba91711ee4 100644 --- a/tests/unittests/evaluation/test_local_eval_service.py +++ b/tests/unittests/evaluation/test_local_eval_service.py @@ -325,6 +325,82 @@ async def test_evaluate_success( assert mock_eval_set_results_manager.save_eval_set_result.call_count == 2 +@pytest.mark.asyncio +async def test_evaluate_skips_failed_inference_results( + eval_service, mock_eval_sets_manager, mock_eval_set_results_manager, mocker +): + invocation = Invocation( + user_content=genai_types.Content( + parts=[genai_types.Part(text="test user content.")] + ), + final_response=genai_types.Content( + parts=[genai_types.Part(text="test final response.")] + ), + ) + inference_results = [ + InferenceResult( + app_name="test_app", + eval_set_id="test_eval_set", + eval_case_id="case_failure", + inferences=None, + session_id="session_fail", + status=InferenceStatus.FAILURE, + error_message="simulated failure", + ), + InferenceResult( + app_name="test_app", + eval_set_id="test_eval_set", + eval_case_id="case_success", + inferences=[invocation.model_copy(deep=True)], + session_id="session_success", + status=InferenceStatus.SUCCESS, + ), + InferenceResult( + app_name="test_app", + eval_set_id="test_eval_set", + eval_case_id="case_unknown", + inferences=[invocation.model_copy(deep=True)], + session_id="session_unknown", + status=InferenceStatus.UNKNOWN, + ), + ] + eval_metric = EvalMetric(metric_name="fake_metric", threshold=0.5) + evaluate_request = EvaluateRequest( + inference_results=inference_results, + evaluate_config=EvaluateConfig(eval_metrics=[eval_metric], parallelism=2), + ) + + mock_eval_case = mocker.MagicMock(spec=EvalCase) + mock_eval_case.conversation = [invocation.model_copy(deep=True)] + mock_eval_case.conversation_scenario = None + mock_eval_case.session_input = None + mock_eval_sets_manager.get_eval_case.return_value = mock_eval_case + + results = [] + async for result in eval_service.evaluate(evaluate_request): + results.append(result) + + assert len(results) == 3 + results_by_case = {result.eval_id: result for result in results} + + failure_result = results_by_case["case_failure"] + assert failure_result.final_eval_status == EvalStatus.NOT_EVALUATED + assert failure_result.overall_eval_metric_results == [] + assert failure_result.eval_metric_result_per_invocation == [] + + for case_id in ["case_success", "case_unknown"]: + case_result = results_by_case[case_id] + assert case_result.final_eval_status == EvalStatus.PASSED + assert len(case_result.overall_eval_metric_results) == 1 + assert ( + case_result.overall_eval_metric_results[0].metric_name == "fake_metric" + ) + assert case_result.overall_eval_metric_results[0].score == 0.9 + + assert mock_eval_sets_manager.get_eval_case.call_count == 3 + assert mock_eval_set_results_manager.save_eval_set_result.call_count == 3 + + @pytest.mark.asyncio async def test_evaluate_eval_case_not_found( eval_service, @@ -418,6 +494,93 @@ async def test_evaluate_single_inference_result( assert metric_result.eval_status == EvalStatus.PASSED +@pytest.mark.asyncio +async def test_evaluate_single_inference_result_handles_failed_inference( + eval_service, mock_eval_sets_manager, mocker +): + invocation = Invocation( + user_content=genai_types.Content( + parts=[genai_types.Part(text="test user content.")] + ), + final_response=genai_types.Content( + parts=[genai_types.Part(text="test final response.")] + ), + ) + inference_result = InferenceResult( + app_name="test_app", + eval_set_id="test_eval_set", + eval_case_id="case1", + inferences=None, + session_id="session1", + status=InferenceStatus.FAILURE, + error_message="simulated inference failure", + ) + eval_metric = EvalMetric(metric_name="fake_metric", threshold=0.5) + evaluate_config = EvaluateConfig(eval_metrics=[eval_metric], parallelism=1) + + mock_eval_case = mocker.MagicMock(spec=EvalCase) + mock_eval_case.conversation = [invocation.model_copy(deep=True)] + mock_eval_case.conversation_scenario = None + mock_eval_case.session_input = None + mock_eval_sets_manager.get_eval_case.return_value = mock_eval_case + + _, result = await eval_service._evaluate_single_inference_result( + inference_result=inference_result, evaluate_config=evaluate_config + ) + + assert isinstance(result, EvalCaseResult) + assert result.eval_id == "case1" + assert result.final_eval_status == EvalStatus.NOT_EVALUATED + assert result.overall_eval_metric_results == [] + assert result.eval_metric_result_per_invocation == [] + mock_eval_sets_manager.get_eval_case.assert_called_once_with( + app_name="test_app", eval_set_id="test_eval_set", eval_case_id="case1" + ) + + +@pytest.mark.asyncio +async def test_evaluate_single_inference_result_handles_missing_inferences( + eval_service, mock_eval_sets_manager, mocker +): + invocation = Invocation( + user_content=genai_types.Content( + parts=[genai_types.Part(text="test user content.")] + ), + final_response=genai_types.Content( + parts=[genai_types.Part(text="test final response.")] + ), + ) + inference_result = InferenceResult( + app_name="test_app", + eval_set_id="test_eval_set", + eval_case_id="case1", + inferences=None, + session_id="session1", + status=InferenceStatus.SUCCESS, + ) + eval_metric = EvalMetric(metric_name="fake_metric", threshold=0.5) + evaluate_config = EvaluateConfig(eval_metrics=[eval_metric], parallelism=1) + + mock_eval_case = mocker.MagicMock(spec=EvalCase) + mock_eval_case.conversation = [invocation.model_copy(deep=True)] + mock_eval_case.conversation_scenario = None + mock_eval_case.session_input = None + mock_eval_sets_manager.get_eval_case.return_value = mock_eval_case + + _, result = await eval_service._evaluate_single_inference_result( + inference_result=inference_result, evaluate_config=evaluate_config + ) + + assert isinstance(result, EvalCaseResult) + assert result.eval_id == "case1" + assert result.final_eval_status == EvalStatus.NOT_EVALUATED + assert result.overall_eval_metric_results == [] + assert result.eval_metric_result_per_invocation == [] + mock_eval_sets_manager.get_eval_case.assert_called_once_with( + app_name="test_app", eval_set_id="test_eval_set", eval_case_id="case1" + ) + + @pytest.mark.asyncio async def test_evaluate_single_inference_result_for_conversation_scenario( eval_service, mock_eval_sets_manager, mocker From 81eaeb5eba6d40cde0cf6147d96921ed1bf7bb31 Mon Sep 17 00:00:00 2001 From: Google Team Member Date: Fri, 16 Jan 2026 15:47:07 -0800 Subject: [PATCH 07/50] fix: Remove custom metadata from A2A response events PiperOrigin-RevId: 857331378 --- src/google/adk/agents/remote_a2a_agent.py | 2 - .../adk/evaluation/local_eval_service.py | 41 ----- .../evaluation/test_local_eval_service.py | 163 ------------------ 3 files changed, 206 deletions(-) diff --git a/src/google/adk/agents/remote_a2a_agent.py b/src/google/adk/agents/remote_a2a_agent.py index 0ac47c02362..dbc51c6dbfa 100644 --- a/src/google/adk/agents/remote_a2a_agent.py +++ b/src/google/adk/agents/remote_a2a_agent.py @@ -504,8 +504,6 @@ async def _handle_a2a_response( invocation_id=ctx.invocation_id, branch=ctx.branch, ) - event.custom_metadata = event.custom_metadata or {} - event.custom_metadata[A2A_METADATA_PREFIX + "response"] = True return event except A2AClientError as e: logger.error("Failed to handle A2A response: %s", e) diff --git a/src/google/adk/evaluation/local_eval_service.py b/src/google/adk/evaluation/local_eval_service.py index 5b8cd21690f..7031266e279 100644 --- a/src/google/adk/evaluation/local_eval_service.py +++ b/src/google/adk/evaluation/local_eval_service.py @@ -268,22 +268,6 @@ async def _evaluate_single_inference_result( else 'test_user_id' ) - if ( - inference_result.status == InferenceStatus.FAILURE - or inference_result.inferences is None - ): - logger.error( - 'Evaluation attempted on failed inference for eval case `%s`.' - ' Error: %s', - inference_result.eval_case_id, - inference_result.error_message, - ) - eval_case_result = await self._build_not_evaluated_eval_case_result( - inference_result=inference_result, - user_id=user_id, - ) - return (inference_result, eval_case_result) - if eval_case.conversation_scenario is None and len( inference_result.inferences ) != len(eval_case.conversation): @@ -480,31 +464,6 @@ def _generate_final_eval_status( return final_eval_status - async def _build_not_evaluated_eval_case_result( - self, - *, - inference_result: InferenceResult, - user_id: str, - ) -> EvalCaseResult: - """Constructs an EvalCaseResult for cases that could not be evaluated.""" - session_details = await self._session_service.get_session( - app_name=inference_result.app_name, - user_id=user_id, - session_id=inference_result.session_id, - ) - - return EvalCaseResult( - eval_set_file=inference_result.eval_set_id, - eval_set_id=inference_result.eval_set_id, - eval_id=inference_result.eval_case_id, - final_eval_status=EvalStatus.NOT_EVALUATED, - overall_eval_metric_results=[], - eval_metric_result_per_invocation=[], - session_id=inference_result.session_id, - session_details=session_details, - user_id=user_id, - ) - async def _perform_inference_single_eval_item( self, app_name: str, diff --git a/tests/unittests/evaluation/test_local_eval_service.py b/tests/unittests/evaluation/test_local_eval_service.py index 4ba91711ee4..08ef2aa8b0b 100644 --- a/tests/unittests/evaluation/test_local_eval_service.py +++ b/tests/unittests/evaluation/test_local_eval_service.py @@ -325,82 +325,6 @@ async def test_evaluate_success( assert mock_eval_set_results_manager.save_eval_set_result.call_count == 2 -@pytest.mark.asyncio -async def test_evaluate_skips_failed_inference_results( - eval_service, mock_eval_sets_manager, mock_eval_set_results_manager, mocker -): - invocation = Invocation( - user_content=genai_types.Content( - parts=[genai_types.Part(text="test user content.")] - ), - final_response=genai_types.Content( - parts=[genai_types.Part(text="test final response.")] - ), - ) - inference_results = [ - InferenceResult( - app_name="test_app", - eval_set_id="test_eval_set", - eval_case_id="case_failure", - inferences=None, - session_id="session_fail", - status=InferenceStatus.FAILURE, - error_message="simulated failure", - ), - InferenceResult( - app_name="test_app", - eval_set_id="test_eval_set", - eval_case_id="case_success", - inferences=[invocation.model_copy(deep=True)], - session_id="session_success", - status=InferenceStatus.SUCCESS, - ), - InferenceResult( - app_name="test_app", - eval_set_id="test_eval_set", - eval_case_id="case_unknown", - inferences=[invocation.model_copy(deep=True)], - session_id="session_unknown", - status=InferenceStatus.UNKNOWN, - ), - ] - eval_metric = EvalMetric(metric_name="fake_metric", threshold=0.5) - evaluate_request = EvaluateRequest( - inference_results=inference_results, - evaluate_config=EvaluateConfig(eval_metrics=[eval_metric], parallelism=2), - ) - - mock_eval_case = mocker.MagicMock(spec=EvalCase) - mock_eval_case.conversation = [invocation.model_copy(deep=True)] - mock_eval_case.conversation_scenario = None - mock_eval_case.session_input = None - mock_eval_sets_manager.get_eval_case.return_value = mock_eval_case - - results = [] - async for result in eval_service.evaluate(evaluate_request): - results.append(result) - - assert len(results) == 3 - results_by_case = {result.eval_id: result for result in results} - - failure_result = results_by_case["case_failure"] - assert failure_result.final_eval_status == EvalStatus.NOT_EVALUATED - assert failure_result.overall_eval_metric_results == [] - assert failure_result.eval_metric_result_per_invocation == [] - - for case_id in ["case_success", "case_unknown"]: - case_result = results_by_case[case_id] - assert case_result.final_eval_status == EvalStatus.PASSED - assert len(case_result.overall_eval_metric_results) == 1 - assert ( - case_result.overall_eval_metric_results[0].metric_name == "fake_metric" - ) - assert case_result.overall_eval_metric_results[0].score == 0.9 - - assert mock_eval_sets_manager.get_eval_case.call_count == 3 - assert mock_eval_set_results_manager.save_eval_set_result.call_count == 3 - - @pytest.mark.asyncio async def test_evaluate_eval_case_not_found( eval_service, @@ -494,93 +418,6 @@ async def test_evaluate_single_inference_result( assert metric_result.eval_status == EvalStatus.PASSED -@pytest.mark.asyncio -async def test_evaluate_single_inference_result_handles_failed_inference( - eval_service, mock_eval_sets_manager, mocker -): - invocation = Invocation( - user_content=genai_types.Content( - parts=[genai_types.Part(text="test user content.")] - ), - final_response=genai_types.Content( - parts=[genai_types.Part(text="test final response.")] - ), - ) - inference_result = InferenceResult( - app_name="test_app", - eval_set_id="test_eval_set", - eval_case_id="case1", - inferences=None, - session_id="session1", - status=InferenceStatus.FAILURE, - error_message="simulated inference failure", - ) - eval_metric = EvalMetric(metric_name="fake_metric", threshold=0.5) - evaluate_config = EvaluateConfig(eval_metrics=[eval_metric], parallelism=1) - - mock_eval_case = mocker.MagicMock(spec=EvalCase) - mock_eval_case.conversation = [invocation.model_copy(deep=True)] - mock_eval_case.conversation_scenario = None - mock_eval_case.session_input = None - mock_eval_sets_manager.get_eval_case.return_value = mock_eval_case - - _, result = await eval_service._evaluate_single_inference_result( - inference_result=inference_result, evaluate_config=evaluate_config - ) - - assert isinstance(result, EvalCaseResult) - assert result.eval_id == "case1" - assert result.final_eval_status == EvalStatus.NOT_EVALUATED - assert result.overall_eval_metric_results == [] - assert result.eval_metric_result_per_invocation == [] - mock_eval_sets_manager.get_eval_case.assert_called_once_with( - app_name="test_app", eval_set_id="test_eval_set", eval_case_id="case1" - ) - - -@pytest.mark.asyncio -async def test_evaluate_single_inference_result_handles_missing_inferences( - eval_service, mock_eval_sets_manager, mocker -): - invocation = Invocation( - user_content=genai_types.Content( - parts=[genai_types.Part(text="test user content.")] - ), - final_response=genai_types.Content( - parts=[genai_types.Part(text="test final response.")] - ), - ) - inference_result = InferenceResult( - app_name="test_app", - eval_set_id="test_eval_set", - eval_case_id="case1", - inferences=None, - session_id="session1", - status=InferenceStatus.SUCCESS, - ) - eval_metric = EvalMetric(metric_name="fake_metric", threshold=0.5) - evaluate_config = EvaluateConfig(eval_metrics=[eval_metric], parallelism=1) - - mock_eval_case = mocker.MagicMock(spec=EvalCase) - mock_eval_case.conversation = [invocation.model_copy(deep=True)] - mock_eval_case.conversation_scenario = None - mock_eval_case.session_input = None - mock_eval_sets_manager.get_eval_case.return_value = mock_eval_case - - _, result = await eval_service._evaluate_single_inference_result( - inference_result=inference_result, evaluate_config=evaluate_config - ) - - assert isinstance(result, EvalCaseResult) - assert result.eval_id == "case1" - assert result.final_eval_status == EvalStatus.NOT_EVALUATED - assert result.overall_eval_metric_results == [] - assert result.eval_metric_result_per_invocation == [] - mock_eval_sets_manager.get_eval_case.assert_called_once_with( - app_name="test_app", eval_set_id="test_eval_set", eval_case_id="case1" - ) - - @pytest.mark.asyncio async def test_evaluate_single_inference_result_for_conversation_scenario( eval_service, mock_eval_sets_manager, mocker From 3dd7e3f1b9be05c28adb061864d84c4202a2d922 Mon Sep 17 00:00:00 2001 From: "Xiang (Sean) Zhou" Date: Sun, 18 Jan 2026 21:03:30 -0800 Subject: [PATCH 08/50] chore: Update sample live streaming tools agent to use latest live models Co-authored-by: Xiang (Sean) Zhou PiperOrigin-RevId: 858001541 --- .../live_bidi_streaming_tools_agent/agent.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/contributing/samples/live_bidi_streaming_tools_agent/agent.py b/contributing/samples/live_bidi_streaming_tools_agent/agent.py index c556518656b..18a947bbc4e 100644 --- a/contributing/samples/live_bidi_streaming_tools_agent/agent.py +++ b/contributing/samples/live_bidi_streaming_tools_agent/agent.py @@ -18,7 +18,6 @@ from google.adk.agents import LiveRequestQueue from google.adk.agents.llm_agent import Agent from google.adk.tools.function_tool import FunctionTool -from google.genai import Client from google.genai import types as genai_types @@ -54,6 +53,8 @@ async def monitor_video_stream( ) -> AsyncGenerator[str, None]: """Monitor how many people are in the video streams.""" print("start monitor_video_stream!") + from google.genai import Client + client = Client(vertexai=False) prompt_text = ( "Count the number of people in this image. Just respond with a numeric" @@ -87,7 +88,7 @@ async def monitor_video_stream( # Call the model to generate content based on the provided image and prompt response = client.models.generate_content( - model="gemini-2.0-flash-exp", + model="gemini-2.5-flash", contents=contents, config=genai_types.GenerateContentConfig( system_instruction=( @@ -121,9 +122,11 @@ def stop_streaming(function_name: str): root_agent = Agent( - # find supported models here: https://google.github.io/adk-docs/get-started/streaming/quickstart-streaming/ - model="gemini-2.0-flash-live-preview-04-09", # for Vertex project - # model="gemini-live-2.5-flash-preview", # for AI studio key + # see https://docs.cloud.google.com/vertex-ai/generative-ai/docs/migrate + # for vertex model names + model="gemini-live-2.5-flash-native-audio", # vertex + # see https://ai.google.dev/gemini-api/docs/models for AIS model names + # model='gemini-2.5-flash-native-audio-latest', # for AI studio name="video_streaming_agent", instruction=""" You are a monitoring agent. You can do video monitoring and stock price monitoring From 4b29d15b3e5df65f3503daffa6bc7af85159507b Mon Sep 17 00:00:00 2001 From: Liang Wu Date: Mon, 19 Jan 2026 19:38:52 -0800 Subject: [PATCH 09/50] fix: Handle async driver URLs in migration tool The migration tool uses synchronous SQLAlchemy engines but users often provide async driver URLs (e.g., postgresql+asyncpg://) since that's what ADK requires at runtime. This fix: - Makes `to_sync_url()` public in `_schema_check_utils.py` for reuse - Updates `migrate_from_sqlalchemy_pickle.py` to convert async URLs - Updates `migrate_from_sqlalchemy_sqlite.py` to convert async URLs - Adds comprehensive unit tests for `to_sync_url()` function - Adds integration test for migration with async driver URLs Fixes #4176 Co-authored-by: Liang Wu PiperOrigin-RevId: 858359061 --- .../sessions/migration/_schema_check_utils.py | 26 +++- .../migrate_from_sqlalchemy_pickle.py | 10 +- .../migrate_from_sqlalchemy_sqlite.py | 8 +- .../sessions/migration/test_migration.py | 141 ++++++++++++++++++ 4 files changed, 179 insertions(+), 6 deletions(-) diff --git a/src/google/adk/sessions/migration/_schema_check_utils.py b/src/google/adk/sessions/migration/_schema_check_utils.py index 249161c84c5..3223847b6b8 100644 --- a/src/google/adk/sessions/migration/_schema_check_utils.py +++ b/src/google/adk/sessions/migration/_schema_check_utils.py @@ -82,8 +82,28 @@ def get_db_schema_version_from_connection(connection) -> str: return _get_schema_version_impl(inspector, connection) -def _to_sync_url(db_url: str) -> str: - """Removes '+driver' from SQLAlchemy URL.""" +def to_sync_url(db_url: str) -> str: + """Removes '+driver' from SQLAlchemy URL. + + This is useful when you need to use a synchronous SQLAlchemy engine with + a database URL that specifies an async driver (e.g., postgresql+asyncpg:// + or sqlite+aiosqlite://). + + Args: + db_url: The database URL, potentially with a driver specification. + + Returns: + The database URL with the driver specification removed (e.g., + 'postgresql+asyncpg://host/db' becomes 'postgresql://host/db'). + + Examples: + >>> to_sync_url('postgresql+asyncpg://localhost/mydb') + 'postgresql://localhost/mydb' + >>> to_sync_url('sqlite+aiosqlite:///path/to/db.sqlite') + 'sqlite:///path/to/db.sqlite' + >>> to_sync_url('mysql://localhost/mydb') # No driver, returns unchanged + 'mysql://localhost/mydb' + """ if "://" in db_url: scheme, _, rest = db_url.partition("://") if "+" in scheme: @@ -106,7 +126,7 @@ def get_db_schema_version(db_url: str) -> str: """ engine = None try: - engine = create_sync_engine(_to_sync_url(db_url)) + engine = create_sync_engine(to_sync_url(db_url)) with engine.connect() as connection: inspector = inspect(connection) return _get_schema_version_impl(inspector, connection) diff --git a/src/google/adk/sessions/migration/migrate_from_sqlalchemy_pickle.py b/src/google/adk/sessions/migration/migrate_from_sqlalchemy_pickle.py index d24f71f682e..b6ad673d906 100644 --- a/src/google/adk/sessions/migration/migrate_from_sqlalchemy_pickle.py +++ b/src/google/adk/sessions/migration/migrate_from_sqlalchemy_pickle.py @@ -165,9 +165,15 @@ def _get_state_dict(state_val: Any) -> dict: # --- Migration Logic --- def migrate(source_db_url: str, dest_db_url: str): """Migrates data from old pickle schema to new JSON schema.""" + # Convert async driver URLs to sync URLs for SQLAlchemy's synchronous engine. + # This allows users to provide URLs like 'postgresql+asyncpg://...' and have + # them automatically converted to 'postgresql://...' for migration. + source_sync_url = _schema_check_utils.to_sync_url(source_db_url) + dest_sync_url = _schema_check_utils.to_sync_url(dest_db_url) + logger.info(f"Connecting to source database: {source_db_url}") try: - source_engine = create_engine(source_db_url) + source_engine = create_engine(source_sync_url) SourceSession = sessionmaker(bind=source_engine) except Exception as e: logger.error(f"Failed to connect to source database: {e}") @@ -175,7 +181,7 @@ def migrate(source_db_url: str, dest_db_url: str): logger.info(f"Connecting to destination database: {dest_db_url}") try: - dest_engine = create_engine(dest_db_url) + dest_engine = create_engine(dest_sync_url) v1.Base.metadata.create_all(dest_engine) DestSession = sessionmaker(bind=dest_engine) except Exception as e: diff --git a/src/google/adk/sessions/migration/migrate_from_sqlalchemy_sqlite.py b/src/google/adk/sessions/migration/migrate_from_sqlalchemy_sqlite.py index a0dd3a84a15..28830a8bc8e 100644 --- a/src/google/adk/sessions/migration/migrate_from_sqlalchemy_sqlite.py +++ b/src/google/adk/sessions/migration/migrate_from_sqlalchemy_sqlite.py @@ -23,6 +23,7 @@ import sys from google.adk.sessions import sqlite_session_service as sss +from google.adk.sessions.migration import _schema_check_utils from google.adk.sessions.schemas import v0 as v0_schema from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker @@ -32,9 +33,14 @@ def migrate(source_db_url: str, dest_db_path: str): """Migrates data from a SQLAlchemy-based SQLite DB to the new schema.""" + # Convert async driver URLs to sync URLs for SQLAlchemy's synchronous engine. + # This allows users to provide URLs like 'sqlite+aiosqlite://...' and have + # them automatically converted to 'sqlite://...' for migration. + source_sync_url = _schema_check_utils.to_sync_url(source_db_url) + logger.info(f"Connecting to source database: {source_db_url}") try: - engine = create_engine(source_db_url) + engine = create_engine(source_sync_url) v0_schema.Base.metadata.create_all( engine ) # Ensure tables exist for inspection diff --git a/tests/unittests/sessions/migration/test_migration.py b/tests/unittests/sessions/migration/test_migration.py index f51356ec328..f8d18bbd017 100644 --- a/tests/unittests/sessions/migration/test_migration.py +++ b/tests/unittests/sessions/migration/test_migration.py @@ -23,10 +23,88 @@ from google.adk.sessions.migration import migrate_from_sqlalchemy_pickle as mfsp from google.adk.sessions.schemas import v0 from google.adk.sessions.schemas import v1 +import pytest from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker +class TestToSyncUrl: + """Tests for the to_sync_url function.""" + + @pytest.mark.parametrize( + "input_url,expected_url", + [ + # PostgreSQL async drivers + ( + "postgresql+asyncpg://localhost/mydb", + "postgresql://localhost/mydb", + ), + ( + "postgresql+asyncpg://user:pass@localhost:5432/mydb", + "postgresql://user:pass@localhost:5432/mydb", + ), + # PostgreSQL sync drivers (should still strip) + ( + "postgresql+psycopg2://localhost/mydb", + "postgresql://localhost/mydb", + ), + # MySQL async drivers + ( + "mysql+aiomysql://localhost/mydb", + "mysql://localhost/mydb", + ), + ( + "mysql+asyncmy://user:pass@localhost:3306/mydb", + "mysql://user:pass@localhost:3306/mydb", + ), + # SQLite async driver + ( + "sqlite+aiosqlite:///path/to/db.sqlite", + "sqlite:///path/to/db.sqlite", + ), + ( + "sqlite+aiosqlite:///:memory:", + "sqlite:///:memory:", + ), + # URLs without driver specification (unchanged) + ( + "postgresql://localhost/mydb", + "postgresql://localhost/mydb", + ), + ( + "mysql://localhost/mydb", + "mysql://localhost/mydb", + ), + ( + "sqlite:///path/to/db.sqlite", + "sqlite:///path/to/db.sqlite", + ), + # Edge cases + ( + "sqlite:///:memory:", + "sqlite:///:memory:", + ), + # Complex URL with query parameters + ( + "postgresql+asyncpg://user:pass@host/db?ssl=require", + "postgresql://user:pass@host/db?ssl=require", + ), + ], + ) + def test_to_sync_url(self, input_url, expected_url): + """Test that async driver specifications are correctly removed.""" + assert _schema_check_utils.to_sync_url(input_url) == expected_url + + def test_to_sync_url_no_scheme_separator(self): + """Test that URLs without :// are returned unchanged.""" + # This is an invalid URL but the function should handle it gracefully + assert _schema_check_utils.to_sync_url("not-a-url") == "not-a-url" + + def test_to_sync_url_empty_string(self): + """Test that empty string is returned unchanged.""" + assert _schema_check_utils.to_sync_url("") == "" + + def test_migrate_from_sqlalchemy_pickle(tmp_path): """Tests for migrate_from_sqlalchemy_pickle.""" source_db_path = tmp_path / "source_pickle.db" @@ -104,3 +182,66 @@ def test_migrate_from_sqlalchemy_pickle(tmp_path): assert event_res.event_data["actions"]["state_delta"] == {"skey": 4} dest_session.close() + + +def test_migrate_from_sqlalchemy_pickle_with_async_driver_urls(tmp_path): + """Tests that migration works with async driver URLs (fixes issue #4176). + + Users often provide async driver URLs (e.g., postgresql+asyncpg://) since + that's what ADK requires at runtime. The migration tool should handle these + by automatically converting them to sync URLs. + """ + source_db_path = tmp_path / "source_pickle_async.db" + dest_db_path = tmp_path / "dest_json_async.db" + # Use async driver URLs like users would typically provide + source_db_url = f"sqlite+aiosqlite:///{source_db_path}" + dest_db_url = f"sqlite+aiosqlite:///{dest_db_path}" + + # Set up source DB with old pickle schema using sync URL + sync_source_url = f"sqlite:///{source_db_path}" + source_engine = create_engine(sync_source_url) + v0.Base.metadata.create_all(source_engine) + SourceSession = sessionmaker(bind=source_engine) + source_session = SourceSession() + + # Populate source data + now = datetime.now(timezone.utc) + app_state = v0.StorageAppState( + app_name="async_app", state={"key": "value"}, update_time=now + ) + session = v0.StorageSession( + app_name="async_app", + user_id="async_user", + id="async_session", + state={}, + create_time=now, + update_time=now, + ) + source_session.add_all([app_state, session]) + source_session.commit() + source_session.close() + + # This should NOT raise an error about async drivers (the fix for #4176) + mfsp.migrate(source_db_url, dest_db_url) + + # Verify destination DB + sync_dest_url = f"sqlite:///{dest_db_path}" + dest_engine = create_engine(sync_dest_url) + DestSession = sessionmaker(bind=dest_engine) + dest_session = DestSession() + + metadata = dest_session.query(v1.StorageMetadata).first() + assert metadata is not None + assert metadata.key == _schema_check_utils.SCHEMA_VERSION_KEY + assert metadata.value == _schema_check_utils.SCHEMA_VERSION_1_JSON + + app_state_res = dest_session.query(v1.StorageAppState).first() + assert app_state_res is not None + assert app_state_res.app_name == "async_app" + assert app_state_res.state == {"key": "value"} + + session_res = dest_session.query(v1.StorageSession).first() + assert session_res is not None + assert session_res.id == "async_session" + + dest_session.close() From 69ad605bc4bbe9a4f018127fd3625169ee70488e Mon Sep 17 00:00:00 2001 From: Xuan Yang Date: Mon, 19 Jan 2026 23:36:23 -0800 Subject: [PATCH 10/50] feat: Use json schema for `base_retrieval_tool`, `load_artifacts_tool`, and `load_memory_tool` declaration when feature enabled Co-authored-by: Xuan Yang PiperOrigin-RevId: 858435881 --- src/google/adk/tools/load_artifacts_tool.py | 16 +++++ src/google/adk/tools/load_memory_tool.py | 14 ++++ .../tools/retrieval/base_retrieval_tool.py | 18 +++++ .../retrieval/test_base_retrieval_tool.py | 67 +++++++++++++++++++ .../tools/test_load_artifacts_tool.py | 20 ++++++ .../unittests/tools/test_load_memory_tool.py | 46 +++++++++++++ 6 files changed, 181 insertions(+) create mode 100644 tests/unittests/tools/retrieval/test_base_retrieval_tool.py create mode 100644 tests/unittests/tools/test_load_memory_tool.py diff --git a/src/google/adk/tools/load_artifacts_tool.py b/src/google/adk/tools/load_artifacts_tool.py index dbdc1f26f2a..8f82d4df7ae 100644 --- a/src/google/adk/tools/load_artifacts_tool.py +++ b/src/google/adk/tools/load_artifacts_tool.py @@ -24,6 +24,8 @@ from google.genai import types from typing_extensions import override +from ..features import FeatureName +from ..features import is_feature_enabled from .base_tool import BaseTool # MIME types Gemini accepts for inline data in requests. @@ -132,6 +134,20 @@ def __init__(self): ) def _get_declaration(self) -> types.FunctionDeclaration | None: + if is_feature_enabled(FeatureName.JSON_SCHEMA_FOR_FUNC_DECL): + return types.FunctionDeclaration( + name=self.name, + description=self.description, + parameters_json_schema={ + 'type': 'object', + 'properties': { + 'artifact_names': { + 'type': 'array', + 'items': {'type': 'string'}, + }, + }, + }, + ) return types.FunctionDeclaration( name=self.name, description=self.description, diff --git a/src/google/adk/tools/load_memory_tool.py b/src/google/adk/tools/load_memory_tool.py index 8410e411410..66e2ffabc33 100644 --- a/src/google/adk/tools/load_memory_tool.py +++ b/src/google/adk/tools/load_memory_tool.py @@ -21,6 +21,8 @@ from pydantic import Field from typing_extensions import override +from ..features import FeatureName +from ..features import is_feature_enabled from ..memory.memory_entry import MemoryEntry from .function_tool import FunctionTool from .tool_context import ToolContext @@ -59,6 +61,18 @@ def __init__(self): @override def _get_declaration(self) -> types.FunctionDeclaration | None: + if is_feature_enabled(FeatureName.JSON_SCHEMA_FOR_FUNC_DECL): + return types.FunctionDeclaration( + name=self.name, + description=self.description, + parameters_json_schema={ + 'type': 'object', + 'properties': { + 'query': {'type': 'string'}, + }, + 'required': ['query'], + }, + ) return types.FunctionDeclaration( name=self.name, description=self.description, diff --git a/src/google/adk/tools/retrieval/base_retrieval_tool.py b/src/google/adk/tools/retrieval/base_retrieval_tool.py index 64f3ec91dbc..f101be9de3d 100644 --- a/src/google/adk/tools/retrieval/base_retrieval_tool.py +++ b/src/google/adk/tools/retrieval/base_retrieval_tool.py @@ -12,9 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations + from google.genai import types from typing_extensions import override +from ...features import FeatureName +from ...features import is_feature_enabled from ..base_tool import BaseTool @@ -22,6 +26,20 @@ class BaseRetrievalTool(BaseTool): @override def _get_declaration(self) -> types.FunctionDeclaration: + if is_feature_enabled(FeatureName.JSON_SCHEMA_FOR_FUNC_DECL): + return types.FunctionDeclaration( + name=self.name, + description=self.description, + parameters_json_schema={ + 'type': 'object', + 'properties': { + 'query': { + 'type': 'string', + 'description': 'The query to retrieve.', + }, + }, + }, + ) return types.FunctionDeclaration( name=self.name, description=self.description, diff --git a/tests/unittests/tools/retrieval/test_base_retrieval_tool.py b/tests/unittests/tools/retrieval/test_base_retrieval_tool.py new file mode 100644 index 00000000000..8c40f492650 --- /dev/null +++ b/tests/unittests/tools/retrieval/test_base_retrieval_tool.py @@ -0,0 +1,67 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from google.adk.features import FeatureName +from google.adk.features._feature_registry import temporary_feature_override +from google.adk.tools.retrieval.base_retrieval_tool import BaseRetrievalTool +from google.genai import types + + +class _TestRetrievalTool(BaseRetrievalTool): + """Concrete implementation of BaseRetrievalTool for testing.""" + + def __init__(self): + super().__init__( + name='test_retrieval', + description='A test retrieval tool.', + ) + + async def run_async(self, *, args, tool_context): + return {'result': 'test'} + + +def test_get_declaration_with_json_schema_feature_disabled(): + """Test that _get_declaration uses parameters when feature is disabled.""" + tool = _TestRetrievalTool() + + with temporary_feature_override(FeatureName.JSON_SCHEMA_FOR_FUNC_DECL, False): + declaration = tool._get_declaration() + + assert declaration.name == 'test_retrieval' + assert declaration.description == 'A test retrieval tool.' + assert declaration.parameters_json_schema is None + assert isinstance(declaration.parameters, types.Schema) + assert declaration.parameters.type == types.Type.OBJECT + assert 'query' in declaration.parameters.properties + + +def test_get_declaration_with_json_schema_feature_enabled(): + """Test that _get_declaration uses parameters_json_schema when feature is enabled.""" + tool = _TestRetrievalTool() + + with temporary_feature_override(FeatureName.JSON_SCHEMA_FOR_FUNC_DECL, True): + declaration = tool._get_declaration() + + assert declaration.name == 'test_retrieval' + assert declaration.description == 'A test retrieval tool.' + assert declaration.parameters is None + assert declaration.parameters_json_schema == { + 'type': 'object', + 'properties': { + 'query': { + 'type': 'string', + 'description': 'The query to retrieve.', + }, + }, + } diff --git a/tests/unittests/tools/test_load_artifacts_tool.py b/tests/unittests/tools/test_load_artifacts_tool.py index 1ea50bb33ce..6a420574f00 100644 --- a/tests/unittests/tools/test_load_artifacts_tool.py +++ b/tests/unittests/tools/test_load_artifacts_tool.py @@ -14,6 +14,8 @@ import base64 +from google.adk.features import FeatureName +from google.adk.features._feature_registry import temporary_feature_override from google.adk.models.llm_request import LlmRequest from google.adk.tools.load_artifacts_tool import _maybe_base64_to_bytes from google.adk.tools.load_artifacts_tool import load_artifacts_tool @@ -160,3 +162,21 @@ def test_maybe_base64_to_bytes_returns_none_for_invalid(): """Invalid base64 strings return None.""" # Single character is invalid (base64 requires length % 4 == 0 after padding) assert _maybe_base64_to_bytes('x') is None + + +def test_get_declaration_with_json_schema_feature_enabled(): + """Test that _get_declaration uses parameters_json_schema when feature is enabled.""" + with temporary_feature_override(FeatureName.JSON_SCHEMA_FOR_FUNC_DECL, True): + declaration = load_artifacts_tool._get_declaration() + + assert declaration.name == 'load_artifacts' + assert declaration.parameters is None + assert declaration.parameters_json_schema == { + 'type': 'object', + 'properties': { + 'artifact_names': { + 'type': 'array', + 'items': {'type': 'string'}, + }, + }, + } diff --git a/tests/unittests/tools/test_load_memory_tool.py b/tests/unittests/tools/test_load_memory_tool.py new file mode 100644 index 00000000000..a3affd3ed35 --- /dev/null +++ b/tests/unittests/tools/test_load_memory_tool.py @@ -0,0 +1,46 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from google.adk.features import FeatureName +from google.adk.features._feature_registry import temporary_feature_override +from google.adk.tools.load_memory_tool import load_memory_tool +from google.genai import types + + +def test_get_declaration_with_json_schema_feature_disabled(): + """Test that _get_declaration uses parameters when feature is disabled.""" + with temporary_feature_override(FeatureName.JSON_SCHEMA_FOR_FUNC_DECL, False): + declaration = load_memory_tool._get_declaration() + + assert declaration.name == 'load_memory' + assert declaration.parameters_json_schema is None + assert isinstance(declaration.parameters, types.Schema) + assert declaration.parameters.type == types.Type.OBJECT + assert 'query' in declaration.parameters.properties + + +def test_get_declaration_with_json_schema_feature_enabled(): + """Test that _get_declaration uses parameters_json_schema when feature is enabled.""" + with temporary_feature_override(FeatureName.JSON_SCHEMA_FOR_FUNC_DECL, True): + declaration = load_memory_tool._get_declaration() + + assert declaration.name == 'load_memory' + assert declaration.parameters is None + assert declaration.parameters_json_schema == { + 'type': 'object', + 'properties': { + 'query': {'type': 'string'}, + }, + 'required': ['query'], + } From 21f63f66ee424501d9a70806277463ef718ae843 Mon Sep 17 00:00:00 2001 From: Wiktoria Walczak Date: Tue, 20 Jan 2026 05:41:12 -0800 Subject: [PATCH 11/50] feat(cli): add `otel_to_cloud` flag to adk deploy agent_engine command Co-authored-by: Wiktoria Walczak PiperOrigin-RevId: 858546581 --- src/google/adk/cli/cli_deploy.py | 11 +++++++ src/google/adk/cli/cli_tools_click.py | 10 ++++++ .../cli/utils/test_cli_tools_click.py | 32 +++++++++++++++++++ 3 files changed, 53 insertions(+) diff --git a/src/google/adk/cli/cli_deploy.py b/src/google/adk/cli/cli_deploy.py index 781274fbfd3..19e4a9cccf0 100644 --- a/src/google/adk/cli/cli_deploy.py +++ b/src/google/adk/cli/cli_deploy.py @@ -689,6 +689,7 @@ def to_agent_engine( adk_app: str, staging_bucket: Optional[str] = None, trace_to_cloud: Optional[bool] = None, + otel_to_cloud: Optional[bool] = None, api_key: Optional[str] = None, adk_app_object: Optional[str] = None, agent_engine_id: Optional[str] = None, @@ -733,6 +734,8 @@ def to_agent_engine( staging_bucket (str): Deprecated. This argument is no longer required or used. trace_to_cloud (bool): Whether to enable Cloud Trace. + otel_to_cloud (bool): Whether to enable exporting OpenTelemetry signals + to Google Cloud. api_key (str): Optional. The API key to use for Express Mode. If not provided, the API key from the GOOGLE_API_KEY environment variable will be used. It will only be used if GOOGLE_GENAI_USE_VERTEXAI is true. @@ -910,6 +913,14 @@ def to_agent_engine( if 'GOOGLE_API_KEY' in env_vars: api_key = env_vars['GOOGLE_API_KEY'] click.echo(f'api_key set by GOOGLE_API_KEY in {env_file}') + if otel_to_cloud: + if 'GOOGLE_CLOUD_AGENT_ENGINE_ENABLE_TELEMETRY' in env_vars: + click.secho( + 'Ignoring GOOGLE_CLOUD_AGENT_ENGINE_ENABLE_TELEMETRY in .env' + ' as `--otel_to_cloud` was explicitly passed and takes precedence', + fg='yellow', + ) + env_vars['GOOGLE_CLOUD_AGENT_ENGINE_ENABLE_TELEMETRY'] = 'true' if env_vars: if 'env_vars' in agent_config: click.echo( diff --git a/src/google/adk/cli/cli_tools_click.py b/src/google/adk/cli/cli_tools_click.py index 0875f2523d4..c80115be8f9 100644 --- a/src/google/adk/cli/cli_tools_click.py +++ b/src/google/adk/cli/cli_tools_click.py @@ -1751,6 +1751,14 @@ def cli_migrate_session( default=None, help="Optional. Whether to enable Cloud Trace for Agent Engine.", ) +@click.option( + "--otel_to_cloud", + type=bool, + is_flag=True, + show_default=True, + default=None, + help="Optional. Whether to enable OpenTelemetry for Agent Engine.", +) @click.option( "--display_name", type=str, @@ -1842,6 +1850,7 @@ def cli_deploy_agent_engine( staging_bucket: Optional[str], agent_engine_id: Optional[str], trace_to_cloud: Optional[bool], + otel_to_cloud: Optional[bool], api_key: Optional[str], display_name: str, description: str, @@ -1872,6 +1881,7 @@ def cli_deploy_agent_engine( region=region, agent_engine_id=agent_engine_id, trace_to_cloud=trace_to_cloud, + otel_to_cloud=otel_to_cloud, api_key=api_key, adk_app_object=adk_app_object, display_name=display_name, diff --git a/tests/unittests/cli/utils/test_cli_tools_click.py b/tests/unittests/cli/utils/test_cli_tools_click.py index 316ffbb6af3..5fac32759c0 100644 --- a/tests/unittests/cli/utils/test_cli_tools_click.py +++ b/tests/unittests/cli/utils/test_cli_tools_click.py @@ -410,6 +410,38 @@ def test_cli_deploy_agent_engine_success( assert called_kwargs.get("region") == "us-central1" +# cli deploy agent_engine with --otel_to_cloud +def test_cli_deploy_agent_engine_otel_to_cloud_success( + tmp_path: Path, monkeypatch: pytest.MonkeyPatch +) -> None: + """Successful path should call cli_deploy.to_agent_engine with --otel_to_cloud.""" + rec = _Recorder() + monkeypatch.setattr(cli_tools_click.cli_deploy, "to_agent_engine", rec) + + agent_dir = tmp_path / "agent_ae" + agent_dir.mkdir() + runner = CliRunner() + result = runner.invoke( + cli_tools_click.main, + [ + "deploy", + "agent_engine", + "--project", + "test-proj", + "--region", + "us-central1", + "--otel_to_cloud", + str(agent_dir), + ], + ) + assert result.exit_code == 0 + assert rec.calls, "cli_deploy.to_agent_engine must be invoked" + called_kwargs = rec.calls[0][1] + assert called_kwargs.get("project") == "test-proj" + assert called_kwargs.get("region") == "us-central1" + assert called_kwargs.get("otel_to_cloud") + + # cli deploy gke def test_cli_deploy_gke_success( tmp_path: Path, monkeypatch: pytest.MonkeyPatch From 53b67ce6340f3f3f8c3d732f9f7811e445c76359 Mon Sep 17 00:00:00 2001 From: Xuan Yang Date: Tue, 20 Jan 2026 10:45:08 -0800 Subject: [PATCH 12/50] feat: Add `--disable_features` CLI option to ADK CLI This flag can be used to override default feature enable state. Co-authored-by: Xuan Yang PiperOrigin-RevId: 858659818 --- src/google/adk/cli/cli_tools_click.py | 62 +++++--- .../unittests/cli/test_cli_feature_options.py | 136 ++++++++++++++++-- .../test_cli_tools_click_option_mismatch.py | 14 +- 3 files changed, 179 insertions(+), 33 deletions(-) diff --git a/src/google/adk/cli/cli_tools_click.py b/src/google/adk/cli/cli_tools_click.py index c80115be8f9..a4b4418f556 100644 --- a/src/google/adk/cli/cli_tools_click.py +++ b/src/google/adk/cli/cli_tools_click.py @@ -50,28 +50,44 @@ ) -def _apply_feature_overrides(enable_features: tuple[str, ...]) -> None: +def _apply_feature_overrides( + *, + enable_features: tuple[str, ...] = (), + disable_features: tuple[str, ...] = (), +) -> None: """Apply feature overrides from CLI flags. Args: enable_features: Tuple of feature names to enable. + disable_features: Tuple of feature names to disable. """ + feature_overrides: dict[str, bool] = {} + for features_str in enable_features: for feature_name_str in features_str.split(","): feature_name_str = feature_name_str.strip() - if not feature_name_str: - continue - try: - feature_name = FeatureName(feature_name_str) - override_feature_enabled(feature_name, True) - except ValueError: - valid_names = ", ".join(f.value for f in FeatureName) - click.secho( - f"WARNING: Unknown feature name '{feature_name_str}'. " - f"Valid names are: {valid_names}", - fg="yellow", - err=True, - ) + if feature_name_str: + feature_overrides[feature_name_str] = True + + for features_str in disable_features: + for feature_name_str in features_str.split(","): + feature_name_str = feature_name_str.strip() + if feature_name_str: + feature_overrides[feature_name_str] = False + + # Apply all overrides + for feature_name_str, enabled in feature_overrides.items(): + try: + feature_name = FeatureName(feature_name_str) + override_feature_enabled(feature_name, enabled) + except ValueError: + valid_names = ", ".join(f.value for f in FeatureName) + click.secho( + f"WARNING: Unknown feature name '{feature_name_str}'. " + f"Valid names are: {valid_names}", + fg="yellow", + err=True, + ) def feature_options(): @@ -88,11 +104,25 @@ def decorator(func): ), multiple=True, ) + @click.option( + "--disable_features", + help=( + "Optional. Comma-separated list of feature names to disable. " + "This provides an alternative to environment variables for " + "disabling features. Example: " + "--disable_features=JSON_SCHEMA_FOR_FUNC_DECL,PROGRESSIVE_SSE_STREAMING" + ), + multiple=True, + ) @functools.wraps(func) def wrapper(*args, **kwargs): enable_features = kwargs.pop("enable_features", ()) - if enable_features: - _apply_feature_overrides(enable_features) + disable_features = kwargs.pop("disable_features", ()) + if enable_features or disable_features: + _apply_feature_overrides( + enable_features=enable_features, + disable_features=disable_features, + ) return func(*args, **kwargs) return wrapper diff --git a/tests/unittests/cli/test_cli_feature_options.py b/tests/unittests/cli/test_cli_feature_options.py index 70bfec2dda8..8a507f5c755 100644 --- a/tests/unittests/cli/test_cli_feature_options.py +++ b/tests/unittests/cli/test_cli_feature_options.py @@ -12,8 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""Unit tests for --enable_features CLI option.""" - from __future__ import annotations import click @@ -42,45 +40,96 @@ class TestApplyFeatureOverrides: def test_single_feature(self): """Single feature name is applied correctly.""" - _apply_feature_overrides(("JSON_SCHEMA_FOR_FUNC_DECL",)) + _apply_feature_overrides(enable_features=("JSON_SCHEMA_FOR_FUNC_DECL",)) assert is_feature_enabled(FeatureName.JSON_SCHEMA_FOR_FUNC_DECL) def test_comma_separated_features(self): """Comma-separated feature names are applied correctly.""" - _apply_feature_overrides(( - "JSON_SCHEMA_FOR_FUNC_DECL,PROGRESSIVE_SSE_STREAMING", - )) + _apply_feature_overrides( + enable_features=("JSON_SCHEMA_FOR_FUNC_DECL,PROGRESSIVE_SSE_STREAMING",) + ) assert is_feature_enabled(FeatureName.JSON_SCHEMA_FOR_FUNC_DECL) assert is_feature_enabled(FeatureName.PROGRESSIVE_SSE_STREAMING) def test_multiple_flag_values(self): """Multiple --enable_features flags are applied correctly.""" - _apply_feature_overrides(( - "JSON_SCHEMA_FOR_FUNC_DECL", - "PROGRESSIVE_SSE_STREAMING", - )) + _apply_feature_overrides( + enable_features=( + "JSON_SCHEMA_FOR_FUNC_DECL", + "PROGRESSIVE_SSE_STREAMING", + ) + ) assert is_feature_enabled(FeatureName.JSON_SCHEMA_FOR_FUNC_DECL) assert is_feature_enabled(FeatureName.PROGRESSIVE_SSE_STREAMING) def test_whitespace_handling(self): """Whitespace around feature names is stripped.""" - _apply_feature_overrides((" JSON_SCHEMA_FOR_FUNC_DECL , COMPUTER_USE ",)) + _apply_feature_overrides( + enable_features=(" JSON_SCHEMA_FOR_FUNC_DECL , COMPUTER_USE ",) + ) assert is_feature_enabled(FeatureName.JSON_SCHEMA_FOR_FUNC_DECL) assert is_feature_enabled(FeatureName.COMPUTER_USE) def test_empty_string_ignored(self): """Empty strings in the list are ignored.""" - _apply_feature_overrides(("",)) + _apply_feature_overrides(enable_features=("",)) # No error should be raised def test_unknown_feature_warns(self, capsys): """Unknown feature names emit a warning.""" - _apply_feature_overrides(("UNKNOWN_FEATURE_XYZ",)) + _apply_feature_overrides(enable_features=("UNKNOWN_FEATURE_XYZ",)) captured = capsys.readouterr() assert "WARNING" in captured.err assert "UNKNOWN_FEATURE_XYZ" in captured.err assert "Valid names are:" in captured.err + def test_single_disable_feature(self): + """Single feature name is disabled correctly.""" + # First enable a feature + _apply_feature_overrides(enable_features=("JSON_SCHEMA_FOR_FUNC_DECL",)) + assert is_feature_enabled(FeatureName.JSON_SCHEMA_FOR_FUNC_DECL) + + # Then disable it + _apply_feature_overrides(disable_features=("JSON_SCHEMA_FOR_FUNC_DECL",)) + assert not is_feature_enabled(FeatureName.JSON_SCHEMA_FOR_FUNC_DECL) + + def test_comma_separated_disable_features(self): + """Comma-separated feature names are disabled correctly.""" + # First enable features + _apply_feature_overrides( + enable_features=("JSON_SCHEMA_FOR_FUNC_DECL,PROGRESSIVE_SSE_STREAMING",) + ) + + # Then disable them + _apply_feature_overrides( + disable_features=( + "JSON_SCHEMA_FOR_FUNC_DECL,PROGRESSIVE_SSE_STREAMING", + ) + ) + assert not is_feature_enabled(FeatureName.JSON_SCHEMA_FOR_FUNC_DECL) + assert not is_feature_enabled(FeatureName.PROGRESSIVE_SSE_STREAMING) + + def test_disable_overrides_enable(self): + """Disable is applied after enable, so disable wins for same feature.""" + _apply_feature_overrides( + enable_features=("JSON_SCHEMA_FOR_FUNC_DECL",), + disable_features=("JSON_SCHEMA_FOR_FUNC_DECL",), + ) + # disable_features is processed after enable_features + assert not is_feature_enabled(FeatureName.JSON_SCHEMA_FOR_FUNC_DECL) + + def test_enable_and_disable_different_features(self): + """Enable and disable can be used together for different features.""" + # First enable a feature that we'll disable + _apply_feature_overrides(enable_features=("PROGRESSIVE_SSE_STREAMING",)) + + _apply_feature_overrides( + enable_features=("JSON_SCHEMA_FOR_FUNC_DECL",), + disable_features=("PROGRESSIVE_SSE_STREAMING",), + ) + assert is_feature_enabled(FeatureName.JSON_SCHEMA_FOR_FUNC_DECL) + assert not is_feature_enabled(FeatureName.PROGRESSIVE_SSE_STREAMING) + class TestFeatureOptionsDecorator: """Tests for feature_options decorator.""" @@ -195,3 +244,64 @@ def my_test_command(): "my_test_command" in my_test_command.name or my_test_command.callback.__name__ == "my_test_command" ) + + def test_decorator_adds_disable_features_option(self): + """Decorator adds --disable_features option to command.""" + + @click.command() + @feature_options() + def test_cmd(): + pass + + runner = CliRunner() + result = runner.invoke(test_cmd, ["--help"]) + assert "--disable_features" in result.output + + def test_disable_features_applied_before_command(self): + """Features are disabled before the command function runs.""" + # First enable the feature via override + _apply_feature_overrides(enable_features=("JSON_SCHEMA_FOR_FUNC_DECL",)) + + feature_was_disabled = [] + + @click.command() + @feature_options() + def test_cmd(): + feature_was_disabled.append( + not is_feature_enabled(FeatureName.JSON_SCHEMA_FOR_FUNC_DECL) + ) + + runner = CliRunner() + runner.invoke( + test_cmd, + ["--disable_features=JSON_SCHEMA_FOR_FUNC_DECL"], + catch_exceptions=False, + ) + assert feature_was_disabled == [True] + + def test_enable_and_disable_together(self): + """Both --enable_features and --disable_features work together.""" + feature_states = [] + + @click.command() + @feature_options() + def test_cmd(): + feature_states.append( + is_feature_enabled(FeatureName.JSON_SCHEMA_FOR_FUNC_DECL) + ) + feature_states.append( + is_feature_enabled(FeatureName.PROGRESSIVE_SSE_STREAMING) + ) + + runner = CliRunner() + runner.invoke( + test_cmd, + [ + "--enable_features=JSON_SCHEMA_FOR_FUNC_DECL", + "--disable_features=PROGRESSIVE_SSE_STREAMING", + ], + catch_exceptions=False, + ) + # JSON_SCHEMA_FOR_FUNC_DECL should be enabled + # PROGRESSIVE_SSE_STREAMING should be disabled + assert feature_states == [True, False] diff --git a/tests/unittests/cli/test_cli_tools_click_option_mismatch.py b/tests/unittests/cli/test_cli_tools_click_option_mismatch.py index 3c67e9ae39f..9b813453121 100644 --- a/tests/unittests/cli/test_cli_tools_click_option_mismatch.py +++ b/tests/unittests/cli/test_cli_tools_click_option_mismatch.py @@ -95,7 +95,10 @@ def test_adk_run(): assert run_command is not None, "Run command not found" _check_options_in_parameters( - run_command, cli_run.callback, "run", ignore_params={"enable_features"} + run_command, + cli_run.callback, + "run", + ignore_params={"enable_features", "disable_features"}, ) @@ -105,7 +108,10 @@ def test_adk_eval(): assert eval_command is not None, "Eval command not found" _check_options_in_parameters( - eval_command, cli_eval.callback, "eval", ignore_params={"enable_features"} + eval_command, + cli_eval.callback, + "eval", + ignore_params={"enable_features", "disable_features"}, ) @@ -118,7 +124,7 @@ def test_adk_web(): web_command, cli_web.callback, "web", - ignore_params={"verbose", "enable_features"}, + ignore_params={"verbose", "enable_features", "disable_features"}, ) @@ -131,7 +137,7 @@ def test_adk_api_server(): api_server_command, cli_api_server.callback, "api_server", - ignore_params={"verbose", "enable_features"}, + ignore_params={"verbose", "enable_features", "disable_features"}, ) From 5257869d91a77ebd1381538a85e7fdc3a600da90 Mon Sep 17 00:00:00 2001 From: George Weale Date: Tue, 20 Jan 2026 12:26:48 -0800 Subject: [PATCH 13/50] fix: Redact sensitive information from URIs in logs This change introduces a helper function `_redact_uri_for_log` to sanitize URIs before logging. It removes user credentials from the netloc and redacts the values of query parameters, ensuring that sensitive information like passwords is not exposed in log outputs. The function is applied to all log statements and error messages that include service URIs for session, memory, and artifact services Co-authored-by: George Weale PiperOrigin-RevId: 858703465 --- src/google/adk/cli/utils/service_factory.py | 64 ++++++++++-- .../cli/utils/test_service_factory.py | 97 +++++++++++++++++-- 2 files changed, 147 insertions(+), 14 deletions(-) diff --git a/src/google/adk/cli/utils/service_factory.py b/src/google/adk/cli/utils/service_factory.py index c03ac10b85d..d8903ece14e 100644 --- a/src/google/adk/cli/utils/service_factory.py +++ b/src/google/adk/cli/utils/service_factory.py @@ -19,6 +19,9 @@ from pathlib import Path from typing import Any from typing import Optional +from urllib.parse import parse_qsl +from urllib.parse import urlsplit +from urllib.parse import urlunsplit from ...artifacts.base_artifact_service import BaseArtifactService from ...memory.base_memory_service import BaseMemoryService @@ -42,6 +45,41 @@ _KUBERNETES_HOST_ENV = "KUBERNETES_SERVICE_HOST" +def _redact_uri_for_log(uri: str) -> str: + """Returns a safe-to-log representation of a URI. + + Redacts user info (username/password) and query parameter values. + """ + if not uri or not uri.strip(): + return "" + sanitized = uri.replace("\r", "\\r").replace("\n", "\\n") + if "://" not in sanitized: + return "" + try: + parsed = urlsplit(sanitized) + except ValueError: + return "" + + if not parsed.scheme: + return "" + + netloc = parsed.netloc + if "@" in netloc: + _, netloc = netloc.rsplit("@", 1) + + if parsed.query: + try: + redacted_pairs = parse_qsl(parsed.query, keep_blank_values=True) + except ValueError: + query = "" + else: + query = "&".join(f"{key}=" for key, _ in redacted_pairs) + else: + query = "" + + return urlunsplit((parsed.scheme, netloc, parsed.path, query, "")) + + def _is_cloud_run() -> bool: """Returns True when running in Cloud Run.""" return bool(os.environ.get(_CLOUD_RUN_SERVICE_ENV)) @@ -148,7 +186,10 @@ def create_session_service_from_options( kwargs.update(session_db_kwargs) if session_service_uri: - logger.info("Using session service URI: %s", session_service_uri) + logger.info( + "Using session service URI: %s", + _redact_uri_for_log(session_service_uri), + ) service = registry.create_session_service(session_service_uri, **kwargs) if service is not None: return service @@ -162,7 +203,7 @@ def create_session_service_from_options( fallback_kwargs.pop("agents_dir", None) logger.info( "Falling back to DatabaseSessionService for URI: %s", - session_service_uri, + _redact_uri_for_log(session_service_uri), ) return DatabaseSessionService(db_url=session_service_uri, **fallback_kwargs) @@ -208,13 +249,18 @@ def create_memory_service_from_options( registry = get_service_registry() if memory_service_uri: - logger.info("Using memory service URI: %s", memory_service_uri) + logger.info( + "Using memory service URI: %s", _redact_uri_for_log(memory_service_uri) + ) service = registry.create_memory_service( memory_service_uri, agents_dir=str(base_path), ) if service is None: - raise ValueError(f"Unsupported memory service URI: {memory_service_uri}") + raise ValueError( + "Unsupported memory service URI: %s" + % _redact_uri_for_log(memory_service_uri) + ) return service logger.info("Using in-memory memory service") @@ -235,7 +281,10 @@ def create_artifact_service_from_options( registry = get_service_registry() if artifact_service_uri: - logger.info("Using artifact service URI: %s", artifact_service_uri) + logger.info( + "Using artifact service URI: %s", + _redact_uri_for_log(artifact_service_uri), + ) service = registry.create_artifact_service( artifact_service_uri, agents_dir=str(base_path), @@ -243,11 +292,12 @@ def create_artifact_service_from_options( if service is None: if strict_uri: raise ValueError( - f"Unsupported artifact service URI: {artifact_service_uri}" + "Unsupported artifact service URI: %s" + % _redact_uri_for_log(artifact_service_uri) ) return _create_in_memory_artifact_service( "Unsupported artifact service URI: %s, falling back to in-memory", - artifact_service_uri, + _redact_uri_for_log(artifact_service_uri), ) return service diff --git a/tests/unittests/cli/utils/test_service_factory.py b/tests/unittests/cli/utils/test_service_factory.py index 87b567be738..ad9a2389855 100644 --- a/tests/unittests/cli/utils/test_service_factory.py +++ b/tests/unittests/cli/utils/test_service_factory.py @@ -16,12 +16,14 @@ from __future__ import annotations +import logging import os from pathlib import Path -from unittest.mock import Mock +from unittest import mock from google.adk.artifacts.file_artifact_service import FileArtifactService from google.adk.artifacts.in_memory_artifact_service import InMemoryArtifactService +from google.adk.cli.service_registry import ServiceRegistry from google.adk.cli.utils.local_storage import PerAgentDatabaseSessionService import google.adk.cli.utils.service_factory as service_factory from google.adk.memory.in_memory_memory_service import InMemoryMemoryService @@ -31,7 +33,7 @@ def test_create_session_service_uses_registry(tmp_path: Path, monkeypatch): - registry = Mock() + registry = mock.create_autospec(ServiceRegistry, instance=True, spec_set=True) expected = object() registry.create_session_service.return_value = expected monkeypatch.setattr(service_factory, "get_service_registry", lambda: registry) @@ -48,6 +50,87 @@ def test_create_session_service_uses_registry(tmp_path: Path, monkeypatch): ) +def test_create_session_service_logs_redacted_uri( + tmp_path: Path, + monkeypatch: pytest.MonkeyPatch, + caplog: pytest.LogCaptureFixture, +) -> None: + registry = mock.create_autospec(ServiceRegistry, instance=True, spec_set=True) + registry.create_session_service.return_value = object() + monkeypatch.setattr(service_factory, "get_service_registry", lambda: registry) + + session_service_uri = ( + "postgresql://user:supersecret@localhost:5432/dbname?sslmode=require" + ) + caplog.set_level(logging.INFO, logger=service_factory.logger.name) + + service_factory.create_session_service_from_options( + base_dir=tmp_path, + session_service_uri=session_service_uri, + ) + + assert "supersecret" not in caplog.text + assert "sslmode=require" not in caplog.text + assert "localhost:5432" in caplog.text + + +def test_redact_uri_for_log_removes_credentials_with_at_in_password() -> None: + uri = "postgresql://user:super@secret@localhost:5432/dbname" + + assert ( + service_factory._redact_uri_for_log(uri) + == "postgresql://localhost:5432/dbname" + ) + + +def test_redact_uri_for_log_preserves_host_when_no_credentials() -> None: + uri = "postgresql://localhost:5432/dbname?sslmode=require&password=secret" + + redacted = service_factory._redact_uri_for_log(uri) + + assert redacted.startswith("postgresql://localhost:5432/dbname?") + assert "require" not in redacted + assert "secret" not in redacted + assert "sslmode=" in redacted + assert "password=" in redacted + + +def test_redact_uri_for_log_redacts_when_parse_qsl_fails( + monkeypatch: pytest.MonkeyPatch, +) -> None: + def _raise_value_error(*_args, **_kwargs): + raise ValueError("bad query") + + monkeypatch.setattr(service_factory, "parse_qsl", _raise_value_error) + + uri = "postgresql://user:pass@localhost:5432/dbname?sslmode=require" + redacted = service_factory._redact_uri_for_log(uri) + + assert "pass" not in redacted + assert "require" not in redacted + assert redacted.endswith("?") + + +def test_redact_uri_for_log_escapes_crlf() -> None: + uri = ( + "postgresql://user:pass@localhost:5432/dbname\rINJECT\nINJECT" + "?sslmode=require" + ) + + redacted = service_factory._redact_uri_for_log(uri) + + assert "\r" not in redacted + assert "\n" not in redacted + assert "\\rINJECT\\nINJECT" in redacted + + +def test_redact_uri_for_log_returns_scheme_missing_without_separator() -> None: + assert ( + service_factory._redact_uri_for_log("user:pass@localhost:5432/dbname") + == "" + ) + + @pytest.mark.asyncio async def test_create_session_service_defaults_to_per_agent_sqlite( tmp_path: Path, @@ -88,7 +171,7 @@ async def test_create_session_service_respects_app_name_mapping( def test_create_session_service_fallbacks_to_database( tmp_path: Path, monkeypatch ): - registry = Mock() + registry = mock.create_autospec(ServiceRegistry, instance=True, spec_set=True) registry.create_session_service.return_value = None monkeypatch.setattr(service_factory, "get_service_registry", lambda: registry) @@ -109,7 +192,7 @@ def test_create_session_service_fallbacks_to_database( def test_create_artifact_service_uses_registry(tmp_path: Path, monkeypatch): - registry = Mock() + registry = mock.create_autospec(ServiceRegistry, instance=True, spec_set=True) expected = object() registry.create_artifact_service.return_value = expected monkeypatch.setattr(service_factory, "get_service_registry", lambda: registry) @@ -129,7 +212,7 @@ def test_create_artifact_service_uses_registry(tmp_path: Path, monkeypatch): def test_create_artifact_service_raises_on_unknown_scheme_when_strict( tmp_path: Path, monkeypatch ): - registry = Mock() + registry = mock.create_autospec(ServiceRegistry, instance=True, spec_set=True) registry.create_artifact_service.return_value = None monkeypatch.setattr(service_factory, "get_service_registry", lambda: registry) @@ -142,7 +225,7 @@ def test_create_artifact_service_raises_on_unknown_scheme_when_strict( def test_create_memory_service_uses_registry(tmp_path: Path, monkeypatch): - registry = Mock() + registry = mock.create_autospec(ServiceRegistry, instance=True, spec_set=True) expected = object() registry.create_memory_service.return_value = expected monkeypatch.setattr(service_factory, "get_service_registry", lambda: registry) @@ -170,7 +253,7 @@ def test_create_memory_service_defaults_to_in_memory(tmp_path: Path): def test_create_memory_service_raises_on_unknown_scheme( tmp_path: Path, monkeypatch ): - registry = Mock() + registry = mock.create_autospec(ServiceRegistry, instance=True, spec_set=True) registry.create_memory_service.return_value = None monkeypatch.setattr(service_factory, "get_service_registry", lambda: registry) From 135f7633253f6a415302142abc3579b664601d5b Mon Sep 17 00:00:00 2001 From: Lusha Wang Date: Tue, 20 Jan 2026 12:36:22 -0800 Subject: [PATCH 14/50] feat: Remove @experimental decorator from AgentEngineSandboxCodeExecutor Co-authored-by: Lusha Wang PiperOrigin-RevId: 858706929 --- .../adk/code_executors/agent_engine_sandbox_code_executor.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/google/adk/code_executors/agent_engine_sandbox_code_executor.py b/src/google/adk/code_executors/agent_engine_sandbox_code_executor.py index 2e3e978bc7b..bfe3497c860 100644 --- a/src/google/adk/code_executors/agent_engine_sandbox_code_executor.py +++ b/src/google/adk/code_executors/agent_engine_sandbox_code_executor.py @@ -23,7 +23,6 @@ from typing_extensions import override from ..agents.invocation_context import InvocationContext -from ..utils.feature_decorator import experimental from .base_code_executor import BaseCodeExecutor from .code_execution_utils import CodeExecutionInput from .code_execution_utils import CodeExecutionResult @@ -32,7 +31,6 @@ logger = logging.getLogger('google_adk.' + __name__) -@experimental class AgentEngineSandboxCodeExecutor(BaseCodeExecutor): """A code executor that uses Agent Engine Code Execution Sandbox to execute code. From 215c2f506e21a3d8c39551b80f6356943ecae320 Mon Sep 17 00:00:00 2001 From: George Weale Date: Tue, 20 Jan 2026 13:16:05 -0800 Subject: [PATCH 15/50] fix: Set LITELLM_MODE to PRODUCTION before importing LiteLLM LiteLLM defaults to DEV mode, which automatically loads environment variables from a local `.env` file. This change sets LITELLM_MODE to PRODUCTION to prevent LiteLLM from implicitly loading `.env` files when used within ADK. Co-authored-by: George Weale PiperOrigin-RevId: 858723362 --- src/google/adk/models/lite_llm.py | 120 ++++++++++++++---- tests/unittests/models/test_litellm_import.py | 108 ++++++++++++++++ 2 files changed, 205 insertions(+), 23 deletions(-) create mode 100644 tests/unittests/models/test_litellm_import.py diff --git a/src/google/adk/models/lite_llm.py b/src/google/adk/models/lite_llm.py index f6705c1de91..a7899e788de 100644 --- a/src/google/adk/models/lite_llm.py +++ b/src/google/adk/models/lite_llm.py @@ -16,6 +16,7 @@ import base64 import copy +import importlib.util import json import logging import mimetypes @@ -32,6 +33,7 @@ from typing import Literal from typing import Optional from typing import Tuple +from typing import TYPE_CHECKING from typing import TypedDict from typing import Union from urllib.parse import urlparse @@ -39,20 +41,12 @@ import warnings from google.genai import types -import litellm -from litellm import acompletion -from litellm import ChatCompletionAssistantMessage -from litellm import ChatCompletionAssistantToolCall -from litellm import ChatCompletionMessageToolCall -from litellm import ChatCompletionSystemMessage -from litellm import ChatCompletionToolMessage -from litellm import ChatCompletionUserMessage -from litellm import completion -from litellm import CustomStreamWrapper -from litellm import Function -from litellm import Message -from litellm import ModelResponse -from litellm import OpenAIMessageContent + +if not TYPE_CHECKING and importlib.util.find_spec("litellm") is None: + raise ImportError( + "LiteLLM support requires: pip install google-adk[extensions]" + ) + from pydantic import BaseModel from pydantic import Field from typing_extensions import override @@ -61,8 +55,36 @@ from .llm_request import LlmRequest from .llm_response import LlmResponse -# This will add functions to prompts if functions are provided. -litellm.add_function_to_prompt = True +if TYPE_CHECKING: + import litellm + from litellm import acompletion + from litellm import ChatCompletionAssistantMessage + from litellm import ChatCompletionAssistantToolCall + from litellm import ChatCompletionMessageToolCall + from litellm import ChatCompletionSystemMessage + from litellm import ChatCompletionToolMessage + from litellm import ChatCompletionUserMessage + from litellm import completion + from litellm import CustomStreamWrapper + from litellm import Function + from litellm import Message + from litellm import ModelResponse + from litellm import OpenAIMessageContent +else: + litellm = None + acompletion = None + ChatCompletionAssistantMessage = None + ChatCompletionAssistantToolCall = None + ChatCompletionMessageToolCall = None + ChatCompletionSystemMessage = None + ChatCompletionToolMessage = None + ChatCompletionUserMessage = None + completion = None + CustomStreamWrapper = None + Function = None + Message = None + ModelResponse = None + OpenAIMessageContent = None logger = logging.getLogger("google_adk." + __name__) @@ -109,6 +131,50 @@ "before a response was recorded)." ) +_LITELLM_IMPORTED = False +_LITELLM_GLOBAL_SYMBOLS = ( + "ChatCompletionAssistantMessage", + "ChatCompletionAssistantToolCall", + "ChatCompletionMessageToolCall", + "ChatCompletionSystemMessage", + "ChatCompletionToolMessage", + "ChatCompletionUserMessage", + "CustomStreamWrapper", + "Function", + "Message", + "ModelResponse", + "OpenAIMessageContent", + "acompletion", + "completion", +) + + +def _ensure_litellm_imported() -> None: + """Imports LiteLLM with safe defaults. + + LiteLLM defaults to DEV mode, which auto-loads a local `.env` at import time. + ADK should not implicitly load `.env` just because LiteLLM is installed. + + Users can opt into LiteLLM's default behavior by setting LITELLM_MODE=DEV. + """ + global _LITELLM_IMPORTED + if _LITELLM_IMPORTED: + return + + # https://github.com/BerriAI/litellm/blob/main/litellm/__init__.py#L80-L82 + os.environ.setdefault("LITELLM_MODE", "PRODUCTION") + + import litellm as litellm_module + + litellm_module.add_function_to_prompt = True + + globals()["litellm"] = litellm_module + for symbol in _LITELLM_GLOBAL_SYMBOLS: + globals()[symbol] = getattr(litellm_module, symbol) + + _redirect_litellm_loggers_to_stdout() + _LITELLM_IMPORTED = True + def _map_finish_reason( finish_reason: Any, @@ -344,6 +410,7 @@ async def acompletion( Returns: The model response as a message. """ + _ensure_litellm_imported() return await acompletion( model=model, @@ -367,6 +434,7 @@ def completion( Returns: The response from the model. """ + _ensure_litellm_imported() return completion( model=model, @@ -513,6 +581,7 @@ async def _content_to_message_param( Returns: A litellm Message, a list of litellm Messages. """ + _ensure_litellm_imported() tool_messages: list[Message] = [] non_tool_parts: list[types.Part] = [] @@ -622,6 +691,8 @@ def _ensure_tool_results(messages: List[Message]) -> List[Message]: if not messages: return messages + _ensure_litellm_imported() + healed_messages: List[Message] = [] pending_tool_call_ids: List[str] = [] @@ -691,6 +762,7 @@ async def _get_content( Returns: The litellm content. """ + _ensure_litellm_imported() parts_list = list(parts) if len(parts_list) == 1: @@ -925,6 +997,7 @@ def _build_tool_call_from_json_dict( candidate: Any, *, index: int ) -> Optional[ChatCompletionMessageToolCall]: """Creates a tool call object from JSON content embedded in text.""" + _ensure_litellm_imported() if not isinstance(candidate, dict): return None @@ -972,11 +1045,12 @@ def _parse_tool_calls_from_text( text_block: str, ) -> tuple[list[ChatCompletionMessageToolCall], Optional[str]]: """Extracts inline JSON tool calls from LiteLLM text responses.""" - tool_calls = [] if not text_block: return tool_calls, None + _ensure_litellm_imported() + remainder_segments = [] cursor = 0 text_length = len(text_block) @@ -1014,7 +1088,6 @@ def _split_message_content_and_tool_calls( message: Message, ) -> tuple[Optional[OpenAIMessageContent], list[ChatCompletionMessageToolCall]]: """Returns message content and tool calls, parsing inline JSON when needed.""" - existing_tool_calls = message.get("tool_calls") or [] normalized_tool_calls = ( list(existing_tool_calls) if existing_tool_calls else [] @@ -1180,6 +1253,7 @@ def _model_response_to_chunk( Yields: A tuple of text or function or usage metadata chunk and finish reason. """ + _ensure_litellm_imported() message = None if response.get("choices", None): @@ -1255,6 +1329,7 @@ def _model_response_to_generate_content_response( Returns: The LlmResponse. """ + _ensure_litellm_imported() message = None finish_reason = None @@ -1313,6 +1388,7 @@ def _message_to_generate_content_response( Returns: The LlmResponse. """ + _ensure_litellm_imported() parts: List[types.Part] = [] if not thought_parts: @@ -1440,6 +1516,8 @@ async def _get_completion_inputs( The litellm inputs (message list, tool dictionary, response format and generation params). """ + _ensure_litellm_imported() + # Determine provider for file handling provider = _get_provider_from_model(model) @@ -1665,11 +1743,6 @@ def _redirect_litellm_loggers_to_stdout() -> None: handler.stream = sys.stdout -# Redirect LiteLLM loggers to stdout immediately after import to ensure -# INFO-level logs are not incorrectly treated as errors in cloud environments. -_redirect_litellm_loggers_to_stdout() - - class LiteLlm(BaseLlm): """Wrapper around litellm. @@ -1732,6 +1805,7 @@ async def generate_content_async( Yields: LlmResponse: The model response. """ + _ensure_litellm_imported() self._maybe_append_user_content(llm_request) _append_fallback_user_content_if_missing(llm_request) diff --git a/tests/unittests/models/test_litellm_import.py b/tests/unittests/models/test_litellm_import.py new file mode 100644 index 00000000000..179dd4703e4 --- /dev/null +++ b/tests/unittests/models/test_litellm_import.py @@ -0,0 +1,108 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import importlib.util +import os +import subprocess +import sys + +import pytest + + +def _subprocess_env() -> dict[str, str]: + env = dict(os.environ) + src_path = os.path.join(os.getcwd(), "src") + pythonpath = env.get("PYTHONPATH", "") + env["PYTHONPATH"] = ( + f"{src_path}{os.pathsep}{pythonpath}" if pythonpath else src_path + ) + return env + + +def test_importing_models_does_not_import_litellm_or_set_mode(): + env = _subprocess_env() + env.pop("LITELLM_MODE", None) + + result = subprocess.run( + [ + sys.executable, + "-c", + ( + "import os, sys\n" + "import google.adk.models\n" + "print('litellm' in sys.modules)\n" + "print(os.environ.get('LITELLM_MODE'))\n" + ), + ], + check=True, + capture_output=True, + text=True, + env=env, + ) + stdout_lines = result.stdout.strip().splitlines() + assert stdout_lines == ["False", "None"] + + +def test_ensure_litellm_imported_defaults_to_production(): + if importlib.util.find_spec("litellm") is None: + pytest.skip("litellm is not installed") + + env = _subprocess_env() + env.pop("LITELLM_MODE", None) + + result = subprocess.run( + [ + sys.executable, + "-c", + ( + "import os\n" + "from google.adk.models.lite_llm import" + " _ensure_litellm_imported\n" + "_ensure_litellm_imported()\n" + "print(os.environ.get('LITELLM_MODE'))\n" + ), + ], + check=True, + capture_output=True, + text=True, + env=env, + ) + assert result.stdout.strip() == "PRODUCTION" + + +def test_ensure_litellm_imported_does_not_override(): + if importlib.util.find_spec("litellm") is None: + pytest.skip("litellm is not installed") + + env = _subprocess_env() + env["LITELLM_MODE"] = "DEV" + + result = subprocess.run( + [ + sys.executable, + "-c", + ( + "import os\n" + "from google.adk.models.lite_llm import" + " _ensure_litellm_imported\n" + "_ensure_litellm_imported()\n" + "print(os.environ.get('LITELLM_MODE'))\n" + ), + ], + check=True, + capture_output=True, + text=True, + env=env, + ) + assert result.stdout.strip() == "DEV" From 7955177fb28b8e5dc19aae8be94015a7b5d9882a Mon Sep 17 00:00:00 2001 From: George Weale Date: Tue, 20 Jan 2026 13:28:23 -0800 Subject: [PATCH 16/50] fix: Update dependency versions in pyproject.toml Bump authlib to >=1.6.6 and mcp to >=1.23.0. Co-authored-by: George Weale PiperOrigin-RevId: 858728187 --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1af967046fd..ad1da6fff1b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ dependencies = [ "PyYAML>=6.0.2, <7.0.0", # For APIHubToolset. "aiosqlite>=0.21.0", # For SQLite database "anyio>=4.9.0, <5.0.0", # For MCP Session Manager - "authlib>=1.5.1, <2.0.0", # For RestAPI Tool + "authlib>=1.6.6, <2.0.0", # For RestAPI Tool "click>=8.1.8, <9.0.0", # For CLI tools "fastapi>=0.115.0, <0.124.0", # FastAPI framework "google-api-python-client>=2.157.0, <3.0.0", # Google API client discovery @@ -46,7 +46,7 @@ dependencies = [ "google-genai>=1.56.0, <2.0.0", # Google GenAI SDK "graphviz>=0.20.2, <1.0.0", # Graphviz for graph rendering "jsonschema>=4.23.0, <5.0.0", # Agent Builder config validation - "mcp>=1.10.0, <2.0.0", # For MCP Toolset + "mcp>=1.23.0, <2.0.0", # For MCP Toolset "opentelemetry-api>=1.37.0, <=1.37.0", # OpenTelemetry - limit upper version for sdk and api to not risk breaking changes from unstable _logs package. "opentelemetry-exporter-gcp-logging>=1.9.0a0, <2.0.0", "opentelemetry-exporter-gcp-monitoring>=1.9.0a0, <2.0.0", From a8f2ddd943301bbf53f49b3a23300ece45803cc0 Mon Sep 17 00:00:00 2001 From: Didier Durand <2927957+didier-durand@users.noreply.github.com> Date: Tue, 20 Jan 2026 14:20:27 -0800 Subject: [PATCH 17/50] chore: fixing various typos Merge https://github.com/google/adk-python/pull/4175 ### Link to Issue or Description of Change **1. Link to an existing issue (if applicable):** N/A: just fixing typos discovered while reading the repo **2. Or, if no issue exists, describe the change:** No code change, just typo fixes: see commit diffs for all details **Problem:** Trying to improve overall repo quality **Solution:** Fixing typos as they get discovered ### Testing Plan N/A **Unit Tests:** N/A **Manual End-to-End (E2E) Tests:** N/A ### Checklist - [X] I have read the [CONTRIBUTING.md](https://github.com/google/adk-python/blob/main/CONTRIBUTING.md) document. - [X] I have performed a self-review of my own code. - [ ] I have commented my code, particularly in hard-to-understand areas. - [ ] I have added tests that prove my fix is effective or that my feature works. - [X] New and existing unit tests pass locally with my changes. - [ ] I have manually tested my changes end-to-end. - [ ] Any dependent changes have been merged and published in downstream modules. COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/4175 from didier-durand:fix-typos-c 16e93ed2d9bc153fa0332ab1ae39633fcc5056e9 PiperOrigin-RevId: 858751240 --- AGENTS.md | 2 +- CHANGELOG.md | 4 ++-- contributing/samples/bigquery_mcp/README.md | 2 +- .../samples/context_offloading_with_artifact/README.md | 2 +- contributing/samples/mcp_stdio_notion_agent/README.md | 2 +- contributing/samples/oauth_calendar_agent/README.md | 2 +- src/google/adk/apps/app.py | 2 +- src/google/adk/cli/adk_web_server.py | 2 +- src/google/adk/flows/llm_flows/base_llm_flow.py | 6 +++--- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 95ea8ff2638..3e8b3543e8f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -24,7 +24,7 @@ agentic architectures that range from simple tasks to complex workflows. interacts with various services like session management, artifact storage, and memory, and integrates with application-wide plugins. The runner provides different execution modes: `run_async` for asynchronous execution - in production, `run_live` for bi-directional streaming interaction, and + in production, `run_live` for bidirectional streaming interaction, and `run` for synchronous execution suitable for local testing and debugging. At the end of each invocation, it can perform event compaction to manage session history size. diff --git a/CHANGELOG.md b/CHANGELOG.md index fada470bb0c..b17c9f351ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -531,7 +531,7 @@ * Set `max_output_tokens` for the agent builder ([2e2d61b](https://github.com/google/adk-python/commit/2e2d61b6fecb90cd474d6f51255678ff74b67a9b)) * Set default response modality to AUDIO in run_session ([68402bd](https://github.com/google/adk-python/commit/68402bda49083f2d56f8e8488fe13aa58b3bc18c)) * Update remote_a2a_agent to better handle streaming events and avoid duplicate responses ([8e5f361](https://github.com/google/adk-python/commit/8e5f36126498f751171bb2639c7f5a9e7dca2558)) -* Update the load_artifacts tool so that the model can reliably call it for follow up questions about the same artifact ([238472d](https://github.com/google/adk-python/commit/238472d083b5aa67551bde733fc47826ff062679)) +* Update the load_artifacts tool so that the model can reliably call it for follow-up questions about the same artifact ([238472d](https://github.com/google/adk-python/commit/238472d083b5aa67551bde733fc47826ff062679)) * Fix VertexAiSessionService base_url override to preserve initialized http_options ([8110e41](https://github.com/google/adk-python/commit/8110e41b36cceddb8b92ba17cffaacf701706b36), [c51ea0b](https://github.com/google/adk-python/commit/c51ea0b52e63de8e43d3dccb24f9d20987784aa5)) * Handle `App` instances returned by `agent_loader.load_agent` ([847df16](https://github.com/google/adk-python/commit/847df1638cbf1686aa43e8e094121d4e23e40245)) @@ -698,7 +698,7 @@ * AgentTool returns last content, instead of the content in the last event [bcf0dda](https://github.com/google/adk-python/commit/bcf0dda8bcc221974098f3077007c9e84c63021a) * Fix adk deploy docker file permission [ad81aa5](https://github.com/google/adk-python/commit/ad81aa54de1f38df580915b7f47834ea8e5f1004) * Updating BaseAgent.clone() and LlmAgent.clone() to properly clone fields that are lists [29bb75f](https://github.com/google/adk-python/commit/29bb75f975fe0c9c9d9a7e534a9c20158e1cbe1e) -* Make tool description for bigquery `execute_sql` for various write modes self contained [167182b](https://github.com/google/adk-python/commit/167182be0163117f814c70f453d5b2e19bf474df) +* Make tool description for bigquery `execute_sql` for various write modes self-contained [167182b](https://github.com/google/adk-python/commit/167182be0163117f814c70f453d5b2e19bf474df) * Set invocation_id and branch for event generated when both output_schema and tools are used [3f3aa7b](https://github.com/google/adk-python/commit/3f3aa7b32d63cae5750d71bc586c088427c979ea) * Rework parallel_agent.py to always aclose async generators [826f554](https://github.com/google/adk-python/commit/826f5547890dc02e707be33a3d6a58b527dac223) * Add table metadata info into Spanner tool `get_table_schema` and fix the key usage info [81a53b5](https://github.com/google/adk-python/commit/81a53b53d6336011187a50ae8f1544de9b2764a8) diff --git a/contributing/samples/bigquery_mcp/README.md b/contributing/samples/bigquery_mcp/README.md index bce19976caa..31fdb598956 100644 --- a/contributing/samples/bigquery_mcp/README.md +++ b/contributing/samples/bigquery_mcp/README.md @@ -4,7 +4,7 @@ This sample agent demonstrates using ADK's `McpToolset` to interact with BigQuery's official MCP endpoint, allowing an agent to access and execute -toole by leveraging the Model Context Protocol (MCP). These tools include: +tools by leveraging the Model Context Protocol (MCP). These tools include: 1. `list_dataset_ids` diff --git a/contributing/samples/context_offloading_with_artifact/README.md b/contributing/samples/context_offloading_with_artifact/README.md index 93f391107ed..741552bc33c 100644 --- a/contributing/samples/context_offloading_with_artifact/README.md +++ b/contributing/samples/context_offloading_with_artifact/README.md @@ -32,7 +32,7 @@ response. This keeps the turn events small, saving context space. the *next* request to the LLM. This makes the report data available immediately, allowing the agent to summarize it or answer questions in the same turn, as seen in the logs. This artifact is only appended for that - round and not saved to session. For furtuer rounds of conversation, it will + round and not saved to session. For future rounds of conversation, it will be removed from context. 3. **Loading on Demand**: The `CustomLoadArtifactsTool` enhances the default `load_artifacts` behavior. diff --git a/contributing/samples/mcp_stdio_notion_agent/README.md b/contributing/samples/mcp_stdio_notion_agent/README.md index d40df313f28..9d8a8922f20 100644 --- a/contributing/samples/mcp_stdio_notion_agent/README.md +++ b/contributing/samples/mcp_stdio_notion_agent/README.md @@ -1,6 +1,6 @@ # Notion MCP Agent -This is an agent that is using Notion MCP tool to call Notion API. And it demonstrate how to pass in the Notion API key. +This is an agent that is using Notion MCP tool to call Notion API. And it demonstrates how to pass in the Notion API key. Follow below instruction to use it: diff --git a/contributing/samples/oauth_calendar_agent/README.md b/contributing/samples/oauth_calendar_agent/README.md index 381bb7902b2..1a580ec8ff9 100644 --- a/contributing/samples/oauth_calendar_agent/README.md +++ b/contributing/samples/oauth_calendar_agent/README.md @@ -7,7 +7,7 @@ This sample tests and demos the OAuth support in ADK via two tools: * 1. list_calendar_events This is a customized tool that calls Google Calendar API to list calendar - events. It pass in the client id and client secrete to ADK and then get back + events. It passes in the client id and client secret to ADK and then get back the access token from ADK. And then it uses the access token to call calendar api. diff --git a/src/google/adk/apps/app.py b/src/google/adk/apps/app.py index 5382eb5a059..5b0194e5772 100644 --- a/src/google/adk/apps/app.py +++ b/src/google/adk/apps/app.py @@ -43,7 +43,7 @@ class ResumabilityConfig(BaseModel): """The config of the resumability for an application. The "resumability" in ADK refers to the ability to: - 1. pause an invocation upon a long running function call. + 1. pause an invocation upon a long-running function call. 2. resume an invocation from the last event, if it's paused or failed midway through. diff --git a/src/google/adk/cli/adk_web_server.py b/src/google/adk/cli/adk_web_server.py index 752af89c344..5230e9c83b8 100644 --- a/src/google/adk/cli/adk_web_server.py +++ b/src/google/adk/cli/adk_web_server.py @@ -205,7 +205,7 @@ class RunAgentRequest(common.BaseModel): new_message: types.Content streaming: bool = False state_delta: Optional[dict[str, Any]] = None - # for resume long running functions + # for resume long-running functions invocation_id: Optional[str] = None diff --git a/src/google/adk/flows/llm_flows/base_llm_flow.py b/src/google/adk/flows/llm_flows/base_llm_flow.py index 91b57cb873b..6d9bdc5788a 100644 --- a/src/google/adk/flows/llm_flows/base_llm_flow.py +++ b/src/google/adk/flows/llm_flows/base_llm_flow.py @@ -73,7 +73,7 @@ class BaseLlmFlow(ABC): """A basic flow that calls the LLM in a loop until a final response is generated. - This flow ends when it transfer to another agent. + This flow ends when it transfers to another agent. """ def __init__(self): @@ -393,8 +393,8 @@ async def _run_one_step_async( current_invocation=True, current_branch=True ) - # Long running tool calls should have been handled before this point. - # If there are still long running tool calls, it means the agent is paused + # Long-running tool calls should have been handled before this point. + # If there are still long-running tool calls, it means the agent is paused # before, and its branch hasn't been resumed yet. if ( invocation_context.is_resumable From 2367901ec54824984d9f0ef9aee711a6edbcb990 Mon Sep 17 00:00:00 2001 From: George Weale Date: Tue, 20 Jan 2026 14:49:43 -0800 Subject: [PATCH 18/50] chore: Upgrade to headers to 2026 Co-authored-by: George Weale PiperOrigin-RevId: 858763407 --- .github/workflows/check-file-contents.yml | 2 +- .github/workflows/isort.yml | 2 +- .github/workflows/pyink.yml | 2 +- .github/workflows/python-unit-tests.yml | 2 +- .github/workflows/stale-bot.yml | 2 +- AGENTS.md | 2 +- autoformat.sh | 2 +- contributing/samples/a2a_auth/__init__.py | 2 +- contributing/samples/a2a_auth/agent.py | 2 +- .../remote_a2a/bigquery_agent/__init__.py | 2 +- .../remote_a2a/bigquery_agent/agent.py | 2 +- contributing/samples/a2a_basic/__init__.py | 2 +- contributing/samples/a2a_basic/agent.py | 2 +- .../remote_a2a/check_prime_agent/__init__.py | 2 +- .../remote_a2a/check_prime_agent/agent.py | 2 +- .../samples/a2a_human_in_loop/__init__.py | 2 +- .../samples/a2a_human_in_loop/agent.py | 2 +- .../remote_a2a/human_in_loop/__init__.py | 2 +- .../remote_a2a/human_in_loop/agent.py | 2 +- contributing/samples/a2a_root/agent.py | 2 +- .../remote_a2a/hello_world/__init__.py | 2 +- .../a2a_root/remote_a2a/hello_world/agent.py | 2 +- .../samples/adk_answering_agent/__init__.py | 2 +- .../samples/adk_answering_agent/agent.py | 2 +- .../gemini_assistant/__init__.py | 2 +- .../gemini_assistant/agent.py | 2 +- .../samples/adk_answering_agent/main.py | 2 +- .../samples/adk_answering_agent/settings.py | 2 +- .../samples/adk_answering_agent/tools.py | 2 +- .../upload_docs_to_vertex_ai_search.py | 2 +- .../samples/adk_answering_agent/utils.py | 2 +- .../samples/adk_documentation/__init__.py | 2 +- .../adk_docs_updater/__init__.py | 2 +- .../adk_docs_updater/agent.py | 2 +- .../adk_docs_updater/main.py | 2 +- .../adk_release_analyzer/__init__.py | 2 +- .../adk_release_analyzer/agent.py | 2 +- .../adk_release_analyzer/main.py | 2 +- .../samples/adk_documentation/settings.py | 2 +- .../samples/adk_documentation/tools.py | 2 +- .../samples/adk_documentation/utils.py | 2 +- .../adk_issue_formatting_agent/__init__.py | 2 +- .../adk_issue_formatting_agent/agent.py | 2 +- .../adk_issue_formatting_agent/settings.py | 2 +- .../adk_issue_formatting_agent/utils.py | 2 +- .../samples/adk_knowledge_agent/__init__.py | 2 +- .../samples/adk_knowledge_agent/agent.py | 2 +- contributing/samples/adk_pr_agent/__init__.py | 2 +- contributing/samples/adk_pr_agent/agent.py | 2 +- contributing/samples/adk_pr_agent/main.py | 2 +- .../samples/adk_pr_triaging_agent/__init__.py | 2 +- .../samples/adk_pr_triaging_agent/agent.py | 2 +- .../samples/adk_pr_triaging_agent/main.py | 2 +- .../samples/adk_pr_triaging_agent/settings.py | 2 +- .../samples/adk_pr_triaging_agent/utils.py | 2 +- .../samples/adk_stale_agent/__init__.py | 2 +- contributing/samples/adk_stale_agent/agent.py | 2 +- contributing/samples/adk_stale_agent/main.py | 2 +- .../samples/adk_stale_agent/settings.py | 2 +- contributing/samples/adk_stale_agent/utils.py | 2 +- .../samples/adk_triaging_agent/__init__.py | 2 +- .../samples/adk_triaging_agent/agent.py | 2 +- .../samples/adk_triaging_agent/main.py | 2 +- .../samples/adk_triaging_agent/settings.py | 2 +- .../samples/adk_triaging_agent/utils.py | 2 +- .../agent_engine_code_execution/__init__.py | 2 +- .../agent_engine_code_execution/agent.py | 2 +- .../samples/api_registry_agent/__init__.py | 2 +- .../samples/api_registry_agent/agent.py | 2 +- .../application_integration_agent/__init__.py | 2 +- .../application_integration_agent/agent.py | 2 +- .../samples/artifact_save_text/__init__.py | 2 +- .../samples/artifact_save_text/agent.py | 2 +- .../agent_openapi_tools/__init__.py | 2 +- .../adk_agents/agent_openapi_tools/agent.py | 2 +- .../hotel_booker_app/hotelbooker_core.py | 2 +- .../hotel_booker_app/main.py | 2 +- .../samples/authn-adk-all-in-one/idp/app.py | 2 +- contributing/samples/bigquery/__init__.py | 2 +- contributing/samples/bigquery/agent.py | 2 +- contributing/samples/bigtable/__init__.py | 2 +- contributing/samples/bigtable/agent.py | 2 +- .../samples/built_in_multi_tools/__init__.py | 2 +- .../samples/built_in_multi_tools/agent.py | 2 +- .../samples/cache_analysis/__init__.py | 2 +- contributing/samples/cache_analysis/agent.py | 2 +- .../cache_analysis/run_cache_experiments.py | 2 +- contributing/samples/cache_analysis/utils.py | 2 +- contributing/samples/callbacks/__init__.py | 2 +- contributing/samples/callbacks/agent.py | 2 +- contributing/samples/callbacks/main.py | 2 +- .../samples/code_execution/__init__.py | 2 +- contributing/samples/code_execution/agent.py | 2 +- .../code_execution/gke_sandbox_agent.py | 2 +- contributing/samples/computer_use/agent.py | 2 +- .../samples/computer_use/playwright.py | 2 +- .../__init__.py | 2 +- .../context_offloading_with_artifact/agent.py | 2 +- .../samples/core_callback_config/__init__.py | 2 +- .../core_custom_agent_config/__init__.py | 2 +- .../core_custom_agent_config/my_agents.py | 2 +- .../samples/crewai_tool_kwargs/__init__.py | 2 +- .../samples/crewai_tool_kwargs/agent.py | 2 +- .../samples/crewai_tool_kwargs/main.py | 2 +- .../samples/custom_code_execution/__init__.py | 2 +- .../samples/custom_code_execution/agent.py | 2 +- contributing/samples/dummy_services.py | 2 +- .../samples/fields_output_schema/__init__.py | 2 +- .../samples/fields_output_schema/agent.py | 2 +- .../samples/fields_planner/__init__.py | 2 +- contributing/samples/fields_planner/agent.py | 2 +- contributing/samples/fields_planner/main.py | 2 +- .../samples/generate_image/__init__.py | 2 +- contributing/samples/generate_image/agent.py | 10 ++--- contributing/samples/gepa/__init__.py | 2 +- contributing/samples/gepa/adk_agent.py | 2 +- contributing/samples/gepa/adk_agent_test.py | 2 +- contributing/samples/gepa/experiment.py | 2 +- contributing/samples/gepa/rater_lib.py | 2 +- contributing/samples/gepa/run_experiment.py | 2 +- contributing/samples/gepa/tau_bench_agent.py | 2 +- contributing/samples/gepa/utils.py | 2 +- .../samples/gepa/voter_agent/gepa.ipynb | 2 +- .../samples/gepa/voter_agent/tools.py | 2 +- contributing/samples/google_api/__init__.py | 2 +- contributing/samples/google_api/agent.py | 2 +- .../samples/google_search_agent/__init__.py | 2 +- .../samples/google_search_agent/agent.py | 2 +- contributing/samples/hello_world/__init__.py | 2 +- contributing/samples/hello_world/agent.py | 2 +- contributing/samples/hello_world/main.py | 2 +- .../samples/hello_world_anthropic/__init__.py | 2 +- .../samples/hello_world_anthropic/agent.py | 2 +- .../samples/hello_world_anthropic/main.py | 2 +- .../samples/hello_world_apigeellm/agent.py | 2 +- .../samples/hello_world_apigeellm/main.py | 2 +- .../samples/hello_world_app/__init__.py | 2 +- contributing/samples/hello_world_app/agent.py | 2 +- contributing/samples/hello_world_app/main.py | 2 +- .../samples/hello_world_gemma/__init__.py | 2 +- .../samples/hello_world_gemma/agent.py | 2 +- .../samples/hello_world_gemma/main.py | 2 +- .../hello_world_gemma3_ollama/__init__.py | 2 +- .../hello_world_gemma3_ollama/agent.py | 2 +- .../samples/hello_world_gemma3_ollama/main.py | 2 +- .../samples/hello_world_litellm/__init__.py | 2 +- .../samples/hello_world_litellm/agent.py | 2 +- .../samples/hello_world_litellm/main.py | 2 +- .../__init__.py | 2 +- .../agent.py | 2 +- .../main.py | 2 +- .../samples/hello_world_ma/__init__.py | 2 +- contributing/samples/hello_world_ma/agent.py | 2 +- .../samples/hello_world_ollama/__init__.py | 2 +- .../samples/hello_world_ollama/agent.py | 2 +- .../samples/hello_world_ollama/main.py | 2 +- .../hello_world_stream_fc_args/__init__.py | 2 +- .../hello_world_stream_fc_args/agent.py | 2 +- .../samples/history_management/__init__.py | 2 +- .../samples/history_management/agent.py | 2 +- .../samples/history_management/main.py | 2 +- .../samples/human_in_loop/__init__.py | 2 +- contributing/samples/human_in_loop/agent.py | 2 +- contributing/samples/human_in_loop/main.py | 2 +- .../human_tool_confirmation/__init__.py | 2 +- .../samples/human_tool_confirmation/agent.py | 2 +- .../__init__.py | 2 +- .../integration_connector_euc_agent/agent.py | 2 +- .../samples/interactions_api/__init__.py | 2 +- .../samples/interactions_api/agent.py | 2 +- contributing/samples/interactions_api/main.py | 2 +- contributing/samples/jira_agent/__init__.py | 2 +- contributing/samples/jira_agent/agent.py | 2 +- contributing/samples/jira_agent/tools.py | 2 +- .../samples/json_passing_agent/__init__.py | 2 +- .../samples/json_passing_agent/agent.py | 2 +- .../samples/json_passing_agent/main.py | 2 +- .../__init__.py | 2 +- .../langchain_structured_tool_agent/agent.py | 2 +- .../__init__.py | 2 +- .../langchain_youtube_search_agent/agent.py | 2 +- .../litellm_inline_tool_call/__init__.py | 2 +- .../samples/litellm_inline_tool_call/agent.py | 2 +- .../litellm_structured_output/__init__.py | 2 +- .../litellm_structured_output/agent.py | 2 +- .../litellm_with_fallback_models/__init__.py | 2 +- .../litellm_with_fallback_models/agent.py | 2 +- .../live_agent_example.py | 2 +- .../live_bidi_debug_utils/pcm_audio_player.py | 2 +- .../__init__.py | 2 +- .../live_bidi_streaming_multi_agent/agent.py | 2 +- .../__init__.py | 2 +- .../live_bidi_streaming_single_agent/agent.py | 2 +- .../__init__.py | 2 +- .../live_bidi_streaming_tools_agent/agent.py | 4 +- .../live_tool_callbacks_agent/__init__.py | 2 +- .../live_tool_callbacks_agent/agent.py | 2 +- contributing/samples/logprobs/__init__.py | 2 +- contributing/samples/logprobs/agent.py | 2 +- .../samples/manual_ollama_test/__init__.py | 2 +- .../samples/manual_ollama_test/agent.py | 2 +- .../mcp_dynamic_header_agent/__init__.py | 2 +- .../samples/mcp_dynamic_header_agent/agent.py | 2 +- .../mcp_dynamic_header_agent/header_server.py | 2 +- .../mcp_in_agent_tool_remote/__init__.py | 2 +- .../samples/mcp_in_agent_tool_remote/agent.py | 2 +- .../mcp_in_agent_tool_stdio/__init__.py | 2 +- .../samples/mcp_in_agent_tool_stdio/agent.py | 2 +- .../samples/mcp_postgres_agent/__init__.py | 2 +- .../samples/mcp_postgres_agent/agent.py | 2 +- .../mcp_server_side_sampling/__init__.py | 2 +- .../samples/mcp_server_side_sampling/agent.py | 2 +- .../mcp_server_side_sampling/mcp_server.py | 2 +- .../mcp_service_account_agent/__init__.py | 2 +- .../mcp_service_account_agent/agent.py | 2 +- .../samples/mcp_sse_agent/__init__.py | 2 +- contributing/samples/mcp_sse_agent/agent.py | 2 +- .../mcp_sse_agent/filesystem_server.py | 2 +- .../mcp_stdio_notion_agent/__init__.py | 2 +- .../samples/mcp_stdio_notion_agent/agent.py | 2 +- .../mcp_stdio_server_agent/__init__.py | 2 +- .../samples/mcp_stdio_server_agent/agent.py | 2 +- .../mcp_streamablehttp_agent/__init__.py | 2 +- .../samples/mcp_streamablehttp_agent/agent.py | 2 +- .../filesystem_server.py | 2 +- contributing/samples/memory/__init__.py | 2 +- contributing/samples/memory/agent.py | 2 +- contributing/samples/memory/main.py | 2 +- .../samples/migrate_session_db/__init__.py | 2 +- .../samples/migrate_session_db/agent.py | 2 +- .../samples/migrate_session_db/main.py | 2 +- .../sample-output/alembic/env.py | 2 +- .../multimodal_tool_results/__init__.py | 2 +- .../samples/multimodal_tool_results/agent.py | 2 +- .../samples/non_llm_sequential/__init__.py | 2 +- .../samples/non_llm_sequential/agent.py | 2 +- .../oauth2_client_credentials/__init__.py | 2 +- .../oauth2_client_credentials/agent.py | 2 +- .../samples/oauth2_client_credentials/main.py | 2 +- .../oauth2_test_server.py | 2 +- .../samples/oauth_calendar_agent/__init__.py | 2 +- .../samples/oauth_calendar_agent/agent.py | 2 +- .../output_schema_with_tools/__init__.py | 2 +- .../samples/output_schema_with_tools/agent.py | 2 +- .../samples/parallel_functions/__init__.py | 2 +- .../samples/parallel_functions/agent.py | 2 +- contributing/samples/plugin_basic/__init__.py | 2 +- .../samples/plugin_basic/count_plugin.py | 2 +- contributing/samples/plugin_basic/main.py | 2 +- .../basic/__init__.py | 2 +- .../plugin_reflect_tool_retry/basic/agent.py | 2 +- .../hallucinating_func_name/__init__.py | 2 +- .../hallucinating_func_name/agent.py | 2 +- contributing/samples/pubsub/__init__.py | 2 +- contributing/samples/pubsub/agent.py | 2 +- .../samples/pydantic_argument/__init__.py | 2 +- .../samples/pydantic_argument/agent.py | 2 +- .../samples/pydantic_argument/main.py | 2 +- contributing/samples/quickstart/__init__.py | 2 +- contributing/samples/quickstart/agent.py | 2 +- contributing/samples/rag_agent/__init__.py | 2 +- contributing/samples/rag_agent/agent.py | 2 +- .../samples/rewind_session/__init__.py | 2 +- contributing/samples/rewind_session/agent.py | 2 +- contributing/samples/rewind_session/main.py | 2 +- .../samples/runner_debug_example/__init__.py | 2 +- .../samples/runner_debug_example/agent.py | 2 +- .../samples/runner_debug_example/main.py | 2 +- contributing/samples/services.py | 2 +- .../samples/session_state_agent/__init__.py | 2 +- .../samples/session_state_agent/agent.py | 2 +- .../simple_sequential_agent/__init__.py | 2 +- .../samples/simple_sequential_agent/agent.py | 2 +- contributing/samples/spanner/__init__.py | 2 +- contributing/samples/spanner/agent.py | 2 +- .../samples/spanner_rag_agent/__init__.py | 2 +- .../samples/spanner_rag_agent/agent.py | 2 +- .../samples/static_instruction/__init__.py | 2 +- .../samples/static_instruction/agent.py | 2 +- .../samples/static_instruction/main.py | 2 +- .../static_non_text_content/__init__.py | 2 +- .../samples/static_non_text_content/agent.py | 2 +- .../samples/static_non_text_content/main.py | 2 +- .../samples/sub_agents_config/__init__.py | 2 +- .../samples/sub_agents_config/life_agent.py | 2 +- contributing/samples/telemetry/agent.py | 2 +- contributing/samples/telemetry/main.py | 2 +- contributing/samples/token_usage/__init__.py | 2 +- contributing/samples/token_usage/agent.py | 2 +- contributing/samples/token_usage/main.py | 2 +- .../samples/tool_functions_config/__init__.py | 2 +- .../samples/tool_functions_config/tools.py | 2 +- .../tool_human_in_the_loop_config/__init__.py | 2 +- .../tool_human_in_the_loop_config/tools.py | 2 +- .../samples/toolbox_agent/__init__.py | 2 +- contributing/samples/toolbox_agent/agent.py | 2 +- contributing/samples/toolbox_agent/tools.yaml | 2 +- .../samples/vertex_code_execution/__init__.py | 2 +- .../samples/vertex_code_execution/agent.py | 2 +- .../samples/workflow_agent_seq/__init__.py | 2 +- .../samples/workflow_agent_seq/agent.py | 2 +- .../samples/workflow_agent_seq/main.py | 2 +- .../samples/workflow_triage/__init__.py | 2 +- contributing/samples/workflow_triage/agent.py | 2 +- .../workflow_triage/execution_agent.py | 2 +- llms-full.txt | 42 +++++++++---------- src/google/adk/__init__.py | 4 +- src/google/adk/a2a/__init__.py | 2 +- src/google/adk/a2a/converters/__init__.py | 2 +- .../adk/a2a/converters/event_converter.py | 2 +- .../adk/a2a/converters/part_converter.py | 2 +- .../adk/a2a/converters/request_converter.py | 2 +- src/google/adk/a2a/converters/utils.py | 2 +- src/google/adk/a2a/executor/__init__.py | 2 +- .../adk/a2a/executor/a2a_agent_executor.py | 2 +- .../a2a/executor/task_result_aggregator.py | 2 +- src/google/adk/a2a/experimental.py | 2 +- src/google/adk/a2a/logs/__init__.py | 2 +- src/google/adk/a2a/logs/log_utils.py | 2 +- src/google/adk/a2a/utils/__init__.py | 2 +- .../adk/a2a/utils/agent_card_builder.py | 2 +- src/google/adk/a2a/utils/agent_to_a2a.py | 2 +- src/google/adk/agents/__init__.py | 2 +- .../adk/agents/active_streaming_tool.py | 2 +- src/google/adk/agents/agent_config.py | 2 +- src/google/adk/agents/base_agent.py | 2 +- src/google/adk/agents/base_agent_config.py | 2 +- src/google/adk/agents/callback_context.py | 2 +- src/google/adk/agents/common_configs.py | 2 +- src/google/adk/agents/config_agent_utils.py | 2 +- src/google/adk/agents/context_cache_config.py | 2 +- src/google/adk/agents/invocation_context.py | 2 +- src/google/adk/agents/langgraph_agent.py | 4 +- src/google/adk/agents/live_request_queue.py | 2 +- src/google/adk/agents/llm_agent.py | 2 +- src/google/adk/agents/llm_agent_config.py | 2 +- src/google/adk/agents/loop_agent.py | 2 +- src/google/adk/agents/loop_agent_config.py | 2 +- .../adk/agents/mcp_instruction_provider.py | 2 +- src/google/adk/agents/parallel_agent.py | 2 +- .../adk/agents/parallel_agent_config.py | 2 +- src/google/adk/agents/readonly_context.py | 2 +- src/google/adk/agents/remote_a2a_agent.py | 2 +- src/google/adk/agents/run_config.py | 2 +- src/google/adk/agents/sequential_agent.py | 2 +- .../adk/agents/sequential_agent_config.py | 2 +- src/google/adk/agents/transcription_entry.py | 4 +- src/google/adk/apps/__init__.py | 2 +- src/google/adk/apps/app.py | 2 +- src/google/adk/apps/base_events_summarizer.py | 2 +- src/google/adk/apps/compaction.py | 2 +- src/google/adk/apps/llm_event_summarizer.py | 2 +- src/google/adk/artifacts/__init__.py | 2 +- src/google/adk/artifacts/artifact_util.py | 2 +- .../adk/artifacts/base_artifact_service.py | 2 +- .../adk/artifacts/file_artifact_service.py | 2 +- .../adk/artifacts/gcs_artifact_service.py | 2 +- .../artifacts/in_memory_artifact_service.py | 2 +- src/google/adk/auth/__init__.py | 2 +- src/google/adk/auth/auth_credential.py | 2 +- src/google/adk/auth/auth_handler.py | 2 +- src/google/adk/auth/auth_preprocessor.py | 2 +- src/google/adk/auth/auth_schemes.py | 2 +- src/google/adk/auth/auth_tool.py | 2 +- src/google/adk/auth/credential_manager.py | 2 +- .../adk/auth/credential_service/__init__.py | 2 +- .../base_credential_service.py | 2 +- .../in_memory_credential_service.py | 2 +- .../session_state_credential_service.py | 2 +- src/google/adk/auth/exchanger/__init__.py | 2 +- .../exchanger/base_credential_exchanger.py | 2 +- .../credential_exchanger_registry.py | 2 +- .../exchanger/oauth2_credential_exchanger.py | 2 +- src/google/adk/auth/oauth2_credential_util.py | 2 +- src/google/adk/auth/oauth2_discovery.py | 2 +- src/google/adk/auth/refresher/__init__.py | 2 +- .../refresher/base_credential_refresher.py | 2 +- .../credential_refresher_registry.py | 2 +- .../refresher/oauth2_credential_refresher.py | 2 +- src/google/adk/cli/__init__.py | 2 +- src/google/adk/cli/__main__.py | 4 +- src/google/adk/cli/adk_web_server.py | 2 +- src/google/adk/cli/agent_graph.py | 2 +- .../adk/cli/browser/assets/audio-processor.js | 2 +- src/google/adk/cli/browser/index.html | 2 +- .../adk/cli/built_in_agents/__init__.py | 2 +- .../adk_agent_builder_assistant.py | 2 +- src/google/adk/cli/built_in_agents/agent.py | 2 +- .../built_in_agents/sub_agents/__init__.py | 2 +- .../sub_agents/google_search_agent.py | 2 +- .../sub_agents/url_context_agent.py | 2 +- .../adk/cli/built_in_agents/tools/__init__.py | 2 +- .../tools/cleanup_unused_files.py | 2 +- .../cli/built_in_agents/tools/delete_files.py | 2 +- .../built_in_agents/tools/explore_project.py | 2 +- .../cli/built_in_agents/tools/query_schema.py | 2 +- .../tools/read_config_files.py | 2 +- .../cli/built_in_agents/tools/read_files.py | 2 +- .../tools/search_adk_knowledge.py | 2 +- .../tools/search_adk_source.py | 2 +- .../tools/write_config_files.py | 2 +- .../cli/built_in_agents/tools/write_files.py | 2 +- .../adk/cli/built_in_agents/utils/__init__.py | 2 +- .../built_in_agents/utils/adk_source_utils.py | 2 +- .../built_in_agents/utils/path_normalizer.py | 2 +- .../utils/resolve_root_directory.py | 2 +- src/google/adk/cli/cli.py | 2 +- src/google/adk/cli/cli_create.py | 2 +- src/google/adk/cli/cli_deploy.py | 2 +- src/google/adk/cli/cli_eval.py | 2 +- src/google/adk/cli/cli_tools_click.py | 2 +- src/google/adk/cli/conformance/__init__.py | 2 +- .../cli/conformance/_generated_file_utils.py | 2 +- .../adk/cli/conformance/_replay_validators.py | 2 +- .../cli/conformance/adk_web_server_client.py | 2 +- src/google/adk/cli/conformance/cli_record.py | 2 +- src/google/adk/cli/conformance/cli_test.py | 2 +- src/google/adk/cli/conformance/test_case.py | 2 +- src/google/adk/cli/fast_api.py | 2 +- src/google/adk/cli/plugins/__init__.py | 2 +- .../adk/cli/plugins/recordings_plugin.py | 2 +- .../adk/cli/plugins/recordings_schema.py | 2 +- src/google/adk/cli/plugins/replay_plugin.py | 2 +- src/google/adk/cli/service_registry.py | 2 +- src/google/adk/cli/utils/__init__.py | 2 +- .../adk/cli/utils/agent_change_handler.py | 2 +- src/google/adk/cli/utils/agent_loader.py | 2 +- src/google/adk/cli/utils/base_agent_loader.py | 2 +- src/google/adk/cli/utils/cleanup.py | 4 +- src/google/adk/cli/utils/common.py | 4 +- src/google/adk/cli/utils/dot_adk_folder.py | 2 +- src/google/adk/cli/utils/envs.py | 2 +- src/google/adk/cli/utils/evals.py | 2 +- src/google/adk/cli/utils/local_storage.py | 2 +- src/google/adk/cli/utils/logs.py | 2 +- src/google/adk/cli/utils/service_factory.py | 2 +- src/google/adk/cli/utils/shared_value.py | 2 +- src/google/adk/cli/utils/state.py | 2 +- src/google/adk/code_executors/__init__.py | 2 +- .../agent_engine_sandbox_code_executor.py | 2 +- .../adk/code_executors/base_code_executor.py | 2 +- .../code_executors/built_in_code_executor.py | 2 +- .../code_executors/code_execution_utils.py | 2 +- .../code_executors/code_executor_context.py | 4 +- .../code_executors/container_code_executor.py | 2 +- .../adk/code_executors/gke_code_executor.py | 2 +- .../unsafe_local_code_executor.py | 2 +- .../code_executors/vertex_ai_code_executor.py | 2 +- src/google/adk/dependencies/__init__.py | 2 +- src/google/adk/dependencies/rouge_scorer.py | 2 +- src/google/adk/dependencies/vertexai.py | 2 +- src/google/adk/errors/__init__.py | 2 +- src/google/adk/errors/already_exists_error.py | 2 +- .../adk/errors/input_validation_error.py | 2 +- src/google/adk/errors/not_found_error.py | 2 +- src/google/adk/evaluation/__init__.py | 2 +- .../_eval_set_results_manager_utils.py | 2 +- .../evaluation/_eval_sets_manager_utils.py | 2 +- .../adk/evaluation/_retry_options_utils.py | 2 +- src/google/adk/evaluation/agent_evaluator.py | 2 +- src/google/adk/evaluation/app_details.py | 2 +- .../adk/evaluation/base_eval_service.py | 2 +- src/google/adk/evaluation/common.py | 2 +- src/google/adk/evaluation/constants.py | 2 +- .../adk/evaluation/conversation_scenarios.py | 2 +- src/google/adk/evaluation/eval_case.py | 2 +- src/google/adk/evaluation/eval_config.py | 2 +- src/google/adk/evaluation/eval_metrics.py | 2 +- src/google/adk/evaluation/eval_result.py | 2 +- src/google/adk/evaluation/eval_rubrics.py | 2 +- src/google/adk/evaluation/eval_set.py | 4 +- .../evaluation/eval_set_results_manager.py | 2 +- .../adk/evaluation/eval_sets_manager.py | 2 +- .../adk/evaluation/evaluation_constants.py | 4 +- .../adk/evaluation/evaluation_generator.py | 2 +- src/google/adk/evaluation/evaluator.py | 2 +- .../adk/evaluation/final_response_match_v1.py | 2 +- .../adk/evaluation/final_response_match_v2.py | 2 +- .../gcs_eval_set_results_manager.py | 2 +- .../adk/evaluation/gcs_eval_sets_manager.py | 2 +- .../adk/evaluation/hallucinations_v1.py | 2 +- .../evaluation/in_memory_eval_sets_manager.py | 2 +- src/google/adk/evaluation/llm_as_judge.py | 2 +- .../adk/evaluation/llm_as_judge_utils.py | 2 +- .../adk/evaluation/local_eval_service.py | 2 +- .../local_eval_set_results_manager.py | 2 +- .../adk/evaluation/local_eval_sets_manager.py | 2 +- .../evaluation/metric_evaluator_registry.py | 2 +- .../adk/evaluation/metric_info_providers.py | 2 +- .../evaluation/request_intercepter_plugin.py | 2 +- .../adk/evaluation/response_evaluator.py | 2 +- .../adk/evaluation/rubric_based_evaluator.py | 2 +- .../rubric_based_final_response_quality_v1.py | 2 +- .../rubric_based_tool_use_quality_v1.py | 2 +- src/google/adk/evaluation/safety_evaluator.py | 2 +- .../adk/evaluation/simulation/__init__.py | 2 +- .../simulation/llm_backed_user_simulator.py | 2 +- .../per_turn_user_simulator_quality_v1.py | 2 +- .../simulation/static_user_simulator.py | 2 +- .../evaluation/simulation/user_simulator.py | 2 +- .../simulation/user_simulator_provider.py | 2 +- .../adk/evaluation/trajectory_evaluator.py | 2 +- .../adk/evaluation/vertex_ai_eval_facade.py | 2 +- src/google/adk/events/__init__.py | 2 +- src/google/adk/events/event.py | 2 +- src/google/adk/events/event_actions.py | 2 +- src/google/adk/examples/__init__.py | 2 +- .../adk/examples/base_example_provider.py | 4 +- src/google/adk/examples/example.py | 4 +- src/google/adk/examples/example_util.py | 4 +- .../adk/examples/vertex_ai_example_store.py | 2 +- src/google/adk/features/__init__.py | 2 +- src/google/adk/features/_feature_decorator.py | 2 +- src/google/adk/features/_feature_registry.py | 2 +- src/google/adk/flows/__init__.py | 2 +- src/google/adk/flows/llm_flows/__init__.py | 2 +- .../flows/llm_flows/_base_llm_processor.py | 2 +- .../adk/flows/llm_flows/_code_execution.py | 2 +- .../adk/flows/llm_flows/_nl_planning.py | 2 +- .../llm_flows/_output_schema_processor.py | 2 +- .../adk/flows/llm_flows/agent_transfer.py | 2 +- .../flows/llm_flows/audio_cache_manager.py | 2 +- .../adk/flows/llm_flows/audio_transcriber.py | 2 +- src/google/adk/flows/llm_flows/auto_flow.py | 2 +- .../adk/flows/llm_flows/base_llm_flow.py | 2 +- src/google/adk/flows/llm_flows/basic.py | 2 +- src/google/adk/flows/llm_flows/contents.py | 2 +- .../llm_flows/context_cache_processor.py | 2 +- src/google/adk/flows/llm_flows/functions.py | 2 +- src/google/adk/flows/llm_flows/identity.py | 2 +- .../adk/flows/llm_flows/instructions.py | 2 +- .../flows/llm_flows/interactions_processor.py | 2 +- .../flows/llm_flows/request_confirmation.py | 2 +- src/google/adk/flows/llm_flows/single_flow.py | 2 +- .../flows/llm_flows/transcription_manager.py | 2 +- src/google/adk/memory/__init__.py | 2 +- src/google/adk/memory/_utils.py | 2 +- src/google/adk/memory/base_memory_service.py | 2 +- .../adk/memory/in_memory_memory_service.py | 2 +- src/google/adk/memory/memory_entry.py | 2 +- .../memory/vertex_ai_memory_bank_service.py | 2 +- .../memory/vertex_ai_rag_memory_service.py | 2 +- src/google/adk/models/__init__.py | 2 +- src/google/adk/models/anthropic_llm.py | 2 +- src/google/adk/models/apigee_llm.py | 2 +- src/google/adk/models/base_llm.py | 2 +- src/google/adk/models/base_llm_connection.py | 2 +- src/google/adk/models/cache_metadata.py | 2 +- .../models/gemini_context_cache_manager.py | 2 +- .../adk/models/gemini_llm_connection.py | 2 +- src/google/adk/models/gemma_llm.py | 2 +- src/google/adk/models/google_llm.py | 2 +- src/google/adk/models/interactions_utils.py | 2 +- src/google/adk/models/lite_llm.py | 2 +- src/google/adk/models/llm_request.py | 2 +- src/google/adk/models/llm_response.py | 2 +- src/google/adk/models/registry.py | 2 +- src/google/adk/planners/__init__.py | 2 +- src/google/adk/planners/base_planner.py | 4 +- src/google/adk/planners/built_in_planner.py | 2 +- .../adk/planners/plan_re_act_planner.py | 4 +- src/google/adk/platform/__init__.py | 2 +- src/google/adk/platform/thread.py | 2 +- src/google/adk/plugins/__init__.py | 2 +- src/google/adk/plugins/base_plugin.py | 2 +- .../bigquery_agent_analytics_plugin.py | 2 +- .../adk/plugins/context_filter_plugin.py | 2 +- .../adk/plugins/global_instruction_plugin.py | 2 +- src/google/adk/plugins/logging_plugin.py | 2 +- .../plugins/multimodal_tool_results_plugin.py | 2 +- src/google/adk/plugins/plugin_manager.py | 2 +- .../adk/plugins/reflect_retry_tool_plugin.py | 2 +- .../plugins/save_files_as_artifacts_plugin.py | 2 +- src/google/adk/runners.py | 2 +- src/google/adk/sessions/__init__.py | 2 +- src/google/adk/sessions/_session_util.py | 2 +- .../adk/sessions/base_session_service.py | 2 +- .../adk/sessions/database_session_service.py | 2 +- .../adk/sessions/in_memory_session_service.py | 2 +- .../sessions/migration/_schema_check_utils.py | 2 +- .../migrate_from_sqlalchemy_pickle.py | 2 +- .../migrate_from_sqlalchemy_sqlite.py | 2 +- .../sessions/migration/migration_runner.py | 2 +- src/google/adk/sessions/schemas/shared.py | 2 +- src/google/adk/sessions/schemas/v0.py | 2 +- src/google/adk/sessions/schemas/v1.py | 2 +- src/google/adk/sessions/session.py | 2 +- .../adk/sessions/sqlite_session_service.py | 2 +- src/google/adk/sessions/state.py | 2 +- .../adk/sessions/vertex_ai_session_service.py | 2 +- src/google/adk/telemetry/__init__.py | 2 +- src/google/adk/telemetry/google_cloud.py | 2 +- src/google/adk/telemetry/setup.py | 2 +- src/google/adk/telemetry/tracing.py | 2 +- src/google/adk/tools/__init__.py | 2 +- .../tools/_automatic_function_calling_util.py | 2 +- .../adk/tools/_forwarding_artifact_service.py | 2 +- .../adk/tools/_function_tool_declarations.py | 2 +- src/google/adk/tools/_gemini_schema_util.py | 2 +- src/google/adk/tools/_google_credentials.py | 2 +- src/google/adk/tools/_memory_entry_utils.py | 2 +- src/google/adk/tools/agent_tool.py | 2 +- src/google/adk/tools/api_registry.py | 2 +- src/google/adk/tools/apihub_tool/__init__.py | 2 +- .../adk/tools/apihub_tool/apihub_toolset.py | 2 +- .../adk/tools/apihub_tool/clients/__init__.py | 2 +- .../apihub_tool/clients/apihub_client.py | 2 +- .../apihub_tool/clients/secret_client.py | 2 +- .../application_integration_tool/__init__.py | 2 +- .../application_integration_toolset.py | 2 +- .../clients/connections_client.py | 2 +- .../clients/integration_client.py | 2 +- .../integration_connector_tool.py | 2 +- .../adk/tools/authenticated_function_tool.py | 2 +- .../adk/tools/base_authenticated_tool.py | 2 +- src/google/adk/tools/base_tool.py | 2 +- src/google/adk/tools/base_toolset.py | 2 +- src/google/adk/tools/bigquery/__init__.py | 2 +- .../tools/bigquery/bigquery_credentials.py | 2 +- .../adk/tools/bigquery/bigquery_toolset.py | 2 +- src/google/adk/tools/bigquery/client.py | 2 +- src/google/adk/tools/bigquery/config.py | 2 +- .../adk/tools/bigquery/data_insights_tool.py | 2 +- .../adk/tools/bigquery/metadata_tool.py | 2 +- src/google/adk/tools/bigquery/query_tool.py | 2 +- src/google/adk/tools/bigtable/__init__.py | 2 +- .../tools/bigtable/bigtable_credentials.py | 2 +- .../adk/tools/bigtable/bigtable_toolset.py | 2 +- src/google/adk/tools/bigtable/client.py | 2 +- .../adk/tools/bigtable/metadata_tool.py | 2 +- src/google/adk/tools/bigtable/query_tool.py | 2 +- src/google/adk/tools/bigtable/settings.py | 2 +- src/google/adk/tools/computer_use/__init__.py | 2 +- .../adk/tools/computer_use/base_computer.py | 2 +- .../tools/computer_use/computer_use_tool.py | 2 +- .../computer_use/computer_use_toolset.py | 2 +- src/google/adk/tools/crewai_tool.py | 2 +- .../adk/tools/discovery_engine_search_tool.py | 2 +- .../adk/tools/enterprise_search_tool.py | 2 +- src/google/adk/tools/example_tool.py | 2 +- src/google/adk/tools/exit_loop_tool.py | 4 +- src/google/adk/tools/function_tool.py | 2 +- src/google/adk/tools/get_user_choice_tool.py | 4 +- .../adk/tools/google_api_tool/__init__.py | 2 +- .../tools/google_api_tool/google_api_tool.py | 2 +- .../google_api_tool/google_api_toolset.py | 2 +- .../google_api_tool/google_api_toolsets.py | 2 +- .../googleapi_to_openapi_converter.py | 2 +- .../adk/tools/google_maps_grounding_tool.py | 2 +- .../adk/tools/google_search_agent_tool.py | 2 +- src/google/adk/tools/google_search_tool.py | 2 +- src/google/adk/tools/google_tool.py | 2 +- src/google/adk/tools/langchain_tool.py | 2 +- src/google/adk/tools/load_artifacts_tool.py | 2 +- src/google/adk/tools/load_memory_tool.py | 2 +- src/google/adk/tools/load_web_page.py | 4 +- src/google/adk/tools/long_running_tool.py | 2 +- src/google/adk/tools/mcp_tool/__init__.py | 2 +- .../adk/tools/mcp_tool/conversion_utils.py | 2 +- .../adk/tools/mcp_tool/mcp_session_manager.py | 2 +- src/google/adk/tools/mcp_tool/mcp_tool.py | 2 +- src/google/adk/tools/mcp_tool/mcp_toolset.py | 2 +- src/google/adk/tools/openapi_tool/__init__.py | 2 +- .../adk/tools/openapi_tool/auth/__init__.py | 2 +- .../tools/openapi_tool/auth/auth_helpers.py | 4 +- .../auth/credential_exchangers/__init__.py | 2 +- .../auto_auth_credential_exchanger.py | 4 +- .../base_credential_exchanger.py | 4 +- .../credential_exchangers/oauth2_exchanger.py | 4 +- .../service_account_exchanger.py | 2 +- .../adk/tools/openapi_tool/common/__init__.py | 2 +- .../adk/tools/openapi_tool/common/common.py | 2 +- .../openapi_spec_parser/__init__.py | 2 +- .../openapi_spec_parser.py | 2 +- .../openapi_spec_parser/openapi_toolset.py | 2 +- .../openapi_spec_parser/operation_parser.py | 2 +- .../openapi_spec_parser/rest_api_tool.py | 2 +- .../openapi_spec_parser/tool_auth_handler.py | 2 +- src/google/adk/tools/preload_memory_tool.py | 2 +- src/google/adk/tools/pubsub/__init__.py | 2 +- src/google/adk/tools/pubsub/client.py | 2 +- src/google/adk/tools/pubsub/config.py | 2 +- src/google/adk/tools/pubsub/message_tool.py | 2 +- .../adk/tools/pubsub/pubsub_credentials.py | 2 +- src/google/adk/tools/pubsub/pubsub_toolset.py | 2 +- src/google/adk/tools/retrieval/__init__.py | 2 +- .../tools/retrieval/base_retrieval_tool.py | 2 +- .../adk/tools/retrieval/files_retrieval.py | 2 +- .../tools/retrieval/llama_index_retrieval.py | 2 +- .../retrieval/vertex_ai_rag_retrieval.py | 2 +- .../adk/tools/set_model_response_tool.py | 2 +- src/google/adk/tools/spanner/__init__.py | 2 +- src/google/adk/tools/spanner/client.py | 2 +- src/google/adk/tools/spanner/metadata_tool.py | 2 +- src/google/adk/tools/spanner/query_tool.py | 2 +- src/google/adk/tools/spanner/search_tool.py | 2 +- src/google/adk/tools/spanner/settings.py | 2 +- .../adk/tools/spanner/spanner_credentials.py | 2 +- .../adk/tools/spanner/spanner_toolset.py | 2 +- src/google/adk/tools/spanner/utils.py | 2 +- src/google/adk/tools/tool_configs.py | 2 +- src/google/adk/tools/tool_confirmation.py | 2 +- src/google/adk/tools/tool_context.py | 2 +- src/google/adk/tools/toolbox_toolset.py | 2 +- .../adk/tools/transfer_to_agent_tool.py | 2 +- src/google/adk/tools/url_context_tool.py | 2 +- src/google/adk/tools/vertex_ai_search_tool.py | 2 +- src/google/adk/utils/__init__.py | 2 +- src/google/adk/utils/_client_labels_utils.py | 2 +- src/google/adk/utils/_debug_output.py | 2 +- .../adk/utils/cache_performance_analyzer.py | 2 +- src/google/adk/utils/context_utils.py | 2 +- src/google/adk/utils/env_utils.py | 2 +- src/google/adk/utils/feature_decorator.py | 2 +- src/google/adk/utils/instructions_utils.py | 2 +- src/google/adk/utils/model_name_utils.py | 2 +- src/google/adk/utils/output_schema_utils.py | 2 +- src/google/adk/utils/streaming_utils.py | 2 +- src/google/adk/utils/variant_utils.py | 2 +- src/google/adk/utils/vertex_ai_utils.py | 2 +- src/google/adk/utils/yaml_utils.py | 2 +- src/google/adk/version.py | 2 +- tests/__init__.py | 2 +- tests/integration/__init__.py | 2 +- tests/integration/conftest.py | 2 +- tests/integration/fixture/__init__.py | 2 +- .../fixture/agent_with_config/__init__.py | 2 +- .../fixture/agent_with_config/agent.py | 2 +- .../fixture/bigquery_agent/__init__.py | 2 +- .../fixture/bigquery_agent/agent.py | 2 +- .../fixture/callback_agent/__init__.py | 2 +- .../fixture/callback_agent/agent.py | 2 +- .../fixture/context_update_test/__init__.py | 2 +- .../fixture/context_update_test/agent.py | 2 +- .../context_variable_agent/__init__.py | 2 +- .../fixture/context_variable_agent/agent.py | 2 +- .../__init__.py | 2 +- .../ecommerce_customer_service_agent/agent.py | 2 +- .../fixture/flow_complex_spark/__init__.py | 2 +- .../fixture/flow_complex_spark/agent.py | 2 +- .../fixture/hello_world_agent/__init__.py | 2 +- .../fixture/hello_world_agent/agent.py | 2 +- .../hello_world_agent_async/__init__.py | 2 +- .../fixture/hello_world_agent_async/agent.py | 2 +- .../fixture/home_automation_agent/__init__.py | 2 +- .../fixture/home_automation_agent/agent.py | 2 +- .../fixture/tool_agent/__init__.py | 2 +- tests/integration/fixture/tool_agent/agent.py | 2 +- .../fixture/trip_planner_agent/__init__.py | 2 +- .../fixture/trip_planner_agent/agent.py | 2 +- tests/integration/models/__init__.py | 2 +- tests/integration/models/test_gemma_llm.py | 2 +- tests/integration/models/test_google_llm.py | 2 +- .../models/test_litellm_no_function.py | 2 +- .../models/test_litellm_with_function.py | 2 +- tests/integration/test_callback.py | 2 +- tests/integration/test_context_variable.py | 2 +- .../test_evaluate_agent_in_fixture.py | 2 +- tests/integration/test_multi_agent.py | 2 +- tests/integration/test_multi_turn.py | 2 +- tests/integration/test_single_agent.py | 2 +- tests/integration/test_sub_agent.py | 2 +- tests/integration/test_system_instruction.py | 2 +- tests/integration/test_tools.py | 2 +- tests/integration/test_with_test_file.py | 2 +- tests/integration/tools/__init__.py | 2 +- tests/integration/utils/__init__.py | 2 +- tests/integration/utils/asserts.py | 2 +- tests/integration/utils/test_runner.py | 2 +- tests/unittests/__init__.py | 2 +- tests/unittests/a2a/__init__.py | 2 +- tests/unittests/a2a/converters/__init__.py | 2 +- .../a2a/converters/test_event_converter.py | 2 +- .../a2a/converters/test_part_converter.py | 2 +- .../a2a/converters/test_request_converter.py | 2 +- tests/unittests/a2a/converters/test_utils.py | 2 +- tests/unittests/a2a/executor/__init__.py | 2 +- .../a2a/executor/test_a2a_agent_executor.py | 2 +- .../executor/test_task_result_aggregator.py | 2 +- tests/unittests/a2a/logs/__init__.py | 2 +- tests/unittests/a2a/logs/test_log_utils.py | 2 +- tests/unittests/a2a/utils/__init__.py | 2 +- .../a2a/utils/test_agent_card_builder.py | 2 +- .../unittests/a2a/utils/test_agent_to_a2a.py | 2 +- tests/unittests/agents/__init__.py | 2 +- tests/unittests/agents/test_agent_clone.py | 2 +- tests/unittests/agents/test_agent_config.py | 2 +- tests/unittests/agents/test_base_agent.py | 2 +- .../unittests/agents/test_callback_context.py | 2 +- .../agents/test_context_cache_config.py | 2 +- .../test_gemini_context_cache_manager.py | 2 +- .../agents/test_invocation_context.py | 2 +- .../unittests/agents/test_langgraph_agent.py | 2 +- .../agents/test_llm_agent_callbacks.py | 2 +- .../agents/test_llm_agent_error_messages.py | 2 +- .../unittests/agents/test_llm_agent_fields.py | 2 +- .../agents/test_llm_agent_include_contents.py | 2 +- .../agents/test_llm_agent_output_save.py | 2 +- tests/unittests/agents/test_loop_agent.py | 2 +- .../agents/test_mcp_instruction_provider.py | 2 +- .../agents/test_model_callback_chain.py | 2 +- tests/unittests/agents/test_parallel_agent.py | 2 +- .../unittests/agents/test_readonly_context.py | 2 +- .../unittests/agents/test_remote_a2a_agent.py | 2 +- .../agents/test_resumable_llm_agent.py | 2 +- tests/unittests/agents/test_run_config.py | 2 +- .../unittests/agents/test_sequential_agent.py | 2 +- tests/unittests/apps/__init__.py | 2 +- tests/unittests/apps/test_apps.py | 2 +- tests/unittests/apps/test_compaction.py | 2 +- .../apps/test_llm_event_summarizer.py | 2 +- tests/unittests/artifacts/__init__.py | 2 +- .../artifacts/test_artifact_service.py | 2 +- .../unittests/artifacts/test_artifact_util.py | 2 +- tests/unittests/auth/__init__.py | 2 +- .../auth/credential_service/__init__.py | 2 +- .../test_in_memory_credential_service.py | 2 +- .../test_session_state_credential_service.py | 2 +- tests/unittests/auth/exchanger/__init__.py | 2 +- .../test_credential_exchanger_registry.py | 2 +- .../test_oauth2_credential_exchanger.py | 2 +- tests/unittests/auth/refresher/__init__.py | 2 +- .../test_credential_refresher_registry.py | 2 +- .../test_oauth2_credential_refresher.py | 2 +- tests/unittests/auth/test_auth_config.py | 2 +- tests/unittests/auth/test_auth_handler.py | 2 +- .../unittests/auth/test_auth_preprocessor.py | 2 +- .../unittests/auth/test_credential_manager.py | 2 +- .../auth/test_oauth2_credential_util.py | 2 +- tests/unittests/auth/test_oauth2_discovery.py | 2 +- tests/unittests/cli/__init__.py | 2 +- tests/unittests/cli/conformance/__init__.py | 2 +- .../conformance/test_adk_web_server_client.py | 2 +- .../test_cli_tools_click_option_mismatch.py | 2 +- tests/unittests/cli/test_cors_regex.py | 2 +- tests/unittests/cli/test_fast_api.py | 2 +- tests/unittests/cli/test_service_registry.py | 2 +- tests/unittests/cli/utils/__init__.py | 2 +- .../cli/utils/test_agent_change_handler.py | 2 +- .../unittests/cli/utils/test_agent_loader.py | 2 +- tests/unittests/cli/utils/test_cli.py | 2 +- tests/unittests/cli/utils/test_cli_create.py | 2 +- tests/unittests/cli/utils/test_cli_deploy.py | 2 +- .../cli/utils/test_cli_deploy_to_cloud_run.py | 2 +- tests/unittests/cli/utils/test_cli_eval.py | 2 +- .../cli/utils/test_cli_tools_click.py | 2 +- .../cli/utils/test_dot_adk_folder.py | 2 +- tests/unittests/cli/utils/test_envs.py | 2 +- tests/unittests/cli/utils/test_evals.py | 2 +- .../unittests/cli/utils/test_local_storage.py | 2 +- .../cli/utils/test_service_factory.py | 2 +- tests/unittests/code_executors/__init__.py | 2 +- ...test_agent_engine_sandbox_code_executor.py | 2 +- .../test_built_in_code_executor.py | 2 +- .../test_code_executor_context.py | 2 +- .../code_executors/test_gke_code_executor.py | 2 +- .../test_unsafe_local_code_executor.py | 2 +- tests/unittests/conftest.py | 2 +- tests/unittests/evaluation/__init__.py | 2 +- .../evaluation/simulation/__init__.py | 2 +- .../test_llm_backed_user_simulator.py | 2 +- ...est_per_turn_user_simulation_quality_v1.py | 2 +- .../simulation/test_static_user_simulator.py | 2 +- .../simulation/test_user_simulator.py | 2 +- .../test_user_simulator_provider.py | 2 +- .../unittests/evaluation/test_app_details.py | 2 +- tests/unittests/evaluation/test_eval_case.py | 2 +- .../unittests/evaluation/test_eval_config.py | 2 +- .../evaluation/test_evaluation_generator.py | 2 +- .../test_final_response_match_v1.py | 2 +- .../test_final_response_match_v2.py | 2 +- .../test_gcs_eval_set_results_manager.py | 2 +- .../evaluation/test_gcs_eval_sets_manager.py | 2 +- .../evaluation/test_hallucinations_v1.py | 2 +- .../test_in_memory_eval_sets_manager.py | 2 +- .../unittests/evaluation/test_llm_as_judge.py | 2 +- .../evaluation/test_llm_as_judge_utils.py | 2 +- .../evaluation/test_local_eval_service.py | 2 +- .../test_local_eval_set_results_manager.py | 2 +- .../test_local_eval_sets_manager.py | 2 +- .../test_metric_evaluator_registry.py | 2 +- .../test_request_intercepter_plugin.py | 2 +- .../evaluation/test_response_evaluator.py | 2 +- .../evaluation/test_retry_options_utils.py | 2 +- .../evaluation/test_rubric_based_evaluator.py | 2 +- ..._rubric_based_final_response_quality_v1.py | 2 +- .../test_rubric_based_tool_use_quality_v1.py | 2 +- .../evaluation/test_safety_evaluator.py | 2 +- .../evaluation/test_trajectory_evaluator.py | 2 +- .../evaluation/test_vertex_ai_eval_facade.py | 2 +- .../features/test_feature_decorator.py | 2 +- .../features/test_feature_registry.py | 2 +- tests/unittests/flows/__init__.py | 2 +- tests/unittests/flows/llm_flows/__init__.py | 2 +- .../flows/llm_flows/test_agent_transfer.py | 2 +- ...test_agent_transfer_system_instructions.py | 2 +- .../llm_flows/test_async_tool_callbacks.py | 2 +- .../llm_flows/test_audio_cache_manager.py | 2 +- .../flows/llm_flows/test_base_llm_flow.py | 2 +- .../test_base_llm_flow_partial_handling.py | 2 +- .../llm_flows/test_base_llm_flow_realtime.py | 2 +- .../flows/llm_flows/test_basic_processor.py | 2 +- .../flows/llm_flows/test_code_execution.py | 2 +- .../flows/llm_flows/test_contents.py | 2 +- .../flows/llm_flows/test_contents_branch.py | 2 +- .../flows/llm_flows/test_contents_function.py | 2 +- .../llm_flows/test_contents_other_agent.py | 2 +- .../llm_flows/test_context_cache_processor.py | 2 +- .../test_functions_error_messages.py | 2 +- .../llm_flows/test_functions_long_running.py | 2 +- .../llm_flows/test_functions_parallel.py | 2 +- .../llm_flows/test_functions_request_euc.py | 2 +- .../llm_flows/test_functions_sequential.py | 2 +- .../flows/llm_flows/test_functions_simple.py | 2 +- .../flows/llm_flows/test_identity.py | 2 +- .../flows/llm_flows/test_instructions.py | 2 +- .../llm_flows/test_interactions_processor.py | 2 +- .../llm_flows/test_live_tool_callbacks.py | 2 +- .../flows/llm_flows/test_model_callbacks.py | 2 +- .../flows/llm_flows/test_nl_planning.py | 2 +- .../flows/llm_flows/test_other_configs.py | 2 +- .../llm_flows/test_output_schema_processor.py | 2 +- .../llm_flows/test_plugin_model_callbacks.py | 2 +- .../llm_flows/test_plugin_tool_callbacks.py | 2 +- .../test_progressive_sse_streaming.py | 2 +- .../llm_flows/test_request_confirmation.py | 2 +- .../flows/llm_flows/test_tool_callbacks.py | 2 +- .../flows/llm_flows/test_tool_telemetry.py | 2 +- .../llm_flows/test_transcription_manager.py | 2 +- .../memory/test_in_memory_memory_service.py | 2 +- .../test_vertex_ai_memory_bank_service.py | 2 +- tests/unittests/models/__init__.py | 2 +- tests/unittests/models/test_anthropic_llm.py | 2 +- tests/unittests/models/test_apigee_llm.py | 2 +- tests/unittests/models/test_cache_metadata.py | 2 +- .../models/test_gemini_llm_connection.py | 2 +- tests/unittests/models/test_gemma_llm.py | 2 +- tests/unittests/models/test_google_llm.py | 2 +- .../models/test_interactions_utils.py | 2 +- tests/unittests/models/test_litellm.py | 2 +- tests/unittests/models/test_llm_request.py | 2 +- tests/unittests/models/test_llm_response.py | 2 +- tests/unittests/models/test_models.py | 2 +- tests/unittests/plugins/__init__.py | 2 +- tests/unittests/plugins/test_base_plugin.py | 2 +- .../test_bigquery_agent_analytics_plugin.py | 2 +- .../plugins/test_context_filtering_plugin.py | 2 +- .../plugins/test_global_instruction_plugin.py | 2 +- .../test_multimodal_tool_results_plugin.py | 2 +- .../unittests/plugins/test_plugin_manager.py | 2 +- .../plugins/test_reflect_retry_tool_plugin.py | 2 +- .../plugins/test_save_files_as_artifacts.py | 2 +- tests/unittests/runners/__init__.py | 2 +- .../runners/test_pause_invocation.py | 2 +- .../runners/test_resume_invocation.py | 2 +- .../runners/test_run_tool_confirmation.py | 2 +- tests/unittests/runners/test_runner_debug.py | 2 +- tests/unittests/runners/test_runner_rewind.py | 2 +- tests/unittests/sessions/__init__.py | 2 +- .../migration/test_database_schema.py | 2 +- .../sessions/migration/test_migration.py | 2 +- .../sessions/test_dynamic_pickle_type.py | 2 +- .../sessions/test_session_service.py | 2 +- .../sessions/test_v0_storage_event.py | 2 +- .../test_vertex_ai_session_service.py | 2 +- tests/unittests/streaming/__init__.py | 2 +- .../streaming/test_live_streaming_configs.py | 2 +- .../streaming/test_multi_agent_streaming.py | 2 +- tests/unittests/streaming/test_streaming.py | 2 +- .../streaming/test_streaming_audio_storage.py | 2 +- tests/unittests/telemetry/__init__.py | 2 +- tests/unittests/telemetry/test_functional.py | 2 +- .../unittests/telemetry/test_google_cloud.py | 2 +- tests/unittests/telemetry/test_setup.py | 2 +- tests/unittests/telemetry/test_spans.py | 2 +- tests/unittests/test_runners.py | 2 +- tests/unittests/testing_utils.py | 2 +- tests/unittests/tools/__init__.py | 2 +- .../apihub_tool/clients/test_apihub_client.py | 2 +- .../apihub_tool/clients/test_secret_client.py | 2 +- .../tools/apihub_tool/test_apihub_toolset.py | 2 +- .../clients/test_connections_client.py | 2 +- .../clients/test_integration_client.py | 2 +- .../test_application_integration_toolset.py | 2 +- .../test_integration_connector_tool.py | 2 +- tests/unittests/tools/bigquery/__init__ | 2 +- .../tools/bigquery/test_bigquery_client.py | 2 +- .../bigquery/test_bigquery_credentials.py | 2 +- .../test_bigquery_data_insights_tool.py | 2 +- .../bigquery/test_bigquery_metadata_tool.py | 2 +- .../bigquery/test_bigquery_query_tool.py | 2 +- .../bigquery/test_bigquery_tool_config.py | 2 +- .../tools/bigquery/test_bigquery_toolset.py | 2 +- tests/unittests/tools/bigtable/__init__ | 2 +- .../bigtable/test_bigtable_credentials.py | 2 +- .../bigtable/test_bigtable_metadata_tool.py | 2 +- .../bigtable/test_bigtable_query_tool.py | 2 +- .../tools/bigtable/test_bigtable_toolset.py | 2 +- tests/unittests/tools/bigtable/test_client.py | 2 +- .../unittests/tools/computer_use/__init__.py | 2 +- .../tools/computer_use/test_base_computer.py | 2 +- .../computer_use/test_computer_use_tool.py | 2 +- .../computer_use/test_computer_use_toolset.py | 2 +- .../tools/google_api_tool/__init__.py | 2 +- .../google_api_tool/test_docs_batchupdate.py | 2 +- .../google_api_tool/test_google_api_tool.py | 2 +- .../test_google_api_toolset.py | 2 +- .../test_googleapi_to_openapi_converter.py | 2 +- tests/unittests/tools/mcp_tool/__init__.py | 2 +- .../tools/mcp_tool/test_conversion_utils.py | 2 +- .../mcp_tool/test_mcp_session_manager.py | 2 +- .../unittests/tools/mcp_tool/test_mcp_tool.py | 2 +- .../tools/mcp_tool/test_mcp_toolset.py | 2 +- .../test_auto_auth_credential_exchanger.py | 2 +- .../test_base_auth_credential_exchanger.py | 2 +- .../test_oauth2_exchanger.py | 2 +- .../test_service_account_exchanger.py | 2 +- .../openapi_tool/auth/test_auth_helper.py | 2 +- .../tools/openapi_tool/common/test_common.py | 2 +- .../openapi_spec_parser/test.yaml | 2 +- .../test_openapi_spec_parser.py | 2 +- .../test_openapi_toolset.py | 2 +- .../test_operation_parser.py | 2 +- .../openapi_spec_parser/test_rest_api_tool.py | 2 +- .../test_tool_auth_handler.py | 2 +- .../tools/pubsub/test_pubsub_client.py | 2 +- .../tools/pubsub/test_pubsub_config.py | 2 +- .../tools/pubsub/test_pubsub_credentials.py | 2 +- .../tools/pubsub/test_pubsub_message_tool.py | 2 +- .../tools/pubsub/test_pubsub_toolset.py | 2 +- tests/unittests/tools/retrieval/__init__.py | 2 +- .../tools/retrieval/test_files_retrieval.py | 2 +- .../retrieval/test_vertex_ai_rag_retrieval.py | 2 +- tests/unittests/tools/spanner/__init__ | 2 +- .../tools/spanner/test_metadata_tool.py | 2 +- .../tools/spanner/test_search_tool.py | 2 +- .../tools/spanner/test_spanner_client.py | 2 +- .../tools/spanner/test_spanner_credentials.py | 2 +- .../tools/spanner/test_spanner_query_tool.py | 2 +- .../spanner/test_spanner_tool_settings.py | 2 +- .../tools/spanner/test_spanner_toolset.py | 2 +- tests/unittests/tools/spanner/test_utils.py | 2 +- tests/unittests/tools/test_agent_tool.py | 2 +- tests/unittests/tools/test_api_registry.py | 2 +- .../tools/test_authenticated_function_tool.py | 2 +- .../tools/test_base_authenticated_tool.py | 2 +- .../test_base_google_credentials_manager.py | 2 +- tests/unittests/tools/test_base_tool.py | 2 +- tests/unittests/tools/test_base_toolset.py | 2 +- .../tools/test_build_function_declaration.py | 2 +- tests/unittests/tools/test_crewai_tool.py | 2 +- .../test_discovery_engine_search_tool.py | 2 +- .../tools/test_enterprise_web_search_tool.py | 2 +- .../tools/test_from_function_with_options.py | 2 +- tests/unittests/tools/test_function_tool.py | 2 +- .../tools/test_function_tool_declarations.py | 2 +- .../tools/test_function_tool_pydantic.py | 2 +- ...t_function_tool_with_import_annotations.py | 2 +- .../tools/test_gemini_schema_util.py | 2 +- .../tools/test_google_search_agent_tool.py | 2 +- .../tools/test_google_search_tool.py | 2 +- tests/unittests/tools/test_google_tool.py | 2 +- tests/unittests/tools/test_langchain_tool.py | 2 +- .../unittests/tools/test_long_running_tool.py | 2 +- .../tools/test_set_model_response_tool.py | 2 +- tests/unittests/tools/test_tool_config.py | 2 +- .../tools/test_transfer_to_agent_tool.py | 2 +- .../unittests/tools/test_url_context_tool.py | 2 +- .../tools/test_vertex_ai_search_tool.py | 2 +- tests/unittests/utils/__init__.py | 2 +- .../utils/test_cache_performance_analyzer.py | 2 +- .../utils/test_client_labels_utils.py | 2 +- tests/unittests/utils/test_env_utils.py | 2 +- .../utils/test_instructions_utils.py | 2 +- .../unittests/utils/test_model_name_utils.py | 2 +- .../utils/test_output_schema_utils.py | 2 +- tests/unittests/utils/test_streaming_utils.py | 2 +- tests/unittests/utils/test_vertex_ai_utils.py | 2 +- tests/unittests/utils/test_yaml_utils.py | 2 +- 1079 files changed, 1147 insertions(+), 1103 deletions(-) diff --git a/.github/workflows/check-file-contents.yml b/.github/workflows/check-file-contents.yml index 974f3816a14..7670733e97c 100644 --- a/.github/workflows/check-file-contents.yml +++ b/.github/workflows/check-file-contents.yml @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.github/workflows/isort.yml b/.github/workflows/isort.yml index a1967b1f539..7a4a81bfd53 100644 --- a/.github/workflows/isort.yml +++ b/.github/workflows/isort.yml @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.github/workflows/pyink.yml b/.github/workflows/pyink.yml index bcd872bda88..4dd9073fc75 100644 --- a/.github/workflows/pyink.yml +++ b/.github/workflows/pyink.yml @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.github/workflows/python-unit-tests.yml b/.github/workflows/python-unit-tests.yml index a19e893469d..abbe5c0d06d 100644 --- a/.github/workflows/python-unit-tests.yml +++ b/.github/workflows/python-unit-tests.yml @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.github/workflows/stale-bot.yml b/.github/workflows/stale-bot.yml index 1e539c7ff66..b6c897b61fa 100644 --- a/.github/workflows/stale-bot.yml +++ b/.github/workflows/stale-bot.yml @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/AGENTS.md b/AGENTS.md index 3e8b3543e8f..1ec9dcb8570 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -316,7 +316,7 @@ navigation and refactoring. immediately after the license header, before any other imports. ```python -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/autoformat.sh b/autoformat.sh index d1c832b8640..3a2dc8c3886 100755 --- a/autoformat.sh +++ b/autoformat.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/a2a_auth/__init__.py b/contributing/samples/a2a_auth/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/a2a_auth/__init__.py +++ b/contributing/samples/a2a_auth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/a2a_auth/agent.py b/contributing/samples/a2a_auth/agent.py index a4c65624d2c..6d07ae6ab34 100644 --- a/contributing/samples/a2a_auth/agent.py +++ b/contributing/samples/a2a_auth/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/a2a_auth/remote_a2a/bigquery_agent/__init__.py b/contributing/samples/a2a_auth/remote_a2a/bigquery_agent/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/a2a_auth/remote_a2a/bigquery_agent/__init__.py +++ b/contributing/samples/a2a_auth/remote_a2a/bigquery_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/a2a_auth/remote_a2a/bigquery_agent/agent.py b/contributing/samples/a2a_auth/remote_a2a/bigquery_agent/agent.py index 05517cd86e6..0d8992ad34e 100644 --- a/contributing/samples/a2a_auth/remote_a2a/bigquery_agent/agent.py +++ b/contributing/samples/a2a_auth/remote_a2a/bigquery_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/a2a_basic/__init__.py b/contributing/samples/a2a_basic/__init__.py index c48963cdc7b..4015e47d6e4 100755 --- a/contributing/samples/a2a_basic/__init__.py +++ b/contributing/samples/a2a_basic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/a2a_basic/agent.py b/contributing/samples/a2a_basic/agent.py index 49e542d1de0..d79a1c256e7 100755 --- a/contributing/samples/a2a_basic/agent.py +++ b/contributing/samples/a2a_basic/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/a2a_basic/remote_a2a/check_prime_agent/__init__.py b/contributing/samples/a2a_basic/remote_a2a/check_prime_agent/__init__.py index c48963cdc7b..4015e47d6e4 100755 --- a/contributing/samples/a2a_basic/remote_a2a/check_prime_agent/__init__.py +++ b/contributing/samples/a2a_basic/remote_a2a/check_prime_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/a2a_basic/remote_a2a/check_prime_agent/agent.py b/contributing/samples/a2a_basic/remote_a2a/check_prime_agent/agent.py index 1a7cd5565f3..64ae534e633 100755 --- a/contributing/samples/a2a_basic/remote_a2a/check_prime_agent/agent.py +++ b/contributing/samples/a2a_basic/remote_a2a/check_prime_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/a2a_human_in_loop/__init__.py b/contributing/samples/a2a_human_in_loop/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/a2a_human_in_loop/__init__.py +++ b/contributing/samples/a2a_human_in_loop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/a2a_human_in_loop/agent.py b/contributing/samples/a2a_human_in_loop/agent.py index a1f7d91231e..30d493ef0d9 100644 --- a/contributing/samples/a2a_human_in_loop/agent.py +++ b/contributing/samples/a2a_human_in_loop/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/a2a_human_in_loop/remote_a2a/human_in_loop/__init__.py b/contributing/samples/a2a_human_in_loop/remote_a2a/human_in_loop/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/a2a_human_in_loop/remote_a2a/human_in_loop/__init__.py +++ b/contributing/samples/a2a_human_in_loop/remote_a2a/human_in_loop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/a2a_human_in_loop/remote_a2a/human_in_loop/agent.py b/contributing/samples/a2a_human_in_loop/remote_a2a/human_in_loop/agent.py index 9a71fb184e8..08a7f255ed0 100644 --- a/contributing/samples/a2a_human_in_loop/remote_a2a/human_in_loop/agent.py +++ b/contributing/samples/a2a_human_in_loop/remote_a2a/human_in_loop/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/a2a_root/agent.py b/contributing/samples/a2a_root/agent.py index c913a6fad80..b52b778c0b4 100755 --- a/contributing/samples/a2a_root/agent.py +++ b/contributing/samples/a2a_root/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/a2a_root/remote_a2a/hello_world/__init__.py b/contributing/samples/a2a_root/remote_a2a/hello_world/__init__.py index c48963cdc7b..4015e47d6e4 100755 --- a/contributing/samples/a2a_root/remote_a2a/hello_world/__init__.py +++ b/contributing/samples/a2a_root/remote_a2a/hello_world/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/a2a_root/remote_a2a/hello_world/agent.py b/contributing/samples/a2a_root/remote_a2a/hello_world/agent.py index f1cb8a33ef7..6261f4d4865 100755 --- a/contributing/samples/a2a_root/remote_a2a/hello_world/agent.py +++ b/contributing/samples/a2a_root/remote_a2a/hello_world/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_answering_agent/__init__.py b/contributing/samples/adk_answering_agent/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/adk_answering_agent/__init__.py +++ b/contributing/samples/adk_answering_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_answering_agent/agent.py b/contributing/samples/adk_answering_agent/agent.py index 69513bace3b..ff82e5029a2 100644 --- a/contributing/samples/adk_answering_agent/agent.py +++ b/contributing/samples/adk_answering_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_answering_agent/gemini_assistant/__init__.py b/contributing/samples/adk_answering_agent/gemini_assistant/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/adk_answering_agent/gemini_assistant/__init__.py +++ b/contributing/samples/adk_answering_agent/gemini_assistant/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_answering_agent/gemini_assistant/agent.py b/contributing/samples/adk_answering_agent/gemini_assistant/agent.py index e8c22e29f36..812a78174f3 100644 --- a/contributing/samples/adk_answering_agent/gemini_assistant/agent.py +++ b/contributing/samples/adk_answering_agent/gemini_assistant/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_answering_agent/main.py b/contributing/samples/adk_answering_agent/main.py index ffb251f5400..0c06fce8b97 100644 --- a/contributing/samples/adk_answering_agent/main.py +++ b/contributing/samples/adk_answering_agent/main.py @@ -1,6 +1,6 @@ """ADK Answering Agent main script.""" -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_answering_agent/settings.py b/contributing/samples/adk_answering_agent/settings.py index 5ca57481b2f..e7b1f8275e3 100644 --- a/contributing/samples/adk_answering_agent/settings.py +++ b/contributing/samples/adk_answering_agent/settings.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_answering_agent/tools.py b/contributing/samples/adk_answering_agent/tools.py index cb20b29cc0c..b817e6f0362 100644 --- a/contributing/samples/adk_answering_agent/tools.py +++ b/contributing/samples/adk_answering_agent/tools.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_answering_agent/upload_docs_to_vertex_ai_search.py b/contributing/samples/adk_answering_agent/upload_docs_to_vertex_ai_search.py index 96fe6adf0aa..fcf312753e7 100644 --- a/contributing/samples/adk_answering_agent/upload_docs_to_vertex_ai_search.py +++ b/contributing/samples/adk_answering_agent/upload_docs_to_vertex_ai_search.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_answering_agent/utils.py b/contributing/samples/adk_answering_agent/utils.py index dafebed2728..71eb18c5546 100644 --- a/contributing/samples/adk_answering_agent/utils.py +++ b/contributing/samples/adk_answering_agent/utils.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_documentation/__init__.py b/contributing/samples/adk_documentation/__init__.py index 0a2669d7a25..58d482ea386 100644 --- a/contributing/samples/adk_documentation/__init__.py +++ b/contributing/samples/adk_documentation/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_documentation/adk_docs_updater/__init__.py b/contributing/samples/adk_documentation/adk_docs_updater/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/adk_documentation/adk_docs_updater/__init__.py +++ b/contributing/samples/adk_documentation/adk_docs_updater/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_documentation/adk_docs_updater/agent.py b/contributing/samples/adk_documentation/adk_docs_updater/agent.py index c54a5c27de0..4b3cac07947 100644 --- a/contributing/samples/adk_documentation/adk_docs_updater/agent.py +++ b/contributing/samples/adk_documentation/adk_docs_updater/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_documentation/adk_docs_updater/main.py b/contributing/samples/adk_documentation/adk_docs_updater/main.py index 3c3839fb612..4fcdb6e6594 100644 --- a/contributing/samples/adk_documentation/adk_docs_updater/main.py +++ b/contributing/samples/adk_documentation/adk_docs_updater/main.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_documentation/adk_release_analyzer/__init__.py b/contributing/samples/adk_documentation/adk_release_analyzer/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/adk_documentation/adk_release_analyzer/__init__.py +++ b/contributing/samples/adk_documentation/adk_release_analyzer/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_documentation/adk_release_analyzer/agent.py b/contributing/samples/adk_documentation/adk_release_analyzer/agent.py index ddad17d3109..158df0fe43a 100644 --- a/contributing/samples/adk_documentation/adk_release_analyzer/agent.py +++ b/contributing/samples/adk_documentation/adk_release_analyzer/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_documentation/adk_release_analyzer/main.py b/contributing/samples/adk_documentation/adk_release_analyzer/main.py index 1d43302c841..bfad49e5e0c 100644 --- a/contributing/samples/adk_documentation/adk_release_analyzer/main.py +++ b/contributing/samples/adk_documentation/adk_release_analyzer/main.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_documentation/settings.py b/contributing/samples/adk_documentation/settings.py index 247aa4c4c07..3ef47f1ce0b 100644 --- a/contributing/samples/adk_documentation/settings.py +++ b/contributing/samples/adk_documentation/settings.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_documentation/tools.py b/contributing/samples/adk_documentation/tools.py index c6fd4c2f4d6..66c858c04f3 100644 --- a/contributing/samples/adk_documentation/tools.py +++ b/contributing/samples/adk_documentation/tools.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_documentation/utils.py b/contributing/samples/adk_documentation/utils.py index 1fd2efbf4a7..89bfb66384d 100644 --- a/contributing/samples/adk_documentation/utils.py +++ b/contributing/samples/adk_documentation/utils.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_issue_formatting_agent/__init__.py b/contributing/samples/adk_issue_formatting_agent/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/adk_issue_formatting_agent/__init__.py +++ b/contributing/samples/adk_issue_formatting_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_issue_formatting_agent/agent.py b/contributing/samples/adk_issue_formatting_agent/agent.py index f2450b3240d..5aa55998c0f 100644 --- a/contributing/samples/adk_issue_formatting_agent/agent.py +++ b/contributing/samples/adk_issue_formatting_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_issue_formatting_agent/settings.py b/contributing/samples/adk_issue_formatting_agent/settings.py index d29bda9b754..ed5b1c49b27 100644 --- a/contributing/samples/adk_issue_formatting_agent/settings.py +++ b/contributing/samples/adk_issue_formatting_agent/settings.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_issue_formatting_agent/utils.py b/contributing/samples/adk_issue_formatting_agent/utils.py index c8c4561bdcc..54498c8886c 100644 --- a/contributing/samples/adk_issue_formatting_agent/utils.py +++ b/contributing/samples/adk_issue_formatting_agent/utils.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_knowledge_agent/__init__.py b/contributing/samples/adk_knowledge_agent/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/adk_knowledge_agent/__init__.py +++ b/contributing/samples/adk_knowledge_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_knowledge_agent/agent.py b/contributing/samples/adk_knowledge_agent/agent.py index 90eb5e6691a..9ac23dc1f18 100644 --- a/contributing/samples/adk_knowledge_agent/agent.py +++ b/contributing/samples/adk_knowledge_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_pr_agent/__init__.py b/contributing/samples/adk_pr_agent/__init__.py index c48963cdc7b..4015e47d6e4 100755 --- a/contributing/samples/adk_pr_agent/__init__.py +++ b/contributing/samples/adk_pr_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_pr_agent/agent.py b/contributing/samples/adk_pr_agent/agent.py index 7d6088ac456..043cfa61ba4 100644 --- a/contributing/samples/adk_pr_agent/agent.py +++ b/contributing/samples/adk_pr_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_pr_agent/main.py b/contributing/samples/adk_pr_agent/main.py index ecf332c2d60..272b678764a 100644 --- a/contributing/samples/adk_pr_agent/main.py +++ b/contributing/samples/adk_pr_agent/main.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_pr_triaging_agent/__init__.py b/contributing/samples/adk_pr_triaging_agent/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/adk_pr_triaging_agent/__init__.py +++ b/contributing/samples/adk_pr_triaging_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_pr_triaging_agent/agent.py b/contributing/samples/adk_pr_triaging_agent/agent.py index 11f45131e4a..8363995cc36 100644 --- a/contributing/samples/adk_pr_triaging_agent/agent.py +++ b/contributing/samples/adk_pr_triaging_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_pr_triaging_agent/main.py b/contributing/samples/adk_pr_triaging_agent/main.py index ad5893d8555..fef2f242ae6 100644 --- a/contributing/samples/adk_pr_triaging_agent/main.py +++ b/contributing/samples/adk_pr_triaging_agent/main.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_pr_triaging_agent/settings.py b/contributing/samples/adk_pr_triaging_agent/settings.py index ca1d7ff2b77..844dbdc67b4 100644 --- a/contributing/samples/adk_pr_triaging_agent/settings.py +++ b/contributing/samples/adk_pr_triaging_agent/settings.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_pr_triaging_agent/utils.py b/contributing/samples/adk_pr_triaging_agent/utils.py index ebcfda9fad4..1b0afbb093e 100644 --- a/contributing/samples/adk_pr_triaging_agent/utils.py +++ b/contributing/samples/adk_pr_triaging_agent/utils.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_stale_agent/__init__.py b/contributing/samples/adk_stale_agent/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/adk_stale_agent/__init__.py +++ b/contributing/samples/adk_stale_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_stale_agent/agent.py b/contributing/samples/adk_stale_agent/agent.py index e9fbe49bdff..5e252aabf7e 100644 --- a/contributing/samples/adk_stale_agent/agent.py +++ b/contributing/samples/adk_stale_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_stale_agent/main.py b/contributing/samples/adk_stale_agent/main.py index d4fe58dd633..f61f87f3330 100644 --- a/contributing/samples/adk_stale_agent/main.py +++ b/contributing/samples/adk_stale_agent/main.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_stale_agent/settings.py b/contributing/samples/adk_stale_agent/settings.py index 599c6ef2ead..82f6d3a4f0c 100644 --- a/contributing/samples/adk_stale_agent/settings.py +++ b/contributing/samples/adk_stale_agent/settings.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_stale_agent/utils.py b/contributing/samples/adk_stale_agent/utils.py index a396c22ac71..e7cd7210253 100644 --- a/contributing/samples/adk_stale_agent/utils.py +++ b/contributing/samples/adk_stale_agent/utils.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_triaging_agent/__init__.py b/contributing/samples/adk_triaging_agent/__init__.py index c48963cdc7b..4015e47d6e4 100755 --- a/contributing/samples/adk_triaging_agent/__init__.py +++ b/contributing/samples/adk_triaging_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_triaging_agent/agent.py b/contributing/samples/adk_triaging_agent/agent.py index 59cfb399ab5..313e9cc15fc 100644 --- a/contributing/samples/adk_triaging_agent/agent.py +++ b/contributing/samples/adk_triaging_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_triaging_agent/main.py b/contributing/samples/adk_triaging_agent/main.py index 3a2d4da5708..2d65cfd67d1 100644 --- a/contributing/samples/adk_triaging_agent/main.py +++ b/contributing/samples/adk_triaging_agent/main.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_triaging_agent/settings.py b/contributing/samples/adk_triaging_agent/settings.py index ea21f8c6790..fdc8b4e0338 100644 --- a/contributing/samples/adk_triaging_agent/settings.py +++ b/contributing/samples/adk_triaging_agent/settings.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/adk_triaging_agent/utils.py b/contributing/samples/adk_triaging_agent/utils.py index fca421abb85..8c5aa9b19dc 100644 --- a/contributing/samples/adk_triaging_agent/utils.py +++ b/contributing/samples/adk_triaging_agent/utils.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/agent_engine_code_execution/__init__.py b/contributing/samples/agent_engine_code_execution/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/agent_engine_code_execution/__init__.py +++ b/contributing/samples/agent_engine_code_execution/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/agent_engine_code_execution/agent.py b/contributing/samples/agent_engine_code_execution/agent.py index ae58ec8dc49..d85989eb2dd 100644 --- a/contributing/samples/agent_engine_code_execution/agent.py +++ b/contributing/samples/agent_engine_code_execution/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/api_registry_agent/__init__.py b/contributing/samples/api_registry_agent/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/api_registry_agent/__init__.py +++ b/contributing/samples/api_registry_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/api_registry_agent/agent.py b/contributing/samples/api_registry_agent/agent.py index 393a5412541..5247c9fac52 100644 --- a/contributing/samples/api_registry_agent/agent.py +++ b/contributing/samples/api_registry_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/application_integration_agent/__init__.py b/contributing/samples/application_integration_agent/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/application_integration_agent/__init__.py +++ b/contributing/samples/application_integration_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/application_integration_agent/agent.py b/contributing/samples/application_integration_agent/agent.py index 83e1143600c..fed5d8e5d13 100644 --- a/contributing/samples/application_integration_agent/agent.py +++ b/contributing/samples/application_integration_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/artifact_save_text/__init__.py b/contributing/samples/artifact_save_text/__init__.py index c48963cdc7b..4015e47d6e4 100755 --- a/contributing/samples/artifact_save_text/__init__.py +++ b/contributing/samples/artifact_save_text/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/artifact_save_text/agent.py b/contributing/samples/artifact_save_text/agent.py index 3ce43bcd156..0dd719aa962 100755 --- a/contributing/samples/artifact_save_text/agent.py +++ b/contributing/samples/artifact_save_text/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/authn-adk-all-in-one/adk_agents/agent_openapi_tools/__init__.py b/contributing/samples/authn-adk-all-in-one/adk_agents/agent_openapi_tools/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/authn-adk-all-in-one/adk_agents/agent_openapi_tools/__init__.py +++ b/contributing/samples/authn-adk-all-in-one/adk_agents/agent_openapi_tools/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/authn-adk-all-in-one/adk_agents/agent_openapi_tools/agent.py b/contributing/samples/authn-adk-all-in-one/adk_agents/agent_openapi_tools/agent.py index db956ea4544..ea9101d4906 100644 --- a/contributing/samples/authn-adk-all-in-one/adk_agents/agent_openapi_tools/agent.py +++ b/contributing/samples/authn-adk-all-in-one/adk_agents/agent_openapi_tools/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/authn-adk-all-in-one/hotel_booker_app/hotelbooker_core.py b/contributing/samples/authn-adk-all-in-one/hotel_booker_app/hotelbooker_core.py index 3f6916034fd..8bf94632d83 100644 --- a/contributing/samples/authn-adk-all-in-one/hotel_booker_app/hotelbooker_core.py +++ b/contributing/samples/authn-adk-all-in-one/hotel_booker_app/hotelbooker_core.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/authn-adk-all-in-one/hotel_booker_app/main.py b/contributing/samples/authn-adk-all-in-one/hotel_booker_app/main.py index 87cbccd3c09..3f7c67dcba6 100644 --- a/contributing/samples/authn-adk-all-in-one/hotel_booker_app/main.py +++ b/contributing/samples/authn-adk-all-in-one/hotel_booker_app/main.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/authn-adk-all-in-one/idp/app.py b/contributing/samples/authn-adk-all-in-one/idp/app.py index 0cc15cd0847..259059ceda5 100644 --- a/contributing/samples/authn-adk-all-in-one/idp/app.py +++ b/contributing/samples/authn-adk-all-in-one/idp/app.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/bigquery/__init__.py b/contributing/samples/bigquery/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/bigquery/__init__.py +++ b/contributing/samples/bigquery/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/bigquery/agent.py b/contributing/samples/bigquery/agent.py index 2389b25f472..5601795d113 100644 --- a/contributing/samples/bigquery/agent.py +++ b/contributing/samples/bigquery/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/bigtable/__init__.py b/contributing/samples/bigtable/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/bigtable/__init__.py +++ b/contributing/samples/bigtable/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/bigtable/agent.py b/contributing/samples/bigtable/agent.py index d79a640ba32..d35f51c1efa 100644 --- a/contributing/samples/bigtable/agent.py +++ b/contributing/samples/bigtable/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/built_in_multi_tools/__init__.py b/contributing/samples/built_in_multi_tools/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/built_in_multi_tools/__init__.py +++ b/contributing/samples/built_in_multi_tools/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/built_in_multi_tools/agent.py b/contributing/samples/built_in_multi_tools/agent.py index 3eb9ce8befa..03b53b12fa4 100644 --- a/contributing/samples/built_in_multi_tools/agent.py +++ b/contributing/samples/built_in_multi_tools/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/cache_analysis/__init__.py b/contributing/samples/cache_analysis/__init__.py index 3d21a562d34..2d0ae3183ec 100644 --- a/contributing/samples/cache_analysis/__init__.py +++ b/contributing/samples/cache_analysis/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/cache_analysis/agent.py b/contributing/samples/cache_analysis/agent.py index b1a25bf88ac..d768cb97c33 100644 --- a/contributing/samples/cache_analysis/agent.py +++ b/contributing/samples/cache_analysis/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/cache_analysis/run_cache_experiments.py b/contributing/samples/cache_analysis/run_cache_experiments.py index c65df3cf1d2..d163e09363d 100644 --- a/contributing/samples/cache_analysis/run_cache_experiments.py +++ b/contributing/samples/cache_analysis/run_cache_experiments.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/cache_analysis/utils.py b/contributing/samples/cache_analysis/utils.py index e2c9f891014..2c4ad71d2f5 100644 --- a/contributing/samples/cache_analysis/utils.py +++ b/contributing/samples/cache_analysis/utils.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/callbacks/__init__.py b/contributing/samples/callbacks/__init__.py index c48963cdc7b..4015e47d6e4 100755 --- a/contributing/samples/callbacks/__init__.py +++ b/contributing/samples/callbacks/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/callbacks/agent.py b/contributing/samples/callbacks/agent.py index adbf15a643d..e67b7de2ca2 100755 --- a/contributing/samples/callbacks/agent.py +++ b/contributing/samples/callbacks/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/callbacks/main.py b/contributing/samples/callbacks/main.py index 7cbf15e4803..17038c42f79 100755 --- a/contributing/samples/callbacks/main.py +++ b/contributing/samples/callbacks/main.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/code_execution/__init__.py b/contributing/samples/code_execution/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/code_execution/__init__.py +++ b/contributing/samples/code_execution/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/code_execution/agent.py b/contributing/samples/code_execution/agent.py index 82de04f25d9..9f99ac45826 100644 --- a/contributing/samples/code_execution/agent.py +++ b/contributing/samples/code_execution/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/code_execution/gke_sandbox_agent.py b/contributing/samples/code_execution/gke_sandbox_agent.py index 4baaf521526..a92de91c389 100644 --- a/contributing/samples/code_execution/gke_sandbox_agent.py +++ b/contributing/samples/code_execution/gke_sandbox_agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/computer_use/agent.py b/contributing/samples/computer_use/agent.py index 001995019d4..74bac02c774 100755 --- a/contributing/samples/computer_use/agent.py +++ b/contributing/samples/computer_use/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/computer_use/playwright.py b/contributing/samples/computer_use/playwright.py index 89b216adf3d..e8a5e95f02c 100644 --- a/contributing/samples/computer_use/playwright.py +++ b/contributing/samples/computer_use/playwright.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/context_offloading_with_artifact/__init__.py b/contributing/samples/context_offloading_with_artifact/__init__.py index c48963cdc7b..4015e47d6e4 100755 --- a/contributing/samples/context_offloading_with_artifact/__init__.py +++ b/contributing/samples/context_offloading_with_artifact/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/context_offloading_with_artifact/agent.py b/contributing/samples/context_offloading_with_artifact/agent.py index 622834917e2..6e62e8f034d 100755 --- a/contributing/samples/context_offloading_with_artifact/agent.py +++ b/contributing/samples/context_offloading_with_artifact/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/core_callback_config/__init__.py b/contributing/samples/core_callback_config/__init__.py index 0a2669d7a25..58d482ea386 100644 --- a/contributing/samples/core_callback_config/__init__.py +++ b/contributing/samples/core_callback_config/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/core_custom_agent_config/__init__.py b/contributing/samples/core_custom_agent_config/__init__.py index 0a2669d7a25..58d482ea386 100644 --- a/contributing/samples/core_custom_agent_config/__init__.py +++ b/contributing/samples/core_custom_agent_config/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/core_custom_agent_config/my_agents.py b/contributing/samples/core_custom_agent_config/my_agents.py index 750fcc6c47c..4282c1d4896 100644 --- a/contributing/samples/core_custom_agent_config/my_agents.py +++ b/contributing/samples/core_custom_agent_config/my_agents.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/crewai_tool_kwargs/__init__.py b/contributing/samples/crewai_tool_kwargs/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/crewai_tool_kwargs/__init__.py +++ b/contributing/samples/crewai_tool_kwargs/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/crewai_tool_kwargs/agent.py b/contributing/samples/crewai_tool_kwargs/agent.py index f52d703dc82..5e863558a06 100644 --- a/contributing/samples/crewai_tool_kwargs/agent.py +++ b/contributing/samples/crewai_tool_kwargs/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/crewai_tool_kwargs/main.py b/contributing/samples/crewai_tool_kwargs/main.py index 15ade6f7745..2b0cd8230c2 100644 --- a/contributing/samples/crewai_tool_kwargs/main.py +++ b/contributing/samples/crewai_tool_kwargs/main.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/custom_code_execution/__init__.py b/contributing/samples/custom_code_execution/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/custom_code_execution/__init__.py +++ b/contributing/samples/custom_code_execution/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/custom_code_execution/agent.py b/contributing/samples/custom_code_execution/agent.py index e27c8dfb267..2c6efed3487 100644 --- a/contributing/samples/custom_code_execution/agent.py +++ b/contributing/samples/custom_code_execution/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/dummy_services.py b/contributing/samples/dummy_services.py index 50c5dfab3a6..5fff0c96748 100644 --- a/contributing/samples/dummy_services.py +++ b/contributing/samples/dummy_services.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/fields_output_schema/__init__.py b/contributing/samples/fields_output_schema/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/fields_output_schema/__init__.py +++ b/contributing/samples/fields_output_schema/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/fields_output_schema/agent.py b/contributing/samples/fields_output_schema/agent.py index 70645ea9ba2..de40774d81e 100644 --- a/contributing/samples/fields_output_schema/agent.py +++ b/contributing/samples/fields_output_schema/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/fields_planner/__init__.py b/contributing/samples/fields_planner/__init__.py index c48963cdc7b..4015e47d6e4 100755 --- a/contributing/samples/fields_planner/__init__.py +++ b/contributing/samples/fields_planner/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/fields_planner/agent.py b/contributing/samples/fields_planner/agent.py index a40616585d7..b75dfec73c9 100755 --- a/contributing/samples/fields_planner/agent.py +++ b/contributing/samples/fields_planner/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/fields_planner/main.py b/contributing/samples/fields_planner/main.py index 01a5e4aa4e0..0c128fd982b 100755 --- a/contributing/samples/fields_planner/main.py +++ b/contributing/samples/fields_planner/main.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/generate_image/__init__.py b/contributing/samples/generate_image/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/generate_image/__init__.py +++ b/contributing/samples/generate_image/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/generate_image/agent.py b/contributing/samples/generate_image/agent.py index 85894427326..4379de1b572 100644 --- a/contributing/samples/generate_image/agent.py +++ b/contributing/samples/generate_image/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,15 +15,15 @@ from google.adk import Agent from google.adk.tools import load_artifacts from google.adk.tools.tool_context import ToolContext -from google.genai import Client from google.genai import types -# Only Vertex AI supports image generation for now. -client = Client() - async def generate_image(prompt: str, tool_context: 'ToolContext'): """Generates an image based on the prompt.""" + from google.genai import Client + + # Only Vertex AI supports image generation for now. + client = Client() response = client.models.generate_images( model='imagen-3.0-generate-002', prompt=prompt, diff --git a/contributing/samples/gepa/__init__.py b/contributing/samples/gepa/__init__.py index 0a2669d7a25..58d482ea386 100644 --- a/contributing/samples/gepa/__init__.py +++ b/contributing/samples/gepa/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/gepa/adk_agent.py b/contributing/samples/gepa/adk_agent.py index e4bc517def4..808426f9a32 100644 --- a/contributing/samples/gepa/adk_agent.py +++ b/contributing/samples/gepa/adk_agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/gepa/adk_agent_test.py b/contributing/samples/gepa/adk_agent_test.py index ff6137e23a4..bdffd125f83 100644 --- a/contributing/samples/gepa/adk_agent_test.py +++ b/contributing/samples/gepa/adk_agent_test.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/gepa/experiment.py b/contributing/samples/gepa/experiment.py index 2f5d03a7728..f3751206a89 100644 --- a/contributing/samples/gepa/experiment.py +++ b/contributing/samples/gepa/experiment.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/gepa/rater_lib.py b/contributing/samples/gepa/rater_lib.py index 732d1bcf9d1..50bbdc229d2 100644 --- a/contributing/samples/gepa/rater_lib.py +++ b/contributing/samples/gepa/rater_lib.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/gepa/run_experiment.py b/contributing/samples/gepa/run_experiment.py index cfd850b3a30..d857da96350 100644 --- a/contributing/samples/gepa/run_experiment.py +++ b/contributing/samples/gepa/run_experiment.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/gepa/tau_bench_agent.py b/contributing/samples/gepa/tau_bench_agent.py index beb78b96434..cd6b0212410 100644 --- a/contributing/samples/gepa/tau_bench_agent.py +++ b/contributing/samples/gepa/tau_bench_agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/gepa/utils.py b/contributing/samples/gepa/utils.py index 0763d280439..19f35f551f6 100644 --- a/contributing/samples/gepa/utils.py +++ b/contributing/samples/gepa/utils.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/gepa/voter_agent/gepa.ipynb b/contributing/samples/gepa/voter_agent/gepa.ipynb index 2b920d6cf8c..5131bedc391 100644 --- a/contributing/samples/gepa/voter_agent/gepa.ipynb +++ b/contributing/samples/gepa/voter_agent/gepa.ipynb @@ -8,7 +8,7 @@ }, "outputs": [], "source": [ - "# Copyright 2025 Google LLC\n", + "# Copyright 2026 Google LLC\n", "#\n", "# Licensed under the Apache License, Version 2.0 (the \"License\");\n", "# you may not use this file except in compliance with the License.\n", diff --git a/contributing/samples/gepa/voter_agent/tools.py b/contributing/samples/gepa/voter_agent/tools.py index c677591ada4..80cffa72f89 100644 --- a/contributing/samples/gepa/voter_agent/tools.py +++ b/contributing/samples/gepa/voter_agent/tools.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/google_api/__init__.py b/contributing/samples/google_api/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/google_api/__init__.py +++ b/contributing/samples/google_api/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/google_api/agent.py b/contributing/samples/google_api/agent.py index 390f1bca108..1a096ba8d59 100644 --- a/contributing/samples/google_api/agent.py +++ b/contributing/samples/google_api/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/google_search_agent/__init__.py b/contributing/samples/google_search_agent/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/google_search_agent/__init__.py +++ b/contributing/samples/google_search_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/google_search_agent/agent.py b/contributing/samples/google_search_agent/agent.py index 2f647812aba..63e877a8dad 100644 --- a/contributing/samples/google_search_agent/agent.py +++ b/contributing/samples/google_search_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/hello_world/__init__.py b/contributing/samples/hello_world/__init__.py index c48963cdc7b..4015e47d6e4 100755 --- a/contributing/samples/hello_world/__init__.py +++ b/contributing/samples/hello_world/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/hello_world/agent.py b/contributing/samples/hello_world/agent.py index 95d8b989e76..dade842526b 100755 --- a/contributing/samples/hello_world/agent.py +++ b/contributing/samples/hello_world/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/hello_world/main.py b/contributing/samples/hello_world/main.py index b9e30355280..0ffde913419 100755 --- a/contributing/samples/hello_world/main.py +++ b/contributing/samples/hello_world/main.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/hello_world_anthropic/__init__.py b/contributing/samples/hello_world_anthropic/__init__.py index 7d5bb0b1c6f..044e24d3883 100644 --- a/contributing/samples/hello_world_anthropic/__init__.py +++ b/contributing/samples/hello_world_anthropic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/hello_world_anthropic/agent.py b/contributing/samples/hello_world_anthropic/agent.py index bafe7fa1b67..ea408cfff9b 100644 --- a/contributing/samples/hello_world_anthropic/agent.py +++ b/contributing/samples/hello_world_anthropic/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/hello_world_anthropic/main.py b/contributing/samples/hello_world_anthropic/main.py index 8886267e01f..8abff7876c5 100644 --- a/contributing/samples/hello_world_anthropic/main.py +++ b/contributing/samples/hello_world_anthropic/main.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/hello_world_apigeellm/agent.py b/contributing/samples/hello_world_apigeellm/agent.py index 21bf0936b99..3c36e768fb7 100644 --- a/contributing/samples/hello_world_apigeellm/agent.py +++ b/contributing/samples/hello_world_apigeellm/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/hello_world_apigeellm/main.py b/contributing/samples/hello_world_apigeellm/main.py index 1e81097ddca..b57482fd2f4 100644 --- a/contributing/samples/hello_world_apigeellm/main.py +++ b/contributing/samples/hello_world_apigeellm/main.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/hello_world_app/__init__.py b/contributing/samples/hello_world_app/__init__.py index c48963cdc7b..4015e47d6e4 100755 --- a/contributing/samples/hello_world_app/__init__.py +++ b/contributing/samples/hello_world_app/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/hello_world_app/agent.py b/contributing/samples/hello_world_app/agent.py index 04ba197946b..dd8dd312fc0 100755 --- a/contributing/samples/hello_world_app/agent.py +++ b/contributing/samples/hello_world_app/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/hello_world_app/main.py b/contributing/samples/hello_world_app/main.py index f9a2ac78d08..d024b4cef23 100755 --- a/contributing/samples/hello_world_app/main.py +++ b/contributing/samples/hello_world_app/main.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/hello_world_gemma/__init__.py b/contributing/samples/hello_world_gemma/__init__.py index 7d5bb0b1c6f..044e24d3883 100644 --- a/contributing/samples/hello_world_gemma/__init__.py +++ b/contributing/samples/hello_world_gemma/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/hello_world_gemma/agent.py b/contributing/samples/hello_world_gemma/agent.py index 3407d721d33..c6e56402420 100644 --- a/contributing/samples/hello_world_gemma/agent.py +++ b/contributing/samples/hello_world_gemma/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/hello_world_gemma/main.py b/contributing/samples/hello_world_gemma/main.py index f177064b689..7f46027df83 100644 --- a/contributing/samples/hello_world_gemma/main.py +++ b/contributing/samples/hello_world_gemma/main.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/hello_world_gemma3_ollama/__init__.py b/contributing/samples/hello_world_gemma3_ollama/__init__.py index 7d5bb0b1c6f..044e24d3883 100644 --- a/contributing/samples/hello_world_gemma3_ollama/__init__.py +++ b/contributing/samples/hello_world_gemma3_ollama/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/hello_world_gemma3_ollama/agent.py b/contributing/samples/hello_world_gemma3_ollama/agent.py index 58294e56618..ae89a451539 100644 --- a/contributing/samples/hello_world_gemma3_ollama/agent.py +++ b/contributing/samples/hello_world_gemma3_ollama/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/hello_world_gemma3_ollama/main.py b/contributing/samples/hello_world_gemma3_ollama/main.py index a383b4f279f..7f97d5e63dc 100644 --- a/contributing/samples/hello_world_gemma3_ollama/main.py +++ b/contributing/samples/hello_world_gemma3_ollama/main.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/hello_world_litellm/__init__.py b/contributing/samples/hello_world_litellm/__init__.py index 7d5bb0b1c6f..044e24d3883 100644 --- a/contributing/samples/hello_world_litellm/__init__.py +++ b/contributing/samples/hello_world_litellm/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/hello_world_litellm/agent.py b/contributing/samples/hello_world_litellm/agent.py index 3a4189403f0..c41c5b0cdca 100644 --- a/contributing/samples/hello_world_litellm/agent.py +++ b/contributing/samples/hello_world_litellm/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/hello_world_litellm/main.py b/contributing/samples/hello_world_litellm/main.py index 4492c6153bd..aacdded41e8 100644 --- a/contributing/samples/hello_world_litellm/main.py +++ b/contributing/samples/hello_world_litellm/main.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/hello_world_litellm_add_function_to_prompt/__init__.py b/contributing/samples/hello_world_litellm_add_function_to_prompt/__init__.py index 7d5bb0b1c6f..044e24d3883 100644 --- a/contributing/samples/hello_world_litellm_add_function_to_prompt/__init__.py +++ b/contributing/samples/hello_world_litellm_add_function_to_prompt/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/hello_world_litellm_add_function_to_prompt/agent.py b/contributing/samples/hello_world_litellm_add_function_to_prompt/agent.py index 0f10621ae7f..a24d0f11eb5 100644 --- a/contributing/samples/hello_world_litellm_add_function_to_prompt/agent.py +++ b/contributing/samples/hello_world_litellm_add_function_to_prompt/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/hello_world_litellm_add_function_to_prompt/main.py b/contributing/samples/hello_world_litellm_add_function_to_prompt/main.py index 4bec7d0500a..4ec966226cc 100644 --- a/contributing/samples/hello_world_litellm_add_function_to_prompt/main.py +++ b/contributing/samples/hello_world_litellm_add_function_to_prompt/main.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/hello_world_ma/__init__.py b/contributing/samples/hello_world_ma/__init__.py index c48963cdc7b..4015e47d6e4 100755 --- a/contributing/samples/hello_world_ma/__init__.py +++ b/contributing/samples/hello_world_ma/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/hello_world_ma/agent.py b/contributing/samples/hello_world_ma/agent.py index 410d516d126..fad1e2b9eb1 100755 --- a/contributing/samples/hello_world_ma/agent.py +++ b/contributing/samples/hello_world_ma/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/hello_world_ollama/__init__.py b/contributing/samples/hello_world_ollama/__init__.py index c48963cdc7b..4015e47d6e4 100755 --- a/contributing/samples/hello_world_ollama/__init__.py +++ b/contributing/samples/hello_world_ollama/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/hello_world_ollama/agent.py b/contributing/samples/hello_world_ollama/agent.py index 7301aa53105..0fef917a023 100755 --- a/contributing/samples/hello_world_ollama/agent.py +++ b/contributing/samples/hello_world_ollama/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/hello_world_ollama/main.py b/contributing/samples/hello_world_ollama/main.py index 28fdbbbc920..f6bb2d74afc 100755 --- a/contributing/samples/hello_world_ollama/main.py +++ b/contributing/samples/hello_world_ollama/main.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/hello_world_stream_fc_args/__init__.py b/contributing/samples/hello_world_stream_fc_args/__init__.py index c48963cdc7b..4015e47d6e4 100755 --- a/contributing/samples/hello_world_stream_fc_args/__init__.py +++ b/contributing/samples/hello_world_stream_fc_args/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/hello_world_stream_fc_args/agent.py b/contributing/samples/hello_world_stream_fc_args/agent.py index f6138421715..8b0593a0bdc 100755 --- a/contributing/samples/hello_world_stream_fc_args/agent.py +++ b/contributing/samples/hello_world_stream_fc_args/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/history_management/__init__.py b/contributing/samples/history_management/__init__.py index c48963cdc7b..4015e47d6e4 100755 --- a/contributing/samples/history_management/__init__.py +++ b/contributing/samples/history_management/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/history_management/agent.py b/contributing/samples/history_management/agent.py index 9621b61cb6f..a9d4cf85ecb 100755 --- a/contributing/samples/history_management/agent.py +++ b/contributing/samples/history_management/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/history_management/main.py b/contributing/samples/history_management/main.py index 7cbf15e4803..17038c42f79 100755 --- a/contributing/samples/history_management/main.py +++ b/contributing/samples/history_management/main.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/human_in_loop/__init__.py b/contributing/samples/human_in_loop/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/human_in_loop/__init__.py +++ b/contributing/samples/human_in_loop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/human_in_loop/agent.py b/contributing/samples/human_in_loop/agent.py index 92f0c51af3d..3ea740b7a19 100644 --- a/contributing/samples/human_in_loop/agent.py +++ b/contributing/samples/human_in_loop/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/human_in_loop/main.py b/contributing/samples/human_in_loop/main.py index 2e664b73df7..3103da91476 100644 --- a/contributing/samples/human_in_loop/main.py +++ b/contributing/samples/human_in_loop/main.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/human_tool_confirmation/__init__.py b/contributing/samples/human_tool_confirmation/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/human_tool_confirmation/__init__.py +++ b/contributing/samples/human_tool_confirmation/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/human_tool_confirmation/agent.py b/contributing/samples/human_tool_confirmation/agent.py index e1ef5a518ef..bf9e6cdfc34 100644 --- a/contributing/samples/human_tool_confirmation/agent.py +++ b/contributing/samples/human_tool_confirmation/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/integration_connector_euc_agent/__init__.py b/contributing/samples/integration_connector_euc_agent/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/integration_connector_euc_agent/__init__.py +++ b/contributing/samples/integration_connector_euc_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/integration_connector_euc_agent/agent.py b/contributing/samples/integration_connector_euc_agent/agent.py index a66e812fa0c..7bac45909c7 100644 --- a/contributing/samples/integration_connector_euc_agent/agent.py +++ b/contributing/samples/integration_connector_euc_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/interactions_api/__init__.py b/contributing/samples/interactions_api/__init__.py index 1c8fb5723b1..f69d3b9701e 100644 --- a/contributing/samples/interactions_api/__init__.py +++ b/contributing/samples/interactions_api/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/interactions_api/agent.py b/contributing/samples/interactions_api/agent.py index 2928bb6ebd9..908a8539482 100644 --- a/contributing/samples/interactions_api/agent.py +++ b/contributing/samples/interactions_api/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/interactions_api/main.py b/contributing/samples/interactions_api/main.py index bfe73b7c060..a776f31ea94 100644 --- a/contributing/samples/interactions_api/main.py +++ b/contributing/samples/interactions_api/main.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/jira_agent/__init__.py b/contributing/samples/jira_agent/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/jira_agent/__init__.py +++ b/contributing/samples/jira_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/jira_agent/agent.py b/contributing/samples/jira_agent/agent.py index 537d8f0845f..70dcd11fe98 100644 --- a/contributing/samples/jira_agent/agent.py +++ b/contributing/samples/jira_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/jira_agent/tools.py b/contributing/samples/jira_agent/tools.py index 94c37565fa8..5f673a5e69f 100644 --- a/contributing/samples/jira_agent/tools.py +++ b/contributing/samples/jira_agent/tools.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/json_passing_agent/__init__.py b/contributing/samples/json_passing_agent/__init__.py index c48963cdc7b..4015e47d6e4 100755 --- a/contributing/samples/json_passing_agent/__init__.py +++ b/contributing/samples/json_passing_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/json_passing_agent/agent.py b/contributing/samples/json_passing_agent/agent.py index 532134f42a2..7d71ce3a65a 100755 --- a/contributing/samples/json_passing_agent/agent.py +++ b/contributing/samples/json_passing_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/json_passing_agent/main.py b/contributing/samples/json_passing_agent/main.py index f87d739bd6a..d0e68e11ff5 100644 --- a/contributing/samples/json_passing_agent/main.py +++ b/contributing/samples/json_passing_agent/main.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/langchain_structured_tool_agent/__init__.py b/contributing/samples/langchain_structured_tool_agent/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/langchain_structured_tool_agent/__init__.py +++ b/contributing/samples/langchain_structured_tool_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/langchain_structured_tool_agent/agent.py b/contributing/samples/langchain_structured_tool_agent/agent.py index e83bc40b2fe..a055edf3a5d 100644 --- a/contributing/samples/langchain_structured_tool_agent/agent.py +++ b/contributing/samples/langchain_structured_tool_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/langchain_youtube_search_agent/__init__.py b/contributing/samples/langchain_youtube_search_agent/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/langchain_youtube_search_agent/__init__.py +++ b/contributing/samples/langchain_youtube_search_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/langchain_youtube_search_agent/agent.py b/contributing/samples/langchain_youtube_search_agent/agent.py index 005fe387098..e3a893e4439 100644 --- a/contributing/samples/langchain_youtube_search_agent/agent.py +++ b/contributing/samples/langchain_youtube_search_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/litellm_inline_tool_call/__init__.py b/contributing/samples/litellm_inline_tool_call/__init__.py index 976288f8e2b..606228d280c 100644 --- a/contributing/samples/litellm_inline_tool_call/__init__.py +++ b/contributing/samples/litellm_inline_tool_call/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/litellm_inline_tool_call/agent.py b/contributing/samples/litellm_inline_tool_call/agent.py index 94847aa8d5c..76ca1ad14d0 100644 --- a/contributing/samples/litellm_inline_tool_call/agent.py +++ b/contributing/samples/litellm_inline_tool_call/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/litellm_structured_output/__init__.py b/contributing/samples/litellm_structured_output/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/litellm_structured_output/__init__.py +++ b/contributing/samples/litellm_structured_output/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/litellm_structured_output/agent.py b/contributing/samples/litellm_structured_output/agent.py index 8fdd5f6661f..b8741e36844 100644 --- a/contributing/samples/litellm_structured_output/agent.py +++ b/contributing/samples/litellm_structured_output/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/litellm_with_fallback_models/__init__.py b/contributing/samples/litellm_with_fallback_models/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/litellm_with_fallback_models/__init__.py +++ b/contributing/samples/litellm_with_fallback_models/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/litellm_with_fallback_models/agent.py b/contributing/samples/litellm_with_fallback_models/agent.py index 2e46a7fb44a..49deb248fd6 100644 --- a/contributing/samples/litellm_with_fallback_models/agent.py +++ b/contributing/samples/litellm_with_fallback_models/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/live_agent_api_server_example/live_agent_example.py b/contributing/samples/live_agent_api_server_example/live_agent_example.py index c6624124b14..da06be086af 100644 --- a/contributing/samples/live_agent_api_server_example/live_agent_example.py +++ b/contributing/samples/live_agent_api_server_example/live_agent_example.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/live_bidi_debug_utils/pcm_audio_player.py b/contributing/samples/live_bidi_debug_utils/pcm_audio_player.py index ab0726bf4f4..045ef10e485 100644 --- a/contributing/samples/live_bidi_debug_utils/pcm_audio_player.py +++ b/contributing/samples/live_bidi_debug_utils/pcm_audio_player.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/live_bidi_streaming_multi_agent/__init__.py b/contributing/samples/live_bidi_streaming_multi_agent/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/live_bidi_streaming_multi_agent/__init__.py +++ b/contributing/samples/live_bidi_streaming_multi_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/live_bidi_streaming_multi_agent/agent.py b/contributing/samples/live_bidi_streaming_multi_agent/agent.py index e69ada5aa12..312c0434916 100644 --- a/contributing/samples/live_bidi_streaming_multi_agent/agent.py +++ b/contributing/samples/live_bidi_streaming_multi_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/live_bidi_streaming_single_agent/__init__.py b/contributing/samples/live_bidi_streaming_single_agent/__init__.py index c48963cdc7b..4015e47d6e4 100755 --- a/contributing/samples/live_bidi_streaming_single_agent/__init__.py +++ b/contributing/samples/live_bidi_streaming_single_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/live_bidi_streaming_single_agent/agent.py b/contributing/samples/live_bidi_streaming_single_agent/agent.py index cd707a35571..f20c9486412 100755 --- a/contributing/samples/live_bidi_streaming_single_agent/agent.py +++ b/contributing/samples/live_bidi_streaming_single_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/live_bidi_streaming_tools_agent/__init__.py b/contributing/samples/live_bidi_streaming_tools_agent/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/live_bidi_streaming_tools_agent/__init__.py +++ b/contributing/samples/live_bidi_streaming_tools_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/live_bidi_streaming_tools_agent/agent.py b/contributing/samples/live_bidi_streaming_tools_agent/agent.py index 18a947bbc4e..57e2279e10e 100644 --- a/contributing/samples/live_bidi_streaming_tools_agent/agent.py +++ b/contributing/samples/live_bidi_streaming_tools_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -52,6 +52,8 @@ async def monitor_video_stream( input_stream: LiveRequestQueue, ) -> AsyncGenerator[str, None]: """Monitor how many people are in the video streams.""" + from google.genai import Client + print("start monitor_video_stream!") from google.genai import Client diff --git a/contributing/samples/live_tool_callbacks_agent/__init__.py b/contributing/samples/live_tool_callbacks_agent/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/live_tool_callbacks_agent/__init__.py +++ b/contributing/samples/live_tool_callbacks_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/live_tool_callbacks_agent/agent.py b/contributing/samples/live_tool_callbacks_agent/agent.py index 95af9d8f22c..a140ac5a151 100644 --- a/contributing/samples/live_tool_callbacks_agent/agent.py +++ b/contributing/samples/live_tool_callbacks_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/logprobs/__init__.py b/contributing/samples/logprobs/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/logprobs/__init__.py +++ b/contributing/samples/logprobs/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/logprobs/agent.py b/contributing/samples/logprobs/agent.py index c5f7daaba41..d38e6ccd409 100644 --- a/contributing/samples/logprobs/agent.py +++ b/contributing/samples/logprobs/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/manual_ollama_test/__init__.py b/contributing/samples/manual_ollama_test/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/manual_ollama_test/__init__.py +++ b/contributing/samples/manual_ollama_test/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/manual_ollama_test/agent.py b/contributing/samples/manual_ollama_test/agent.py index e3d071b96fe..2fe8909831b 100644 --- a/contributing/samples/manual_ollama_test/agent.py +++ b/contributing/samples/manual_ollama_test/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/mcp_dynamic_header_agent/__init__.py b/contributing/samples/mcp_dynamic_header_agent/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/mcp_dynamic_header_agent/__init__.py +++ b/contributing/samples/mcp_dynamic_header_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/mcp_dynamic_header_agent/agent.py b/contributing/samples/mcp_dynamic_header_agent/agent.py index 028d7feb120..17768c16e4c 100644 --- a/contributing/samples/mcp_dynamic_header_agent/agent.py +++ b/contributing/samples/mcp_dynamic_header_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/mcp_dynamic_header_agent/header_server.py b/contributing/samples/mcp_dynamic_header_agent/header_server.py index 386ae43bdfc..095cb0ed933 100644 --- a/contributing/samples/mcp_dynamic_header_agent/header_server.py +++ b/contributing/samples/mcp_dynamic_header_agent/header_server.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/mcp_in_agent_tool_remote/__init__.py b/contributing/samples/mcp_in_agent_tool_remote/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/mcp_in_agent_tool_remote/__init__.py +++ b/contributing/samples/mcp_in_agent_tool_remote/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/mcp_in_agent_tool_remote/agent.py b/contributing/samples/mcp_in_agent_tool_remote/agent.py index f446d8ca592..f486274aa85 100644 --- a/contributing/samples/mcp_in_agent_tool_remote/agent.py +++ b/contributing/samples/mcp_in_agent_tool_remote/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/mcp_in_agent_tool_stdio/__init__.py b/contributing/samples/mcp_in_agent_tool_stdio/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/mcp_in_agent_tool_stdio/__init__.py +++ b/contributing/samples/mcp_in_agent_tool_stdio/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/mcp_in_agent_tool_stdio/agent.py b/contributing/samples/mcp_in_agent_tool_stdio/agent.py index e140bf7b252..74e20387e9e 100644 --- a/contributing/samples/mcp_in_agent_tool_stdio/agent.py +++ b/contributing/samples/mcp_in_agent_tool_stdio/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/mcp_postgres_agent/__init__.py b/contributing/samples/mcp_postgres_agent/__init__.py index c48963cdc7b..4015e47d6e4 100755 --- a/contributing/samples/mcp_postgres_agent/__init__.py +++ b/contributing/samples/mcp_postgres_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/mcp_postgres_agent/agent.py b/contributing/samples/mcp_postgres_agent/agent.py index 7298e250042..7224c34ab58 100644 --- a/contributing/samples/mcp_postgres_agent/agent.py +++ b/contributing/samples/mcp_postgres_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/mcp_server_side_sampling/__init__.py b/contributing/samples/mcp_server_side_sampling/__init__.py index c48963cdc7b..4015e47d6e4 100755 --- a/contributing/samples/mcp_server_side_sampling/__init__.py +++ b/contributing/samples/mcp_server_side_sampling/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/mcp_server_side_sampling/agent.py b/contributing/samples/mcp_server_side_sampling/agent.py index 36695f1bdf0..23396d96c3a 100755 --- a/contributing/samples/mcp_server_side_sampling/agent.py +++ b/contributing/samples/mcp_server_side_sampling/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/mcp_server_side_sampling/mcp_server.py b/contributing/samples/mcp_server_side_sampling/mcp_server.py index 2680c29dddc..364b8b6f4a2 100644 --- a/contributing/samples/mcp_server_side_sampling/mcp_server.py +++ b/contributing/samples/mcp_server_side_sampling/mcp_server.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/mcp_service_account_agent/__init__.py b/contributing/samples/mcp_service_account_agent/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/mcp_service_account_agent/__init__.py +++ b/contributing/samples/mcp_service_account_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/mcp_service_account_agent/agent.py b/contributing/samples/mcp_service_account_agent/agent.py index dc3ebf7b1a5..a62e30cea23 100644 --- a/contributing/samples/mcp_service_account_agent/agent.py +++ b/contributing/samples/mcp_service_account_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/mcp_sse_agent/__init__.py b/contributing/samples/mcp_sse_agent/__init__.py index c48963cdc7b..4015e47d6e4 100755 --- a/contributing/samples/mcp_sse_agent/__init__.py +++ b/contributing/samples/mcp_sse_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/mcp_sse_agent/agent.py b/contributing/samples/mcp_sse_agent/agent.py index 8d0980df445..2afbb930b1c 100755 --- a/contributing/samples/mcp_sse_agent/agent.py +++ b/contributing/samples/mcp_sse_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/mcp_sse_agent/filesystem_server.py b/contributing/samples/mcp_sse_agent/filesystem_server.py index 291091e5119..beddcd38ea1 100644 --- a/contributing/samples/mcp_sse_agent/filesystem_server.py +++ b/contributing/samples/mcp_sse_agent/filesystem_server.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/mcp_stdio_notion_agent/__init__.py b/contributing/samples/mcp_stdio_notion_agent/__init__.py index c48963cdc7b..4015e47d6e4 100755 --- a/contributing/samples/mcp_stdio_notion_agent/__init__.py +++ b/contributing/samples/mcp_stdio_notion_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/mcp_stdio_notion_agent/agent.py b/contributing/samples/mcp_stdio_notion_agent/agent.py index bfb385a1bc2..55ea56ec494 100644 --- a/contributing/samples/mcp_stdio_notion_agent/agent.py +++ b/contributing/samples/mcp_stdio_notion_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/mcp_stdio_server_agent/__init__.py b/contributing/samples/mcp_stdio_server_agent/__init__.py index c48963cdc7b..4015e47d6e4 100755 --- a/contributing/samples/mcp_stdio_server_agent/__init__.py +++ b/contributing/samples/mcp_stdio_server_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/mcp_stdio_server_agent/agent.py b/contributing/samples/mcp_stdio_server_agent/agent.py index fe8b75c218e..1799bd56d0a 100755 --- a/contributing/samples/mcp_stdio_server_agent/agent.py +++ b/contributing/samples/mcp_stdio_server_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/mcp_streamablehttp_agent/__init__.py b/contributing/samples/mcp_streamablehttp_agent/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/mcp_streamablehttp_agent/__init__.py +++ b/contributing/samples/mcp_streamablehttp_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/mcp_streamablehttp_agent/agent.py b/contributing/samples/mcp_streamablehttp_agent/agent.py index f165c4c1b46..e2223b0f134 100644 --- a/contributing/samples/mcp_streamablehttp_agent/agent.py +++ b/contributing/samples/mcp_streamablehttp_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/mcp_streamablehttp_agent/filesystem_server.py b/contributing/samples/mcp_streamablehttp_agent/filesystem_server.py index 9e822f232be..f8363f16b82 100644 --- a/contributing/samples/mcp_streamablehttp_agent/filesystem_server.py +++ b/contributing/samples/mcp_streamablehttp_agent/filesystem_server.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/memory/__init__.py b/contributing/samples/memory/__init__.py index c48963cdc7b..4015e47d6e4 100755 --- a/contributing/samples/memory/__init__.py +++ b/contributing/samples/memory/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/memory/agent.py b/contributing/samples/memory/agent.py index 3f415963b3e..6bf843cb80a 100755 --- a/contributing/samples/memory/agent.py +++ b/contributing/samples/memory/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/memory/main.py b/contributing/samples/memory/main.py index 5242d30ad4f..4dc6f29dc4d 100755 --- a/contributing/samples/memory/main.py +++ b/contributing/samples/memory/main.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/migrate_session_db/__init__.py b/contributing/samples/migrate_session_db/__init__.py index 7d5bb0b1c6f..044e24d3883 100644 --- a/contributing/samples/migrate_session_db/__init__.py +++ b/contributing/samples/migrate_session_db/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/migrate_session_db/agent.py b/contributing/samples/migrate_session_db/agent.py index 6caeeb1c66e..f51b6deb16a 100644 --- a/contributing/samples/migrate_session_db/agent.py +++ b/contributing/samples/migrate_session_db/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/migrate_session_db/main.py b/contributing/samples/migrate_session_db/main.py index 22385063af4..2774440356b 100644 --- a/contributing/samples/migrate_session_db/main.py +++ b/contributing/samples/migrate_session_db/main.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/migrate_session_db/sample-output/alembic/env.py b/contributing/samples/migrate_session_db/sample-output/alembic/env.py index 4bc5c948eab..265b528a22d 100644 --- a/contributing/samples/migrate_session_db/sample-output/alembic/env.py +++ b/contributing/samples/migrate_session_db/sample-output/alembic/env.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/multimodal_tool_results/__init__.py b/contributing/samples/multimodal_tool_results/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/multimodal_tool_results/__init__.py +++ b/contributing/samples/multimodal_tool_results/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/multimodal_tool_results/agent.py b/contributing/samples/multimodal_tool_results/agent.py index 8c66d597156..b5303f476db 100644 --- a/contributing/samples/multimodal_tool_results/agent.py +++ b/contributing/samples/multimodal_tool_results/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/non_llm_sequential/__init__.py b/contributing/samples/non_llm_sequential/__init__.py index c48963cdc7b..4015e47d6e4 100755 --- a/contributing/samples/non_llm_sequential/__init__.py +++ b/contributing/samples/non_llm_sequential/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/non_llm_sequential/agent.py b/contributing/samples/non_llm_sequential/agent.py index 8e59116b5ce..52a120190be 100755 --- a/contributing/samples/non_llm_sequential/agent.py +++ b/contributing/samples/non_llm_sequential/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/oauth2_client_credentials/__init__.py b/contributing/samples/oauth2_client_credentials/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/oauth2_client_credentials/__init__.py +++ b/contributing/samples/oauth2_client_credentials/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/oauth2_client_credentials/agent.py b/contributing/samples/oauth2_client_credentials/agent.py index f0806784a9c..4759fd81621 100644 --- a/contributing/samples/oauth2_client_credentials/agent.py +++ b/contributing/samples/oauth2_client_credentials/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/oauth2_client_credentials/main.py b/contributing/samples/oauth2_client_credentials/main.py index ede4b1c7354..60fafc322a5 100644 --- a/contributing/samples/oauth2_client_credentials/main.py +++ b/contributing/samples/oauth2_client_credentials/main.py @@ -4,7 +4,7 @@ weather assistant agent with AuthenticatedFunctionTool. """ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/oauth2_client_credentials/oauth2_test_server.py b/contributing/samples/oauth2_client_credentials/oauth2_test_server.py index ee569830a67..ee30d9f0137 100644 --- a/contributing/samples/oauth2_client_credentials/oauth2_test_server.py +++ b/contributing/samples/oauth2_client_credentials/oauth2_test_server.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/oauth_calendar_agent/__init__.py b/contributing/samples/oauth_calendar_agent/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/oauth_calendar_agent/__init__.py +++ b/contributing/samples/oauth_calendar_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/oauth_calendar_agent/agent.py b/contributing/samples/oauth_calendar_agent/agent.py index db24b998059..447fffd3474 100644 --- a/contributing/samples/oauth_calendar_agent/agent.py +++ b/contributing/samples/oauth_calendar_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/output_schema_with_tools/__init__.py b/contributing/samples/output_schema_with_tools/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/output_schema_with_tools/__init__.py +++ b/contributing/samples/output_schema_with_tools/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/output_schema_with_tools/agent.py b/contributing/samples/output_schema_with_tools/agent.py index b523d2d7aef..f294b897f74 100644 --- a/contributing/samples/output_schema_with_tools/agent.py +++ b/contributing/samples/output_schema_with_tools/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/parallel_functions/__init__.py b/contributing/samples/parallel_functions/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/parallel_functions/__init__.py +++ b/contributing/samples/parallel_functions/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/parallel_functions/agent.py b/contributing/samples/parallel_functions/agent.py index af4cad8b40c..a5443ece660 100644 --- a/contributing/samples/parallel_functions/agent.py +++ b/contributing/samples/parallel_functions/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/plugin_basic/__init__.py b/contributing/samples/plugin_basic/__init__.py index dbd8645041e..9c7fdecb882 100644 --- a/contributing/samples/plugin_basic/__init__.py +++ b/contributing/samples/plugin_basic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/plugin_basic/count_plugin.py b/contributing/samples/plugin_basic/count_plugin.py index 67ef3ea68e5..dbd116de30e 100644 --- a/contributing/samples/plugin_basic/count_plugin.py +++ b/contributing/samples/plugin_basic/count_plugin.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/plugin_basic/main.py b/contributing/samples/plugin_basic/main.py index 75c04d91927..df3020cc878 100644 --- a/contributing/samples/plugin_basic/main.py +++ b/contributing/samples/plugin_basic/main.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/plugin_reflect_tool_retry/basic/__init__.py b/contributing/samples/plugin_reflect_tool_retry/basic/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/plugin_reflect_tool_retry/basic/__init__.py +++ b/contributing/samples/plugin_reflect_tool_retry/basic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/plugin_reflect_tool_retry/basic/agent.py b/contributing/samples/plugin_reflect_tool_retry/basic/agent.py index 65b4a3e61dc..6604c071428 100644 --- a/contributing/samples/plugin_reflect_tool_retry/basic/agent.py +++ b/contributing/samples/plugin_reflect_tool_retry/basic/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/plugin_reflect_tool_retry/hallucinating_func_name/__init__.py b/contributing/samples/plugin_reflect_tool_retry/hallucinating_func_name/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/plugin_reflect_tool_retry/hallucinating_func_name/__init__.py +++ b/contributing/samples/plugin_reflect_tool_retry/hallucinating_func_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/plugin_reflect_tool_retry/hallucinating_func_name/agent.py b/contributing/samples/plugin_reflect_tool_retry/hallucinating_func_name/agent.py index 8a958b656ab..d42acad770d 100644 --- a/contributing/samples/plugin_reflect_tool_retry/hallucinating_func_name/agent.py +++ b/contributing/samples/plugin_reflect_tool_retry/hallucinating_func_name/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/pubsub/__init__.py b/contributing/samples/pubsub/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/pubsub/__init__.py +++ b/contributing/samples/pubsub/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/pubsub/agent.py b/contributing/samples/pubsub/agent.py index 923bca32ee3..98434fb46ce 100644 --- a/contributing/samples/pubsub/agent.py +++ b/contributing/samples/pubsub/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/pydantic_argument/__init__.py b/contributing/samples/pydantic_argument/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/pydantic_argument/__init__.py +++ b/contributing/samples/pydantic_argument/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/pydantic_argument/agent.py b/contributing/samples/pydantic_argument/agent.py index 9d29e54fa43..97a763f3752 100644 --- a/contributing/samples/pydantic_argument/agent.py +++ b/contributing/samples/pydantic_argument/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/pydantic_argument/main.py b/contributing/samples/pydantic_argument/main.py index 16af323afd7..5ef060378ab 100644 --- a/contributing/samples/pydantic_argument/main.py +++ b/contributing/samples/pydantic_argument/main.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """Simple test script for Pydantic argument agent.""" -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/quickstart/__init__.py b/contributing/samples/quickstart/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/quickstart/__init__.py +++ b/contributing/samples/quickstart/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/quickstart/agent.py b/contributing/samples/quickstart/agent.py index f32c1e54951..46a65060af7 100644 --- a/contributing/samples/quickstart/agent.py +++ b/contributing/samples/quickstart/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/rag_agent/__init__.py b/contributing/samples/rag_agent/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/rag_agent/__init__.py +++ b/contributing/samples/rag_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/rag_agent/agent.py b/contributing/samples/rag_agent/agent.py index ca3a7e32ce0..234edb64fee 100644 --- a/contributing/samples/rag_agent/agent.py +++ b/contributing/samples/rag_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/rewind_session/__init__.py b/contributing/samples/rewind_session/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/rewind_session/__init__.py +++ b/contributing/samples/rewind_session/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/rewind_session/agent.py b/contributing/samples/rewind_session/agent.py index 569bde07379..45912dfd0f8 100644 --- a/contributing/samples/rewind_session/agent.py +++ b/contributing/samples/rewind_session/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/rewind_session/main.py b/contributing/samples/rewind_session/main.py index 5856b90b444..7a1cc65abf0 100644 --- a/contributing/samples/rewind_session/main.py +++ b/contributing/samples/rewind_session/main.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """Simple test script for Rewind Session agent.""" -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/runner_debug_example/__init__.py b/contributing/samples/runner_debug_example/__init__.py index 1ca56dac2b6..f93cbd4137d 100644 --- a/contributing/samples/runner_debug_example/__init__.py +++ b/contributing/samples/runner_debug_example/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/runner_debug_example/agent.py b/contributing/samples/runner_debug_example/agent.py index 6afb4dbab77..620e1b27450 100644 --- a/contributing/samples/runner_debug_example/agent.py +++ b/contributing/samples/runner_debug_example/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/runner_debug_example/main.py b/contributing/samples/runner_debug_example/main.py index 88ee0c41cc4..2fa8461f580 100644 --- a/contributing/samples/runner_debug_example/main.py +++ b/contributing/samples/runner_debug_example/main.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/services.py b/contributing/samples/services.py index 769a44fdd79..910682a2f83 100644 --- a/contributing/samples/services.py +++ b/contributing/samples/services.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/session_state_agent/__init__.py b/contributing/samples/session_state_agent/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/session_state_agent/__init__.py +++ b/contributing/samples/session_state_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/session_state_agent/agent.py b/contributing/samples/session_state_agent/agent.py index a4ed704e964..6c06c91765b 100644 --- a/contributing/samples/session_state_agent/agent.py +++ b/contributing/samples/session_state_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/simple_sequential_agent/__init__.py b/contributing/samples/simple_sequential_agent/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/simple_sequential_agent/__init__.py +++ b/contributing/samples/simple_sequential_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/simple_sequential_agent/agent.py b/contributing/samples/simple_sequential_agent/agent.py index 9ec0b35a95a..52b2615a63a 100644 --- a/contributing/samples/simple_sequential_agent/agent.py +++ b/contributing/samples/simple_sequential_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/spanner/__init__.py b/contributing/samples/spanner/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/spanner/__init__.py +++ b/contributing/samples/spanner/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/spanner/agent.py b/contributing/samples/spanner/agent.py index 065cf027595..36dde572607 100644 --- a/contributing/samples/spanner/agent.py +++ b/contributing/samples/spanner/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/spanner_rag_agent/__init__.py b/contributing/samples/spanner_rag_agent/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/spanner_rag_agent/__init__.py +++ b/contributing/samples/spanner_rag_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/spanner_rag_agent/agent.py b/contributing/samples/spanner_rag_agent/agent.py index 1460242184c..cd479c0cafb 100644 --- a/contributing/samples/spanner_rag_agent/agent.py +++ b/contributing/samples/spanner_rag_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/static_instruction/__init__.py b/contributing/samples/static_instruction/__init__.py index e0517c644c7..6dba1777338 100644 --- a/contributing/samples/static_instruction/__init__.py +++ b/contributing/samples/static_instruction/__init__.py @@ -10,7 +10,7 @@ - Performance benefits of context caching """ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/static_instruction/agent.py b/contributing/samples/static_instruction/agent.py index efe17d409c2..6715a29a0c4 100644 --- a/contributing/samples/static_instruction/agent.py +++ b/contributing/samples/static_instruction/agent.py @@ -4,7 +4,7 @@ pet that has different moods based on feeding time stored in session state. """ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/static_instruction/main.py b/contributing/samples/static_instruction/main.py index 4dae14e86ed..328ebee25a6 100644 --- a/contributing/samples/static_instruction/main.py +++ b/contributing/samples/static_instruction/main.py @@ -4,7 +4,7 @@ that has different moods based on feeding time stored in session state. """ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/static_non_text_content/__init__.py b/contributing/samples/static_non_text_content/__init__.py index 2192c5ee2a5..330541afc6f 100644 --- a/contributing/samples/static_non_text_content/__init__.py +++ b/contributing/samples/static_non_text_content/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/static_non_text_content/agent.py b/contributing/samples/static_non_text_content/agent.py index 58869155a38..e3c69f6fbb5 100644 --- a/contributing/samples/static_non_text_content/agent.py +++ b/contributing/samples/static_non_text_content/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/static_non_text_content/main.py b/contributing/samples/static_non_text_content/main.py index 1c9301c49a0..d3835b22054 100644 --- a/contributing/samples/static_non_text_content/main.py +++ b/contributing/samples/static_non_text_content/main.py @@ -1,6 +1,6 @@ """Static non-text content sample agent main script.""" -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/sub_agents_config/__init__.py b/contributing/samples/sub_agents_config/__init__.py index 0a2669d7a25..58d482ea386 100644 --- a/contributing/samples/sub_agents_config/__init__.py +++ b/contributing/samples/sub_agents_config/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/sub_agents_config/life_agent.py b/contributing/samples/sub_agents_config/life_agent.py index 8c7bbb1bac0..90e74803bd6 100644 --- a/contributing/samples/sub_agents_config/life_agent.py +++ b/contributing/samples/sub_agents_config/life_agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/telemetry/agent.py b/contributing/samples/telemetry/agent.py index a9db434b6c8..257d28ab8cc 100755 --- a/contributing/samples/telemetry/agent.py +++ b/contributing/samples/telemetry/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/telemetry/main.py b/contributing/samples/telemetry/main.py index c6e05f0f624..885dc6489f1 100755 --- a/contributing/samples/telemetry/main.py +++ b/contributing/samples/telemetry/main.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/token_usage/__init__.py b/contributing/samples/token_usage/__init__.py index c48963cdc7b..4015e47d6e4 100755 --- a/contributing/samples/token_usage/__init__.py +++ b/contributing/samples/token_usage/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/token_usage/agent.py b/contributing/samples/token_usage/agent.py index a73f9e7638e..aef598735da 100755 --- a/contributing/samples/token_usage/agent.py +++ b/contributing/samples/token_usage/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/token_usage/main.py b/contributing/samples/token_usage/main.py index 2845498946a..e9025992adc 100755 --- a/contributing/samples/token_usage/main.py +++ b/contributing/samples/token_usage/main.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/tool_functions_config/__init__.py b/contributing/samples/tool_functions_config/__init__.py index 0a2669d7a25..58d482ea386 100644 --- a/contributing/samples/tool_functions_config/__init__.py +++ b/contributing/samples/tool_functions_config/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/tool_functions_config/tools.py b/contributing/samples/tool_functions_config/tools.py index 410a96e3a8b..f5cc9f8f453 100644 --- a/contributing/samples/tool_functions_config/tools.py +++ b/contributing/samples/tool_functions_config/tools.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/tool_human_in_the_loop_config/__init__.py b/contributing/samples/tool_human_in_the_loop_config/__init__.py index 0a2669d7a25..58d482ea386 100644 --- a/contributing/samples/tool_human_in_the_loop_config/__init__.py +++ b/contributing/samples/tool_human_in_the_loop_config/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/tool_human_in_the_loop_config/tools.py b/contributing/samples/tool_human_in_the_loop_config/tools.py index 9ad472a4c86..d9dea826862 100644 --- a/contributing/samples/tool_human_in_the_loop_config/tools.py +++ b/contributing/samples/tool_human_in_the_loop_config/tools.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/toolbox_agent/__init__.py b/contributing/samples/toolbox_agent/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/toolbox_agent/__init__.py +++ b/contributing/samples/toolbox_agent/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/toolbox_agent/agent.py b/contributing/samples/toolbox_agent/agent.py index cfbb8a9c116..55c1eb7f723 100644 --- a/contributing/samples/toolbox_agent/agent.py +++ b/contributing/samples/toolbox_agent/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/toolbox_agent/tools.yaml b/contributing/samples/toolbox_agent/tools.yaml index f9f8522eeb9..9d953fe0e5b 100644 --- a/contributing/samples/toolbox_agent/tools.yaml +++ b/contributing/samples/toolbox_agent/tools.yaml @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/vertex_code_execution/__init__.py b/contributing/samples/vertex_code_execution/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/vertex_code_execution/__init__.py +++ b/contributing/samples/vertex_code_execution/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/vertex_code_execution/agent.py b/contributing/samples/vertex_code_execution/agent.py index 89838f5c99a..79e5a03d1bb 100644 --- a/contributing/samples/vertex_code_execution/agent.py +++ b/contributing/samples/vertex_code_execution/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/workflow_agent_seq/__init__.py b/contributing/samples/workflow_agent_seq/__init__.py index c48963cdc7b..4015e47d6e4 100644 --- a/contributing/samples/workflow_agent_seq/__init__.py +++ b/contributing/samples/workflow_agent_seq/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/workflow_agent_seq/agent.py b/contributing/samples/workflow_agent_seq/agent.py index 4d9ccef25c2..5e26c20d628 100644 --- a/contributing/samples/workflow_agent_seq/agent.py +++ b/contributing/samples/workflow_agent_seq/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/workflow_agent_seq/main.py b/contributing/samples/workflow_agent_seq/main.py index 9ea689a1324..7373508cbb1 100644 --- a/contributing/samples/workflow_agent_seq/main.py +++ b/contributing/samples/workflow_agent_seq/main.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/workflow_triage/__init__.py b/contributing/samples/workflow_triage/__init__.py index c48963cdc7b..4015e47d6e4 100755 --- a/contributing/samples/workflow_triage/__init__.py +++ b/contributing/samples/workflow_triage/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/workflow_triage/agent.py b/contributing/samples/workflow_triage/agent.py index b39e86eb873..9b0cc669432 100755 --- a/contributing/samples/workflow_triage/agent.py +++ b/contributing/samples/workflow_triage/agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contributing/samples/workflow_triage/execution_agent.py b/contributing/samples/workflow_triage/execution_agent.py index 2f3f1140bd0..ca97939d565 100644 --- a/contributing/samples/workflow_triage/execution_agent.py +++ b/contributing/samples/workflow_triage/execution_agent.py @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/llms-full.txt b/llms-full.txt index b84e9496ee1..52b9121f155 100644 --- a/llms-full.txt +++ b/llms-full.txt @@ -567,7 +567,7 @@ Finally, you instantiate your `StoryFlowAgent` and use the `Runner` as usual. ```python # Full runnable code for the StoryFlowAgent example - # Copyright 2025 Google LLC + # Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -3704,7 +3704,7 @@ When the ADK framework encounters a point where a callback can run (e.g., just b This example demonstrates the common pattern for a guardrail using `before_model_callback`.