2458 Commits

Author SHA1 Message Date
Jacksunwei d98ff23377 chore: update last-release-sha for next release v1.29.0 2026-04-09 19:40:02 +00:00
Wei (Jack) Sun 40e050b930 chore(release/candidate): release 1.29.0 (#5231)
Co-authored-by: Yifan <wanyif@google.com>
2026-04-09 12:39:50 -07:00
Google Team Member ede8a56a3c fix: avoid load all agents in adk web server
PiperOrigin-RevId: 897179529
2026-04-09 17:43:36 +00:00
Liang Wu 6b1600fbf5 fix(live): Handle live session resumption and GoAway signal
* Skip sending conversation history when a live session is being resumed using a handle.
* Catch ConnectionClosed and APIError exceptions during live sessions and attempt to reconnect if a session resumption handle is available.
* Handle the server's "go_away" signal by proactively closing the connection to trigger a reconnection with the latest session handle.
* Propagate the "go_away" signal from the Gemini connection to the LlmResponse.
* Add unit tests for reconnection on ConnectionClosed, APIError, skipping history on resumption, and handling the go_away signal.

Closes #4996

Co-authored-by: Liang Wu <wuliang@google.com>
PiperOrigin-RevId: 896687925
2026-04-08 14:04:13 -07:00
Google Team Member 6fd0f85191 fix: move BigQueryAgentAnalyticsPlugin import inside get_runner_async
PiperOrigin-RevId: 896665913
2026-04-08 13:20:04 -07:00
Google Team Member 20748894cd feat: Support loading agents from Visual Builder with BigQuery-powered logging
PiperOrigin-RevId: 896612027
2026-04-08 11:33:55 -07:00
Yixiao Song 9e73ab8466 feat(skill): Standardize skill tools and make script arguments flexible
Standardize Parameter Names:
- Use `skill_name` instead of `name`.
- Use `file_path` instead of `script_path`.
- Updated `_DEFAULT_SKILL_SYSTEM_INSTRUCTION` system prompt to use `skill_name="<SKILL_NAME>"`.

Flexible Arguments for RunSkillScriptTool:
- Updated schema to allow args to be either a JSON object or a list of strings (`anyOf`).
- Updated `RunSkillScriptTool.run_async` and `_SkillScriptCodeExecutor.execute_script_async` to accept both dict and list types for arguments.
- Modified `_SkillScriptCodeExecutor._build_wrapper_code` to pass list arguments directly as command-line arguments for python and bash scripts.

Improved Error Messages:
- Updated error messages across skills tools to specify the parameter name (e.g., "Argument 'skill_name' is required.").
- Collected all validation error messages.

Type Safety:
- Fixed a TypeError in run_skill_script().

PiperOrigin-RevId: 896602439
2026-04-08 11:18:40 -07:00
Divyansh Shukla 23bd95bcf2 feat: Add blacklist for shell metacharacters in BashTool
PiperOrigin-RevId: 896191354
2026-04-07 18:37:01 -07:00
Google Team Member ccac461b2a docs(adk): clean up remote triggers README to remove internal references
PiperOrigin-RevId: 896153946
2026-04-07 16:48:37 -07:00
Google Team Member e2d970ff94 feat: add ADK trigger endpoints to ADK Web Server
PiperOrigin-RevId: 896133436
2026-04-07 16:06:37 -07:00
Google Team Member a60baca3dd docs: Update the MCP Toolbox docsite with the new URL
We recently overhauled our MCP Toolbox documentation and moved it to a new domain. This PR propagates that URL change here.

PiperOrigin-RevId: 896118946
2026-04-07 15:37:11 -07:00
George Weale 62daf4f61b fix: truncate error_message in v0 schema to prevent VARCHAR overflow
Close #4993

Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 896076625
2026-04-07 14:03:59 -07:00
Kathy Wu 0f3850f56c fix: Fixes for initializing RemoteA2aAgent - passing in preferred transport, protocol version, and auth headers
Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 896068855
2026-04-07 13:46:34 -07:00
Kathy Wu 3a374ce0aa fix: Small fixes for express mode
Remove extra "would you like to proceed" from ToS message since it is asked later. For checking express eligibility, if the API response is "ELIGIBLE" then it is also considered eligible.

Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 896066249
2026-04-07 13:40:42 -07:00
Google Team Member 83393ab839 feat: Propagate context to thread pools
PiperOrigin-RevId: 896063584
2026-04-07 13:34:52 -07:00
llalitkumarrr 6a1c90bd9d docs: Auto-Assignment GitHub Action for Issues
Merge https://github.com/google/adk-python/pull/4966

Co-authored-by: Xuan Yang <xygoogle@google.com>
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/4966 from llalitkumarrr:main ff7a8465ae923b3990de2483c16f374f8193302b
PiperOrigin-RevId: 896062781
2026-04-07 13:33:19 -07:00
Liang Wu 114deefdfd test: prevent test_resource_limits_set from hanging in GitHub Actions
Set mock_process.pid to None in the resource limits test. Without this, the `finally` block in `run_async` attempts to call `os.killpg` with a fallback `Mock` object (which evaluates to True). In some environments like GitHub Actions, this can inadvertently kill the test runner's process group rather than raising a TypeException, causing the CI job to hang indefinitely.

Co-authored-by: Liang Wu <wuliang@google.com>
PiperOrigin-RevId: 895992429
2026-04-07 11:05:31 -07:00
Google Team Member 9199189e57 feat(eval): Add ADK CLI for eval_set generation
PiperOrigin-RevId: 895946363
2026-04-07 09:43:35 -07:00
Google Team Member a22091058d feat(auth): Add public api to register custom auth provider with credential manager
PiperOrigin-RevId: 895904372
2026-04-07 08:04:50 -07:00
rei-arifi bbad9ec64c fix(cli): fail Agent Engine deploy when config file path is invalid
Merge https://github.com/google/adk-python/pull/5128

### Link to Issue or Description of Change

**1. Link to an existing issue (if applicable):**

- Closes: #5127

**Problem:**
When `--agent_engine_config_file` is set to a path that does not exist, `to_agent_engine` previously behaved like no config file was provided.

**Solution:**
This change raises `click.ClickException` with a message that includes the resolved path.

### Testing plan

- [x] `uv run python -m pytest tests/unittests/cli/utils/test_cli_deploy.py -v`
- [x] Manual test `adk deploy agent_engine ... --agent_engine_config_file /nonexistent.json` and confirm a clear error before remote deploy. The same command with correct filename relative to parent directory of the agent does not fail.

**Unit Tests:**

- [x] I have added or updated unit tests for my change.
- [x] All unit tests pass locally.

```
uv run python -m pytest tests/unittests/cli/utils/test_cli_deploy.py -v
=========================================================================================================================== test session starts ===========================================================================================================================
platform darwin -- Python 3.11.13, pytest-9.0.2, pluggy-1.6.0 -- /Users/rei/Repos/adk-python/.venv/bin/python3
cachedir: .pytest_cache
rootdir: /Users/rei/Repos/adk-python
configfile: pyproject.toml
plugins: mock-3.15.1, xdist-3.8.0, asyncio-1.3.0, langsmith-0.7.25, anyio-4.13.0
asyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=function, asyncio_default_test_loop_scope=function
collected 31 items

tests/unittests/cli/utils/test_cli_deploy.py::test_resolve_project_with_option PASSED                                                                                                                                                                               [  3%]
tests/unittests/cli/utils/test_cli_deploy.py::test_resolve_project_from_gcloud PASSED                                                                                                                                                                               [  6%]
tests/unittests/cli/utils/test_cli_deploy.py::test_resolve_project_from_gcloud_fails PASSED                                                                                                                                                                         [  9%]
tests/unittests/cli/utils/test_cli_deploy.py::test_get_service_option_by_adk_version[1.3.0-sqlite://s-gs://a-rag://m-None---session_service_uri=sqlite://s --artifact_service_uri=gs://a --memory_service_uri=rag://m] PASSED                                       [ 12%]
tests/unittests/cli/utils/test_cli_deploy.py::test_get_service_option_by_adk_version[1.2.5-sqlite://s-gs://a-rag://m-None---session_db_url=sqlite://s --artifact_storage_uri=gs://a] PASSED                                                                         [ 16%]
tests/unittests/cli/utils/test_cli_deploy.py::test_get_service_option_by_adk_version[0.5.0-sqlite://s-gs://a-rag://m-None---session_db_url=sqlite://s] PASSED                                                                                                       [ 19%]
tests/unittests/cli/utils/test_cli_deploy.py::test_get_service_option_by_adk_version[1.3.0-sqlite://s-None-None-None---session_service_uri=sqlite://s] PASSED                                                                                                       [ 22%]
tests/unittests/cli/utils/test_cli_deploy.py::test_get_service_option_by_adk_version[1.3.0-None-gs://a-rag://m-None---artifact_service_uri=gs://a --memory_service_uri=rag://m] PASSED                                                                              [ 25%]
tests/unittests/cli/utils/test_cli_deploy.py::test_get_service_option_by_adk_version[1.2.0-None-gs://a-None-None---artifact_storage_uri=gs://a] PASSED                                                                                                              [ 29%]
tests/unittests/cli/utils/test_cli_deploy.py::test_get_service_option_by_adk_version[1.21.0-None-None-None-False---no_use_local_storage] PASSED                                                                                                                     [ 32%]
tests/unittests/cli/utils/test_cli_deploy.py::test_get_service_option_by_adk_version[1.21.0-None-None-None-True---use_local_storage] PASSED                                                                                                                         [ 35%]
tests/unittests/cli/utils/test_cli_deploy.py::test_get_service_option_by_adk_version[1.21.0-sqlite://s-gs://a-None-False---session_service_uri=sqlite://s --artifact_service_uri=gs://a] PASSED                                                                     [ 38%]
tests/unittests/cli/utils/test_cli_deploy.py::test_agent_engine_app_template_compiles_with_windows_paths PASSED                                                                                                                                                     [ 41%]
tests/unittests/cli/utils/test_cli_deploy.py::test_to_agent_engine_happy_path[True] PASSED                                                                                                                                                                          [ 45%]
tests/unittests/cli/utils/test_cli_deploy.py::test_to_agent_engine_happy_path[False] PASSED                                                                                                                                                                         [ 48%]
tests/unittests/cli/utils/test_cli_deploy.py::test_to_agent_engine_raises_when_explicit_config_file_missing PASSED                                                                                                                                                  [ 51%]
tests/unittests/cli/utils/test_cli_deploy.py::test_to_agent_engine_skips_agent_import_validation_by_default PASSED                                                                                                                                                  [ 54%]
tests/unittests/cli/utils/test_cli_deploy.py::test_to_agent_engine_validates_agent_import_when_enabled PASSED                                                                                                                                                       [ 58%]
tests/unittests/cli/utils/test_cli_deploy.py::test_to_gke_happy_path[True] PASSED                                                                                                                                                                                   [ 61%]
tests/unittests/cli/utils/test_cli_deploy.py::test_to_gke_happy_path[False] PASSED                                                                                                                                                                                  [ 64%]
tests/unittests/cli/utils/test_cli_deploy.py::TestValidateAgentImport::test_skips_config_agents PASSED                                                                                                                                                              [ 67%]
tests/unittests/cli/utils/test_cli_deploy.py::TestValidateAgentImport::test_raises_on_missing_agent_module PASSED                                                                                                                                                   [ 70%]
tests/unittests/cli/utils/test_cli_deploy.py::TestValidateAgentImport::test_raises_on_missing_export PASSED                                                                                                                                                         [ 74%]
tests/unittests/cli/utils/test_cli_deploy.py::TestValidateAgentImport::test_success_with_root_agent_export PASSED                                                                                                                                                   [ 77%]
tests/unittests/cli/utils/test_cli_deploy.py::TestValidateAgentImport::test_success_with_app_export PASSED                                                                                                                                                          [ 80%]
tests/unittests/cli/utils/test_cli_deploy.py::TestValidateAgentImport::test_success_with_relative_imports PASSED                                                                                                                                                    [ 83%]
tests/unittests/cli/utils/test_cli_deploy.py::TestValidateAgentImport::test_raises_on_import_error PASSED                                                                                                                                                           [ 87%]
tests/unittests/cli/utils/test_cli_deploy.py::TestValidateAgentImport::test_raises_on_basellm_import_error PASSED                                                                                                                                                   [ 90%]
tests/unittests/cli/utils/test_cli_deploy.py::TestValidateAgentImport::test_raises_on_syntax_error PASSED                                                                                                                                                           [ 93%]
tests/unittests/cli/utils/test_cli_deploy.py::TestValidateAgentImport::test_cleans_up_sys_modules PASSED                                                                                                                                                            [ 96%]
tests/unittests/cli/utils/test_cli_deploy.py::TestValidateAgentImport::test_restores_sys_path PASSED                                                                                                                                                                [100%]

=========================================================================================================================== 31 passed in 2.48s ============================================================================================================================
```

**Manual End-to-End (E2E) Tests:**

1. Install adk cli from this PR
2. Run `adk deploy agent_engine ... --agent_engine_config_file /nonexistent.json # Failure expected`
3. Run `adk deploy agent_engine ... --agent_engine_config_file agent/config.json # Deployment proceeds if file path is correct`
### 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.
- [n/a] 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.
- [n/a] Any dependent changes have been merged and published in downstream modules.

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/5128 from rei-arifi:fix/agent-engine-config-file-missing 0c2f9f7b2f7f2e681f7d814637204a113047d95a
PiperOrigin-RevId: 895550691
2026-04-06 16:14:55 -07:00
Google Team Member 2b49163b39 feat: Support short options and positional arguments in RunSkillScriptTool
- Updates `parameters_json_schema` to accept `short_options` (object) and `positional_args` (array).
  - Updates `_SkillScriptCodeExecutor._build_wrapper_code` to materialize these options for both Python and Shell scripts.
  - Appends `--` before positional arguments to remove ambiguity in CLI parsing.
  - Adds comprehensive unit tests.

PiperOrigin-RevId: 895536577
2026-04-06 15:43:01 -07:00
Liang Wu e51b649b76 chore: Improve event content handling and minor prompt adjustments
Co-authored-by: Liang Wu <wuliang@google.com>
PiperOrigin-RevId: 895518689
2026-04-06 15:05:49 -07:00
Kathy Wu 5cf2ca3fc0 chore: Update ADK CLI Express mode ToS to align with the Express mode ToS
Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 895514895
2026-04-06 14:57:45 -07:00
Liang Wu da438fafd8 feat: Add /apps/{app_name}/app-info endpoint to ADK CLI web server
This endpoint provides detailed **static** information about an application's agents, including their description, instructions, tools, and sub-agents, specifically for LlmAgent instances.

Co-authored-by: Liang Wu <wuliang@google.com>
PiperOrigin-RevId: 895470828
2026-04-06 13:23:48 -07:00
Kathy Wu 7dd9359fa1 fix: Add A2ATransport.http_json to the default supported transports list
remote_a2a_agent is only including A2ATransport.jsonrpc on the default supported list, but it should also include http_json since it is a common transport (default used by agent engine)

Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 895444831
2026-04-06 12:23:40 -07:00
Google Team Member 9da9dee140 feat: Use raw_event to store event data in vertex ai session service
PiperOrigin-RevId: 895379069
2026-04-06 10:04:12 -07:00
Google Team Member 1445ad5069 feat: refresh credentials if token is missing in the common code and samples
PiperOrigin-RevId: 894473156
2026-04-04 02:02:43 -07:00
Google Team Member 19ac679aea feat: Add regional endpoint support to SecretManagerClient
The `SecretManagerClient` now accepts a `location` parameter to connect to a regional Secret Manager endpoint.

PiperOrigin-RevId: 894356924
2026-04-03 19:34:02 -07:00
Divyansh Shukla 1b0584241f feat: add configurable resource limits for subprocesses in BashTool
PiperOrigin-RevId: 894338571
2026-04-03 18:20:54 -07:00
Haiyuan Cao 37973daff4 feat: Add configurable view_prefix to BigQueryLoggerConfig
Adds a configurable `view_prefix` field to `BigQueryLoggerConfig` (default `"v"`) so that multiple plugin instances sharing a dataset can use distinct prefixes to avoid overwriting each other's auto-created analytics views
- Validates that `view_prefix` is non-empty at init time
- Wires `view_prefix` into `_create_analytics_views` in place of the hardcoded `"v_"` prefix

Co-authored-by: Haiyuan Cao <haiyuan@google.com>
PiperOrigin-RevId: 894331973
2026-04-03 17:58:57 -07:00
Haiyuan Cao 435f7c7a9f feat: Add Description column to SKILL.md and update terminology
Adds a **Description** column to the function routing table in `SKILL.md` so the LLM can select the correct reference file without extra `load_skill_resource` calls
- Replaces internal "1P" terminology with "BigQuery tools" for clarity

Co-authored-by: Haiyuan Cao <haiyuan@google.com>
PiperOrigin-RevId: 894329869
2026-04-03 17:51:03 -07:00
Google Team Member e1913a6b41 feat: Add custom session id functionality to vertex ai session service
PiperOrigin-RevId: 894285971
2026-04-03 15:46:03 -07:00
Kathy Wu 8850916e19 feat: Add Easy GCP support to ADK CLI
Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 894266946
2026-04-03 15:04:55 -07:00
Google Team Member 898c4e5f78 fix: empty events_iterator assignment
PiperOrigin-RevId: 894188179
2026-04-03 12:01:26 -07:00
Kathy Wu 7913a3b764 feat: Add auth scheme/credential support to MCP toolsets in Agent Registry
This is also so that we can add Agent Identity support when it's ready.

Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 894180206
2026-04-03 11:43:36 -07:00
Divyansh Shukla f641b1a219 feat: Implement robust process group management and timeouts in BashTool
Refactors BashTool to use start_new_session=True and os.killpg for proper process isolation and cleanup on timeouts or errors.

PiperOrigin-RevId: 893740978
2026-04-02 15:44:00 -07:00
Wei (Jack) Sun 33d48472cf chore: merge release v1.28.1 to main (#5122)
Co-authored-by: Jacksunwei <1281348+Jacksunwei@users.noreply.github.com>
Co-authored-by: Liang Wu <wuliang@google.com>
Co-authored-by: Sasha Sobran <asobran@google.com>
Co-authored-by: Ankur Sharma <ankusharma@google.com>
2026-04-02 15:31:17 -07:00
Yifan Wang 203d7b7dfb chore: Add a new endpoint to fetch the base agent graph in DOT format
Co-authored-by: Yifan Wang <wanyif@google.com>
PiperOrigin-RevId: 893730378
2026-04-02 15:22:24 -07:00
Kathy Wu 064f0d278e fix: Disable tool caching for skill toolset
Skill toolset's tools can change dynamically within a single invocation (when a skill is loaded)

Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 893666326
2026-04-02 13:22:03 -07:00
Google Team Member 16a1a185ab feat: Option to use shallow-copy for session in InMemorySessionService
PiperOrigin-RevId: 893606046
2026-04-02 11:20:34 -07:00
Kathy Wu 4d7b9515b6 chore: Consolidate weather_skill and weather-skill in sample agent
We changed skills to use kebab case and created weather-skill, but forgot to get rid of weather_skill in the sample

Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 893597141
2026-04-02 11:03:54 -07:00
Google Team Member aaa03ac308 refactor: Remove the session events dependency from A2aAgentExecutor
PiperOrigin-RevId: 893590774
2026-04-02 10:51:18 -07:00
Kathy Wu 6f29775f4b fix: Fix RemoteA2AAgent deepcopy errors
RemoteA2Agent's new _config attribute in v1.27.0 was not working with deepcopy() because it had Callable fields, causing agent engine deployment issues. This adds a custom deepcopy attribute that handles Callables by copying them by reference.

Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 893590078
2026-04-02 10:49:59 -07:00
Kathy Wu eb4674b49f feat: Add support for model endpoints in Agent Registry
Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 893585328
2026-04-02 10:40:54 -07:00
Sasha Sobran dcee290272 fix: Disallow args on /builder and Add warning about Web UI usage to CLI help
Co-authored-by: Sasha Sobran <asobran@google.com>
PiperOrigin-RevId: 893521804
2026-04-02 08:22:58 -07:00
Google Team Member 9fec503061 feat(auth): Pass consent_nonce to Agent Frontend
Propagate consent_nonce received from Agent Identity Credentials service during 3-legged OAuth flows into the AuthCredential OAuth2 object. This will be sent to the Agent Frontend via the adk_request_credential FunctionCall.

PiperOrigin-RevId: 893474363
2026-04-02 06:24:38 -07:00
Google Team Member b3e99628ee feat(auth): Support additional HTTP headers in MCP tools
PiperOrigin-RevId: 893287579
2026-04-01 22:31:41 -07:00
Google Team Member 110452375c refactor: Move SecretManagerClient to google.adk.integrations.secret_manager package
Reasons for moving `SecretManagerClient`:

1. **Logical Grouping**: `SecretManagerClient` represents an integration with Google Cloud Secret Manager. Placing it in the `integrations` package is more intuitive and organized than keeping it within a specific tool's client directory.

2. **Increased Reusability**: As a common utility in `google.adk.integrations`, it is now easily discoverable and accessible for any other agent or tool in the ADK that needs to interact with Google Cloud Secret Manager.

3. **Better Abstraction**: It provides a clean, simplified interface for secret retrieval from Google Cloud Secret Manager. Future enhancements will be consolidated in the same package.

4. **Cleaner Tooling**: The `apihub_tool` can now focus purely on the API Hub logic while delegating secret management to this dedicated package.

For what its worth, `SecretManagerClient` is not used by the `apihub_tool` at the moment.

PiperOrigin-RevId: 893221472
2026-04-01 19:05:09 -07:00
Liang Wu 7fa13edacd fix(live): Buffer tool calls and emit them together upon turn completion
The `receive` method now accumulates function calls from multiple `LiveServerMessage` instances. These accumulated tool calls are yielded as a single `LlmResponse` containing all function call parts only when a turn_complete message is received.

Without the change, the tool_1's response is sent to the model as soon as it's generated, triggering a second call for tool_2. Upon receiving two consecutive tool_2's responses, the model utters the same message twice.
Fixes issue #4902

Co-authored-by: Liang Wu <wuliang@google.com>
PiperOrigin-RevId: 893197482
2026-04-01 17:45:51 -07:00
Google Team Member 642d337a90 feat: Remove use of raw_event field in vertex ai session service
PiperOrigin-RevId: 893175221
2026-04-01 16:43:07 -07:00