Skip to content

Commit 1a540b5

Browse files
authored
Merge branch 'main' into spelling-markdown
2 parents 8c0c70a + 0b1784e commit 1a540b5

File tree

61 files changed

+8458
-5056
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+8458
-5056
lines changed

CHANGELOG.md

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

3+
## [1.18.0](https://github.com/google/adk-python/compare/v1.17.0...v1.18.0) (2025-11-05)
4+
5+
### Features
6+
7+
* **[ADK Visual Agent Builder]**
8+
* Core Features
9+
* Visual workflow designer for agent creation
10+
* Support for multiple agent types (LLM, Sequential, Parallel, Loop, Workflow)
11+
* Agent tool support with nested agent tools
12+
* Built-in and custom tool integration
13+
* Callback management for all ADK callback types (before/after agent, model, tool)
14+
* Assistant to help you build your agents with natural language
15+
* Assistant proposes and writes agent configuration yaml files for you
16+
* Save to test with chat interfaces as normal
17+
* Build and debug at the same time in adk web!
18+
19+
* **[Core]**
20+
* Add support for extracting cache-related token counts from LiteLLM usage ([4f85e86](https://github.com/google/adk-python/commit/4f85e86fc3915f0e67312a39fe22451968d4f1b1))
21+
* Expose the Python code run by the code interpreter in the logs ([a2c6a8a](https://github.com/google/adk-python/commit/a2c6a8a85cf4f556e9dacfe46cf384d13d964208))
22+
* Add run_debug() helper method for quick agent experimentation ([0487eea](https://github.com/google/adk-python/commit/0487eea2abcd05d7efd123962d17b8c6c9a9d975))
23+
* Allow injecting a custom Runner into `agent_to_a2a` ([156d235](https://github.com/google/adk-python/commit/156d23547915e8f7f5c6ba55e0362f4b133c3968))
24+
* Support MCP prompts via the McpInstructionProvider class ([88032cf](https://github.com/google/adk-python/commit/88032cf5c56bb2d81842353605f9f5ab4b2206ff))
25+
26+
* **[Models]**
27+
* Add model tracking to LiteLlm and introduce a LiteLLM with fallbacks demo ([d4c63fc](https://github.com/google/adk-python/commit/d4c63fc5629e7d70ad8b8185be09243a01e3428f))
28+
* Add ApigeeLlm as a model that lets ADK Agent developers to connect with an Apigee proxy ([87dcb3f](https://github.com/google/adk-python/commit/87dcb3f7ba344a2ba7d9edfc4817c9e792d90bfc))
29+
30+
* **[Integrations]**
31+
* Add example and fix for loading and upgrading old ADK session databases ([338c3c8](https://github.com/google/adk-python/commit/338c3c89c6bce7f3406f729013cedcd78b809a56))
32+
* Add support for specifying logging level for adk eval cli command ([b1ff85f](https://github.com/google/adk-python/commit/b1ff85fb2347e3402eedd42e3673be7093a99548))
33+
* Propagate LiteLLM finish_reason to LlmResponse for use in callbacks ([71aa564](https://github.com/google/adk-python/commit/71aa5645f6c3d91fd0e0ddb1ed564188c6727080))
34+
* Allow LLM request to override the model used in the generate content async method in LiteLLM ([ce8f674](https://github.com/google/adk-python/commit/ce8f674a287368439ba11be3285902671e9bc75a))
35+
* Add api key argument to Vertex Session and Memory services for Express Mode support ([9014a84](https://github.com/google/adk-python/commit/9014a849eab9f77b82db4a7f2053fb2a96282f03))
36+
* Added support for enums as arguments for function tools ([240ef5b](https://github.com/google/adk-python/commit/240ef5beea9389911e8c03a6039b353befc716ac))
37+
* Implement artifact_version related methods in GcsArtifactService ([e194ebb](https://github.com/google/adk-python/commit/e194ebb33c62bc40403ea852a88f77a9511b61a4))
38+
39+
* **[Services]**
40+
* Add support for Vertex AI Express Mode when deploying to Agent Engine ([d4b2a8b](https://github.com/google/adk-python/commit/d4b2a8b49f98a9991cb44ac7ec6e538b81a08664))
41+
* Remove custom polling logic for Vertex AI Session Service since LRO polling is supported in express mode ([546c2a6](https://github.com/google/adk-python/commit/546c2a68165f54e694664d5b6b6740566301782b))
42+
* Make VertexAiSessionService fully asynchronous ([f7e2a7a](https://github.com/google/adk-python/commit/f7e2a7a40ef248dd6fbba9669503b0828a12f0cc))
43+
44+
* **[Tools]**
45+
* Add Bigquery detect_anomalies tool ([9851340](https://github.com/google/adk-python/commit/9851340ad1df86d6f5c21e8984199573f239bb2b))
46+
* Extend Bigquery detect_anomalies tool to support future data anomaly detection ([38ea749](https://github.com/google/adk-python/commit/38ea749c9cec8e65f5e768f49fd2de79b5545571))
47+
* Add get_job_info tool to BigQuery toolset ([6429457](https://github.com/google/adk-python/commit/64294572c1c93590aa3c221015a5cb9b440ee948))
48+
49+
* **[Evals]**
50+
* Add "final_session_state" to the EvalCase data model ([2274c4f](https://github.com/google/adk-python/commit/2274c4f3040b20da3690aa03272155776ca330c1))
51+
* Marked expected_invocation as optional field on evaluator interface ([b17c8f1](https://github.com/google/adk-python/commit/b17c8f19e5fc67180d1bdc621f84cd43e357571c))
52+
* Adds LLM-backed user simulator ([54c4ecc](https://github.com/google/adk-python/commit/54c4ecc73381cffa51cff01c7fb8a2ac59308c53))
53+
54+
* **[Observability]**
55+
* Add BigQueryLoggingPlugin for event logging to BigQuery ([b7dbfed](https://github.com/google/adk-python/commit/b7dbfed4a3d4a0165e2c6e51594d1f547bec89d3))
56+
57+
* **[Live]**
58+
* Add token usage to live events for bidi streaming ([6e5c0eb](https://github.com/google/adk-python/commit/6e5c0eb6e0474f5b908eb9df20328e7da85ebed9))
59+
60+
### Bug Fixes
61+
62+
* Reduce logging spam for MCP tools without authentication ([11571c3](https://github.com/google/adk-python/commit/11571c37ab948d43cbaa3a1d82522256dfe4d467))
63+
* Fix typo in several files ([d2888a3](https://github.com/google/adk-python/commit/d2888a3766b87df2baaaa1a67a2235b1b80f138f))
64+
* Disable SetModelResponseTool workaround for Vertex AI Gemini 2+ models ([6a94af2](https://github.com/google/adk-python/commit/6a94af24bf3367c05a5d405b7e7b79810a1fac4e))
65+
* Bug when callback_context_invocation_context is missing in GlobalInstructionPlugin ([f81ebdb](https://github.com/google/adk-python/commit/f81ebdb622211031945eb06c3f00ff5208d94f9b))
66+
* Support models slash prefix in model name extraction ([8dff850](https://github.com/google/adk-python/commit/8dff85099d67623dd6f4a707fb932ea55b8aaf9b))
67+
* Do not consider events with state delta and no content as final response ([1ee93c8](https://github.com/google/adk-python/commit/1ee93c8bcb7ccd6f33658dc76b2095dd7e58aac9))
68+
* Parameter filtering for CrewAI functions with **kwargs ([74a3500](https://github.com/google/adk-python/commit/74a3500fc5d4b07e80f914d83a0d91face28086c))
69+
* Do not treat FinishReason.STOP as error case for LLM responses containing candidates with empty contents ([2f72ceb](https://github.com/google/adk-python/commit/2f72ceb49b452c5a1f257bce6adb004fa5d54472))
70+
* Fixes null check for reflect_retry plugin sample ([86f0155](https://github.com/google/adk-python/commit/86f01550bd1b52d6d160e8bc54cecc6c4fe8611c))
71+
* Creates evalset directory on evalset create ([6c3882f](https://github.com/google/adk-python/commit/6c3882f2d66f169d393171be280b6e6218b52a7c))
72+
* Add ADK_DISABLE_LOAD_DOTENV environment variable that disables automatic loading of .env when running ADK cli, if set to true or 1 ([15afbcd](https://github.com/google/adk-python/commit/15afbcd1587d4102a4dc5c07c0c493917df9d6ea))
73+
* Allow tenacity 9.0.0 ([ee8acc5](https://github.com/google/adk-python/commit/ee8acc58be7421a3e8eab07b051c45f9319f80dc))
74+
* Output file uploading to artifact service should handle both base64 encoded and raw bytes ([496f8cd](https://github.com/google/adk-python/commit/496f8cd6bb36d3ba333d7ab1e94e7796d2960300))
75+
* Correct message part ordering in A2A history ([5eca72f](https://github.com/google/adk-python/commit/5eca72f9bfd05c7c28a3d738391138a59a31167d))
76+
* Change instruction insertion to respect tool call/response pairs ([1e6a9da](https://github.com/google/adk-python/commit/1e6a9daa63050936ab421f1f684935927aebc63e))
77+
* DynamicPickleType to support MySQL dialect ([fc15c9a](https://github.com/google/adk-python/commit/fc15c9a0c3c043c0a61dce625b8cd1ee121b4baf))
78+
* Enable usage metadata in LiteLLM streaming ([f9569bb](https://github.com/google/adk-python/commit/f9569bbb1afbc7f0e8b6e68599590471fd112b9f))
79+
* Fix issue with MCP tools throwing an error ([1a4261a](https://github.com/google/adk-python/commit/1a4261ad4b66cdeb39d39110a086bd6112b17516))
80+
* Remove redundant `format` field from LiteLLM content objects ([489c39d](https://github.com/google/adk-python/commit/489c39db01465e38ecbc2c7f32781c349b8cddc9))
81+
* Update the contribution analysis tool to use original write mode ([54db3d4](https://github.com/google/adk-python/commit/54db3d4434e0706b83a589fa2499d11d439a6e4e))
82+
83+
### Improvements
84+
85+
* Add Community Repo section to README ([432d30a](https://github.com/google/adk-python/commit/432d30af486329aa83f89c5d5752749a85c0b843))
86+
* Undo adding MCP tools output schema to FunctionDeclaration ([92a7d19](https://github.com/google/adk-python/commit/92a7d1957367d498de773761edd142d8c108d751))
87+
* Refactor ADK README for clarity and consistency ([b0017ae](https://github.com/google/adk-python/commit/b0017aed4472c73c3b07e71f1d65ae97a5293547))
88+
* Add support for reversed proxy in adk web ([a0df75b](https://github.com/google/adk-python/commit/a0df75b6fa35d837086decb8802dbf1c0a6637ad))
89+
* Avoid rendering empty columns as part of detailed results rendering of eval results ([5cb35db](https://github.com/google/adk-python/commit/5cb35db921bf86b5ad0012046bd19fa7cc1e6abb))
90+
* Clear the behavior of disallow_transfer_to_parent ([48ddd07](https://github.com/google/adk-python/commit/48ddd078941f9240b10f052b6de171c310bc2bc6))
91+
* Disable the scheduled execution for issue triage workflow ([a02f321](https://github.com/google/adk-python/commit/a02f321f1bdb8be9ad1873db804e0e8393268dc3))
92+
* Include delimiter when matching events from parent nodes in content processor ([b8a2b6c](https://github.com/google/adk-python/commit/b8a2b6c57080ae29d7a02df7d9fcc2f961d422d2))
93+
* Improve Tau-bench ADK colab stability ([04dbc42](https://github.com/google/adk-python/commit/04dbc42e50ce40ef3924d1c259e425215e12c2e7))
94+
* Implement ADK-based agent factory for Tau-bench ([c0c67c8](https://github.com/google/adk-python/commit/c0c67c8698d70ddb9ed958416661f232ef9a5ed8))
95+
* Add util to run ADK LLM Agent with simulation environment ([87f415a](https://github.com/google/adk-python/commit/87f415a7c36a1f3b6ab84d1fe939726c6ef7f34e))
96+
* Demonstrate CodeExecutor customization for environment setup ([8eeff35](https://github.com/google/adk-python/commit/8eeff35b35d7e1538a5c9662cc8369f6ff7962f8))
97+
* Add sample agent for VertexAiCodeExecutor ([edfe553](https://github.com/google/adk-python/commit/edfe5539421d196ca4da14d3a37fac7b598f8c8d))
98+
* Adds a new sample agent that demonstrates how to integrate PostgreSQL databases using the Model Context Protocol (MCP) ([45a2168](https://github.com/google/adk-python/commit/45a2168e0e6773e595ecfb825d7e4ab0a38c3a38))
99+
* Add example for using ADK with Fast MCP sampling ([d3796f9](https://github.com/google/adk-python/commit/d3796f9b33251d28d05e6701f11e80f02a2a49e1))
100+
3101
## [1.17.0](https://github.com/google/adk-python/compare/v1.16.0...v1.17.0) (2025-10-22)
4102

5103
### Features

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,12 @@ We welcome contributions from the community! Whether it's bug reports, feature r
155155
- [General contribution guideline and flow](https://google.github.io/adk-docs/contributing-guide/).
156156
- Then if you want to contribute code, please read [Code Contributing Guidelines](./CONTRIBUTING.md) to get started.
157157

158+
## Community Repo
159+
160+
We have [adk-python-community repo](https://github.com/google/adk-python-community)that is home to a growing ecosystem of community-contributed tools, third-party
161+
service integrations, and deployment scripts that extend the core capabilities
162+
of the ADK.
163+
158164
## Vibe Coding
159165

160166
If you are to develop agent via vibe coding the [llms.txt](./llms.txt) and the [llms-full.txt](./llms-full.txt) can be used as context to LLM. While the former one is a summarized one and the later one has the full information in case your LLM has big enough context window.

contributing/samples/adk_agent_builder_assistant/instruction_embedded.template

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,19 @@ tools:
202202
```
203203
**DO NOT create Python files like `tools/google_search_tool.py` for built-in tools!**
204204

205+
- **🚫 Tool Hallucination Ban**
206+
- Use only the built-in tool names enumerated in the **ADK Built-in Tools**
207+
list above; never invent additional built-in labels.
208+
- If you cannot confirm that a tool already exists in this project or in the
209+
built-in list, ask the user for confirmation instead of guessing or fabricating
210+
the implementation.
211+
- Do not generate custom helper tools whose only purpose is transferring control
212+
to another agent; ADK injects the official `transfer_to_agent` tool
213+
automatically when sub-agents are configured. Avoid creating look-alikes such
214+
as `transfer_to_agent_tool`.
215+
- `tool_code` is reserved by some runtimes for code execution. Do not reuse that
216+
name for ADK tools or dotted paths.
217+
205218
**Custom Tools** (require Python implementation):
206219
- **Naming**: Use dotted path: `{{project_folder_name}}.tools.{{module_name}}.{{function_name}}`
207220
- **Require Python file**: Must create actual Python file in `tools/` directory

contributing/samples/adk_triaging_agent/agent.py

Lines changed: 44 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,33 @@
4141
"a2a": "seanzhou1023",
4242
}
4343

44+
LABEL_GUIDELINES = """
45+
Label rubric and disambiguation rules:
46+
- "documentation": Tutorials, README content, reference docs, or samples.
47+
- "services": Session and memory services, persistence layers, or storage
48+
integrations.
49+
- "web": ADK web UI, FastAPI server, dashboards, or browser-based flows.
50+
- "question": Usage questions without a reproducible problem.
51+
- "tools": Built-in tools (e.g., SQL utils, code execution) or tool APIs.
52+
- "mcp": Model Context Protocol features. Apply both "mcp" and "tools".
53+
- "eval": Evaluation framework, test harnesses, scoring, or datasets.
54+
- "live": Streaming, bidi, audio, or Gemini Live configuration.
55+
- "models": Non-Gemini model adapters (LiteLLM, Ollama, OpenAI, etc.).
56+
- "tracing": Telemetry, observability, structured logs, or spans.
57+
- "core": Core ADK runtime (Agent definitions, Runner, planners,
58+
thinking config, CLI commands, GlobalInstructionPlugin, CPU usage, or
59+
general orchestration). Default to "core" when the topic is about ADK
60+
behavior and no other label is a better fit.
61+
- "agent engine": Vertex AI Agent Engine deployment or sandbox topics
62+
only (e.g., `.agent_engine_config.json`, `ae_ignore`, Agent Engine
63+
sandbox, `agent_engine_id`). If the issue does not explicitly mention
64+
Agent Engine concepts, do not use this label—choose "core" instead.
65+
- "a2a": Agent-to-agent workflows, coordination logic, or A2A protocol.
66+
67+
When unsure between labels, prefer the most specific match. If a label
68+
cannot be assigned confidently, do not call the labeling tool.
69+
"""
70+
4471
APPROVAL_INSTRUCTION = (
4572
"Do not ask for user approval for labeling! If you can't find appropriate"
4673
" labels for the issue, do not label it."
@@ -171,18 +198,20 @@ def change_issue_type(issue_number: int, issue_type: str) -> dict[str, Any]:
171198
You are a triaging bot for the GitHub {REPO} repo with the owner {OWNER}. You will help get issues, and recommend a label.
172199
IMPORTANT: {APPROVAL_INSTRUCTION}
173200
201+
{LABEL_GUIDELINES}
202+
174203
Here are the rules for labeling:
175204
- If the user is asking about documentation-related questions, label it with "documentation".
176-
- If it's about session, memory services, label it with "services"
177-
- If it's about UI/web, label it with "web"
178-
- If the user is asking about a question, label it with "question"
179-
- If it's related to tools, label it with "tools"
205+
- If it's about session, memory services, label it with "services".
206+
- If it's about UI/web, label it with "web".
207+
- If the user is asking about a question, label it with "question".
208+
- If it's related to tools, label it with "tools".
180209
- If it's about agent evaluation, then label it with "eval".
181210
- If it's about streaming/live, label it with "live".
182-
- If it's about model support(non-Gemini, like Litellm, Ollama, OpenAI models), label it with "models".
211+
- If it's about model support (non-Gemini, like Litellm, Ollama, OpenAI models), label it with "models".
183212
- If it's about tracing, label it with "tracing".
184-
- If it's agent orchestration, agent definition, label it with "core".
185-
- If it's about agent engine, label it with "agent engine".
213+
- If it's agent orchestration, agent definition, Runner behavior, planners, or performance, label it with "core".
214+
- Use "agent engine" only when the issue clearly references Vertex AI Agent Engine deployment artifacts (for example `.agent_engine_config.json`, `ae_ignore`, `agent_engine_id`, or Agent Engine sandbox errors).
186215
- If it's about Model Context Protocol (e.g. MCP tool, MCP toolset, MCP session management etc.), label it with both "mcp" and "tools".
187216
- If it's about A2A integrations or workflows, label it with "a2a".
188217
- If you can't find a appropriate labels for the issue, follow the previous instruction that starts with "IMPORTANT:".
@@ -194,6 +223,14 @@ def change_issue_type(issue_number: int, issue_type: str) -> dict[str, Any]:
194223
- If the issue is a feature request, change the issue type to "Feature".
195224
- Otherwise, **do not change the issue type**.
196225
226+
Response quality requirements:
227+
- Summarize the issue in your own words without leaving template
228+
placeholders (never output text like "[fill in later]").
229+
- Justify the chosen label with a short explanation referencing the issue
230+
details.
231+
- Mention the assigned owner when a label maps to one.
232+
- If no label is applied, clearly state why.
233+
197234
Present the followings in an easy to read format highlighting issue number and your label.
198235
- the issue summary in a few sentence
199236
- your label recommendation and justification

contributing/samples/gepa/adk_agent.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@
3131
from google.adk.agents import loop_agent
3232
from google.adk.events import event as event_lib
3333
from google.adk.models import google_llm
34+
from google.adk.planners import built_in_planner
3435
from google.adk.tools import base_tool
3536
from google.genai import types
37+
from retry import api as retry
3638

3739

3840
class EnvResponse(Protocol):
@@ -134,6 +136,11 @@ def _adk_agent(
134136
model=model or 'gemini-2.5-flash',
135137
retry_options=_default_retry_options(),
136138
),
139+
planner=built_in_planner.BuiltInPlanner(
140+
thinking_config=types.ThinkingConfig(
141+
thinking_budget=-1, include_thoughts=False
142+
)
143+
),
137144
instruction=instruction,
138145
tools=tools,
139146
generate_content_config=types.GenerateContentConfig(
@@ -173,11 +180,17 @@ async def _run_async_impl(self, ctx: Any) -> Any:
173180
return
174181

175182
if last_event.content and last_event.content.parts:
176-
next_message = last_event.content.parts[-1].text
183+
next_message = '\n\n'.join([p.text for p in last_event.content.parts])
177184
else:
178185
logging.warn('Empty content with event=%s', last_event)
179186
next_message = ''
180-
env_response = self.env.step(types.Part(text=next_message))
187+
env_response = retry.retry_call(
188+
self.env.step,
189+
fargs=(types.Part(text=next_message),),
190+
tries=3,
191+
delay=2,
192+
backoff=2,
193+
)
181194

182195
output_event = event_lib.Event(
183196
content=types.Content(

0 commit comments

Comments
 (0)