Skip to content

Commit 4aa7dcc

Browse files
authored
Merge branch 'main' into feat/database-memory-service
2 parents 5ed1ff3 + 87cd310 commit 4aa7dcc

62 files changed

Lines changed: 2977 additions & 1168 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.30.0"
2+
".": "1.31.0"
33
}

.github/release-please-config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3-
"last-release-sha": "80a7ecf4b31e4c6de4a1425b03422f384c1a032d",
3+
"last-release-sha": "d69477f6ff348311e1d53e3f2c389dcf037fb049",
44
"packages": {
55
".": {
66
"release-type": "python",

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,39 @@
11
# Changelog
22

3+
## [1.31.0](https://github.com/google/adk-python/compare/v1.30.0...v1.31.0) (2026-04-16)
4+
5+
6+
### Features
7+
8+
* Add "google-adk" user agent to Parameter Manager and Secret Manager clients ([b8e8f6b](https://github.com/google/adk-python/commit/b8e8f6b90290e48e134f48bbe7e2b800276e7269))
9+
* Add support for memories.ingest_events in VertexAiMemoryBankService ([d69477f](https://github.com/google/adk-python/commit/d69477f6ff348311e1d53e3f2c389dcf037fb049))
10+
* Add Vertex AI Agent Engine Sandbox integration for computer use ([7686848](https://github.com/google/adk-python/commit/76868485519090c5fa2a0287bccca040e438d94e))
11+
* Firestore support ([1a9df8f](https://github.com/google/adk-python/commit/1a9df8f77410a08a85d04744f199d25f20d55ebd))
12+
* **live:** Add live_session_id to LlmResponse ([bf84e2c](https://github.com/google/adk-python/commit/bf84e2cee84f04c886914eb72318875f3c29ea13))
13+
14+
15+
### Bug Fixes
16+
17+
* Bump minimum mcp version from 1.23.0 to 1.24.0 ([494c360](https://github.com/google/adk-python/commit/494c360b2a82af5130f153ff615f84e4c2604a73))
18+
* **cli:** correct console URL path after adk deploy agent_engine ([64ed1a6](https://github.com/google/adk-python/commit/64ed1a68c98e32d61aff43857fa4e756b129b13f)), closes [#5336](https://github.com/google/adk-python/issues/5336)
19+
* execute on_event_callback before append_event to persist plugin modifications ([454188d](https://github.com/google/adk-python/commit/454188de5de0ef44adb7716230eacddcb060dab2)), closes [#3990](https://github.com/google/adk-python/issues/3990)
20+
* make `_EvalMetricResultWithInvocation.expected_invocation` `Optional` for conversation_scenario support ([#5215](https://github.com/google/adk-python/issues/5215)) ([a4c9387](https://github.com/google/adk-python/commit/a4c938775764794f42e00a89e3cb33da5119c38b))
21+
* Pass in auth headers with header provider instead of connection params ([e12b0af](https://github.com/google/adk-python/commit/e12b0af20d9a025e3d75f309de836b139b6d3e88))
22+
* populate required fields in FunctionDeclaration json_schema fallback ([9b9faa4](https://github.com/google/adk-python/commit/9b9faa4ba21d566252e4c25bd55ab9db2658051e))
23+
* Resolve BigQuery plugin issues with A2A transfers, spans, and metadata ([9ca8c38](https://github.com/google/adk-python/commit/9ca8c384324e07e945146359f21010b438eb1bc6))
24+
* upgrade google-genai lower bound ([8bc5728](https://github.com/google/adk-python/commit/8bc57283f3c584a5a6d6d774a316fe63342ed481))
25+
26+
27+
### Code Refactoring
28+
29+
* **live:** Use `send_client_content` to send conversation history ([67dc2eb](https://github.com/google/adk-python/commit/67dc2ebfd42f175f2dd6ea58df51a03c575062c6))
30+
* **live:** Use `send_tool_response` for function responses ([70c5fc8](https://github.com/google/adk-python/commit/70c5fc83a62d1e81d20986223f5c275b086f9822))
31+
32+
33+
### Documentation
34+
35+
* update MCP Toolbox branding, binary version, and asset references ([47fa7b7](https://github.com/google/adk-python/commit/47fa7b743c37e3aa8302e78be552876c2784e6ff))
36+
337
## [1.30.0](https://github.com/google/adk-python/compare/v1.29.0...v1.30.0) (2026-04-13)
438

539

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ You can install the latest stable version of ADK using `pip`:
6969
pip install google-adk
7070
```
7171

72+
To install optional integrations, you can use the following command:
73+
```bash
74+
pip install "google-adk[extensions]"
75+
```
76+
7277
The release cadence is roughly bi-weekly.
7378

7479
This version is recommended for most users as it represents the most recent official release.

contributing/samples/adk_triaging_agent/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"models": "xuanyang15",
3838
"services": "DeanChensj",
3939
"tools": "xuanyang15",
40-
"tracing": "jawoszek",
40+
"tracing": "mhenc",
4141
"web": "wyf7107",
4242
"workflow": "DeanChensj",
4343
}

contributing/samples/local_environment_skill/agent.py

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -15,38 +15,7 @@
1515

1616
from google.adk import Agent
1717
from google.adk.environment import LocalEnvironment
18-
from google.adk.tools.base_tool import BaseTool
1918
from google.adk.tools.environment import EnvironmentToolset
20-
from google.genai import types
21-
22-
23-
class GetTimezoneTool(BaseTool):
24-
"""A tool to get the timezone for a given location."""
25-
26-
def __init__(self):
27-
super().__init__(
28-
name="get_timezone",
29-
description="Returns the timezone for a given location.",
30-
)
31-
32-
def _get_declaration(self) -> types.FunctionDeclaration | None:
33-
return types.FunctionDeclaration(
34-
name=self.name,
35-
description=self.description,
36-
parameters_json_schema={
37-
"type": "object",
38-
"properties": {
39-
"location": {
40-
"type": "string",
41-
"description": "The location to get the timezone for.",
42-
},
43-
},
44-
"required": ["location"],
45-
},
46-
)
47-
48-
async def run_async(self, *, args: dict, tool_context) -> str:
49-
return f"The timezone for {args['location']} is UTC+00:00."
5019

5120

5221
def get_wind_speed(location: str) -> str:
@@ -89,7 +58,6 @@ def get_wind_speed(location: str) -> str:
8958
working_dir=pathlib.Path(__file__).parent
9059
),
9160
),
92-
GetTimezoneTool(),
9361
get_wind_speed,
9462
],
9563
)

contributing/samples/local_environment_skill/skills/weather-skill/SKILL.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
---
22
name: weather-skill
33
description: A skill that provides weather information based on reference data.
4-
metadata:
5-
adk_additional_tools:
6-
- get_wind_speed
74
---
85

96
Step 1: Check 'references/weather_info.md' for the current weather.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ dependencies = [
3333
"fastapi>=0.124.1, <1.0.0", # FastAPI framework
3434
"google-api-python-client>=2.157.0, <3.0.0", # Google API client discovery
3535
"google-auth[pyopenssl]>=2.47.0", # Google Auth library
36-
"google-cloud-aiplatform[agent_engines]>=1.132.0, <2.0.0", # For VertexAI integrations, e.g. example store.
36+
"google-cloud-aiplatform[agent_engines]>=1.148.0, <2.0.0", # For VertexAI integrations, e.g. example store.
3737
"google-cloud-bigquery-storage>=2.0.0",
3838
"google-cloud-bigquery>=2.2.0",
3939
"google-cloud-bigtable>=2.32.0", # For Bigtable database
@@ -111,7 +111,7 @@ eval = [
111111
# go/keep-sorted start
112112
"Jinja2>=3.1.4,<4.0.0", # For eval template rendering
113113
"gepa>=0.1.0",
114-
"google-cloud-aiplatform[evaluation]>=1.143.0",
114+
"google-cloud-aiplatform[evaluation]>=1.148.0",
115115
"pandas>=2.2.3",
116116
"rouge-score>=0.1.2",
117117
"tabulate>=0.9.0",

src/google/adk/agents/base_agent.py

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import inspect
1818
import logging
19+
import sys
1920
from typing import Any
2021
from typing import AsyncGenerator
2122
from typing import Awaitable
@@ -285,7 +286,9 @@ async def run_async(
285286
Event: the events generated by the agent.
286287
"""
287288

288-
with tracer.start_as_current_span(f'invoke_agent {self.name}') as span:
289+
cm = tracer.start_as_current_span(f'invoke_agent {self.name}')
290+
span = cm.__enter__()
291+
try:
289292
ctx = self._create_invocation_context(parent_context)
290293
tracing.trace_agent_invocation(span, self, ctx)
291294
if event := await self._handle_before_agent_callback(ctx):
@@ -302,6 +305,23 @@ async def run_async(
302305

303306
if event := await self._handle_after_agent_callback(ctx):
304307
yield event
308+
except BaseException:
309+
try:
310+
cm.__exit__(*sys.exc_info())
311+
except ValueError:
312+
logger.warning(
313+
'Failed to detach context during generator cleanup, likely due to'
314+
' cancellation.'
315+
)
316+
raise
317+
else:
318+
try:
319+
cm.__exit__(None, None, None)
320+
except ValueError:
321+
logger.warning(
322+
'Failed to detach context during generator cleanup, likely due to'
323+
' cancellation.'
324+
)
305325

306326
@final
307327
async def run_live(

src/google/adk/agents/common_configs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class AgentRefConfig(BaseModel):
118118
my_custom_agent = LlmAgent(
119119
name="my_custom_agent",
120120
instruction="You are a helpful custom agent.",
121-
model="gemini-2.0-flash",
121+
model="gemini-2.5-flash",
122122
)
123123
```
124124

0 commit comments

Comments
 (0)