Skip to content

Commit fa661dd

Browse files
authored
Merge branch 'main' into fix-issue-1814-path-parameter-extraction
2 parents bf1a873 + da34692 commit fa661dd

35 files changed

+2736
-73
lines changed

AGENTS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ This document provides context for the Gemini CLI and Gemini Code Assist to unde
66

77
The Agent Development Kit (ADK) is an open-source, code-first Python toolkit for building, evaluating, and deploying sophisticated AI agents with flexibility and control. While optimized for Gemini and the Google ecosystem, ADK is model-agnostic, deployment-agnostic, and is built for compatibility with other frameworks. ADK was designed to make agent development feel more like software development, to make it easier for developers to create, deploy, and orchestrate agentic architectures that range from simple tasks to complex workflows.
88

9+
## Project Architecture
10+
11+
Please refer to [ADK Project Overview and Architecture](https://github.com/google/adk-python/blob/main/contributing/adk_project_overview_and_architecture.md) for details.
12+
913
## ADK: Style Guides
1014

1115
### Python Style Guide

CHANGELOG.md

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

3+
## [1.6.1](https://github.com/google/adk-python/compare/v1.5.0...v1.6.1) (2025-07-09)
4+
5+
### Features
6+
7+
* Add A2A support as experimental features [f0183a9](https://github.com/google/adk-python/commit/f0183a9b98b0bcf8aab4f948f467cef204ddc9d6)
8+
* Install google-adk with a2a extra: pip install google-adk[a2a]
9+
* Users can serve agents as A2A agent with `--a2a` option for `adk web` and
10+
`adk api_server`
11+
* Users can run a remote A2A agent with `RemoteA2AAgent` class
12+
* Three A2A agent samples are added:
13+
* contributing/samples/a2a_basic
14+
* contributing/samples/a2a_auth
15+
* contributing/samples/a2a_human_in_loop
16+
17+
* Support agent hot reload.[e545e5a](https://github.com/google/adk-python/commit/e545e5a570c1331d2ed8fda31c7244b5e0f71584)
18+
Users can add `--reload_agents` flag to `adk web` and `adk api_server` command
19+
to reload agents automatically when new changes are detected.
20+
21+
* Eval features
22+
* Implement auto rater-based evaluator for responses [75699fb](https://github.com/google/adk-python/commit/75699fbeca06f99c6f2415938da73bb423ec9b9b)
23+
* Add Safety evaluator metric [0bd05df](https://github.com/google/adk-python/commit/0bd05df471a440159a44b5864be4740b0f1565f9)
24+
* Add BaseEvalService declaration and surrounding data models [b0d88bf](https://github.com/google/adk-python/commit/b0d88bf17242e738bcd409b3d106deed8ce4d407)
25+
26+
* Minor features
27+
* Add `custom_metadata` to VertexAiSessionService when adding events [a021222](https://github.com/google/adk-python/commit/a02122207734cabb26f7c23e84d2336c4b8b0375)
28+
* Support protected write in BigQuery `execute_sql` tool [dc43d51](https://github.com/google/adk-python/commit/dc43d518c90b44932b3fdedd33fca9e6c87704e2)
29+
* Added clone() method to BaseAgent to allow users to create copies of an agent [d263afd] (https://github.com/google/adk-python/commit/d263afd91ba4a3444e5321c0e1801c499dec4c68)
30+
31+
### Bug Fixes
32+
33+
* Support project-based gemini model path to use enterprise_web_search_tool [e33161b](https://github.com/google/adk-python/commit/e33161b4f8650e8bcb36c650c4e2d1fe79ae2526)
34+
* Use inspect.signature() instead of typing.get_type_hints for examining function signatures[4ca77bc](https://github.com/google/adk-python/commit/4ca77bc056daa575621a80d3c8d5014b78209233)
35+
* Replace Event ID generation with UUID4 to prevent SQLite integrity constraint failures [e437c7a](https://github.com/google/adk-python/commit/e437c7aac650ac6a53fcfa71bd740e3e5ec0f230)
36+
* Remove duplicate options from `adk deploy` [3fa2ea7](https://github.com/google/adk-python/commit/3fa2ea7cb923c9f8606d98b45a23bd58a7027436)
37+
* Fix scenario where a user can access another users events given the same session id [362fb3f](https://github.com/google/adk-python/commit/362fb3f2b7ac4ad15852d00ce4f3935249d097f6)
38+
* Handle unexpected 'parameters' argument in FunctionTool.run_async [0959b06](https://github.com/google/adk-python/commit/0959b06dbdf3037fe4121f12b6d25edca8fb9afc)
39+
* Make sure each partial event has different timestamp [17d6042](https://github.com/google/adk-python/commit/17d604299505c448fcb55268f0cbaeb6c4fa314a)
40+
* Avoid pydantic.ValidationError when the model stream returns empty final chunk [9b75e24](https://github.com/google/adk-python/commit/9b75e24d8c01878c153fec26ccfea4490417d23b)
41+
* Fix google_search_tool.py to support updated Gemini LIVE model naming [77b869f](https://github.com/google/adk-python/commit/77b869f5e35a66682cba35563824fd23a9028d7c)
42+
* Adding detailed information on each metric evaluation [04de3e1](https://github.com/google/adk-python/commit/04de3e197d7a57935488eb7bfa647c7ab62cd9d9)
43+
* Converts litellm generate config err [3901fad](https://github.com/google/adk-python/commit/3901fade71486a1e9677fe74a120c3f08efe9d9e)
44+
* Save output in state via output_key only when the event is authored by current agent [20279d9](https://github.com/google/adk-python/commit/20279d9a50ac051359d791dea77865c17c0bbf9e)
45+
* Treat SQLite database update time as UTC for session's last update time [3f621ae](https://github.com/google/adk-python/commit/3f621ae6f2a5fac7f992d3d833a5311b4d4e7091)
46+
* Raise ValueError when sessionId and userId are incorrect combination(#1653) [4e765ae](https://github.com/google/adk-python/commit/4e765ae2f3821318e581c26a52e11d392aaf72a4)
47+
* Support API-Key for MCP Tool authentication [045aea9](https://github.com/google/adk-python/commit/045aea9b15ad0190a960f064d6e1e1fc7f964c69)
48+
* Lock LangGraph version to <= 0.4.10 [9029b8a](https://github.com/google/adk-python/commit/9029b8a66e9d5e0d29d9a6df0e5590cc7c0e9038)
49+
* Update the retry logic of create session polling [3d2f13c](https://github.com/google/adk-python/commit/3d2f13cecd3fef5adfa1c98bf23d7b68ff355f4d)
50+
51+
### Chores
52+
53+
* Extract mcp client creation logic to a separate method [45d60a1](https://github.com/google/adk-python/commit/45d60a1906bfe7c43df376a829377e2112ea3d17)
54+
* Add tests for live streaming configs [bf39c00](https://github.com/google/adk-python/commit/bf39c006102ef3f01e762e7bb744596a4589f171)
55+
* Update ResponseEvaluator to use newer version of Eval SDK [62c4a85](https://github.com/google/adk-python/commit/62c4a8591780a9a3fdb03a0de11092d84118a1b9)
56+
* Add util to build our llms.txt and llms-full.txt files [a903c54](https://github.com/google/adk-python/commit/a903c54bacfcb150dc315bec9c67bf7ce9551c07)
57+
* Create an example for multi agent live streaming [a58cc3d](https://github.com/google/adk-python/commit/a58cc3d882e59358553e8ea16d166b1ab6d3aa71)
58+
* Refactor the ADK Triaging Agent to make the code easier to read [b6c7b5b](https://github.com/google/adk-python/commit/b6c7b5b64fcd2e83ed43f7b96ea43791733955d8)
59+
60+
61+
### Documentation
62+
63+
* Update the a2a exmaple link in README.md [d0fdfb8](https://github.com/google/adk-python/commit/d0fdfb8c8e2e32801999c81de8d8ed0be3f88e76)
64+
* Adds AGENTS.md to provide relevant project context for the Gemini CLI [37108be](https://github.com/google/adk-python/commit/37108be8557e011f321de76683835448213f8515)
65+
* Update CONTRIBUTING.md [ffa9b36](https://github.com/google/adk-python/commit/ffa9b361db615ae365ba62c09a8f4226fb761551)
66+
* Add adk project overview and architecture [28d0ea8](https://github.com/google/adk-python/commit/28d0ea876f2f8de952f1eccbc788e98e39f50cf5)
67+
* Add docstring to clarify that inmemory service are not suitable for production [dc414cb](https://github.com/google/adk-python/commit/dc414cb5078326b8c582b3b9072cbda748766286)
68+
* Update agents.md to include versioning strategy [6a39c85](https://github.com/google/adk-python/commit/6a39c854e032bda3bc15f0e4fe159b41cf2f474b)
69+
* Add tenacity into project.toml [df141db](https://github.com/google/adk-python/commit/df141db60c1137a6bcddd6d46aad3dc506868543)
70+
* Updating CONTRIBUTING.md with missing extra [e153d07](https://github.com/google/adk-python/commit/e153d075939fb628a7dc42b12e1b3461842db541)
71+
372
## [1.5.0](https://github.com/google/adk-python/compare/v1.4.2...v1.5.0) (2025-06-25)
473

574

contributing/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,10 @@ This folder host resources for ADK contributors, for example, testing samples et
77
Samples folder host samples to test different features. The samples are usually minimal and simplistic to test one or a few scenarios.
88

99
**Note**: This is different from the [google/adk-samples](https://github.com/google/adk-samples) repo, which hosts more complex e2e samples for customers to use or modify directly.
10+
11+
## ADK project and architecture overview
12+
13+
The [adk_project_overview_and_architecture.md](adk_project_overview_and_architecture.md) describes the ADK project overview and its technical architecture from high-level.
14+
15+
This is helpful for contributors to understand the project and design philosophy.
16+
It can also be feed into LLMs for vibe-coding.
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# ADK Project Overview and Architecture
2+
3+
Google Agent Development Kit (ADK) for Python
4+
5+
## Core Philosophy & Architecture
6+
7+
- Code-First: Everything is defined in Python code for versioning, testing, and IDE support. Avoid GUI-based logic.
8+
9+
- Modularity & Composition: We build complex multi-agent systems by composing multiple, smaller, specialized agents.
10+
11+
- Deployment-Agnostic: The agent's core logic is separate from its deployment environment. The same agent.py can be run locally for testing, served via an API, or deployed to the cloud.
12+
13+
## Foundational Abstractions (Our Vocabulary)
14+
15+
- Agent: The blueprint. It defines an agent's identity, instructions, and tools. It's a declarative configuration object.
16+
17+
- Tool: A capability. A Python function an agent can call to interact with the world (e.g., search, API call).
18+
19+
- Runner: The engine. It orchestrates the "Reason-Act" loop, manages LLM calls, and executes tools.
20+
21+
- Session: The conversation state. It holds the history for a single, continuous dialogue.
22+
23+
- Memory: Long-term recall across different sessions.
24+
25+
- Artifact Service: Manages non-textual data like files.
26+
27+
## Canonical Project Structure
28+
29+
Adhere to this structure for compatibility with ADK tooling.
30+
31+
my_adk_project/ \
32+
└── src/ \
33+
└── my_app/ \
34+
├── agents/ \
35+
│ ├── my_agent/ \
36+
│ │ ├── __init__.py # Must contain: from. import agent \
37+
│ │ └── agent.py # Must contain: root_agent = Agent(...) \
38+
│ └── another_agent/ \
39+
│ ├── __init__.py \
40+
│ └── agent.py\
41+
42+
agent.py: Must define the agent and assign it to a variable named root_agent. This is how ADK's tools find it.
43+
44+
__init__.py: In each agent directory, it must contain from. import agent to make the agent discoverable.
45+
46+
## Local Development & Debugging
47+
48+
Interactive UI (adk web): This is our primary debugging tool. It's a decoupled system:
49+
50+
Backend: A FastAPI server started with adk api_server.
51+
52+
Frontend: An Angular app that connects to the backend.
53+
54+
Use the "Events" tab to inspect the full execution trace (prompts, tool calls, responses).
55+
56+
CLI (adk run): For quick, stateless functional checks in the terminal.
57+
58+
Programmatic (pytest): For writing automated unit and integration tests.
59+
60+
## The API Layer (FastAPI)
61+
62+
We expose agents as production APIs using FastAPI.
63+
64+
- get_fast_api_app: This is the key helper function from google.adk.cli.fast_api that creates a FastAPI app from our agent directory.
65+
66+
- Standard Endpoints: The generated app includes standard routes like /list-apps and /run_sse for streaming responses. The wire format is camelCase.
67+
68+
- Custom Endpoints: We can add our own routes (e.g., /health) to the app object returned by the helper.
69+
70+
Python
71+
72+
from google.adk.cli.fast_api import get_fast_api_app
73+
app = get_fast_api_app(agent_dir="./agents")
74+
75+
@app.get("/health")
76+
async def health_check():
77+
return {"status": "ok"}
78+
79+
80+
## Deployment to Production
81+
82+
The adk cli provides the "adk deploy" command to deploy to Google Vertex Agent Engine, Google CloudRun, Google GKE.
83+
84+
## Testing & Evaluation Strategy
85+
86+
Testing is layered, like a pyramid.
87+
88+
### Layer 1: Unit Tests (Base)
89+
90+
What: Test individual Tool functions in isolation.
91+
92+
How: Use pytest in tests/test_tools.py. Verify deterministic logic.
93+
94+
### Layer 2: Integration Tests (Middle)
95+
96+
What: Test the agent's internal logic and interaction with tools.
97+
98+
How: Use pytest in tests/test_agent.py, often with mocked LLMs or services.
99+
100+
### Layer 3: Evaluation Tests (Top)
101+
102+
What: Assess end-to-end performance with a live LLM. This is about quality, not just pass/fail.
103+
104+
How: Use the ADK Evaluation Framework.
105+
106+
Test Cases: Create JSON files with input and a reference (expected tool calls and final response).
107+
108+
Metrics: tool_trajectory_avg_score (does it use tools correctly?) and response_match_score (is the final answer good?).
109+
110+
Run via: adk web (UI), pytest (for CI/CD), or adk eval (CLI).
111+

contributing/samples/a2a_basic/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def roll_die(sides: int) -> int:
9393

9494

9595
root_agent = Agent(
96-
model="gemini-1.5-flash",
96+
model="gemini-2.0-flash",
9797
name="root_agent",
9898
instruction="""
9999
You are a helpful assistant that can roll dice and check if numbers are prime.

contributing/samples/a2a_human_in_loop/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def reimburse(purpose: str, amount: float) -> str:
3333

3434

3535
root_agent = Agent(
36-
model='gemini-1.5-flash',
36+
model='gemini-2.0-flash',
3737
name='reimbursement_agent',
3838
instruction="""
3939
You are an agent whose job is to handle the reimbursement process for

contributing/samples/a2a_human_in_loop/remote_a2a/human_in_loop/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def ask_for_approval(
3939

4040

4141
root_agent = Agent(
42-
model='gemini-1.5-flash',
42+
model='gemini-2.0-flash',
4343
name='reimbursement_agent',
4444
instruction="""
4545
You are an agent whose job is to handle the reimbursement process for
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
from . import agent

0 commit comments

Comments
 (0)