479 Commits

Author SHA1 Message Date
k4w_wak a721c1eb34 fix(security): enable Jinja2 autoescape to prevent XSS in gepa sample
Merge https://github.com/google/adk-python/pull/5526

## Security Fix: XSS via Jinja2 Template Injection (CWE-79)

### Vulnerability
`contributing/samples/gepa/rater_lib.py` instantiates `jinja2.Environment()` **without** `autoescape=True`. The companion template `rubric_validation_template.txt` renders `{{user_input}}` and `{{model_response}}` without escaping.

### Impact
Since ADK is Google's official framework for building AI agents, developers copy/adapt this sample code into production web applications. Unescaped user-controlled input in Jinja2 templates enables:

- **Cross-Site Scripting (XSS)** — Arbitrary JavaScript execution in browsers
- **Session Hijacking** — Steal cookies/tokens if rendered in web context
- **Phishing** — Inject fake login forms

### Proof of Concept
```python
# user_input: <script>alert("XSS")</script>
# Renders as: <main_prompt><script>alert("XSS")</script></main_prompt>

# model_response: <img src=x onerror=alert("XSS from model")>
# Renders as: <responses><img src=x onerror=alert("XSS from model")></responses>
```

### Changes
1. **rater_lib.py:170** — `jinja2.Environment()` → `jinja2.Environment(autoescape=True)`
2. **rubric_validation_template.txt:158** — `{{user_input}}` → `{{user_input|e}}`
3. **rubric_validation_template.txt:163** — `{{model_response}}` → `{{model_response|e}}`

Defense in depth: `autoescape=True` provides baseline protection, explicit `|e` filters ensure escaping even if autoescape is later disabled.

### References
- CWE-79: Cross-site Scripting (XSS)
- OWASP A7:2017 — Cross-site Scripting
- Jinja2 docs: https://jinja.palletsprojects.com/en/3.1.x/api/#autoescaping

Co-authored-by: Shangjie Chen <deanchen@google.com>
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/5526 from k4w-wak:fix/jinja2-xss-autoescape b5b6d3eee616aa95c6a06ced4053fdc0745d5e0a
PiperOrigin-RevId: 943549514
2026-07-06 16:17:10 -07:00
Haran Rajkumar 527e3c1089 docs(samples): Add ManagedAgent code-execution sample
Add a runnable sample under contributing/samples/managed_agent/code_execution
showing how to use ManagedAgent with the server-side code execution tool. Since
ManagedAgent has no code_executor field, code execution is enabled by passing the
raw types.Tool(code_execution=types.ToolCodeExecution()) config in tools. The
sample exposes a root_agent in agent.py and ships a README plus a matching
single-turn live integration test that verifies a code-executed prime-sum
computation.

Co-authored-by: Haran Rajkumar <haranrk@google.com>
PiperOrigin-RevId: 943548907
2026-07-06 16:15:37 -07:00
Haran Rajkumar 969909f2ba docs(samples): Add ManagedAgent sample using server-side google_search
Add a runnable sample under contributing/samples/managed_agent/basic showing how
to use ManagedAgent (backed by the Managed Agents API) with the server-side
google_search tool, mirroring the live integration test flow. The sample
exposes a root_agent in agent.py and ships a README covering the required
enterprise/ADC setup and example prompts (including a multi-turn follow-up that
reuses the recovered remote sandbox).

Co-authored-by: Haran Rajkumar <haranrk@google.com>
PiperOrigin-RevId: 943536117
2026-07-06 15:48:57 -07:00
Shangjie Chen 1263ed64e3 feat: Implement Workflow as Tool core feature
Introduce NodeTool, allowing individual Nodes and entire Workflows to be wrapped and executed as standard ADK Tools.

This PR implements the core, single-turn execution capability:
- Support auto-wrapping of BaseNode (Workflows) directly in Agent.tools.
- Wrapping synchronous and asynchronous function nodes as NodeTools.
- Providing a complete sample workflow demonstrating how to run a workflow as a tool.

Resumption and multi-turn nested HITL support are skipped in this PR and will be fully enabled in the later PR.

Co-authored-by: Shangjie Chen <deanchen@google.com>
PiperOrigin-RevId: 943499058
2026-07-06 14:32:39 -07:00
George Weale ade8577745 fix: drop nonexistent log_query tool from session_state_agent sample
The instruction told the model to use a `log_query` tool that is not
registered on the agent, so when the model followed it the run failed
with "Tool 'log_query' not found". That made the integration_test
presubmit, which runs this sample, flaky. Reword the instruction to
just reply, matching the sample's documented output.

Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 943350141
2026-07-06 09:59:53 -07:00
Xuan Yang df6baf4acf feat(integrations): Add DaytonaEnvironment for remote sandbox workspaces
Co-authored-by: Xuan Yang <xygoogle@google.com>
PiperOrigin-RevId: 941353505
2026-07-01 16:27:10 -07:00
Shangjie Chen 5735690d55 refactor: Align single-turn subagent branch scoping with function_call_id
Co-authored-by: Shangjie Chen <deanchen@google.com>
PiperOrigin-RevId: 941318373
2026-07-01 15:11:30 -07:00
George Weale be23327b03 chore: remove the issue triaging agent
The agent ran on a schedule with a write-scoped GitHub token while feeding
attacker-controlled issue title and body straight into its prompt, so a
crafted issue could steer its labeling and owner-assignment actions.
Removing the agent and its workflow removes that exposure.

Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 941289396
2026-07-01 14:15:55 -07:00
Haran Rajkumar 9d0a5a8615 test(samples): add replay tests for the interactions_api sample
Add replay test fixtures covering the documented flows of the
contributing/samples/models/interactions_api sample (basic text, Google
Search grounding, multi-turn stateful recall, and a custom function
tool), so the sample is exercised by tests/unittests/test_samples.py.

Also fix the shared sample test harness (cli/agent_test_runner.py) to
support the Interactions API:

- Exclude the volatile interaction_id (a server-issued token) and
  turn_complete fields from fixture comparison and from rebuilt
  fixtures, matching how other non-reproducible fields (timestamps,
  usage metadata, etc.) are already handled. The Interactions API
  stamps these onto every model response and the replay MockModel
  cannot reproduce them.
- Drive all turns of a fixture rebuild on a single persistent event
  loop. The sync Runner.run() uses asyncio.run() per call, which closes
  the loop the model's cached async api_client is bound to, so
  subsequent turns fail with "Event loop is closed" and corrupt
  multi-turn fixtures. Reusing one loop keeps the cached client valid
  across the conversation.

Co-authored-by: Haran Rajkumar <haranrk@google.com>
PiperOrigin-RevId: 940691339
2026-06-30 15:31:21 -07:00
Kathy Wu 3962d0bca8 fix: Add debug level logging to mcp sse agent sample
We gated the HTTP debug info behind debug level logging - this fixes the sample agent so that it returns the debug info

Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 940676911
2026-06-30 15:04:41 -07:00
Google Team Member 46dadbeb1f chore: Update telemetry owner
PiperOrigin-RevId: 940282321
2026-06-30 00:31:51 -07:00
Shangjie Chen 8a7656b857 refactor(ci): Consolidate compliance checks into pre-commit hook
Move custom file compliance checks (logger pattern, future annotations,
cli imports, mTLS endpoints) from GHA inline bash scripts to a unified
python script (compliance_checks.py) and expose it as a local pre-commit hook.
Remove the compliance-check job from CI workflow.

Co-authored-by: Shangjie Chen <deanchen@google.com>
PiperOrigin-RevId: 940081615
2026-06-29 15:59:28 -07:00
Kathy Wu 4c4f77ae39 feat: HTTP traces for MCP server requests/errors
Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 938200678
2026-06-25 14:38:56 -07:00
Xuan Yang 8679aa8e95 docs: Sort PRs by update time in list_untriaged_pull_requests
Co-authored-by: Xuan Yang <xygoogle@google.com>
PiperOrigin-RevId: 937462665
2026-06-24 11:34:22 -07:00
Xuan Yang dbd4bb07d0 docs: Add manual batch mode trigger for ADK Pull Request Triaging workflow
Co-authored-by: Xuan Yang <xygoogle@google.com>
PiperOrigin-RevId: 936929363
2026-06-23 15:33:36 -07:00
Xuan Yang b3f278a692 docs: Update ADK Pull Request Triaging Agent workflow to run periodically
Co-authored-by: Xuan Yang <xygoogle@google.com>
PiperOrigin-RevId: 936855428
2026-06-23 13:26:39 -07:00
Milen Kovachev 3cbcefce9f chore: add missing Apache 2.0 license headers
Merge https://github.com/google/adk-python/pull/6155

**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

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

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

**Problem:**
The repository is missing Apache 2.0 license headers across 155 files. This is required by Google OSPO.

**Solution:**
Prepended the standard Apache 2.0 open-source license header to all flagged files. The copyright year was dynamically assigned based on each file's first commit year in git history.

### Testing Plan

_Please describe the tests that you ran to verify your changes. This is required for all PRs that are not small documentation or typo fixes._

**Unit Tests:**

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

_Please include a summary of passed `pytest` results._
N/A - This PR only adds comments (license headers) to the top of files and contains zero functional code changes. No new tests are needed, and existing tests should pass as-is.

**Manual End-to-End (E2E) Tests:**
N/A - No functional code was changed.

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

### Additional context

