Skip to content

Commit 06bc838

Browse files
authored
Merge branch 'main' into feat/hitl-blocking-poll-pattern
2 parents b82668a + 7e6ef71 commit 06bc838

209 files changed

Lines changed: 16697 additions & 4507 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.

.github/workflows/python-unit-tests.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
runs-on: ubuntu-latest
2626
strategy:
2727
matrix:
28-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
28+
python-version: ["3.10", "3.11", "3.12", "3.13"]
2929

3030
steps:
3131
- name: Checkout code
@@ -48,14 +48,6 @@ jobs:
4848
- name: Run unit tests with pytest
4949
run: |
5050
source .venv/bin/activate
51-
if [[ "${{ matrix.python-version }}" == "3.9" ]]; then
52-
pytest tests/unittests \
53-
--ignore=tests/unittests/a2a \
54-
--ignore=tests/unittests/tools/mcp_tool \
55-
--ignore=tests/unittests/artifacts/test_artifact_service.py \
56-
--ignore=tests/unittests/tools/google_api_tool/test_googleapi_to_openapi_converter.py
57-
else
58-
pytest tests/unittests \
59-
--ignore=tests/unittests/artifacts/test_artifact_service.py \
60-
--ignore=tests/unittests/tools/google_api_tool/test_googleapi_to_openapi_converter.py
61-
fi
51+
pytest tests/unittests \
52+
--ignore=tests/unittests/artifacts/test_artifact_service.py \
53+
--ignore=tests/unittests/tools/google_api_tool/test_googleapi_to_openapi_converter.py

.github/workflows/stale-bot.yml

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,43 @@
1-
# .github/workflows/stale-issue-auditor.yml
2-
3-
# Best Practice: Always have a 'name' field at the top.
41
name: ADK Stale Issue Auditor
52

6-
# The 'on' block defines the triggers.
73
on:
8-
# The 'workflow_dispatch' trigger allows manual runs.
94
workflow_dispatch:
105

11-
# The 'schedule' trigger runs the bot on a timer.
126
schedule:
13-
# This runs at 6:00 AM UTC (e.g., 10 PM PST).
7+
# This runs at 6:00 AM UTC (10 PM PST)
148
- cron: '0 6 * * *'
159

16-
# The 'jobs' block contains the work to be done.
1710
jobs:
18-
# A unique ID for the job.
1911
audit-stale-issues:
20-
# The runner environment.
2112
runs-on: ubuntu-latest
13+
timeout-minutes: 60
2214

23-
# Permissions for the job's temporary GITHUB_TOKEN.
24-
# These are standard and syntactically correct.
2515
permissions:
2616
issues: write
2717
contents: read
2818

29-
# The sequence of steps for the job.
3019
steps:
3120
- name: Checkout repository
32-
uses: actions/checkout@v4
21+
uses: actions/checkout@v5
3322

3423
- name: Set up Python
35-
uses: actions/setup-python@v5
24+
uses: actions/setup-python@v6
3625
with:
3726
python-version: '3.11'
3827

3928
- name: Install dependencies
40-
# The '|' character allows for multi-line shell commands.
4129
run: |
4230
python -m pip install --upgrade pip
4331
pip install requests google-adk
4432
4533
- name: Run Auditor Agent Script
46-
# The 'env' block for setting environment variables.
4734
env:
4835
GITHUB_TOKEN: ${{ secrets.ADK_TRIAGE_AGENT }}
4936
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
50-
OWNER: google
37+
OWNER: ${{ github.repository_owner }}
5138
REPO: adk-python
52-
ISSUES_PER_RUN: 100
39+
CONCURRENCY_LIMIT: 3
5340
LLM_MODEL_NAME: "gemini-2.5-flash"
5441
PYTHONPATH: contributing/samples
5542

56-
# The final 'run' command.
5743
run: python -m adk_stale_agent.main

.github/workflows/triage.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,22 @@ name: ADK Issue Triaging Agent
22

33
on:
44
issues:
5-
types: [labeled]
5+
types: [opened, labeled]
66
schedule:
7-
# Run every 6 hours to triage planned but not triaged issues
7+
# Run every 6 hours to triage untriaged issues
88
- cron: '0 */6 * * *'
99

