Commit Graph

2234 Commits

Author SHA1 Message Date
Xuan Yang f9c104faf7 fix: Preserve thought_signature in FunctionCall conversions between GenAI and A2A
Close: https://github.com/google/adk-python/issues/4311

Co-authored-by: Xuan Yang <xygoogle@google.com>
PiperOrigin-RevId: 877465519
2026-03-02 10:29:06 -08:00
dependabot[bot] a61c7e3880 chore(deps): bump flask from 3.1.1 to 3.1.3 in /contributing/samples/authn-adk-all-in-one in the pip group across 1 directory
Merge https://github.com/google/adk-python/pull/4571

Bumps the pip group with 1 update in the /contributing/samples/authn-adk-all-in-one directory: [flask](https://github.com/pallets/flask).

Updates `flask` from 3.1.1 to 3.1.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/pallets/flask/releases">flask's releases</a>.</em></p>
<blockquote>
<h2>3.1.3</h2>
<p>This is the Flask 3.1.3 security fix release, which fixes a security issue but does not otherwise change behavior and should not result in breaking changes compared to the latest feature release.</p>
<p>PyPI: <a href="https://pypi.org/project/Flask/3.1.3/">https://pypi.org/project/Flask/3.1.3/</a>
Changes: <a href="https://flask.palletsprojects.com/page/changes/#version-3-1-3">https://flask.palletsprojects.com/page/changes/#version-3-1-3</a></p>
<ul>
<li>The session is marked as accessed for operations that only access the keys but not the values, such as <code>in</code> and <code>len</code>. <a href="https://github.com/pallets/flask/security/advisories/GHSA-68rp-wp8r-4726">GHSA-68rp-wp8r-4726</a></li>
</ul>
<h2>3.1.2</h2>
<p>This is the Flask 3.1.2 fix release, which fixes bugs but does not otherwise change behavior and should not result in breaking changes compared to the latest feature release.</p>
<p>PyPI: <a href="https://pypi.org/project/Flask/3.1.2/">https://pypi.org/project/Flask/3.1.2/</a>
Changes: <a href="https://flask.palletsprojects.com/page/changes/#version-3-1-2">https://flask.palletsprojects.com/page/changes/#version-3-1-2</a>
Milestone: <a href="https://github.com/pallets/flask/milestone/38?closed=1">https://github.com/pallets/flask/milestone/38?closed=1</a></p>
<ul>
<li><code>stream_with_context</code> does not fail inside async views. <a href="https://redirect.github.com/pallets/flask/issues/5774">#5774</a></li>
<li>When using <code>follow_redirects</code> in the test client, the final state of <code>session</code> is correct. <a href="https://redirect.github.com/pallets/flask/issues/5786">#5786</a></li>
<li>Relax type hint for passing bytes IO to <code>send_file</code>. <a href="https://redirect.github.com/pallets/flask/issues/5776">#5776</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/pallets/flask/blob/main/CHANGES.rst">flask's changelog</a>.</em></p>
<blockquote>
<h2>Version 3.1.3</h2>
<p>Released 2026-02-18</p>
<ul>
<li>The session is marked as accessed for operations that only access the keys
but not the values, such as <code>in</code> and <code>len</code>. :ghsa:<code>68rp-wp8r-4726</code></li>
</ul>
<h2>Version 3.1.2</h2>
<p>Released 2025-08-19</p>
<ul>
<li><code>stream_with_context</code> does not fail inside async views. :issue:<code>5774</code></li>
<li>When using <code>follow_redirects</code> in the test client, the final state
of <code>session</code> is correct. :issue:<code>5786</code></li>
<li>Relax type hint for passing bytes IO to <code>send_file</code>. :issue:<code>5776</code></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/pallets/flask/commit/22d924701a6ae2e4cd01e9a15bbaf3946094af65"><code>22d9247</code></a> release version 3.1.3</li>
<li><a href="https://github.com/pallets/flask/commit/089cb86dd22bff589a4eafb7ab8e42dc357623b4"><code>089cb86</code></a> Merge commit from fork</li>
<li><a href="https://github.com/pallets/flask/commit/c17f379390731543eea33a570a47bd4ef76a54fa"><code>c17f379</code></a> request context tracks session access</li>
<li><a href="https://github.com/pallets/flask/commit/27be9338405382445a7cb01151e084559b98d602"><code>27be933</code></a> start version 3.1.3</li>
<li><a href="https://github.com/pallets/flask/commit/4e652d3f68b90d50aa2301d3b7e68c3fafd9251d"><code>4e652d3</code></a> Abort if the instance folder cannot be created (<a href="https://redirect.github.com/pallets/flask/issues/5903">#5903</a>)</li>
<li><a href="https://github.com/pallets/flask/commit/3d03098a97ddc6a908aa4a50c2ef7381f8297d0a"><code>3d03098</code></a> Abort if the instance folder cannot be created</li>
<li><a href="https://github.com/pallets/flask/commit/407eb76b27884848383a37c7274654f0271e4bc4"><code>407eb76</code></a> document using gevent for async (<a href="https://redirect.github.com/pallets/flask/issues/5900">#5900</a>)</li>
<li><a href="https://github.com/pallets/flask/commit/ac5664d2281533eacafd64f5cc7d5edcdaccab60"><code>ac5664d</code></a> document using gevent for async</li>
<li><a href="https://github.com/pallets/flask/commit/4f79d5b59a56bc4356a97f2e81a35f98cb18d7b3"><code>4f79d5b</code></a> Increase required flit_core version to 3.11 (<a href="https://redirect.github.com/pallets/flask/issues/5865">#5865</a>)</li>
<li><a href="https://github.com/pallets/flask/commit/fe3b215d3ade4db68262dae1a3cdc464a1fc524f"><code>fe3b215</code></a> Increase required flit_core version to 3.11</li>
<li>Additional commits viewable in <a href="https://github.com/pallets/flask/compare/3.1.1...3.1.3">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=flask&package-manager=pip&previous-version=3.1.1&new-version=3.1.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/google/adk-python/network/alerts).

</details>

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/4571 from google:dependabot/pip/contributing/samples/authn-adk-all-in-one/pip-81068183c6 6f577df16cb78beec2d26d873761173811f6ef5b
PiperOrigin-RevId: 877461954
2026-03-02 10:21:29 -08:00
George Weale 6a929af718 fix: Prevent splitting of SSE events with artifactDelta for function resume requests
When handling a /run_sse request that includes a functionCallEventId, do not split events that contain both content and artifactDelta

Close #4487

Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 877435561
2026-03-02 09:25:22 -08:00
nikkie 991abd44e9 chore: escape Click's wrapping
Escape Click’s Wrapping in `adk deploy agent_engine` example

Merge https://github.com/google/adk-python/pull/4337

### Link to Issue or Description of Change

**2. Or, if no issue exists, describe the change:**

**Problem:**
`adk deploy agent_engine` help message loses newlines in docstring formatting

<img width="749" height="257" alt="スクリーンショット 2026-01-31 13 29 18" src="https://github.com/user-attachments/assets/ede7d9e7-609d-4412-acce-c80e24ec1e2f" />

**Solution:**

Add `\b` on a line by itself before the formatted block

### Testing Plan

This is format improvement of help message, so I think there is no need to add test case.

**Unit Tests:**

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

```
% pytest tests/unittests/cli  # Python 3.13.8
======================= 260 passed, 140 warnings in 7.73s ========================
```

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

Ran `adk deploy agent_engine --help`, then saw

```
  Example:

      # With Express Mode API Key
      adk deploy agent_engine --api_key=[api_key] my_agent

      # With Google Cloud Project and Region
      adk deploy agent_engine --project=[project] --region=[region]
        --display_name=[app_name] my_agent
```

### 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.

### Additional context

Same solution as #4258

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/4337 from ftnext:escape-wrapping-deploy-agent-engine-example 09440380dd5b1e14a48151eba1b808def8ae3b6a
PiperOrigin-RevId: 877205878
2026-03-01 22:32:15 -08:00
nikkie eb55eb7e7f fix: typo in A2A EXPERIMENTAL warning
Merge https://github.com/google/adk-python/pull/4462

**Please ensure you have read the [contribution guide](https://github.com/google/adk-python/blob/main/CONTRIBUTING.md) before creating a pull request.**

### Link to Issue or Description of Change

**2. Or, if no issue exists, describe the change:**

**Problem:**
I found a typo: arethemselves

>/.../adk-python/src/google/adk/a2a/converters/event_converter.py:245: UserWarning: [EXPERIMENTAL] convert_a2a_message_to_event: ADK Implementation for A2A support (A2aAgentExecutor, RemoteA2aAgent and corresponding supporting components etc.) is in experimental mode and is subjected to breaking changes. A2A protocol and SDK arethemselves not experimental. Once it's stable enough the experimental mode will be removed. Your feedback is welcome.

**Solution:**
Just fix

### Testing Plan

This is typo fix

**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.
- [ ] 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/4462 from ftnext:fix-typo-a2a-experimental-warning a117314eb524dd93351e17f2183eea080225e43e
PiperOrigin-RevId: 877095788
2026-03-01 14:52:34 -08:00
Shangjie Chen 8ddddc040c chore: Use factory method to create invocation context in the runner
Co-authored-by: Shangjie Chen <deanchen@google.com>
PiperOrigin-RevId: 876474267
2026-02-27 17:12:06 -08:00
Lusha Wang dff4c44040 fix: Update agent_engine_sandbox_code_executor in ADK
1. For prototyping and testing purposes, sandbox name can be provided, and it will be used for all requests across the lifecycle of an agent
2. If no sandbox name is provided, agent engine name will be provided, and we will automatically create one sandbox per session, and the sandbox has TTL set for a year.
If the sandbox stored in the session hits the TTL, it will not be in "STATE_RUNNING" so a new sandbox will be created.

Co-authored-by: Lusha Wang <lusha@google.com>
PiperOrigin-RevId: 876450610
2026-02-27 15:59:20 -08:00
Wei (Jack) Sun 1206addd6e chore: merge release v1.26.0 to main
Merge https://github.com/google/adk-python/pull/4637

Syncs version bump and CHANGELOG from release v1.26.0 to main.

Co-authored-by: Xuan Yang <xygoogle@google.com>
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/4637 from google:release/v1.26.0 427a983b18088bdc22272d02714393b0a779ecdf
PiperOrigin-RevId: 875930970
2026-02-26 16:00:38 -08:00
Kathy Wu 8ad8bc9b69 fix: Add a script to the sample skills agent
Added a get_humidity script to demo the new RunSkillScript tool

Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 875901416
2026-02-26 14:50:02 -08:00
Ke Wang 8a3161202e feat(skill): Add BashTool
PiperOrigin-RevId: 875899505
2026-02-26 14:46:16 -08:00
George Weale ebbc114786 fix: Validate session before streaming instead of eagerly advancing the runner generator
Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 875892569
2026-02-26 14:30:42 -08:00
Xuan Yang d55afede1b chore: Stop auto-triggering Release Please after cherry-picks
Co-authored-by: Xuan Yang <xygoogle@google.com>
PiperOrigin-RevId: 875867583
2026-02-26 13:33:37 -08:00
Kathy Wu b4610fe1c6 chore: Add README for integrations folder
Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 875836816
2026-02-26 12:24:24 -08:00
Keyur Joshi 7b7ddda46c feat: Add interface between optimization infra and LocalEvalService
details:
* Enables the use of ADK evaluations via LocalEvalService for optimizing agents.
* Provides flexibility in choosing eval sets and eval cases for training and validation.
* Converts ADK eval results into a compact format useful for whitebox agent optimization.

Co-authored-by: Keyur Joshi <keyurj@google.com>
PiperOrigin-RevId: 875818012
2026-02-26 11:40:37 -08:00
Carlos Chinchilla Corbacho 65d9a726c5 chore: add @override decorators to LoggingPlugin callback methods
Merge https://github.com/google/adk-python/pull/4572

### Link to Issue or Description of Change
**1. Link to an existing issue (if applicable):**
- Closes: #4496

**2. Or, if no issue exists, describe the change:**

**Problem:**

`LoggingPlugin` overrides 12 callback methods from `BasePlugin` but none use the `@override` decorator. Every other plugin in the package (`DebugLoggingPlugin`, `ReplayPlugin`, `RecordingsPlugin`, `EnsureRetryOptionsPlugin`, `_RequestIntercepterPlugin`) already follows this practice. With `mypy --strict` enabled in `pyproject.toml`, missing `@override` means renamed or removed base-class methods would be silently missed in `LoggingPlugin` while being caught everywhere else.

**Solution:**

Import `override` from `typing_extensions` and decorate all 12 overridden callbacks. Purely additive: one import line and 12 decorators. No behavioral, API, or runtime change.

### Testing Plan

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

No new tests are required — `@override` is a static-analysis-only decorator with no runtime effect. Ran `mypy` on the file before and after the change: same preexisting warnings, no new errors introduced. CI will validate via the existing test suite and linting checks.

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

Not applicable. This change adds only decorators with no runtime behavior. Verified by comparing `mypy` output before and after — no new errors.

### 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.
- [ ] 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.

### Additional context

I am the author of the original issue (#4496). A previous PR (#4544) was opened but is pending clarification, so I'm
submitting this complete PR as the original issue author.

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/4572 from cchinchilla-dev:feat/add_override_decorators_to_loggingplugin_4496 142ed872bee39db782c1dccb84f40906ee849bb8
PiperOrigin-RevId: 875811966
2026-02-26 11:29:52 -08:00
Wiktoria Walczak 4dd4d5ecb6 feat(otel): add gen_ai.tool.definitions to experimental semconv
Co-authored-by: Wiktoria Walczak <wwalczak@google.com>
PiperOrigin-RevId: 875741416
2026-02-26 08:42:50 -08:00
Google Admin 7a813b0987 chore: refactor Github Action
Co-authored-by: Sasha Sobran <asobran@google.com>
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/4535 from google:lsc-1771431513.0644026 200d04544fafa4c555f2031f66ef6a3c2ff8a774
PiperOrigin-RevId: 875727295
2026-02-26 08:06:59 -08:00
Sasha Sobran b38b708e23 chore: Update release-please to always bump minor
Co-authored-by: Sasha Sobran <asobran@google.com>
PiperOrigin-RevId: 875727292
2026-02-26 08:06:15 -08:00
Wiktoria Walczak 19718e9c17 feat(otel): add experimental semantic convention and emit gen_ai.client.inference.operation.details event
Co-authored-by: Wiktoria Walczak <wwalczak@google.com>
PiperOrigin-RevId: 875709959
2026-02-26 07:19:15 -08:00
Google Team Member 6f772d2b08 feat: Introduce A2A request interceptors in RemoteA2aAgent
This change adds a new `a2a` subpackage with configuration and utility functions for intercepting requests and responses in `RemoteA2aAgent`. The `RemoteA2aAgent` now accepts an `A2aRemoteAgentConfig` to register `RequestInterceptor` instances, allowing custom logic to be executed before and after the A2A message send.

PiperOrigin-RevId: 875559286
2026-02-26 00:23:01 -08:00
Shangjie Chen 5f806ed73a chore: Refactor runner to infer invocation_id from FunctionResponse Event for HITL resuming
invocation_id is no longer required in resuming case, unless no new_message is provided.

Co-authored-by: Shangjie Chen <deanchen@google.com>
PiperOrigin-RevId: 875432024
2026-02-25 18:27:16 -08:00
Kathy Wu de4dee899c fix: Re-export DEFAULT_SKILL_SYSTEM_INSTRUCTION to skills and skill/prompt.py to avoid breaking current users
Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 875407169
2026-02-25 17:18:29 -08:00
Google Team Member 5702a4b1f5 feat: Add param support to Bigtable execute_sql
PiperOrigin-RevId: 875382675
2026-02-25 16:11:44 -08:00
Google Admin 9730bc34d7 Refactor Github Action per b/485167538 (#4535)
Co-authored-by: Ben Knutson <benknutson@google.com>
2026-02-25 17:09:43 -05:00
Yifan Wang 4460f4fada chore: add /dev/build_graph/{app_name} to build the graph serialization for apps, and
make it dev only with `with_ui` flag

Co-authored-by: Yifan Wang <wanyif@google.com>
PiperOrigin-RevId: 875319398
2026-02-25 13:47:41 -08:00