Skip to content

Commit d7ecf5a

Browse files
authored
Merge branch 'main' into feat/add-user-agent
2 parents c0c465e + f660180 commit d7ecf5a

29 files changed

+1173
-157
lines changed

CHANGELOG.md

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

3+
## 1.12.0 (2025-08-21)
4+
5+
### Features
6+
7+
**[Agent Config]** 🌟 **NEW FEATURE**: Support using config file (YAML) to author agents in addition to python code. See the [documentation](https://google.github.io/adk-docs/agents/config/) for details.
8+
* [Agent Config] Support deploying config agent to Agent Engine in CLI ([b3b7003](https://github.com/google/adk-python/commit/b3b70035c432670a5f0b5cdd1e9467f43b80495c))
9+
* [Tools] Add a dedicated Bigtable toolset to provide an easier, integrated way to interact
10+
with Bigtable for building AI Agent applications(experimental feature) ([a953807](https://github.com/google/adk-python/commit/a953807cce341425ba23e3f0a85eae58d6b0630f))
11+
* [Tools] Support custom tool_name_prefix in auto-generated GoogleApiToolset ([a2832d5](https://github.com/google/adk-python/commit/a2832d5ac7ba5264ee91f6d5a6a0058cfe4c9e8a)) See [oauth_calendar_agent](https://github.com/google/adk-python/tree/main/contributing/samples/oauth_calendar_agent) as an example.
12+
* [CLI] Add `build_image` option for `adk deploy cloud_run` CLI ([c843503](https://github.com/google/adk-python/commit/c84350345af0ea6a232e0818b20c4262b228b103))
13+
* [Services] Add setdefault method to the ADK State object ([77ed1f5](https://github.com/google/adk-python/commit/77ed1f5f15ed3f009547ed0e20f86d949de12ec2))
14+
15+
16+
### Bug Fixes
17+
18+
* Lazy load VertexAiCodeExecutor and ContainerCodeExecutor ([018db79](https://github.com/google/adk-python/commit/018db79d1354f93b8328abb8416f63070b25f9f1))
19+
* Fix the path for agent card in A2A demo ([fa64545](https://github.com/google/adk-python/commit/fa64545a9de216312a69f93126cfd37f1016c14b))
20+
* Fix the path for agent card in A2A demo ([a117cf0](https://github.com/google/adk-python/commit/a117cf0af335c5e316ae9d61336a433052316462))
21+
* litellm-test due to breaking change in dep library of extension extra ([004a0a0](https://github.com/google/adk-python/commit/004a0a0f2d9a4f7ae6bff42a7cad96c11a99acaf))
22+
* Using base event's invocation id when merge multiple function response event ([279e4fe](https://github.com/google/adk-python/commit/279e4fedd0b1c0d1499c0f9a4454357af7da490e))
23+
* Avoid crash when there is no candidates_token_count, which is Optional ([22f34e9](https://github.com/google/adk-python/commit/22f34e9d2c552fbcfa15a672ef6ff0c36fa32619))
24+
* Fix the packaging version comparison logic in adk cli ([a2b7909](https://github.com/google/adk-python/commit/a2b7909fc36e7786a721f28e2bf75a1e86ad230d))
25+
* Add Spanner admin scope to Spanner tool default Oauth scopes ([b66054d](https://github.com/google/adk-python/commit/b66054dd0d8c5b3d6f6ad58ac1fbd8128d1da614))
26+
* Fixes SequentialAgent.config_type type hint ([8a9a271](https://github.com/google/adk-python/commit/8a9a271141678996c9b84b8c55d4b539d011391c))
27+
* Fixes the host in the ansi bracket of adk web ([cd357bf](https://github.com/google/adk-python/commit/cd357bf5aeb01f1a6ae2a72349a73700ca9f1ed2))
28+
* Add spanner tool name prefix ([a27927d](https://github.com/google/adk-python/commit/a27927dc8197c391c80acb8b2c23d610fba2f887))
29+
30+
### Improvements
31+
32+
* Support `ADK_SUPPRESS_EXPERIMENTAL_FEATURE_WARNINGS` as environment variable to suppress experimental warnings ([4afc9b2](https://github.com/google/adk-python/commit/4afc9b2f33d63381583cea328f97c02213611529))
33+
* Uses pydantic `Field` for Agent configs, so that the generated AgentConfig.json json schema can carry field description ([5b999ed](https://github.com/google/adk-python/commit/5b999ed6fd23a0fc1da56ccff4c09621f433846b))
34+
* Update `openai` dependency version, based on correct OPENAI release ([bb8ebd1](https://github.com/google/adk-python/commit/bb8ebd15f90768b518cd0e21a59b269e30d6d944))
35+
* Add the missing license header for core_callback_config init file ([f8fd6a4](https://github.com/google/adk-python/commit/f8fd6a4f09ab520b8ecdbd8f9fe48228dbff7ebe))
36+
* Creates yaml_utils.py in utils to allow adk dump yaml in the same style ([1fd58cb](https://github.com/google/adk-python/commit/1fd58cb3633992cd88fa7e09ca6eda0f9b34236f))
37+
* Return explict None type for DELETE endpoints ([f03f167](https://github.com/google/adk-python/commit/f03f1677790c0a9e59b6ba6f46010d0b7b64be50))
38+
* Add _config suffix to all yaml-based agent examples ([43f302c](https://github.com/google/adk-python/commit/43f302ce1ab53077ee8f1486d5294540678921e6))
39+
* Rename run related method and request to align with the conventions ([ecaa7b4](https://github.com/google/adk-python/commit/ecaa7b4c9847b478c7cdc37185b1525f733bb403))
40+
* Update models in samples/ folder to be gemini 2.0+ ([6c217ba](https://github.com/google/adk-python/commit/6c217bad828edf62b41ec06b168f8a6cb7ece2ed))
41+
* Remove the "one commit" requirement from the contributing guide ([c32cb6e](https://github.com/google/adk-python/commit/c32cb6eef9ce320ea5a1f3845fc57b83762c237e))
42+
* Bump version to 1.11.0 ([8005270](https://github.com/google/adk-python/commit/80052700f6cee947322080ae6c415d3a428b6c91))
43+
44+
### Documentation
45+
46+
* Add contributing bigtable sample ([fef5318](https://github.com/google/adk-python/commit/fef5318a22f3dcaadb7ecb858725eb61a0350140))
47+
* Fix core_callback example ([ba6e85e](https://github.com/google/adk-python/commit/ba6e85eb3fb06f58ce9077574eac193298e18bea))
48+
* Adds a minimal sample to demo how to use Agent Config to create a multi-agent setup ([1328e6e](https://github.com/google/adk-python/commit/1328e6ef62e9e6260048c0078579edb85a0440bc))
49+
50+
351
## [1.11.0](https://github.com/google/adk-python/compare/v1.10.0...v1.11.0) (2025-08-14)
452

553
### Features

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ Agent Development Kit (ADK) is a flexible and modular framework for developing a
2727

2828
---
2929

30+
## ✨ What's new
31+
32+
- **Agent Config**: Build agents without code. Check out the
33+
[Agent Config](https://google.github.io/adk-docs/agents/config/) feature.
34+
3035
## ✨ Key Features
3136

3237
- **Rich Tool Ecosystem**: Utilize pre-built tools, custom functions,

contributing/samples/spanner/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ distributed via the `google.adk.tools.spanner` module. These tools include:
2323

2424
1. `get_table_schema`
2525

26-
Fetches Spanner database table schema.
26+
Fetches Spanner database table schema and metadata information.
2727

2828
1. `execute_sql`
2929

pyproject.toml

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -25,38 +25,38 @@ classifiers = [ # List of https://pypi.org/classifiers/
2525
]
2626
dependencies = [
2727
# go/keep-sorted start
28-
"PyYAML>=6.0.2, <7.0.0", # For APIHubToolset.
29-
"absolufy-imports>=0.3.1, <1.0.0", # For Agent Engine deployment.
30-
"anyio>=4.9.0, <5.0.0;python_version>='3.10'", # For MCP Session Manager
31-
"authlib>=1.5.1, <2.0.0", # For RestAPI Tool
32-
"click>=8.1.8, <9.0.0", # For CLI tools
33-
"fastapi>=0.115.0, <1.0.0", # FastAPI framework
34-
"google-api-python-client>=2.157.0, <3.0.0", # Google API client discovery
35-
"google-cloud-bigtable>=2.32.0", # For Bigtable database
28+
"PyYAML>=6.0.2, <7.0.0", # For APIHubToolset.
29+
"absolufy-imports>=0.3.1, <1.0.0", # For Agent Engine deployment.
30+
"anyio>=4.9.0, <5.0.0;python_version>='3.10'", # For MCP Session Manager
31+
"authlib>=1.5.1, <2.0.0", # For RestAPI Tool
32+
"click>=8.1.8, <9.0.0", # For CLI tools
33+
"fastapi>=0.115.0, <1.0.0", # FastAPI framework
34+
"google-api-python-client>=2.157.0, <3.0.0", # Google API client discovery
35+
"google-cloud-bigtable>=2.32.0", # For Bigtable database
3636
"google-cloud-aiplatform[agent_engines]>=1.95.1, <2.0.0", # For VertexAI integrations, e.g. example store.
37-
"google-cloud-secret-manager>=2.22.0, <3.0.0", # Fetching secrets in RestAPI Tool
38-
"google-cloud-spanner>=3.56.0, <4.0.0", # For Spanner database
39-
"google-cloud-speech>=2.30.0, <3.0.0", # For Audio Transcription
40-
"google-cloud-storage>=2.18.0, <3.0.0", # For GCS Artifact service
41-
"google-genai>=1.21.1, <2.0.0", # Google GenAI SDK
42-
"graphviz>=0.20.2, <1.0.0", # Graphviz for graph rendering
43-
"mcp>=1.8.0, <2.0.0;python_version>='3.10'", # For MCP Toolset
44-
"opentelemetry-api>=1.31.0, <2.0.0", # OpenTelemetry
37+
"google-cloud-secret-manager>=2.22.0, <3.0.0", # Fetching secrets in RestAPI Tool
38+
"google-cloud-spanner>=3.56.0, <4.0.0", # For Spanner database
39+
"google-cloud-speech>=2.30.0, <3.0.0", # For Audio Transcription
40+
"google-cloud-storage>=2.18.0, <3.0.0", # For GCS Artifact service
41+
"google-genai>=1.21.1, <2.0.0", # Google GenAI SDK
42+
"graphviz>=0.20.2, <1.0.0", # Graphviz for graph rendering
43+
"mcp>=1.8.0, <2.0.0;python_version>='3.10'", # For MCP Toolset
44+
"opentelemetry-api>=1.31.0, <2.0.0", # OpenTelemetry
4545
"opentelemetry-exporter-gcp-trace>=1.9.0, <2.0.0",
4646
"opentelemetry-sdk>=1.31.0, <2.0.0",
47-
"pydantic>=2.0, <3.0.0", # For data validation/models
48-
"python-dateutil>=2.9.0.post0, <3.0.0", # For Vertext AI Session Service
49-
"python-dotenv>=1.0.0, <2.0.0", # To manage environment variables
47+
"pydantic>=2.0, <3.0.0", # For data validation/models
48+
"python-dateutil>=2.9.0.post0, <3.0.0", # For Vertext AI Session Service
49+
"python-dotenv>=1.0.0, <2.0.0", # To manage environment variables
5050
"requests>=2.32.4, <3.0.0",
51-
"sqlalchemy-spanner>=1.14.0", # Spanner database session service
52-
"sqlalchemy>=2.0, <3.0.0", # SQL database ORM
53-
"starlette>=0.46.2, <1.0.0", # For FastAPI CLI
54-
"tenacity>=8.0.0, <9.0.0", # For Retry management
51+
"sqlalchemy-spanner>=1.14.0", # Spanner database session service
52+
"sqlalchemy>=2.0, <3.0.0", # SQL database ORM
53+
"starlette>=0.46.2, <1.0.0", # For FastAPI CLI
54+
"tenacity>=8.0.0, <9.0.0", # For Retry management
5555
"typing-extensions>=4.5, <5",
56-
"tzlocal>=5.3, <6.0", # Time zone utilities
57-
"uvicorn>=0.34.0, <1.0.0", # ASGI server for FastAPI
58-
"watchdog>=6.0.0, <7.0.0", # For file change detection and hot reload
59-
"websockets>=15.0.1, <16.0.0", # For BaseLlmFlow
56+
"tzlocal>=5.3, <6.0", # Time zone utilities
57+
"uvicorn>=0.34.0, <1.0.0", # ASGI server for FastAPI
58+
"watchdog>=6.0.0, <7.0.0", # For file change detection and hot reload
59+
"websockets>=15.0.1, <16.0.0", # For BaseLlmFlow
6060
# go/keep-sorted end
6161
]
6262
dynamic = ["version"]
@@ -99,18 +99,20 @@ eval = [
9999

100100
test = [
101101
# go/keep-sorted start
102-
"anthropic>=0.43.0", # For anthropic model tests
102+
"a2a-sdk>=0.3.0,<0.4.0;python_version>='3.10'",
103+
"anthropic>=0.43.0", # For anthropic model tests
103104
"langchain-community>=0.3.17",
104-
# langgraph 0.5 removed langgraph.graph.graph which we depend on
105-
"langgraph>=0.2.60, <= 0.4.10", # For LangGraphAgent
106-
"litellm>=1.75.5, <2.0.0", # For LiteLLM tests
107-
"llama-index-readers-file>=0.4.0", # For retrieval tests
108-
"openai>=1.100.2", # For LiteLLM
105+
"langgraph>=0.2.60, <= 0.4.10", # For LangGraphAgent
106+
"litellm>=1.75.5, <2.0.0", # For LiteLLM tests
107+
"llama-index-readers-file>=0.4.0", # For retrieval tests
108+
"openai>=1.100.2", # For LiteLLM
109109
"pytest-asyncio>=0.25.0",
110110
"pytest-mock>=3.14.0",
111111
"pytest-xdist>=3.6.1",
112112
"pytest>=8.3.4",
113113
"python-multipart>=0.0.9",
114+
"rouge-score>=0.1.2",
115+
"tabulate>=0.9.0",
114116
# go/keep-sorted end
115117
]
116118

src/google/adk/a2a/utils/agent_to_a2a.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,25 +39,32 @@
3939
from ...runners import Runner
4040
from ...sessions.in_memory_session_service import InMemorySessionService
4141
from ..executor.a2a_agent_executor import A2aAgentExecutor
42+
from ..experimental import a2a_experimental
4243
from .agent_card_builder import AgentCardBuilder
4344

4445

46+
@a2a_experimental
4547
def to_a2a(
46-
agent: BaseAgent, *, host: str = "localhost", port: int = 8000
48+
agent: BaseAgent,
49+
*,
50+
host: str = "localhost",
51+
port: int = 8000,
52+
protocol: str = "http",
4753
) -> Starlette:
4854
"""Convert an ADK agent to a A2A Starlette application.
4955
5056
Args:
5157
agent: The ADK agent to convert
5258
host: The host for the A2A RPC URL (default: "localhost")
5359
port: The port for the A2A RPC URL (default: 8000)
60+
protocol: The protocol for the A2A RPC URL (default: "http")
5461
5562
Returns:
5663
A Starlette application that can be run with uvicorn
5764
5865
Example:
5966
agent = MyAgent()
60-
app = to_a2a(agent, host="localhost", port=8000)
67+
app = to_a2a(agent, host="localhost", port=8000, protocol="http")
6168
# Then run with: uvicorn module:app --host localhost --port 8000
6269
"""
6370
# Set up ADK logging to ensure logs are visible when using uvicorn directly
@@ -87,7 +94,7 @@ async def create_runner() -> Runner:
8794
)
8895

8996
# Build agent card
90-
rpc_url = f"http://{host}:{port}/"
97+
rpc_url = f"{protocol}://{host}:{port}/"
9198
card_builder = AgentCardBuilder(
9299
agent=agent,
93100
rpc_url=rpc_url,

src/google/adk/agents/base_agent.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,18 @@ def clone(
181181

182182
cloned_agent = self.model_copy(update=update)
183183

184+
# If any field is stored as list and not provided in the update, need to
185+
# shallow copy it for the cloned agent to avoid sharing the same list object
186+
# with the original agent.
187+
for field_name in cloned_agent.__class__.model_fields:
188+
if field_name == 'sub_agents':
189+
continue
190+
if update is not None and field_name in update:
191+
continue
192+
field = getattr(cloned_agent, field_name)
193+
if isinstance(field, list):
194+
setattr(cloned_agent, field_name, field.copy())
195+
184196
if update is None or 'sub_agents' not in update:
185197
# If `sub_agents` is not provided in the update, need to recursively clone
186198
# the sub-agents to avoid sharing the sub-agents with the original agent.

src/google/adk/agents/base_agent_config.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,3 @@ class BaseAgentConfig(BaseModel):
7979
default=None,
8080
description='Optional. The after_agent_callbacks of the agent.',
8181
)
82-
83-
def to_agent_config(
84-
self, custom_agent_config_cls: Type[TBaseAgentConfig]
85-
) -> TBaseAgentConfig:
86-
"""Converts this config to the concrete agent config type.
87-
88-
NOTE: this is for ADK framework use only.
89-
"""
90-
return custom_agent_config_cls.model_validate(self.model_dump())

0 commit comments

Comments
 (0)