Co-authored-by: Shangjie Chen <deanchen@google.com>
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/6155 from milenvk:fix-missing-licenses d2a264b9a812fd997daf975ec37996e6b4b7a042
PiperOrigin-RevId: 936165783
2026-06-22 11:37:57 -07:00
Shangjie Chen 59fe9b3bb8 fix: Rollback instruction util refactoring as its breaking internal customers
Co-authored-by: Shangjie Chen <deanchen@google.com>
PiperOrigin-RevId: 935006608
2026-06-19 12:04:50 -07:00
Haran Rajkumar 1c7255b83a chore(samples): pin google-adk to 2.2.0 and update sample model
Bump the pinned google-adk dependency in three sample requirement files from
1.28.1 to 2.2.0 (the latest 2.x release):
- contributing/samples/integrations/authn-adk-all-in-one/requirements.txt
- contributing/samples/integrations/authn-adk-all-in-one/adk_agents/requirements.txt
- contributing/samples/adk_team/adk_knowledge_agent/requirements.txt

Also update the authn-adk-all-in-one sample default model to
gemini-flash-latest, since gemini-2.5-flash is no longer served by the Gemini
API and returns a 404.

Co-authored-by: Haran Rajkumar <haranrk@google.com>
PiperOrigin-RevId: 934016255
2026-06-17 17:39:57 -07:00
dependabot[bot] 9dc8ed722e chore(deps): bump the pip group across 1 directory with 3 updates
Merge https://github.com/google/adk-python/pull/5748