1010
jobs:
1111
agent-triage-issues:
1212
runs-on: ubuntu-latest
13-
# Only run if labeled with "planned" or if it's a scheduled run
14-
if: github.event_name == 'schedule' || github.event.label.name == 'planned'
13+
# Run for:
14+
# - Scheduled runs (batch processing)
15+
# - New issues (need component labeling)
16+
# - Issues labeled with "planned" (need owner assignment)
17+
if: >-
18+
github.event_name == 'schedule' ||
19+
github.event.action == 'opened' ||
20+
github.event.label.name == 'planned'
1521
permissions:
1622
issues: write
1723
contents: read
@@ -35,8 +41,8 @@ jobs:
3541
GITHUB_TOKEN: ${{ secrets.ADK_TRIAGE_AGENT }}
3642
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
3743
GOOGLE_GENAI_USE_VERTEXAI: 0
38-
OWNER: 'google'
39-
REPO: 'adk-python'
44+
OWNER: ${{ github.repository_owner }}
45+
REPO: ${{ github.event.repository.name }}
4046
INTERACTIVE: 0
4147
EVENT_NAME: ${{ github.event_name }} # 'issues', 'schedule', etc.
4248
ISSUE_NUMBER: ${{ github.event.issue.number }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ Thumbs.db
101101

102102
# AI Coding Tools - Project-specific configs
103103
# Developers should symlink or copy AGENTS.md and add their own overrides locally
104+
.adk/
104105
.claude/
105106
CLAUDE.md
106107
.cursor/

CHANGELOG.md

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

3+
## [1.21.0](https://github.com/google/adk-python/compare/v1.20.0...v1.21.0) (2025-12-11)
4+
5+
### Features
6+
* **[Interactions API Support]**
7+
* The newly released Gemini [Interactions API](https://ai.google.dev/gemini-api/docs/interactions) is supported in ADK Now. To use it:
8+
```Python
9+
Agent(
10+
model=Gemini(
11+
model="gemini-3-pro-preview",
12+
use_interactions_api=True,
13+
),
14+
name="...",
15+
description="...",
16+
instruction="...",
17+
)
18+
```
19+
see [samples](https://github.com/google/adk-python/tree/main/contributing/samples/interactions_api) for details
20+
21+
22+
* **[Services]**
23+
* Add `add_session_to_memory` to `CallbackContext` and `ToolContext` to explicitly save the current session to memory ([7b356dd](https://github.com/google/adk-python/commit/7b356ddc1b1694d2c8a9eee538f3a41cf5518e42))
24+
25+
* **[Plugins]**
26+
* Add location for table in agent events in plugin BigQueryAgentAnalytics ([507424a](https://github.com/google/adk-python/commit/507424acb9aabc697fc64ef2e9a57875f25f0a21))
27+
* Upgrade BigQueryAgentAnalyticsPlugin to v2.0 with improved performance, multimodal support, and reliability ([7b2fe14](https://github.com/google/adk-python/commit/7b2fe14dab96440ee25b66dae9e66eadba629a56))
28+
29+
30+
* **[A2A]**
31+
* Adds ADK EventActions to A2A response ([32e87f6](https://github.com/google/adk-python/commit/32e87f6381ff8905a06a9a43a0207d758a74299d))
32+
33+
* **[Tools]**
34+
* Add `header_provider` to `OpenAPIToolset` and `RestApiTool` ([e1a7593](https://github.com/google/adk-python/commit/e1a7593ae8455d51cdde46f5165410217400d3c9))
35+
* Allow overriding connection template ([cde7f7c](https://github.com/google/adk-python/commit/cde7f7c243a7cdc8c7b886f68be55fd59b1f6d5a))
36+
* Add SSL certificate verification configuration to OpenAPI tools using the `verify` parameter ([9d2388a](https://github.com/google/adk-python/commit/9d2388a46f7a481ea1ec522f33641a06c64394ed))
37+
* Use json schema for function tool declaration when feature enabled ([cb3244b](https://github.com/google/adk-python/commit/cb3244bb58904ab508f77069b436f85b442d3299))
38+
39+
* **[Models]**
40+
* Add Gemma3Ollama model integration and a sample ([e9182e5](https://github.com/google/adk-python/commit/e9182e5eb4a37fb5219fc607cd8f06d7e6982e83))
41+
42+
43+
### Bug Fixes
44+
45+
* Install dependencies for py 3.10 ([9cccab4](https://github.com/google/adk-python/commit/9cccab453706138826f313c47118812133e099c4))
46+
* Refactor LiteLLM response schema formatting for different models ([894d8c6](https://github.com/google/adk-python/commit/894d8c6c2652492324c428e8dae68a8646b17485))
47+
* Resolve project and credentials before creating Spanner client ([99f893a](https://github.com/google/adk-python/commit/99f893ae282a04c67cce5f80e87d3bfadd3943e6))
48+
* Avoid false positive "App name mismatch" warnings in Runner ([6388ba3](https://github.com/google/adk-python/commit/6388ba3b2054e60d218eae6ec8abc621ed0a1139))
49+
* Update the code to work with either 1 event or more than 1 events ([4f54660](https://github.com/google/adk-python/commit/4f54660d6de54ddde0fec6e09fdd68890ce657ca))
50+
* OpenAPI schema generation by skipping JSON schema for judge_model_config ([56775af](https://github.com/google/adk-python/commit/56775afc48ee54e9cbea441a6e0fa6c8a12891b9))
51+
* Add tool_name_prefix support to OpenAPIToolset ([82e6623](https://github.com/google/adk-python/commit/82e6623fa97fb9cbc6893b44e228f4da098498da))
52+
* Pass context to client interceptors ([143ad44](https://github.com/google/adk-python/commit/143ad44f8c5d1c56fc92dd691589aaa0b788e485))
53+
* Yield event with error code when agent run raised A2AClientHTTPError ([b7ce5e1](https://github.com/google/adk-python/commit/b7ce5e17b6653074c5b41d08b2027b5e9970a671))
54+
* Handle string function responses in LiteLLM conversion ([2b64715](https://github.com/google/adk-python/commit/2b6471550591ee7fc5f70f79e66a6e4080df442b))
55+
* ApigeeLLM support for Built-in tools like GoogleSearch, BuiltInCodeExecutor when calling Gemini models through Apigee ([a9b853f](https://github.com/google/adk-python/commit/a9b853fe364d08703b37914a89cf02293b5c553b))
56+
* Extract and propagate task_id in RemoteA2aAgent ([82bd4f3](https://github.com/google/adk-python/commit/82bd4f380bd8b4822191ea16e6140fe2613023ad))
57+
* Update FastAPI and Starlette to fix CVE-2025-62727 (ReDoS vulnerability) ([c557b0a](https://github.com/google/adk-python/commit/c557b0a1f2aac9f0ef7f1e0f65e3884007407e30))
58+
* Add client id to token exchange ([f273517](https://github.com/google/adk-python/commit/f2735177f195b8d7745dba6360688ddfebfed31a))
59+
60+
### Improvements
61+
62+
* Normalize multipart content for LiteLLM's ollama_chat provider ([055dfc7](https://github.com/google/adk-python/commit/055dfc79747aa365db8441908d4994f795e94a68))
63+
* Update adk web, fixes image not rendering, state not updating, update drop down box width and trace icons ([df86847](https://github.com/google/adk-python/commit/df8684734bbfd5a8afe3b4362574fe93dcb43048))
64+
* Add sample agent for interaction api integration ([68d7048](https://github.com/google/adk-python/commit/68d70488b9340251a9d37e8ae3a9166870f26aa1))
65+
* Update genAI SDK version ([f0bdcab](https://github.com/google/adk-python/commit/f0bdcaba449f21bd8c27cde7dbedc03bf5ec5349))
66+
* Introduce `build_function_declaration_with_json_schema` to use pydantic to generate json schema for FunctionTool ([51a638b](https://github.com/google/adk-python/commit/51a638b6b85943d4aaec4ee37c95a55386ebac90))
67+
* Update component definition for triaging agent ([ee743bd](https://github.com/google/adk-python/commit/ee743bd19a8134129111fc4769ec24e40a611982))
68+
* Migrate Google tools to use the new feature decorator ([bab5729](https://github.com/google/adk-python/commit/bab57296d553cb211106ece9ee2c226c64a60c57))
69+
* Migrate computer to use the new feature decorator ([1ae944b](https://github.com/google/adk-python/commit/1ae944b39d9cf263e15b36c76480975fe4291d22))
70+
* Add Spanner execute sql query result mode using list of dictionaries ([f22bac0](https://github.com/google/adk-python/commit/f22bac0b202cd8f273bf2dee9fff57be1b40730d))
71+
* Improve error message for missing `invocation_id` and `new_message` in `run_async` ([de841a4](https://github.com/google/adk-python/commit/de841a4a0982d98ade4478f10481c817a923faa2))
72+
73+
## [1.20.0](https://github.com/google/adk-python/compare/v1.19.0...v1.20.0) (2025-12-01)
74+
75+
76+
### Features
77+
* **[Core]**
78+
* Add enum constraint to `agent_name` for `transfer_to_agent` ([4a42d0d](https://github.com/google/adk-python/commit/4a42d0d9d81b7aab98371427f70a7707dbfb8bc4))
79+
* Add validation for unique sub-agent names ([#3557](https://github.com/google/adk-python/issues/3557)) ([2247a45](https://github.com/google/adk-python/commit/2247a45922afdf0a733239b619f45601d9b325ec))
80+
* Support streaming function call arguments in progressive SSE streaming feature ([786aaed](https://github.com/google/adk-python/commit/786aaed335e1ce64b7e92dff2f4af8316b2ef593))
81+
82+
* **[Models]**
83+
* Enable multi-provider support for Claude and LiteLLM ([d29261a](https://github.com/google/adk-python/commit/d29261a3dc9c5a603feef27ea657c4a03bb8a089))
84+
85+
* **[Tools]**
86+
* Create APIRegistryToolset to add tools from Cloud API registry to agent ([ec4ccd7](https://github.com/google/adk-python/commit/ec4ccd718feeadeb6b2b59fcc0e9ff29a4fd0bac))
87+
* Add an option to disallow propagating runner plugins to AgentTool runner ([777dba3](https://github.com/google/adk-python/commit/777dba3033a9a14667fb009ba017f648177be41d))
88+
89+
* **[Web]**
90+
* Added an endpoint to list apps with details ([b57fe5f](https://github.com/google/adk-python/commit/b57fe5f4598925ec7592917bb32c7f0d6eca287a))
91+
92+
93+
### Bug Fixes
94+
95+
* Allow image parts in user messages for Anthropic Claude ([5453b5b](https://github.com/google/adk-python/commit/5453b5bfdedc91d9d668c9eac39e3bb009a7bbbf))
96+
* Mark the Content as non-empty if its first part contains text or inline_data or file_data or func call/response ([631b583](https://github.com/google/adk-python/commit/631b58336d36bfd93e190582be34069613d38559))
97+
* Fixes double response processing issue in `base_llm_flow.py` where, in Bidi-streaming (live) mode, the multi-agent structure causes duplicated responses after tool calling. ([cf21ca3](https://github.com/google/adk-python/commit/cf21ca358478919207049695ba6b31dc6e0b2673))
98+
* Fix out of bounds error in _run_async_impl ([8fc6128](https://github.com/google/adk-python/commit/8fc6128b62ba576480d196d4a2597564fd0a7006))
99+
* Fix paths for public docs ([cd54f48](https://github.com/google/adk-python/commit/cd54f48fed0c87b54fb19743c9c75e790c5d9135))
100+
* Ensure request bodies without explicit names are named 'body' ([084c2de](https://github.com/google/adk-python/commit/084c2de0dac84697906e2b4beebf008bbd9ae8e1)), closes [#2213](https://github.com/google/adk-python/issues/2213)
101+
* Optimize Stale Agent with GraphQL and Search API to resolve 429 Quota errors ([cb19d07](https://github.com/google/adk-python/commit/cb19d0714c90cd578551753680f39d8d6076c79b))
102+
* Update AgentTool to use Agent's description when input_schema is provided in FunctionDeclaration ([52674e7](https://github.com/google/adk-python/commit/52674e7fac6b7689f0e3871d41c4523e13471a7e))
103+
* Update LiteLLM system instruction role from "developer" to "system" ([2e1f730](https://github.com/google/adk-python/commit/2e1f730c3bc0eb454b76d7f36b7b9f1da7304cfe)), closes [#3657](https://github.com/google/adk-python/issues/3657)
104+
* Update session last update time when appending events ([a3e4ad3](https://github.com/google/adk-python/commit/a3e4ad3cd130714affcaa880f696aeb498cd93af)), closes [#2721](https://github.com/google/adk-python/issues/2721)
105+
* Update the retry_on_closed_resource decorator to retry on all errors ([a3aa077](https://github.com/google/adk-python/commit/a3aa07722a7de3e08807e86fd10f28938f0b267d))
106+
* Windows Path Handling and Normalize Cross-Platform Path Resolution in AgentLoader ([a1c09b7](https://github.com/google/adk-python/commit/a1c09b724bb37513eaabaff9643eeaa68014f14d))
107+
108+
109+
### Documentation
110+
111+
* Add Code Wiki badge to README ([caf23ac](https://github.com/google/adk-python/commit/caf23ac49fe08bc7f625c61eed4635c26852c3ba))
112+
113+
3114
## [1.19.0](https://github.com/google/adk-python/compare/v1.18.0...v1.19.0) (2025-11-19)
4115

5116
### Features

contributing/samples/adk_documentation/adk_docs_updater/main.py

Lines changed: 73 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,14 @@
2424
from adk_documentation.settings import DOC_REPO
2525
from adk_documentation.tools import get_issue
2626
from adk_documentation.utils import call_agent_async
27+
from adk_documentation.utils import parse_suggestions
2728
from google.adk.cli.utils import logs
2829
from google.adk.runners import InMemoryRunner
2930

3031
APP_NAME = "adk_docs_updater"
3132
USER_ID = "adk_docs_updater_user"
3233

33-
logs.setup_adk_logger(level=logging.DEBUG)
34+
logs.setup_adk_logger(level=logging.INFO)
3435

3536

3637
def process_arguments():
@@ -68,23 +69,84 @@ async def main():
6869
print(f"Failed to get issue {issue_number}: {get_issue_response}\n")
6970
return
7071
issue = get_issue_response["issue"]
72+
issue_title = issue.get("title", "")
73+
issue_body = issue.get("body", "")
74+
75+
# Parse numbered suggestions from issue body
76+
suggestions = parse_suggestions(issue_body)
77+
78+
if not suggestions:
79+
print(f"No numbered suggestions found in issue #{issue_number}.")
80+
print("Falling back to processing the entire issue as a single task.")
81+
suggestions = [(1, issue_body)]
82+
83+
print(f"Found {len(suggestions)} suggestion(s) in issue #{issue_number}.")
84+
print("=" * 80)
7185

7286
runner = InMemoryRunner(
7387
agent=agent.root_agent,
7488
app_name=APP_NAME,
7589
)
76-
session = await runner.session_service.create_session(
77-
app_name=APP_NAME,
78-
user_id=USER_ID,
79-
)
8090

81-
response = await call_agent_async(
82-
runner,
83-
USER_ID,
84-
session.id,
85-
f"Please update the ADK docs according to the following issue:\n{issue}",
91+
results = []
92+
for suggestion_num, suggestion_text in suggestions:
93+
print(f"\n>>> Processing suggestion #{suggestion_num}...")
94+
print("-" * 80)
95+
96+
# Create a new session for each suggestion to avoid context interference
97+
session = await runner.session_service.create_session(
98+
app_name=APP_NAME,
99+
user_id=USER_ID,
100+
)
101+
102+
prompt = f"""
103+
Please update the ADK docs according to suggestion #{suggestion_num} from issue #{issue_number}.
104+
105+
Issue title: {issue_title}
106+
107+
Suggestion to process:
108+
{suggestion_text}
109+
110+
Note: Focus only on this specific suggestion. Create exactly one pull request for this suggestion.
111+
"""
112+
113+
try:
114+
response = await call_agent_async(
115+
runner,
116+
USER_ID,
117+
session.id,
118+
prompt,
119+
)
120+
results.append({
121+
"suggestion_num": suggestion_num,
122+
"status": "success",
123+
"response": response,
124+
})
125+
print(f"<<<< Suggestion #{suggestion_num} completed.")
126+
except Exception as e:
127+
results.append({
128+
"suggestion_num": suggestion_num,
129+
"status": "error",
130+
"error": str(e),
131+
})
132+
print(f"<<<< Suggestion #{suggestion_num} failed: {e}")
133+
134+
print("-" * 80)
135+
136+
# Print summary
137+
print("\n" + "=" * 80)
138+
print("SUMMARY")
139+
print("=" * 80)
140+
successful = [r for r in results if r["status"] == "success"]
141+
failed = [r for r in results if r["status"] == "error"]
142+
print(
143+
f"Total: {len(results)}, Success: {len(successful)}, Failed:"
144+
f" {len(failed)}"
86145
)
87-
print(f"<<<< Agent Final Output: {response}\n")
146+
if failed:
147+
print("\nFailed suggestions:")
148+
for r in failed:
149+
print(f" - Suggestion #{r['suggestion_num']}: {r['error']}")
88150

89151

90152
if __name__ == "__main__":

0 commit comments

Comments
 (0)