Bumps the pip group with 3 updates in the /contributing/samples/integrations/authn-adk-all-in-one directory: [google-adk](https://github.com/google/adk-python), [python-dotenv](https://github.com/theskumar/python-dotenv) and [requests](https://github.com/psf/requests).

Updates `google-adk` from 1.12 to 1.28.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/google/adk-python/releases">google-adk's releases</a>.</em></p>
<blockquote>
<h2>v1.28.1</h2>
<h2><a href="https://github.com/google/adk-python/compare/v1.28.0...v1.28.1">1.28.1</a> (2026-04-02)</h2>
<h3>Features</h3>
<ul>
<li><strong>live:</strong> support live for <code>gemini-3.1-flash-live-preview</code> model (<a href="https://github.com/google/adk-python/commit/ee69661a616056fa89e0ec2188aaa59bd714d8c9">ee69661</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>Disallow args on /builder and Add warning about Web UI usage to CLI help (<a href="https://github.com/google/adk-python/commit/f037f68d67ae1bd16b00df0c7523fb67cbd1e911">f037f68</a>)</li>
<li><strong>live:</strong> Buffer tool calls and emit them together upon turn completion (<a href="https://github.com/google/adk-python/commit/081adbdfa41490e4868b028a1cdabceb811a7505">081adbd</a>)</li>
</ul>
<h2>v1.28.0</h2>
<h2><a href="https://github.com/google/adk-python/compare/v1.27.5...v1.28.0">1.28.0</a> (2026-03-26)</h2>
<h3>Features</h3>
<ul>
<li><strong>a2a:</strong> add lifespan parameter to to_a2a() (<a href="https://github.com/google/adk-python/commit/0f4c8073e5a180a220f88928d67ee8d521486f03">0f4c807</a>), closes <a href="https://redirect.github.com/google/adk-python/issues/4701">#4701</a></li>
<li>Add a new extension for the new version of ADK-A2A integration (<a href="https://github.com/google/adk-python/commit/6f0dcb3e26dd82fed1a8564c17a47eec03b04617">6f0dcb3</a>)</li>
<li>Add ability to run individual unit tests to unittests.sh (<a href="https://github.com/google/adk-python/commit/b3fcd8a21fe64063cdd8d07121ee4da3adb44c30">b3fcd8a</a>)</li>
<li>Add database_role property to SpannerToolSettings and use it in execute_sql to support fine grained access controls (<a href="https://github.com/google/adk-python/commit/360e0f7ebaba7a682f7230c259b474ace7ff6d13">360e0f7</a>)</li>
<li>Add index to events table and update dependencies (<a href="https://github.com/google/adk-python/commit/3153e6d74f401f39e363a36f6fa0664f245013db">3153e6d</a>), closes <a href="https://redirect.github.com/google/adk-python/issues/4827">#4827</a></li>
<li>Add MultiTurn Task success metric (<a href="https://github.com/google/adk-python/commit/9a75c06873b79fbd206b3712231c0280fb2f87ca">9a75c06</a>)</li>
<li>Add MultiTurn Task trajectory and tool trajectory metrics (<a href="https://github.com/google/adk-python/commit/38bfb4475406d63af3111775950d9c25acf17ed2">38bfb44</a>)</li>
<li>Add slack integration to ADK (<a href="https://github.com/google/adk-python/commit/6909a167c8d030111bf7118b9d5e78255a299684">6909a16</a>)</li>
<li>Add Spanner Admin Toolset (<a href="https://github.com/google/adk-python/commit/28618a8dcbee9c4faeec6653a5d978d0330f39bb">28618a8</a>)</li>
<li>Add SSE streaming support to conformance tests (<a href="https://github.com/google/adk-python/commit/c910961501ef559814f54c22aca1609fd3227b80">c910961</a>)</li>
<li>Add support for Anthropic's thinking_blocks format in LiteLLM integration (<a href="https://github.com/google/adk-python/commit/fc45fa68d75fbf5276bf5951929026285a8bb4af">fc45fa6</a>), closes <a href="https://redirect.github.com/google/adk-python/issues/4801">#4801</a></li>
<li>Add support for timeout to UnsafeLocalCodeExecutor (<a href="https://github.com/google/adk-python/commit/71d26ef7b90fe25a5093e4ccdf74b103e64fac67">71d26ef</a>)</li>
<li><strong>auth:</strong> Integrate GCP IAM Connectors (Noop implementation) (<a href="https://github.com/google/adk-python/commit/78e5a908dcb4b1a93e156c6f1b282f59ec6b69d4">78e5a90</a>)</li>
<li><strong>bigquery:</strong> Migrate 1P BQ Toolset (<a href="https://github.com/google/adk-python/commit/08be44295de614f30e686113897af7fe9c228751">08be442</a>) (<a href="https://github.com/google/adk-python/commit/7aa1f5252c15caaf40fde73ac4283fa0a48d8a96">7aa1f52</a>) (<a href="https://github.com/google/adk-python/commit/d1121317ef4e1ac559f4ae13855ac1af28eef8f6">d112131</a>) (<a href="https://github.com/google/adk-python/commit/166ff99b9266cd3bb0e86070c58a67d937216297">166ff99</a>)</li>
<li>enable suppressing A2A experimental warnings (<a href="https://github.com/google/adk-python/commit/fdc2b4355b5a73b8f32d3fa32a092339d963ce67">fdc2b43</a>)</li>
<li>Enhance AgentEngineSandboxCodeExecutor sample to automatically provision an Agent Engine if neither agent_engine_resource_name nor sandbox_resource_name is provided (<a href="https://github.com/google/adk-python/commit/6c34694da64968bc766a7e5e860c0ed9acbc69c2">6c34694</a>)</li>
<li>Extract and merge EventActions from A2A metadata (<a href="https://github.com/google/adk-python/commit/4b677e73b939f5a13269abd9ba9fe65e4b78d7f6">4b677e7</a>), closes <a href="https://redirect.github.com/google/adk-python/issues/3968">#3968</a></li>
<li><strong>mcp:</strong> add sampling callback support for MCP sessions (<a href="https://github.com/google/adk-python/commit/8f826972cc06ef250c1f020e34b9d1cdbd0788c4">8f82697</a>)</li>
<li>Optional GCP project and credential for GCS access (<a href="https://github.com/google/adk-python/commit/2f90c1ac09638517b08cd96a17d595f0968f0bf6">2f90c1a</a>)</li>
<li>Support new embedding model in files retrieval (<a href="https://github.com/google/adk-python/commit/faafac9bb33b45174f04746055fc655b12d3e7f7">faafac9</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>add agent name validation to prevent arbitrary module imports (<a href="https://github.com/google/adk-python/commit/116f75d">116f75d</a>)</li>
<li>add protection for arbitrary module imports (<a href="https://github.com/google/adk-python/commit/995cd1c">995cd1c</a>), closes <a href="https://redirect.github.com/google/adk-python/issues/4947">#4947</a></li>
<li>Add read-only session support in DatabaseSessionService (<a href="https://github.com/google/adk-python/commit/f6ea58b5939b33afad5a2d2f8fb395150120ae07">f6ea58b</a>), closes <a href="https://redirect.github.com/google/adk-python/issues/4771">#4771</a></li>
<li>Allow snake case for skill name (<a href="https://github.com/google/adk-python/commit/b157276cbb3c4f7f7b97e338e9d9df63d9c949cd">b157276</a>)</li>
<li><strong>bigquery:</strong> use valid dataplex OAuth scope (<a href="https://github.com/google/adk-python/commit/4010716470fc83918dc367c5971342ff551401c8">4010716</a>)</li>
<li>Default to ClusterIP so GKE deployment isn't publicly exposed by default (<a href="https://github.com/google/adk-python/commit/f7359e3fd40eae3b8ef50c7bc88f1075ffb9b7de">f7359e3</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/google/adk-python/blob/main/CHANGELOG.md">google-adk's changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<h2><a href="https://github.com/google/adk-python/compare/v1.33.0...v1.34.0">1.34.0</a> (2026-05-18)</h2>
<h3>Features</h3>
<ul>
<li><strong>a2a:</strong> add support for persistent task stores (<a href="https://github.com/google/adk-python/commit/cd78d87b967111d40d429bcf9552a962b7e9614f">cd78d87</a>)</li>
<li>add general support for Gemini Live API in ADK evaluate (<a href="https://github.com/google/adk-python/commit/790c9bef9a336ea000d0cf68e63b025dfead5227">790c9be</a>)</li>
<li>Add mTLS support to Google Cloud Telemetry exporter (<a href="https://github.com/google/adk-python/commit/cfe8d2cc2b29e392886f997be4d77d4cced9959e">cfe8d2c</a>)</li>
<li>add support for A2aAgentExecutor factory in to_a2a() function (<a href="https://github.com/google/adk-python/commit/115124cdf413859c7f634ce995113e4de6cf5ff7">115124c</a>)</li>
<li>add support for non-ADK produced input-required events (<a href="https://github.com/google/adk-python/commit/6e534723dd6be938e6fb1b6f55b06de8ac4d27d8">6e53472</a>)</li>
<li>Added config option to include tool calls/responses in conversation history passed to user simulator (<a href="https://github.com/google/adk-python/commit/baf7efbaa92ce9d71152ea9ba7f5d0706277b171">baf7efb</a>)</li>
<li><strong>ci:</strong> add Gemini auto review and invoke workflows (<a href="https://github.com/google/adk-python/commit/fd8b49295d628075cf70acabb2c52eedf62dd5bd">fd8b492</a>)</li>
<li>Implement GCPSkillRegistry in ADK (<a href="https://github.com/google/adk-python/commit/88ebd426beaec9564bec1fe98ad0096bba519e3d">88ebd42</a>)</li>
<li>Implement Skill Registry in ADK (<a href="https://github.com/google/adk-python/commit/380d261e59b1955af735bf66e47aba2150f04d9f">380d261</a>)</li>
<li>Make Agent Skill description validation more informative (<a href="https://github.com/google/adk-python/commit/9f38973081aacf1999f707dac9778b72b5ce75fd">9f38973</a>)</li>
<li>Simplify data retrieved handling of ask_data_agent tool and ask_data_insights tool (<a href="https://github.com/google/adk-python/commit/48f1b302510c3520643db739494ff8ea318b7b8f">48f1b30</a>)</li>
<li>Support OAuth PKCE in McpToolset (<a href="https://github.com/google/adk-python/commit/e7316dc077d676b4349a8d7779ad4ad73f6b0d24">e7316dc</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>agents:</strong> fix visibility of output_key state delta in callbacks (<a href="https://github.com/google/adk-python/commit/0524797ac75ddd13b1c01cac91e507ba2c42cef0">0524797</a>)</li>
<li><strong>anthropic:</strong> map negative thinking_budget to adaptive thinking (<a href="https://github.com/google/adk-python/commit/03b915b1bdf5dcab14ae51d8b8cadf37d649acca">03b915b</a>)</li>
<li><strong>auth:</strong> persist refreshed OAuth2 credentials to store (<a href="https://github.com/google/adk-python/commit/218ea76e30ced48898a46ca48a014f7dffd266a7">218ea76</a>), closes <a href="https://redirect.github.com/google/adk-python/issues/5329">#5329</a></li>
<li><strong>auth:</strong> remove unneeded OAuth flows (<a href="https://github.com/google/adk-python/commit/c35a57969d70cb98356297beb36fdf79ab7c00f6">c35a579</a>)</li>
<li>avoid pre-serializing dict values in Interactions API to prevent double-escaping (<a href="https://github.com/google/adk-python/commit/85f397d20f8b32cdfd074463ff505a06c8535ddf">85f397d</a>)</li>
<li><strong>cache:</strong> enforce CacheMetadata active-state invariant (<a href="https://github.com/google/adk-python/commit/76b9f0baa0bcc4e715ee996b4dc894ffc9264583">76b9f0b</a>)</li>
<li><strong>cache:</strong> handle fingerprint-only metadata in performance analyzer (<a href="https://github.com/google/adk-python/commit/9c5de58cfa55fc2b4aade2018456214c95140c16">9c5de58</a>)</li>
<li>Catch OSError when importing AnthropicLlm (<a href="https://github.com/google/adk-python/commit/91cb5c6071cc73da8b97e789557dfbc32026a3e8">91cb5c6</a>)</li>
<li><strong>evaluation:</strong> handle none config in per_turn_user_simulator_quality (<a href="https://github.com/google/adk-python/commit/eed9bd319ffc398fae14c2362c93f986ffe25f67">eed9bd3</a>), closes <a href="https://redirect.github.com/google/adk-python/issues/5677">#5677</a></li>
<li>fallback to project id if crendetials don't contain quota project (<a href="https://github.com/google/adk-python/commit/e377cb5ec057ed4176f2714f368c45e730053eb0">e377cb5</a>)</li>
<li>Fix missing dynamically loaded tools in SkillToolset during the same invocation (<a href="https://github.com/google/adk-python/commit/f9097cbf7b64b78da894e482480fc22a9603e429">f9097cb</a>)</li>
<li><strong>live:</strong> ensure sub live agent doesn't inherit session resumption handle from parent live agent to avoid interrupting the conversation (<a href="https://github.com/google/adk-python/commit/8dd9147443b1dc4121756ad186090f1f267e83b0">8dd9147</a>)</li>
<li><strong>models:</strong> preserve string content in Anthropic tool_result blocks (<a href="https://github.com/google/adk-python/commit/9a1e75f24256cfe54766c69691247df90dc5558f">9a1e75f</a>), closes <a href="https://redirect.github.com/google/adk-python/issues/5358">#5358</a></li>
<li><strong>models:</strong> preserve tool_use IDs for Anthropic models on session resume (<a href="https://github.com/google/adk-python/commit/327c45f9f4c98f7b32feeb8555c166b814ee6684">327c45f</a>), closes <a href="https://redirect.github.com/google/adk-python/issues/5074">#5074</a></li>
<li><strong>models:</strong> treat empty GenerateContentResponse without prompt feedback as successful (<a href="https://github.com/google/adk-python/commit/0cb9ae94b30ac2cff120b2c4ccab77e6b85cbf45">0cb9ae9</a>)</li>
<li>only serialize llm_response to json if it will be included in the trace (<a href="https://github.com/google/adk-python/commit/12844939f1a89b2a06c592a52bbd3c293860e808">1284493</a>)</li>
<li>Preserve live_session_id in function call handling (<a href="https://github.com/google/adk-python/commit/07a9a01b3c1fb2866cc8bdcd8d8ab0906aa88682">07a9a01</a>)</li>
<li>Prevent compaction of events involved in Human-in-the-Loop interactions (<a href="https://github.com/google/adk-python/commit/bb2efb6bd234e3235c47b3245676581f6022b458">bb2efb6</a>)</li>
<li>raise eagerly on importing AgentRegistry if a2a-sdk is missing (<a href="https://github.com/google/adk-python/commit/33cf6cb61016bdd227749a7eff113045f848b203">33cf6cb</a>)</li>
<li><strong>small:</strong> Convert events to the A2A format while respecting user vs agent role (<a href="https://github.com/google/adk-python/commit/59f7347a635bc56fa8abdd3c7c771ae11bebf9ab">59f7347</a>)</li>
<li><strong>tools:</strong> preserve code_execution_result and executable_code in AgentTool (<a href="https://github.com/google/adk-python/commit/7e61b517027a23c640b7b636a87e04a0a02c392c">7e61b51</a>), closes <a href="https://redirect.github.com/google/adk-python/issues/5481">#5481</a></li>
<li><strong>tools:</strong> Prevent AnyIO CancelScope task boundary violations during MCP session creation failure (<a href="https://github.com/google/adk-python/commit/430915970062a4ff926a65e5884cc5bc2912c48c">4309159</a>)</li>
<li>Update model name in hello_world agent (<a href="https://github.com/google/adk-python/commit/192f19d82495eb560ee701eb751ce14b90e4b5c7">192f19d</a>)</li>
<li>Update model to gemini-3-flash-preview in hello word agent sample (<a href="https://github.com/google/adk-python/commit/6d89d2194a21220801c602248b27b81b9188050c">6d89d21</a>)</li>
<li>Update model to gemini-3-flash-preview in session state agent sample (<a href="https://github.com/google/adk-python/commit/2d423e835569e0e8e67772a09bf1a76f1bb5324e">2d423e8</a>)</li>
<li>use tool_responses role for gemma4 models in LiteLLM integration (<a href="https://github.com/google/adk-python/commit/3d07960a70031fb7786485f58a964a98dbdb932d">3d07960</a>), closes <a href="https://redirect.github.com/google/adk-python/issues/5650">#5650</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/google/adk-python/commit/0d48362f2e5410f0f39fab8b38c2164d4293abc1"><code>0d48362</code></a> chore(release/candidate): release 1.28.1 (<a href="https://redirect.github.com/google/adk-python/issues/5121">#5121</a>)</li>
<li><a href="https://github.com/google/adk-python/commit/f037f68d67ae1bd16b00df0c7523fb67cbd1e911"><code>f037f68</code></a> fix: Disallow args on /builder and Add warning about Web UI usage to CLI help</li>
<li><a href="https://github.com/google/adk-python/commit/081adbdfa41490e4868b028a1cdabceb811a7505"><code>081adbd</code></a> fix(live): Buffer tool calls and emit them together upon turn completion</li>
<li><a href="https://github.com/google/adk-python/commit/ee69661a616056fa89e0ec2188aaa59bd714d8c9"><code>ee69661</code></a> feat(live): support live for <code>gemini-3.1-flash-live-preview</code> model</li>
<li><a href="https://github.com/google/adk-python/commit/4e05efb76ca96351f6fd868e09f26fe6d8cf8f9f"><code>4e05efb</code></a> chore: update last-release-sha for next release</li>
<li><a href="https://github.com/google/adk-python/commit/c57d000699d9d4c0a0cb5d1c9e40e86f29f55b05"><code>c57d000</code></a> chore(release/candidate): release 1.28.0 (<a href="https://redirect.github.com/google/adk-python/issues/5014">#5014</a>)</li>
<li><a href="https://github.com/google/adk-python/commit/50209549206256abe5d1c5d84ab2b14dfdf80d66"><code>5020954</code></a> fix: Update list_agents to only list directories, not validate agent definitions</li>
<li><a href="https://github.com/google/adk-python/commit/f7359e3fd40eae3b8ef50c7bc88f1075ffb9b7de"><code>f7359e3</code></a> fix: Default to ClusterIP so GKE deployment isn't publicly exposed by default</li>
<li><a href="https://github.com/google/adk-python/commit/ab9ae0fce7b9da2e8901e2af1a46c30d3bf16f7e"><code>ab9ae0f</code></a> ADK changes</li>
<li><a href="https://github.com/google/adk-python/commit/08be44295de614f30e686113897af7fe9c228751"><code>08be442</code></a> feat(bigquery): Migrate 1P BQ Toolset</li>
<li>Additional commits viewable in <a href="https://github.com/google/adk-python/compare/v1.12.0...v1.28.1">compare view</a></li>
</ul>
</details>
<br />

Updates `python-dotenv` from 1.1.1 to 1.2.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/theskumar/python-dotenv/releases">python-dotenv's releases</a>.</em></p>
<blockquote>
<h2>v1.2.2</h2>
<h3>Added</h3>
<ul>
<li>Support for Python 3.14, including the free-threaded (3.14t) build. (#)</li>
</ul>
<h3>Changed</h3>
<ul>
<li>The <code>dotenv run</code> command now forwards flags directly to the specified command by <a href="https://github.com/bbc2"><code>@​bbc2</code></a> in <a href="https://redirect.github.com/theskumar/python-dotenv/pull/607">theskumar/python-dotenv#607</a></li>
<li>Improved documentation clarity regarding override behavior and the reference page.</li>
<li>Updated PyPy support to version 3.11.</li>
<li>Documentation for FIFO file support.</li>
<li>Support for Python 3.9.</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>Improved <code>set_key</code> and <code>unset_key</code> behavior when interacting with symlinks by <a href="https://github.com/bbc2"><code>@​bbc2</code></a> in <a href="https://github.com/theskumar/python-dotenv/commit/790c5c02991100aa1bf41ee5330aca75edc51311">#790c5</a></li>
<li>Corrected the license specifier and added missing Python 3.14 classifiers in package metadata by <a href="https://github.com/JYOuyang"><code>@​JYOuyang</code></a> in <a href="https://redirect.github.com/theskumar/python-dotenv/pull/590">theskumar/python-dotenv#590</a></li>
</ul>
<h3>Breaking Changes</h3>
<ul>
<li>
<p><code>dotenv.set_key</code> and <code>dotenv.unset_key</code> used to follow symlinks in some
situations. This is no longer the case. For that behavior to be restored in
all cases, <code>follow_symlinks=True</code> should be used.</p>
</li>
<li>
<p>In the CLI, <code>set</code> and <code>unset</code> used to follow symlinks in some situations. This
is no longer the case.</p>
</li>
<li>
<p><code>dotenv.set_key</code>, <code>dotenv.unset_key</code> and the CLI commands <code>set</code> and <code>unset</code>
used to reset the file mode of the modified .env file to <code>0o600</code> in some
situations. This is no longer the case: The original mode of the file is now
preserved. Is the file needed to be created or wasn't a regular file, mode
<code>0o600</code> is used.</p>
</li>
</ul>
<h3>Misc</h3>
<ul>
<li>skip 000 permission tests for root user by <a href="https://github.com/burnout-projects"><code>@​burnout-projects</code></a> in <a href="https://redirect.github.com/theskumar/python-dotenv/pull/561">theskumar/python-dotenv#561</a></li>
<li>Bump actions/checkout from 5 to 6 in the github-actions group by <a href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot] in <a href="https://redirect.github.com/theskumar/python-dotenv/pull/593">theskumar/python-dotenv#593</a></li>
<li>Add Windows testing to CI by <a href="https://github.com/bbc2"><code>@​bbc2</code></a> in <a href="https://redirect.github.com/theskumar/python-dotenv/pull/604">theskumar/python-dotenv#604</a></li>
<li>Improve workflow efficiency with best practices by <a href="https://github.com/theskumar"><code>@​theskumar</code></a> in <a href="https://redirect.github.com/theskumar/python-dotenv/pull/609">theskumar/python-dotenv#609</a></li>
<li>Remove the use of <code>sh</code> in tests by <a href="https://github.com/bbc2"><code>@​bbc2</code></a> in <a href="https://redirect.github.com/theskumar/python-dotenv/pull/612">theskumar/python-dotenv#612</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/JYOuyang"><code>@​JYOuyang</code></a> made their first contribution in <a href="https://redirect.github.com/theskumar/python-dotenv/pull/590">theskumar/python-dotenv#590</a></li>
<li><a href="https://github.com/burnout-projects"><code>@​burnout-projects</code></a> made their first contribution in <a href="https://redirect.github.com/theskumar/python-dotenv/pull/561">theskumar/python-dotenv#561</a></li>
<li><a href="https://github.com/cpackham-atlnz"><code>@​cpackham-atlnz</code></a> made their first contribution in <a href="https://redirect.github.com/theskumar/python-dotenv/pull/597">theskumar/python-dotenv#597</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/theskumar/python-dotenv/compare/v1.2.1...v1.2.2">https://github.com/theskumar/python-dotenv/compare/v1.2.1...v1.2.2</a></p>
<h2>v1.2.1</h2>
<h2>What's Changed</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/theskumar/python-dotenv/blob/main/CHANGELOG.md">python-dotenv's changelog</a>.</em></p>
<blockquote>
<h2>[1.2.2] - 2026-03-01</h2>
<h3>Added</h3>
<ul>
<li>Support for Python 3.14, including the free-threaded (3.14t) build. (<a href="https://redirect.github.com/theskumar/python-dotenv/issues/588">#588</a>)</li>
</ul>
<h3>Changed</h3>
<ul>
<li>The <code>dotenv run</code> command now forwards flags directly to the specified command by [<a href="https://github.com/bbc2"><code>@​bbc2</code></a>] in <a href="https://redirect.github.com/theskumar/python-dotenv/issues/607">#607</a></li>
<li>Improved documentation clarity regarding override behavior and the reference page.</li>
<li>Updated PyPy support to version 3.11.</li>
<li>Documentation for FIFO file support.</li>
<li>Dropped Support for Python 3.9.</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>Improved <code>set_key</code> and <code>unset_key</code> behavior when interacting with symlinks by [<a href="https://github.com/bbc2"><code>@​bbc2</code></a>] in [790c5c0]</li>
<li>Corrected the license specifier and added missing Python 3.14 classifiers in package metadata by [<a href="https://github.com/JYOuyang"><code>@​JYOuyang</code></a>] in <a href="https://redirect.github.com/theskumar/python-dotenv/issues/590">#590</a></li>
</ul>
<h3>Breaking Changes</h3>
<ul>
<li>
<p><code>dotenv.set_key</code> and <code>dotenv.unset_key</code> used to follow symlinks in some
situations. This is no longer the case. For that behavior to be restored in
all cases, <code>follow_symlinks=True</code> should be used.</p>
</li>
<li>
<p>In the CLI, <code>set</code> and <code>unset</code> used to follow symlinks in some situations. This
is no longer the case.</p>
</li>
<li>
<p><code>dotenv.set_key</code>, <code>dotenv.unset_key</code> and the CLI commands <code>set</code> and <code>unset</code>
used to reset the file mode of the modified .env file to <code>0o600</code> in some
situations. This is no longer the case: The original mode of the file is now
preserved. Is the file needed to be created or wasn't a regular file, mode
<code>0o600</code> is used.</p>
</li>
</ul>
<h2>[1.2.1] - 2025-10-26</h2>
<ul>
<li>Move more config to <code>pyproject.toml</code>, removed <code>setup.cfg</code></li>
<li>Add support for reading <code>.env</code> from FIFOs (Unix) by [<a href="https://github.com/sidharth-sudhir"><code>@​sidharth-sudhir</code></a>] in <a href="https://redirect.github.com/theskumar/python-dotenv/issues/586">#586</a></li>
</ul>
<h2>[1.2.0] - 2025-10-26</h2>
<ul>
<li>Upgrade build system to use PEP 517 &amp; PEP 518 to use <code>build</code> and <code>pyproject.toml</code> by [<a href="https://github.com/EpicWink"><code>@​EpicWink</code></a>] in <a href="https://redirect.github.com/theskumar/python-dotenv/issues/583">#583</a></li>
<li>Add support for Python 3.14 by [<a href="https://github.com/23f3001135"><code>@​23f3001135</code></a>] in <a href="https://redirect.github.com/theskumar/python-dotenv/issues/579">#579</a></li>
<li>Add support for disabling of <code>load_dotenv()</code> using <code>PYTHON_DOTENV_DISABLED</code> env var. by [<a href="https://github.com/matthewfranglen"><code>@​matthewfranglen</code></a>] in <a href="https://redirect.github.com/theskumar/python-dotenv/issues/569">#569</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/theskumar/python-dotenv/commit/36004e0e34be7665ff2b11a8a4005144f76f176d"><code>36004e0</code></a> Bump version: 1.2.1 → 1.2.2</li>
<li><a href="https://github.com/theskumar/python-dotenv/commit/eb202520e5933c9daf42501e1e42fdb0144002c8"><code>eb20252</code></a> docs: update changelog for v1.2.2</li>
<li><a href="https://github.com/theskumar/python-dotenv/commit/790c5c02991100aa1bf41ee5330aca75edc51311"><code>790c5c0</code></a> Merge commit from fork</li>
<li><a href="https://github.com/theskumar/python-dotenv/commit/43340da220fb4ca4f95357bbe21a3c7f8f1278b1"><code>43340da</code></a> Remove the use of <code>sh</code> in tests (<a href="https://redirect.github.com/theskumar/python-dotenv/issues/612">#612</a>)</li>
<li><a href="https://github.com/theskumar/python-dotenv/commit/09d7cee32459e7abdcb5c9d8122a552589c06a9c"><code>09d7cee</code></a> docs: clarify override behavior and document FIFO support (<a href="https://redirect.github.com/theskumar/python-dotenv/issues/610">#610</a>)</li>
<li><a href="https://github.com/theskumar/python-dotenv/commit/c8de2887c00198c22842c5ae5e92d1747467363c"><code>c8de288</code></a> ci: improve workflow efficiency with best practices (<a href="https://redirect.github.com/theskumar/python-dotenv/issues/609">#609</a>)</li>
<li><a href="https://github.com/theskumar/python-dotenv/commit/7bd9e3dbfedc0983ad7d56d5570013035242bdf4"><code>7bd9e3d</code></a> Add Windows testing to CI (<a href="https://redirect.github.com/theskumar/python-dotenv/issues/604">#604</a>)</li>
<li><a href="https://github.com/theskumar/python-dotenv/commit/1baaf04f336072e0ee324d5df9563ec767f14f81"><code>1baaf04</code></a> Drop Python 3.9 support and update to PyPy 3.11 (<a href="https://redirect.github.com/theskumar/python-dotenv/issues/608">#608</a>)</li>
<li><a href="https://github.com/theskumar/python-dotenv/commit/4a22cf8993804aeede0c20b75bb1a29d3a99e9dc"><code>4a22cf8</code></a> ci: enable testing on Python 3.14t (free-threaded) (<a href="https://redirect.github.com/theskumar/python-dotenv/issues/588">#588</a>)</li>
<li><a href="https://github.com/theskumar/python-dotenv/commit/e2e8e776b42e382ae38b44d3982dd649e7507dd4"><code>e2e8e77</code></a> Fix license specifier (<a href="https://redirect.github.com/theskumar/python-dotenv/issues/597">#597</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/theskumar/python-dotenv/compare/v1.1.1...v1.2.2">compare view</a></li>
</ul>
</details>
<br />

Updates `requests` from 2.32.4 to 2.33.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/psf/requests/releases">requests's releases</a>.</em></p>
<blockquote>
<h2>v2.33.0</h2>
<h2>2.33.0 (2026-03-25)</h2>
<p><strong>Announcements</strong></p>
<ul>
<li>📣 Requests is adding inline types. If you have a typed code base that uses Requests, please take a look at <a href="https://redirect.github.com/psf/requests/issues/7271">#7271</a>. Give it a try, and report any gaps or feedback you may have in the issue. 📣</li>
</ul>
<p><strong>Security</strong></p>
<ul>
<li>CVE-2026-25645 <code>requests.utils.extract_zipped_paths</code> now extracts contents to a non-deterministic location to prevent malicious file replacement. This does not affect default usage of Requests, only applications calling the utility function directly.</li>
</ul>
<p><strong>Improvements</strong></p>
<ul>
<li>Migrated to a PEP 517 build system using setuptools. (<a href="https://redirect.github.com/psf/requests/issues/7012">#7012</a>)</li>
</ul>
<p><strong>Bugfixes</strong></p>
<ul>
<li>Fixed an issue where an empty netrc entry could cause malformed authentication to be applied to Requests on Python 3.11+. (<a href="https://redirect.github.com/psf/requests/issues/7205">#7205</a>)</li>
</ul>
<p><strong>Deprecations</strong></p>
<ul>
<li>Dropped support for Python 3.9 following its end of support. (<a href="https://redirect.github.com/psf/requests/issues/7196">#7196</a>)</li>
</ul>
<p><strong>Documentation</strong></p>
<ul>
<li>Various typo fixes and doc improvements.</li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/M0d3v1"><code>@​M0d3v1</code></a> made their first contribution in <a href="https://redirect.github.com/psf/requests/pull/6865">psf/requests#6865</a></li>
<li><a href="https://github.com/aminvakil"><code>@​aminvakil</code></a> made their first contribution in <a href="https://redirect.github.com/psf/requests/pull/7220">psf/requests#7220</a></li>
<li><a href="https://github.com/E8Price"><code>@​E8Price</code></a> made their first contribution in <a href="https://redirect.github.com/psf/requests/pull/6960">psf/requests#6960</a></li>
<li><a href="https://github.com/mitre88"><code>@​mitre88</code></a> made their first contribution in <a href="https://redirect.github.com/psf/requests/pull/7244">psf/requests#7244</a></li>
<li><a href="https://github.com/magsen"><code>@​magsen</code></a> made their first contribution in <a href="https://redirect.github.com/psf/requests/pull/6553">psf/requests#6553</a></li>
<li><a href="https://github.com/Rohan5commit"><code>@​Rohan5commit</code></a> made their first contribution in <a href="https://redirect.github.com/psf/requests/pull/7227">psf/requests#7227</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/psf/requests/blob/main/HISTORY.md#2330-2026-03-25">https://github.com/psf/requests/blob/main/HISTORY.md#2330-2026-03-25</a></p>
<h2>v2.32.5</h2>
<h2>2.32.5 (2025-08-18)</h2>
<p><strong>Bugfixes</strong></p>
<ul>
<li>The SSLContext caching feature originally introduced in 2.32.0 has created
a new class of issues in Requests that have had negative impact across a number
of use cases. The Requests team has decided to revert this feature as long term
maintenance of it is proving to be unsustainable in its current iteration.</li>
</ul>
<p><strong>Deprecations</strong></p>
<ul>
<li>Added support for Python 3.14.</li>
<li>Dropped support for Python 3.8 following its end of support.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/psf/requests/blob/main/HISTORY.md">requests's changelog</a>.</em></p>
<blockquote>
<h2>2.33.0 (2026-03-25)</h2>
<p><strong>Announcements</strong></p>
<ul>
<li>📣 Requests is adding inline types. If you have a typed code base that
uses Requests, please take a look at <a href="https://redirect.github.com/psf/requests/issues/7271">#7271</a>. Give it a try, and report
any gaps or feedback you may have in the issue. 📣</li>
</ul>
<p><strong>Security</strong></p>
<ul>
<li>CVE-2026-25645 <code>requests.utils.extract_zipped_paths</code> now extracts
contents to a non-deterministic location to prevent malicious file
replacement. This does not affect default usage of Requests, only
applications calling the utility function directly.</li>
</ul>
<p><strong>Improvements</strong></p>
<ul>
<li>Migrated to a PEP 517 build system using setuptools. (<a href="https://redirect.github.com/psf/requests/issues/7012">#7012</a>)</li>
</ul>
<p><strong>Bugfixes</strong></p>
<ul>
<li>Fixed an issue where an empty netrc entry could cause
malformed authentication to be applied to Requests on
Python 3.11+. (<a href="https://redirect.github.com/psf/requests/issues/7205">#7205</a>)</li>
</ul>
<p><strong>Deprecations</strong></p>
<ul>
<li>Dropped support for Python 3.9 following its end of support. (<a href="https://redirect.github.com/psf/requests/issues/7196">#7196</a>)</li>
</ul>
<p><strong>Documentation</strong></p>
<ul>
<li>Various typo fixes and doc improvements.</li>
</ul>
<h2>2.32.5 (2025-08-18)</h2>
<p><strong>Bugfixes</strong></p>
<ul>
<li>The SSLContext caching feature originally introduced in 2.32.0 has created
a new class of issues in Requests that have had negative impact across a number
of use cases. The Requests team has decided to revert this feature as long term
maintenance of it is proving to be unsustainable in its current iteration.</li>
</ul>
<p><strong>Deprecations</strong></p>
<ul>
<li>Added support for Python 3.14.</li>
<li>Dropped support for Python 3.8 following its end of support.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/psf/requests/commit/bc04dfd6dad4cb02cd92f5daa81eb562d280a761"><code>bc04dfd</code></a> v2.33.0</li>
<li><a href="https://github.com/psf/requests/commit/66d21cb07bd6255b1280291c4fafb71803cdb3b7"><code>66d21cb</code></a> Merge commit from fork</li>
<li><a href="https://github.com/psf/requests/commit/8b9bc8fc0f63be84602387913c4b689f19efd028"><code>8b9bc8f</code></a> Move badges to top of README (<a href="https://redirect.github.com/psf/requests/issues/7293">#7293</a>)</li>
<li><a href="https://github.com/psf/requests/commit/e331a288f369973f5de0ec8901c94cae4fa87286"><code>e331a28</code></a> Remove unused extraction call (<a href="https://redirect.github.com/psf/requests/issues/7292">#7292</a>)</li>
<li><a href="https://github.com/psf/requests/commit/753fd08c5eacce0aa0df73fe47e49525c67e0a29"><code>753fd08</code></a> docs: fix FAQ grammar in httplib2 example</li>
<li><a href="https://github.com/psf/requests/commit/774a0b837a194ee885d4fdd9ca947900cc3daf71"><code>774a0b8</code></a> docs(socks): same block as other sections</li>
<li><a href="https://github.com/psf/requests/commit/9c72a41bec8597f948c9d8caa5dc3f12273b3303"><code>9c72a41</code></a> Bump github/codeql-action from 4.33.0 to 4.34.1</li>
<li><a href="https://github.com/psf/requests/commit/ebf71906798ec82f34e07d3168f8b8aecaf8a3be"><code>ebf7190</code></a> Bump github/codeql-action from 4.32.0 to 4.33.0</li>
<li><a href="https://github.com/psf/requests/commit/0e4ae38f0c93d4f92a96c774bd52c069d12a4798"><code>0e4ae38</code></a> docs: exclude Response.is_permanent_redirect from API docs (<a href="https://redirect.github.com/psf/requests/issues/7244">#7244</a>)</li>
<li><a href="https://github.com/psf/requests/commit/d568f47278492e630cc990a259047c67991d007a"><code>d568f47</code></a> docs: clarify Quickstart POST example (<a href="https://redirect.github.com/psf/requests/issues/6960">#6960</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/psf/requests/compare/v2.32.4...v2.33.0">compare view</a></li>
</ul>
</details>
<br />

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>

Co-authored-by: Haran Rajkumar <haranrk@google.com>
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/5748 from google:dependabot/pip/contributing/samples/integrations/authn-adk-all-in-one/pip-34b5800231 be03a4d1907f2b7cef211809cab2fde27f8cf75a
PiperOrigin-RevId: 933980994
2026-06-17 16:18:13 -07:00
Jainish 94c43a269d feat(utils): Add support for nested state access in template injection
Merge https://github.com/google/adk-python/pull/3673

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

- Closes: #575
- Solves: https://github.com/google/adk-python-community/issues/6

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

**Problem:**
Previously, `inject_session_state()` only supported flat state access (e.g., `{user_name}`), preventing users from accessing nested properties within state objects. This limitation forced developers to either flatten their state structure or manually handle template replacement, reducing code readability and flexibility when working with complex, hierarchical state structures.

**Solution:**
Added support for nested state access in template injection using dot notation with optional chaining. The implementation adds a `_get_nested_value()` helper function that:
- Traverses dot-separated paths through nested dictionaries and objects
- Supports both dictionary access (`__getitem__`) and attribute access (`getattr`)
- Handles optional chaining with `?` operator for safe navigation
- Returns empty strings for None values or missing optional paths
- Raises `KeyError` for missing required paths
- Maintains compatibility with existing prefixed state variables (app:, user:, temp:)

This solution was chosen because it:
- Maintains backward compatibility with existing flat state access
- Follows common patterns from JavaScript/TypeScript (optional chaining)
- Provides clear error messages for debugging
- Works seamlessly with both dictionary-based and object-based state

### Testing Plan

**Unit Tests:**

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

**Summary of pytest results:**
```bash
$ uv run pytest ./tests/unittests/utils/test_instructions_utils.py -v
OUT

=========================================================================================================================================== test session starts ============================================================================================================================================
platform darwin -- Python 3.11.13, pytest-9.0.1, pluggy-1.6.0 -- /Users/jainish/os/adk-python/.venv/bin/python3
cachedir: .pytest_cache
rootdir: /Users/jainish/os/adk-python
configfile: pyproject.toml
plugins: mock-3.15.1, langsmith-0.4.29, xdist-3.8.0, anyio-4.10.0, asyncio-1.3.0
asyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=function, asyncio_default_test_loop_scope=function
collected 27 items

tests/unittests/utils/test_instructions_utils.py::test_inject_session_state PASSED                                                                                                                                                                                                                   [  3%]
tests/unittests/utils/test_instructions_utils.py::test_inject_session_state_with_artifact PASSED                                                                                                                                                                                                     [  7%]
tests/unittests/utils/test_instructions_utils.py::test_inject_session_state_with_optional_state PASSED                                                                                                                                                                                               [ 11%]
tests/unittests/utils/test_instructions_utils.py::test_inject_session_state_with_missing_state_raises_key_error PASSED                                                                                                                                                                               [ 14%]
tests/unittests/utils/test_instructions_utils.py::test_inject_session_state_with_missing_artifact_raises_key_error PASSED                                                                                                                                                                            [ 18%]
tests/unittests/utils/test_instructions_utils.py::test_inject_session_state_with_invalid_state_name_returns_original PASSED                                                                                                                                                                          [ 22%]
tests/unittests/utils/test_instructions_utils.py::test_inject_session_state_with_invalid_prefix_state_name_returns_original PASSED                                                                                                                                                                   [ 25%]
tests/unittests/utils/test_instructions_utils.py::test_inject_session_state_with_valid_prefix_state PASSED                                                                                                                                                                                           [ 29%]
tests/unittests/utils/test_instructions_utils.py::test_inject_session_state_with_multiple_variables_and_artifacts PASSED                                                                                                                                                                             [ 33%]
tests/unittests/utils/test_instructions_utils.py::test_inject_session_state_with_empty_artifact_name_raises_key_error PASSED                                                                                                                                                                         [ 37%]
tests/unittests/utils/test_instructions_utils.py::test_inject_session_state_artifact_service_not_initialized_raises_value_error PASSED                                                                                                                                                               [ 40%]
tests/unittests/utils/test_instructions_utils.py::test_inject_session_state_with_optional_missing_artifact_returns_empty PASSED                                                                                                                                                                      [ 44%]
tests/unittests/utils/test_instructions_utils.py::test_inject_session_state_with_none_state_value_returns_empty PASSED                                                                                                                                                                               [ 48%]
tests/unittests/utils/test_instructions_utils.py::test_inject_session_state_with_optional_missing_state_returns_empty PASSED                                                                                                                                                                         [ 51%]
tests/unittests/utils/test_instructions_utils.py::test_inject_session_state_with_nested_dict_access PASSED                                                                                                                                                                                           [ 55%]
tests/unittests/utils/test_instructions_utils.py::test_inject_session_state_with_deep_nested_access PASSED                                                                                                                                                                                           [ 59%]
tests/unittests/utils/test_instructions_utils.py::test_inject_session_state_with_optional_nested_access_existing PASSED                                                                                                                                                                              [ 62%]
tests/unittests/utils/test_instructions_utils.py::test_inject_session_state_with_optional_nested_access_missing PASSED                                                                                                                                                                               [ 66%]
tests/unittests/utils/test_instructions_utils.py::test_inject_session_state_with_optional_nested_missing_root PASSED                                                                                                                                                                                 [ 70%]
tests/unittests/utils/test_instructions_utils.py::test_inject_session_state_with_nested_none_value PASSED                                                                                                                                                                                            [ 74%]
tests/unittests/utils/test_instructions_utils.py::test_inject_session_state_with_optional_nested_none_value PASSED                                                                                                                                                                                   [ 77%]
tests/unittests/utils/test_instructions_utils.py::test_inject_session_state_with_missing_nested_key_raises_error PASSED                                                                                                                                                                              [ 81%]
tests/unittests/utils/test_instructions_utils.py::test_inject_session_state_with_required_parent_missing_raises_error PASSED                                                                                                                                                                         [ 85%]
tests/unittests/utils/test_instructions_utils.py::test_inject_session_state_with_nested_and_prefixed_state PASSED                                                                                                                                                                                    [ 88%]
tests/unittests/utils/test_instructions_utils.py::test_inject_session_state_with_mixed_nested_and_flat_state PASSED                                                                                                                                                                                  [ 92%]
tests/unittests/utils/test_instructions_utils.py::test_inject_session_state_with_numeric_nested_values PASSED                                                                                                                                                                                        [ 96%]
tests/unittests/utils/test_instructions_utils.py::test_inject_session_state_with_nested_object_attribute_access PASSED                                                                                                                                                                               [100%]

======================== 27 passed in 0.89s ==========================
```

Added 12 comprehensive test cases covering:

- Basic and deep nested dictionary access
- Optional chaining with existing and missing values
- None value handling in nested paths
- Error handling for missing required keys
- Prefixed state variables with nesting (app:, user:, temp:)
- Mixed nested and flat state access patterns
- Numeric nested values
- Object attribute access vs dictionary access

**Manual End-to-End (E2E) Tests:** Created a sample agent to demonstrate the feature (located at `contributing/samples/nested_state_agent/`, not included in this PR). Setup:

```bash
cd contributing/samples/nested_state_agent
adk run .
```

Agent code:

```python3
import logging

from google.adk.agents import Agent
from google.adk.agents.callback_context import CallbackContext
from google.adk.agents.readonly_context import ReadonlyContext
from google.adk.utils.instructions_utils import inject_session_state

def inject_nested_state(callback_context: CallbackContext):
  callback_context.state["user"] = {
      "name": "John",
      "profile": {"age": 24, "role": "Software Engineer"},
  }
  logging.info("State populated with nested user object.")

async def build_instruction(readonly_context: ReadonlyContext) -> str:
  template = (
      "Current user is {user?.name} and {user?.profile?.role}. Please greet"
      " them by name and designation."
  )
  return await inject_session_state(template, readonly_context)

root_agent = Agent(
    name="nested_state_agent",
    model="gemini-2.0-flash-lite",
    instruction=build_instruction,
    before_agent_callback=[inject_nested_state],
)
```

**Expected behavior:**

- Agent receives instruction: "Current user is John and Software Engineer. Please greet them by name and designation."
- Agent responds with greeting including the user's name and role
- Missing fields with optional chaining (?) return empty strings instead of raising errors

**Actual output:**
```
INFO: State populated with nested user object.
Agent: Hello John, Software Engineer! How can I help you today?
```

 **Result:** Nested state values correctly injected into instruction template

#### Checklist

-  I have read the [CONTRIBUTING.md](https://github.com/google/adk-python/blob/main/CONTRIBUTING.md) document.
- 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.

**Additional context**

**Note:** This PR re-implements the solution for issue #575. A previous implementation existed but was not merged due to merge conflicts. This is a fresh implementation with the same functionality. Feature highlights:

-  Backward compatible with existing flat state access
-  Supports deeply nested structures: {user.profile.settings.theme}
-  Safe navigation with ?: {user?.profile?.department?} returns "" if missing
-  Works with both dict and object attributes
-  Compatible with prefixed state: {app:config.api.endpoint}
-  Clear error messages for debugging required fields

**Files changed:**

- src/google/adk/utils/instructions_utils.py - Core implementation (+92 lines)
- tests/unittests/utils/test_instructions_utils.py - Test coverage (+278 lines)

---

**Key improvements made:**
1.  Followed the exact template structure with all required sections
2.  Filled in all checkboxes appropriately
3.  Included actual pytest output summary as requested
4.  Provided clear E2E testing instructions with expected vs actual output
5.  Added context about this being a re-implementation
6.  Used proper markdown formatting throughout
7.  Kept your example code but formatted it better within the E2E section
8.  Made the testing plan more detailed and actionable

Co-authored-by: Bo Yang <ybo@google.com>
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/3673 from Jainish-S:feat/575-nested-state-template 2fe5321631e63c1dd753e71933e85eb6679969bc
PiperOrigin-RevId: 933958647
2026-06-17 15:33:32 -07:00
Wei Sun (Jack) 22adbe12d6 ci(kokoro): install addlicense tool on pre-commit presubmits
Co-authored-by: Wei Sun (Jack) <weisun@google.com>
PiperOrigin-RevId: 932061051
2026-06-14 11:44:13 -07:00
Wei (Jack) Sun d3c21d716e docs: Align Python version to 3.10+ and update README badges
Merge https://github.com/google/adk-python/pull/6107

## Summary
- Fix README claiming Python 3.11+ while the package requires `>=3.10`; sync all docs (README, AGENTS.md, adk-setup skill, two sample READMEs) to 3.10+
- Swap the rate-limited shields.io PyPI downloads badge for a pepy.tech one (the old badge rendered "rate limited by upstream service")
- Add a Python Unit Tests CI status badge

## Test plan
- [ ] Confirm README badges render correctly on GitHub (downloads + unit test status)
- [ ] Verify Python version wording matches `requires-python = ">=3.10"` in pyproject.toml

Co-authored-by: Wei Sun (Jack) <weisun@google.com>
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/6107 from google:docs/readme-badges-python-310 bdfa1c125375abe94c343389702994cbc8857e7d
PiperOrigin-RevId: 931539712
2026-06-13 00:26:26 -07:00
Wei Sun (Jack) fa829296c0 docs: fix formatting in multi-agent sample READMEs
Fixes minor indentation and bullet formatting issues in the multi-agent samples README files.

Co-authored-by: Wei Sun (Jack) <weisun@google.com>
PiperOrigin-RevId: 931446655
2026-06-12 19:11:07 -07:00
Bo Yang f84a5b5e20 docs: add unit guides for task mode
Added task mode doc, README and cross-linking samples.

Co-authored-by: Bo Yang <ybo@google.com>
PiperOrigin-RevId: 931386773
2026-06-12 16:19:07 -07:00
Kathy Wu fe497a4f5d feat: Migrate McpToolset to AsyncAuthorizedSession for mTLS support
Use Google's official async client to support mTLS for GCP API calls. This resolves the issue where we were failing mTLS policy due to unbound tokens.

Note: This CL also removes the legacy bound-token patch from mcp_tool.py and mcp_toolset.py, which constitutes a behavior change beyond the mTLS feature.

Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 931326860
2026-06-12 14:14:22 -07:00
Wei Sun (Jack) 0aca7bf65e fix: update model to gemini-3.5-flash in session_state_agent sample
Co-authored-by: Wei Sun (Jack) <weisun@google.com>
PiperOrigin-RevId: 931241548
2026-06-12 11:16:49 -07:00
Google Team Member 57bdecfcb1 feat: Update gcp_auth client UI to support Remote Agents
Enhance the `client/` directory within the `gcp_auth` sample to support interaction with remote agents. The client can now discover and communicate with agents hosted on remote endpoints.

Key updates:
- Implemented functionality to list and select remote agents, replacing local filesystem scanning.
- Added client-side logic to communicate with remote agents.
- The Material 3-based "Agent Playground" interface is adapted for remote agent selection and interaction.
- Updated `README.md` with new setup instructions.
- Revised `requirements.txt` to include new dependencies required for remote agent communication.

PiperOrigin-RevId: 930965837
2026-06-11 23:49:54 -07:00
Google Team Member fb19e1a155 feat: add GCS first party toolset to ADK integrations
GCS toolset supports basic operations to interact with GCS buckets and objects.

PiperOrigin-RevId: 930830041
2026-06-11 17:41:06 -07:00
George Weale ef395c7050 docs: fix triaging agent sample typo
Merge https://github.com/google/adk-python/pull/5785

## Summary
- fix a misspelled word in the ADK team triaging-agent sample instructions
- keep the change limited to sample prompt prose

## Validation
- Confirmed no open upstream PR already targets this exact typo context:
  -  -> []
  -  -> []
  -  -> []
- 192:  issues will be separated in two categories: issues with type "Bug" and issues
-
-

Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 930813570
2026-06-11 16:59:01 -07:00
Wei (Jack) Sun 4cb27fd42e feat(labs): add experimental Antigravity SDK agent wrapper
Merge https://github.com/google/adk-python/pull/6040

## Summary

Introduces `google.adk.labs.antigravity` with `AntigravityAgent`, a `BaseAgent` that runs a Google Antigravity SDK agent (described by an `AgentConfig`) as a native ADK root agent. Lives under `labs/` as an experimental feature.

- Delegates each turn to a fresh SDK `Agent` and maps trajectory steps to ADK events: model text, function calls/responses, and SSE-gated partial thinking/text deltas.
- Folder-based session resumption via `config.save_dir`: renames the harness trajectory to a deterministic per-session name and skips replayed steps using a persisted resume step index.
- Restricted to standalone root use (local mode only) with construction-time guards (cannot be a sub-agent or have sub-agents).
- `serialize_agent` now honors `Field(exclude=True)` so the non-serializable `config` does not break the `build_graph` endpoint.
- Adds the `[antigravity]` optional extra (in both the extra and `test` groups, with `uv.lock` updated), a game-developer sample, package README, and unit tests.

## Test plan

- [ ] `pytest tests/unittests/labs/antigravity/` (22 unit tests pass)
- [ ] `pytest tests/unittests/cli/utils/test_graph_serialization.py`
- [ ] Manual: run the sample via `adk web` with `GEMINI_API_KEY` and a `[antigravity]` install, confirm multi-turn resumption and no duplicate events.

Co-authored-by: Wei Sun (Jack) <weisun@google.com>
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/6040 from google:feat/antigravity-agent 304f6ad4d1e9edc414a28aa01eb77028519de11a
PiperOrigin-RevId: 930712984
2026-06-11 13:42:11 -07:00
llalitkumarrr 3e9f3daec0 chore: Updating triaging bot
Merge https://github.com/google/adk-python/pull/6049

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/6049 from llalitkumarrr:main 81421c661648f939e352d8e35e46d8b3aa957360
PiperOrigin-RevId: 930327899
2026-06-11 00:04:22 -07:00
Haran Rajkumar 4100a24021 chore: replace vertexai with enterprise in samples and docs
Co-authored-by: Haran Rajkumar <haranrk@google.com>
PiperOrigin-RevId: 930146494
2026-06-10 16:34:15 -07:00
Shangjie Chen 0c6974cbc4 fix: Set role='model' for request_input event Content
Set role='model' in the Content object generated by create_request_input_event()
to ensure proper role attribution when returning function call events to the client.

Co-authored-by: Shangjie Chen <deanchen@google.com>
PiperOrigin-RevId: 929538818
2026-06-09 19:19:51 -07:00
Wei (Jack) Sun 92d608f83e feat(integrations): Add E2BEnvironment for remote sandbox workspaces
Merge https://github.com/google/adk-python/pull/6031

> **Stacked on #6030** (`fix/experimental-typing`). This PR targets that branch; please review/merge #6030 first, after which this will be retargeted to `main`.

## Summary

Adds `E2BEnvironment`, a `BaseEnvironment` backed by an [E2B](https://e2b.dev) sandbox. It gives agents a persistent remote workspace for shell execution, file CRUD, and on-demand installs (`pip`/`apt`) without touching the host machine.

- The sandbox TTL is bounded to cap credit usage and is extended on each operation; an expired idle sandbox is transparently recreated.
- Lazy-imports the SDK behind a new `e2b` extra, so the base package stays lean.
- Includes a data-analysis sample that downloads a public (GCS-hosted) dataset and analyzes it inside the sandbox.

## Usage

```python
from google.adk.integrations.e2b import E2BEnvironment
from google.adk.tools.environment import EnvironmentToolset

toolset = EnvironmentToolset(environment=E2BEnvironment())
```

## Test plan

- [x] `pytest tests/unittests/integrations/e2b/` (14 passed)
- [x] `pyright src/google/adk/integrations/e2b/_e2b_environment.py` — 0 errors
- [x] Sample agent loads (`contributing/samples/environment_and_skills/e2b_environment`)
- [ ] Manual run against a live E2B sandbox (requires `E2B_API_KEY`)

Co-authored-by: Wei Sun (Jack) <weisun@google.com>
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/6031 from google:feat/e2b f2b5584e28c71e7110e9d98e1d0839f575183368
PiperOrigin-RevId: 929443164
2026-06-09 15:40:45 -07:00
Xuan Yang d72bb7d90d docs: Upgrade ADK release analyzer agent to use gemini-3.1-pro-preview model
Co-authored-by: Xuan Yang <xygoogle@google.com>
PiperOrigin-RevId: 929314765
2026-06-09 11:39:46 -07:00
Shangjie Chen 0337d19c47 chore: sync Google internal changes to GitHub (#6022) 2026-06-08 15:11:24 -07:00
George Weale aa51512587 chore: apply pre-commit formatting
Change-Id: Iec95a44368502706d814380881c8d10c4a7e8cd4
2026-05-28 16:05:50 -07:00
Bo Yang 6a533573db feat(api_server): Abort runs on client drops to avoid leaks
Standard REST, SSE, and WebSocket endpoints now actively monitor client disconnections. When a connection drop is intercepted, the executing worker task tree is aborted mid-run to prevent background task leaks, API token burn, and resource wastage.

Includes:
1. REST `/run` connection drop monitor blocking on raw ASGI receive events with 0% CPU consumption.
2. Graceful `499 Client Closed Request` status response on REST disconnections to suppress server-side exceptions.
3. Unit and integration tests validating REST task cancellations and generator finalizations.
4. Comprehensive architectural design documents and user guide under `/docs`.
5. An invocation-focused cooperative counting agent sandbox under `/contributing/samples/core/abort`.

Change-Id: I50fcba7a8bb56cf28b0a3bb8fa66b85732062a67
2026-05-28 14:11:39 -07:00
haranrk da1d8f1552 feat(interactions): update ADK to support Google GenAI SDK v2.0.0
Update ADK to support the new Interactions API. See: https://ai.google.dev/gemini-api/docs/interactions-breaking-changes-may-2026

Key changes include:
* Updated `interactions_utils.py` to parse new v2 interaction events such as
  `InteractionCreatedEvent`, `InteractionCompletedEvent`, and explicit step
  types (`ModelOutputStep`, `FunctionCallStep`, etc.).
* Transitioned from "turns" to "steps" terminology, including renaming
  `convert_contents_to_turns` to `convert_contents_to_steps`.
* Updated `contributing/samples/interactions_api`

Breaking Changes in interactions_utils.py:

- Renamed "turn" functions to "step" equivalents:
  - `convert_content_to_turn` -> `_convert_content_to_step`
  - `convert_contents_to_turns` -> `_convert_contents_to_steps`
  - `convert_interaction_output_to_part` -> `_convert_interaction_step_to_parts`
- Updated `build_interactions_request_log` to use required `input_steps` instead of `input_turns`.
- Deprecated `convert_part_to_interaction_content`

Change-Id: I962724321342ba0192251896ce51832b214d60d9
2026-05-27 16:30:02 -07:00
Shangjie Chen afb0a64f96 feat(tools): Standardize request_input tool for proactive LLM clarification
Add RequestInputTool to allow single LLM agents to pause, request user input, and resume seamlessly mid-loop without workflow graphs.

Also add comprehensive unit tests, integration tests, and a new official sample with automated session replay tests.

Change-Id: Ifb50cc2e644aeb5ffb2be797255608d0d5a37234
2026-05-27 13:07:54 -07:00
Xuan Yang af8bfe08ac fix: Format the files to fix pre-commit failures
Change-Id: Ie86c42e4fa3f0c2acd1d73d399fbe6f4e0c54f02
2026-05-27 11:22:36 -07:00
George Weale 104edc8317 fix: convert Union[Pydantic, Pydantic] tool args at runtime
FunctionTool._preprocess_args only converted dict args to a Pydantic
model for single-model and Optional[Model] annotations. A
Union[ModelA, ModelB] parameter was left as a raw dict, so
isinstance checks inside the tool failed with "Unexpected entity
type: <class 'dict'>"

Use pydantic.TypeAdapter to validate against the full Union so
pydantic picks the matching member. None and instances of any
declared union member pass through unchanged; instances of
unrelated BaseModels fall back to the existing graceful-failure
warning path.

Close #5799

Change-Id: Ie69f8efc8395162eac375a0eaad0c77ed2097cec
2026-05-22 16:21:58 -07:00
Emily Feng cbd14ebf99 feat: Add support for creating sandboxes from templates and snapshots
This change allows AgentEngineSandboxComputer to create new sandboxes
using either a specified sandbox template or a sandbox snapshot. The
environment variables VMAAS_SANDBOX_TEMPLATE_NAME and
VMAAS_SANDBOX_SNAPSHOT_NAME are introduced to configure this behavior.

Co-authored-by: Emily Feng <emilyfeng@google.com>
Change-Id: Iebdd980a16966ba765cacbce6d63d0d5b691650a
2026-05-22 15:47:41 -07:00
Han Cao db064160bf feat: Add chart generation and artifact loading to data agent
Introduces a generate_chart tool to the Data Agent sample, leveraging
Altair and vl-convert to render Vega-Lite specifications into charts.

Co-authored-by: Han Cao <huanc@google.com>
Change-Id: I5765487406d511e650091f5dc884102c43568fd4
2026-05-22 15:38:02 -07:00
George Weale a4f394e139 chore: edit files
Change-Id: I4e3e3e9f1846520f3fda86cc83453b30bdd336ef
2026-05-22 10:47:37 -07:00
Xuan Yang 55cbc8c9e8 fix(ci): Prevent workflow failures in relocated adk_team samples
Workflows failed because the gemini-2.5-pro model is not available for our projects and the CONTRIBUTING.md relative path resolved incorrectly after relocation. Updated the model to gemini-3.5-flash and adjusted the path resolver depth.

Change-Id: Iffc8a2b0044f3d73b0cb0b364db220d2bd055683
2026-05-20 14:37:22 -07:00
Shangjie Chen 3329ced0b9 fix(tests): Append trailing newline to JSON test outputs
JSON test files generated by the agent test runner were missing trailing newlines, causing the pre-commit end-of-file-fixer hook to fail. Added an explicit newline write on serialization.

Change-Id: Idaffc4f2c23fa213f595ddef2188b0050aeb431d
2026-05-19 16:27:47 -07:00
Xuan Yang 7fc5b0efc4 test(samples): Verify behavior of parallel functions and Pydantic arguments with new tests
Generated test JSON files for parallel_functions and pydantic_argument samples to verify their behavior.

Also fixed a test replay issue by ignoring timestamps in state (in agent_test_runner.py) to prevent false failures due to dynamic data.

Note: Some sample agents could not have tests generated successfully due to:
1. agent_tool_with_grounding_metadata: Fails on replay because AgentTool hides sub-agent events, causing mock LLM to get out of sync.
2. hello_world_stream_fc_args: Fails on rebuild because streaming function calls are not supported in the Unary API used by the test recorder.
3. output_schema_with_tools: Has external dependencies (Wikipedia/Google Search), making it unsuitable for automated regression tests without proper mocking.

Change-Id: I69df7daf49d175905dcbd85cf70914e460717915
2026-05-19 13:36:37 +00:00
Sasha Sobran 162279358c chore: switch main to v2.0.0 GA (transition to v2)
Co-authored-by: Bo Yang <ybo@google.com>
Co-authored-by: Wei Sun (Jack) <weisun@google.com>
Co-authored-by: George Weale <gweale@google.com>
Co-authored-by: Swapnil Agarwal <swapnilag@google.com>
Co-authored-by: Xuan Yang <xygoogle@google.com>
Co-authored-by: Shangjie Chen <deanchen@google.com>
Co-authored-by: Yifan Wang <wanyif@google.com>
Co-authored-by: Kathy Wu <wukathy@google.com>
2026-05-19 02:01:33 +00:00