**Highlights:**
- **Callback Chaining:** Now supports a list of before and after callbacks, as in the non-live version. Callbacks are executed in order, stopping when one returns a response.
- **Unit Tests:** Added new unit tests for before and after callbacks, async and sync versions, callback chains and mixed callbacks.
- **Sample Agent:** Introduced a new example agent with multiple callbacks showing various behaviors: audit, security, validation, and enhancement. This provides practical usage examples.
PiperOrigin-RevId: 783884562
This change adds activity start and end signals to the LiveRequestQueue,
allowing clients to manually control the start and end of user input in
streaming sessions when automatic voice activity detection is disabled.
The LiveRequestQueue allows users to send messages to the model with the following semantics:
- `content`: sends turn-by-turn content.
- `blob`: sends a media blob for realtime streaming (e.g., audio).
- `activity_start`: indicates the beginning of an activity.
- `activity_end`: indicates the end of an activity.
- `close`: closes the connection.
GeminiLLMConnection has been updated to send the new activity signals to the backend.
This change is a necessary to support clients (e.g. voice assistants) that do not want to use automatic voice activity detection. In this case, the client will be responsible to send the `activity_start` signal when the user starts talking, and `activity_end` when the user finishes talking.
To test the change:
run_config = RunConfig(
realtime_input_config=types.RealtimeInputConfig(
automatic_activity_detection=types.AutomaticActivityDetection(
disabled=True,
),
)
)
import threading # Add this import
def thread_target():
# Define the async operations to run in the background.
async def background_task():
live_request_queue.send_activity_start()
# live_request_queue.send_content(
# content=types.Content(
# role='user',
# parts=[types.Part.from_text(text="hi, what's the time?")],
# )
# )
await asyncio.sleep(3)
live_request_queue.send_activity_end()
PiperOrigin-RevId: 783882447
1. credential service may be accessed by callbacks
2. plan to add load_credential and save_credential method in CallbackContext (see cl/782158513) given customer has requirement to access credential service themselves. (see https://github.com/google/adk-python/issues/1816)
It's backward compatible given CallbackContext is parent class of ToolContext
PiperOrigin-RevId: 783480378
This is to support model path like :
projects/265104255505/locations/us-central1/publishers/google/models/gemini-2.0-flash-001"
PiperOrigin-RevId: 783413351
This version of the EvalSetsManager is intended to support two main behaviors
1) The agent developer wants to bring in their own eval set file, which is usually the case with `adk eval` cli. Once their eval sets are uploaded into this version of the eval sets manager, the EvalSetManager could be handed over to the Eval system for running evals.
2) As a part of AgentEvaluator testing, we expect developers to supply Eval cases in json files. The in-memory version of the EvalSetsManager will help us run those test cases using LocalEvalService.
PiperOrigin-RevId: 783198788
When get session is being called on a session with more than 1 page of events (100+), the response of the subsequent listevents calls fails due to missing parsing logic. This change fixes the processing of the listevents responses.
PiperOrigin-RevId: 783166959
1) raise explicit error if the response event contains responses against multiple function call events
2) merge all function responses for the corresponding function call event
PiperOrigin-RevId: 782154577
According to a2a protocol task artifact is a different concept from adk artifact.
if a task is completed the final result should be in task artifact.
PiperOrigin-RevId: 782154265
This change:
- Introduces the LocalEvalService Class.
- Implements only the "perform_inference" method. Evaluate method will be implemented in the next CL.
- Adds required test coverage.
PiperOrigin-RevId: 781781954
This change integrates the plugin system with ADK. PluginManager is attached to the invocation context similar to session/artifact/memory.
It includes integrations with following ADK internal callbacks:
* App callbacks: Integrated in the BaseRunner class, in run_async and run_live
* On Message callbacks: Integrated in the BaseRunner class, triggers on run_async.
* Agent callbacks: Integrated in the BaseAgent class. Leveraging the existing *callback functions
* Model callbacks: Integrating in the base_llm_flow.
* Tool callbacks: Integrated in functions.py, wrapped around the code for agent tool_callbacks
Sample code to use plugins:
```python
# Add plugins to Runner
runner = Runner(
app_name="my-app",
agent=root_agent,
artifact_service=artifact_service,
session_service=session_service,
memory_service=memory_service,
plugins=[
MySamplePlugin(),
LoggingPlugin(),
],
)
```
PiperOrigin-RevId: 781746586
Plugin is a collection of callbacks (lifecycle hooks), including callbacks for Agent, Tools, Model and App. It helps developers to add customizations and change behaviors of their agent application easily
This is the first change that introduces only the base interfaces based on the doc.
plugins folder is generated with `create_symlink.sh plugins`
PiperOrigin-RevId: 781745044
Including basic fields in configs, the from_config() methods and the JSON schema. Other fields will be added in following PRs.
PiperOrigin-RevId: 781660569
Even though InMemoryMemoryService is intended only for testing and local development, we eliminate a potential source of bugs during prototyping by providing a thread-safe InMemoryMemoryService.
PiperOrigin-RevId: 781554006
- Allow run_async to break on partial events instead of raising ValueError
- Generate aggregated streaming content regardless of finish_reason
- Add error_code and error_message to final streaming responses if model response is interrupted.
PiperOrigin-RevId: 781377328
This commit includes a number of new tests for live streaming with function calls. These tests cover various scenarios:
- Single function calls
- Multiple function calls
- Parallel function calls
- Function calls with errors
- Synchronous function calls
- Simple streaming tools
- Video streaming tools
- Stopping a streaming tool
- Multiple streaming tools simultaneously
The tests use mock models and custom runners to simulate the interaction between the agent, model, and tools. They verify that function calls are correctly generated, executed, and that the expected data is returned.
PiperOrigin-RevId: 781318483
This would allow users to easily make a copy of the agents they built without having to add too much boilerplates. This promotes code reuse, modularity and testability of agents.
PiperOrigin-RevId: 781214379
This PR extends the existing Streaming tests to consider new configurations that have been added, including:
- `output_audio_transcription`
- `input_audio_transcription`
- `realtime_input_config`
- `enable_affective_dialog`
- `proactivity`
These configurations are tested individually and also combined, to cover all the possibilities, increasing the testing coverage and ensuring everything is working as expected.
In addition, the new configuration values are also validated to be sure they are properly initialized.
PiperOrigin-RevId: 780178334
This explains the high-level architecture and philosophy of the ADK project.
It can also be feed into LLMs for vibe-coding.
PiperOrigin-RevId: 780178125
fix: Use `inspect.signature()` instead of `typing.get_type_hints()` to find the LiveRequestQueue.
Motivation: `typing.get_type_hints()` may raise errors in complex scenarios where type annotation is not available.
Add live_bidi_streaming_tools_agent example to show how to use the live streaming feature.
PiperOrigin-RevId: 780160921
Adds a description for docstring and comments in the AGENTS.md and adds a section for Versioning that describes how ADK follows Semantic Versioning 2.0.0
PiperOrigin-RevId: 778667398
test: refine test_session_state in test_session_state to catch event leakage
fix: revert app name to my_app for test_session_state test
style: fix pyink style warnings
fix: add app_name to filter as per suggestion from rpedela-recurly
We add a new metric for evaluating safety of Agent's response to ADK Eval. We delegate the actual implementation to Vertex Gen AI Eval SDK, so using this metric will require GCP project.
As a part of this change, we created (refactored) a simple Facade for vertex gen ai eval sdk.
PiperOrigin-RevId: 778580406
The LLM occasionally includes an unexpected 'parameters' argument when calling tools, specifically observed with 'transfer_to_agent'. This change makes FunctionTool.run_async more robust by filtering arguments against the function signature before invocation.
This resolves issue #1637.
Update test_function_tool.py
fix typing
fix: add `from __future__ import annotations`
`grep -L` returns status 1 when there are modified files that don't have the `from __future__ import annotations` pattern. Previously if this happens, the entire GitHub action by default will stop and exit with status 1. Adding `|| true` will prevent this from happening and continue the workflow.
PiperOrigin-RevId: 778246018
Bug: When a model emits a stream of tokens, it sometimes emits a final chunk of whitespace or no content. The agent was trying to parse that content into JSON, causing a validation error.
Fix: If a model is expected to return JSON and the last streamed token is empty/whitespace, the agent will no longer try to parse it, and exit gracefully.
New unit tests confirm the scenario and the fix.
PiperOrigin-RevId: 777609415
This example include multi agents:
- Root agent.
- Sub agent for Rolling Dice.
- Sub agent for checking primes.
Added README.md to demonstrate how to use it.
PiperOrigin-RevId: 777599625
This change adds a new enum value which the agent builder can pass in the `BigQueryToolConfig` to allow limited writes to the `execute_sql` tool.
PiperOrigin-RevId: 776661744
Fixes https://github.com/google/adk-python/issues/1180
We are using `func.now()` to set the `onupdate` time for db, when SQLAlchemy generates the SQL to build the database, it actually translates `func.now()` into `NOW()` or `CURRENT_TIMESTAMP`. The value it returns depends on the database server settings. For example, if the global/default timezone for a db is set to be UTC, the update time will be set to be a UCT time; if the global time zone for a db is set to be a local time zone (e.g. America/Los_Angeles), the update time will be a local time.
Normally, the best practice is to set database server to use UTC. Applications will convert it into different time zones as needed.
For SQLite, there is no way to config the default timezone, it will just treat it as UTC. But because it is a naive datetime (with no timezone info), python will assume it is a local time and then covert it into a UTC, which is why we see the bug (e.g. we create a session at 2025-06-17 12:49:33 local time, but when we read the session, its last update time is 2025-06-17 19:49:33 local time).
The solution is converting the native datatime to be timezone aware before `.timestamp()`.
The change in this CL only affects SQLite database.
PiperOrigin-RevId: 776654443
Merge https://github.com/google/adk-python/pull/1679
Contributing doc says to do the following:
```sh
uv sync --extra test --extra eval
pytest ./tests/unittests
```
If you follow this the tests will fail:
```sh
tests/unittests/a2a/executor/test_task_result_aggregator.py:27: in <module>
from a2a.types import Message
E ModuleNotFoundError: No module named 'a2a'
```
This makes sense since the `a2a` package is not part of ADK's core dep, it is an extra:
https://github.com/google/adk-python/blob/e79651cd86ba3f0c998109f2140f1db2cab78708/pyproject.toml#L79-L83
Thus for a2a tests to pass we must include the extra in the sync command:
```sh
uv sync --extra test --extra eval --extra a2a
pytest ./tests/unittests
```
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/1679 from jackwotherspoon:main c1a536780409065db817088a8d5ed5979cca8d8f
PiperOrigin-RevId: 776617515
Additionally, few other small changes.
* Updated a test fixture to support the latest eval data schema. Somehow I missed doing that previously.
* Updated the `evaluation_generator.py` to use `run_async`, instead of `run`.
* Also, raise an informed error when dependencies required eval are not installed.
* Also, changed the behavior of AgentEvaluator.evaluate method to run all the evals, instead of failing at the first eval metric failure.
PiperOrigin-RevId: 775919127
a. fix function call long running id matching logic
b. fix error code conversion logic
c. add input required and auth required status conversion logic
d. add a2a Task/Message to ADK event converter
f. set task id and context id from input argument
PiperOrigin-RevId: 775860563
This change renames the sample agent based on the Google API based tools to reflect the larger purpose and avoid confusion with the built-in BigQuery tools. In addition, it also renames the root agent in the BigQuery sample agent to "bigquery_agent"
PiperOrigin-RevId: 775655226
Merge https://github.com/google/adk-python/pull/1451
## Description
Fixes https://github.com/google/adk-python/issues/1306 by using `async for` with `await self.llm_client.acompletion()` instead of synchronous `for` loop.
## Changes
- Updated test mocks to properly handle async streaming by creating an async generator
- Ensured proper parameter handling to avoid duplicate stream parameter
## Testing Plan
- All unit tests now pass with the async streaming implementation
- Verified with `pytest tests/unittests/models/test_litellm.py` that all streaming tests pass
- Manually tested with a sample agent using LiteLLM to confirm streaming works properly
# Test Evidence:
https://youtu.be/hSp3otI79DM
Let me know if you need anything else from me for this PR
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/1451 from avidelatm:fix/litellm-async-streaming d35b9dc90b2fd6fad44c3869de0fda2514e50055
PiperOrigin-RevId: 774835130
Merge https://github.com/google/adk-python/pull/1079
Fixes part of #356
Add usage attributes to span.
Note: Since the handling of GenAI event bodies in OpenTelemetry has not yet been determined, I have temporarily added only attributes related to usage.
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/1079 from soundTricker:feature/356-support-more-opentelemetry-semantics 99a9d0352b4bca165baa645440e39ce7199f072b
PiperOrigin-RevId: 774834279
This change accepts the `google.auth.credentials.Credentials` type for `BigQueryCredentialsConfig`, so any subclass of that, including `google.oauth2.credentials.Credentials` would work to integrate with BigQuery service. This opens up a whole range of possibilities, such as using service account credentials to deploy an agent using these tools.
PiperOrigin-RevId: 773190440
This change sets an explicit project id in the BigQuery client from the conversation context. Without this the client was trying to set a project from the environment's application default credentials and running into issues where application default credentials is not available.
PiperOrigin-RevId: 772695883
#non-breaking
The correct conversion from 25 degrees Celsius is 77 degrees Fahrenheit. The previous value of 41 was wrong.
PiperOrigin-RevId: 772528757
Context: we'd like to separate fetcher into exchanger and refresher later. This cl help to extract the common utility that will be used by both exchanger and refresher.
PiperOrigin-RevId: 772257995
set environment variable ADK_ALLOW_WIP_FEATURES=true can bypass it.
working_in_progress features are not working. ADK users are not supposed to set this environment variable.
PiperOrigin-RevId: 771333335
* modified list issues to only return unlabelled open issues
* added github workflow to run on schedule and issue open/reopen
* interactive/workflow modes
* readme document
PiperOrigin-RevId: 771152306
1. remove unnecessary cached session instance in mcp toolset
2. move session reinitialization logic from mcp tool and mcp toolset to mcp session manager
3. add lock for the code block of session creation to avoid race conditions
PiperOrigin-RevId: 770949529
1. let auth_handler.py to utilize the oauth2 credential fetcher to exchange token
2. restructure tool_auth_handler.py to support refresh token
PiperOrigin-RevId: 770901469
Merge https://github.com/google/adk-python/pull/981
issue: https://github.com/google/adk-python/issues/982
This pull request introduces a new configuration option, `realtime_input_config`, to the `RunConfig` class.
**Reason for this change:**
Currently, there is no direct way to configure real-time audio input behaviors, such as Voice Activity Detection (VAD), for live agents through the `RunConfig`. The Gemini API documentation (specifically [Configure automatic VAD](https://ai.google.dev/gemini-api/docs/live#configure-automatic-vad)) outlines parameters for VAD that users may want to customize.
This change enables users to pass these real-time input configurations, providing more granular control over the audio input for live agents.
**Changes made:**
- Added a new optional field `realtime_input_config: Optional[types.RealtimeInputConfig]` to the `RunConfig` class.
- The docstring for `realtime_input_config` has been added to explain its purpose.
**Example Usage (Conceptual):**
While the specific structure of `types.RealtimeInputConfig` would define the exact parameters, a user might configure it like this:
```python
# (Assuming types.RealtimeInputConfig and types.VadConfig are defined elsewhere)
# import your_project.types as types
run_config = RunConfig(
# ... other configurations ...
realtime_input_config=types.RealtimeInputConfig(
automatic_activity_detection =types.AutomaticActivityDetection(
# VAD specific parameters like sensitivity, endpoint_duration_millis etc.
# based on https://ai.google.dev/gemini-api/docs/live#configure-automatic-vad
)
# Potentially other real-time input settings could be added here in the future
)
)
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/981 from ammmr:patch-add-realtime-input-config b2e17fbf5742d264029ad49bf632422b5c5b1e0a
PiperOrigin-RevId: 770797640
This change introduces unit tests in which the behavior of the tool is asserted for various query types in various write modes through a mocked BigQuery client.
PiperOrigin-RevId: 770653117
This allows to protect against any write operations (e.g. update or delete a table), useful for some agents that must only be used in a read-only mode, while the user may have write permissions.
PiperOrigin-RevId: 769803741
Merge https://github.com/google/adk-python/pull/1211
### Description
When using the Google.GenAI backend (GEMINI_API), file uploads fail if the `file_data` or `inline_data` parts of the request contain a `display_name`. The Gemini API (non-Vertex) does not support this attribute, causing a `ValueError`.
This commit updates the `_preprocess_request` method in the `Gemini` class to sanitize the request. It now iterates through all content parts and sets `display_name` to `None` if the determined backend is `GEMINI_API`. This ensures compatibility, similar to the existing handling of the `labels` attribute.
Fixes#1182
### Testing Plan
**1. Unit Tests**
- Added a new parameterized test `test_preprocess_request_handles_backend_specific_fields` to `tests/unittests/models/test_google_llm.py`.
- This test verifies:
- When the backend is `GEMINI_API`, `display_name` in `file_data` and `inline_data` is correctly set to `None`.
- When the backend is `VERTEX_AI`, `display_name` remains unchanged.
- All unit tests passed successfully.
```shell
pytest ./tests/unittests/models/test_google_llm.py ░▒▓ ✔ adk-python base system 21:14:02
============================================================================================ test session starts ============================================================================================
platform darwin -- Python 3.12.10, pytest-8.3.5, pluggy-1.6.0
rootdir: /Users/leo/PycharmProjects/adk-python
configfile: pyproject.toml
plugins: anyio-4.9.0, langsmith-0.3.42, asyncio-0.26.0, mock-3.14.0, xdist-3.6.1
asyncio: mode=Mode.AUTO, asyncio_default_fixture_loop_scope=function, asyncio_default_test_loop_scope=function
collected 20 items
tests/unittests/models/test_google_llm.py .................... [100%]
============================================================================================ 20 passed in 3.19s =============================================================================================
```
**2. Manual End-to-End (E2E) Test**
I manually verified the fix using `adk web`. The test was configured to use a **Google AI Studio API key**, which is the scenario where the bug occurs.
- **Before the fix:**
When uploading a file, the request failed with the error: `{"error": "display_name parameter is not supported in Gemini API."}`. This confirms the bug.
<img width="968" alt="Screenshot 2025-06-06 at 21 22 35" src="https://github.com/user-attachments/assets/f1ab2db2-d5ec-40fc-a182-9932562b21e1" />
- **After the fix:**
With the patch applied, the same file upload was processed successfully. The agent correctly analyzed the file and responded without errors.
<img width="973" alt="Screenshot 2025-06-06 at 21 23 24" src="https://github.com/user-attachments/assets/e03228f6-0b7d-4bf9-955a-ac24efb4fb72" />
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/1211 from ystory:fix/display-name d3efebe74aca635a7a255063e64f07cc44016f05
PiperOrigin-RevId: 769278445
Merge https://github.com/google/adk-python/pull/1143
## Summary
Added a DeepWiki badge to the README.md file to provide users with easy access to interactive documentation that stays automatically updated.
## Changes Made
- Added DeepWiki badge to the existing badge section in README.md
- Badge links to: https://deepwiki.com/google/adk-python
## What is DeepWiki?
DeepWiki provides up-to-date documentation you can talk to, for every repository in the world. By adding this badge to our repository, we help users find and interact with documentation more easily. Users can ask questions about the codebase and get contextual answers based on the latest repository content.
The documentation is automatically updated weekly, ensuring that users always have access to the most current information about the ADK codebase, including new features, API changes, and code examples that reflect the latest development progress.
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/1143 from takashikik:add-deepwiki-badge d9b8bc676c9fe2e94c7b3f0ae49814452e45b5f9
PiperOrigin-RevId: 769273276
Merge https://github.com/google/adk-python/pull/1250
The `Args:` section in the docstring of the `cli_deploy_agent_engine` function was causing formatting issues in the help output, with line breaks not being rendered correctly.
This commit removes the redundant `Args:` section from the docstring. The help text for options is already comprehensively covered by the `help` attributes in the `@click.option` decorators, and `click` automatically lists the command's arguments.
This change ensures that the help output for
`adk deploy agent_engine --help` is clean, readable, and correctly formatted, relying on `click`'s standard help generation mechanisms.
After the fix:
(adk_test234) (base) hangfeilin@Hangfeis-MBP adk-python % adk deploy agent_engine --help
Usage: adk deploy agent_engine [OPTIONS] AGENT
Deploys an agent to Agent Engine.
Args: agent (str): Required. The path to the agent to be deloyed.
Example:
adk deploy agent_engine --project=[project] --region=[region] --staging_bucket=[staging_bucket] path/to/my_agent
Options:
--project TEXT Required. Google Cloud project to deploy the agent.
--region TEXT Required. Google Cloud region to deploy the agent.
--staging_bucket TEXT Required. GCS bucket for staging the deployment artifacts.
--trace_to_cloud Optional. Whether to enable Cloud Trace for Agent Engine.
--adk_app TEXT Optional. Python file for defining the ADK application (default: a file named agent_engine_app.py)
--temp_folder TEXT Optional. Temp folder for the generated Agent Engine source files. If the folder already exists, its
contents will be removed. (default: a timestamped folder in the system temp directory).
--env_file TEXT Optional. The filepath to the `.env` file for environment variables. (default: the `.env` file in
the `agent` directory, if any.)
--requirements_file TEXT Optional. The filepath to the `requirements.txt` file to use. (default: the `requirements.txt` file
in the `agent` directory, if any.)
--help Show this message and exit.
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/1250 from google:fix-1191-agent-engine-help d2d0e89ed1af6ace11abe4e3bed89335dbcf9be5
PiperOrigin-RevId: 769182740
Partial fix for https://github.com/google/adk-python/issues/1170
TODOs:
- UI rendering still has issue to match the event with the correct agent.
- graph building needs further fix when there is a workflow agent in the tree.
PiperOrigin-RevId: 767711701
Even though litellm type definitions and openai API specifies content as list of dictionaries (with type and relevant attributes potentially to allow multimodal inputs/outputs in addition to text), ollama has been demonstrating marshal errors. As a workaround this change simplifies the content as string when there is no more than one content part.
Fixes#642, #928, #376
PiperOrigin-RevId: 766890141
Three fixes:
1. used "fetch-depth: 2" to ensure that files in all commits in the PR are checked
2. triggered by all changed ".py" files in the repo
3. merged the "check modified files" and "run Pyink" steps because $GITHUB_ENV cannot handle multi-line env vars without special treatment
PiperOrigin-RevId: 766793736
Merge https://github.com/google/adk-python/pull/482
Added new agent visualzation that accounts for the internal architecture of the Workflow Agents and shows them inside of a cluster with a label as the name of the Workflow Agent. The sub agents are conencted as per the Workflow Agents' working and architecture
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/482 from BhadrakshB:new_agent_visualization 994a9e28039b62d9d1d99fc73374a3fa97807aca
PiperOrigin-RevId: 766345311
This is in response to the litellm v1.71.2 + ollama v0.9.0 sending function call chunks with 0 indices across multiple calls and lacking call ids.
Solutions introduced:
1. increment fallback index when accumulated arg becomes json parsable.
2. tolerate finish reason == stop when tool calls are present
3. fallback to index when tool call id is None
Fixes https://github.com/google/adk-python/issues/294
PiperOrigin-RevId: 766258344
--
618add7d297cbe26f26f45aa01b39c3d086a13e8 by Hangfei Lin <hangfei@google.com>:
doc: Create readme.md
--
5ba85d653cac11b2858ee5d53d175c1c16d933ec by Hangfei Lin <hangfei@google.com>:
doc: Update CONTRIBUTING.md
--
02606a34babba6a660886a073332979fb2b12fc3 by Wei Sun (Jack) <weisun@google.com>:
Rename readme.md to README.md
--
08a38bd5727bf554f6fb043c73623d367e9b138e by Hangfei Lin <hangfei@google.com>:
Update README.md
--
92e7ee6d498dfce35f1c6df44c1ec0f86ae5d513 by Wei Sun (Jack) <weisun@google.com>:
Update README.md
--
69c3a44e6946b3541746ded43dae8a70d47d538f by Wei Sun (Jack) <weisun@google.com>:
Update README.md
--
9de40783990ae9935463b37225c186e91c93025d by Wei Sun (Jack) <weisun@google.com>:
Update README.md
--
0f8a011ddc5b22ba8361ce7b34413a34cfcf15ba by Wei Sun (Jack) <weisun@google.com>:
Update README.md
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/1058 from google:hangfei-patch-2 81eacedef69468fa554312a187880ccf4c30c559
PiperOrigin-RevId: 766234622
--
8772b3de0b2fd04f246cc90c4c8032f9dc8cfed9 by Jaeyeon Kim <anencore94@gmail.com>:
fix: update unit test code for test_connection
- Fix for Unit Test Failures
--
8e0b45c2a64994bfda6401847e485fdd9edc8306 by Jaeyeon Kim <anencore94@gmail.com>:
fix useless changes
--
54efa004fa0fc9bcf78b49061221994650e162bc by Jaeyeon Kim <anencore94@gmail.com>:
fix conflict resolve issue
--
003ed4418c73b74bfba5ff055a364b62ddc18fa7 by Wei Sun (Jack) <weisun@google.com>:
Autoformat test_connections_client.py
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/578 from anencore94:bugfix/failed_unittests ba0e1d33ad905b0b046023b685c70f4ef05e4efa
PiperOrigin-RevId: 766221165
Copybara import of the project:
--
95292471f6dba29b55a17239670cdc6cc14619b5 by Yongsul Kim <ystory84@gmail.com>:
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/936 from ystory:fix/artifact-sample-save 7b0babc53266afadb8421ccafa0f3de092eeeae5
PiperOrigin-RevId: 766220649
Copybara import of the project:
--
ffd6184d7e402b0787b0fa37fc09cd519adcc7f3 by Calvin Giles <calvin.giles@trademe.co.nz>:
fix: Call all tools in parallel calls during partial authentication
--
c71782a582ba825dbe2246cdb5be3f273ca90dca by seanzhou1023 <seanzhou1023@gmail.com>:
Update auth_preprocessor.py
--
843af6b1bc0bc6291cb9cb23acf11840098ba6dd by seanzhou1023 <seanzhou1023@gmail.com>:
Update test_functions_request_euc.py
--
955e3fa852420ecbf196583caa3cf86b7b80ab56 by seanzhou1023 <seanzhou1023@gmail.com>:
Update test_functions_request_euc.py
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/853 from calvingiles:fix-parallel-auth-tool-calls f44671e37b9fe44a25c9b1c0c25a26fc634b011c
PiperOrigin-RevId: 765639904
Copybara import of the project:
--
6596c477c7138df79d77e67181fd5979fd1a72e3 by Garrett Bischof <bischofgarrett@gmail.com>:
docs: change eval_dataset to eval_dataset_file_path_or_dir
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/397 from gwbischof:eval_dataset e8a0d0911c21ac76dab83e8520aaebc38d24adf5
PiperOrigin-RevId: 765638775
Copybara import of the project:
--
8540f266ebc0210749834d73ee61f01783ae3526 by Edward Funnekotter (aider) <efunneko@gmail.com>:
fix: ensure function description is copied when ignoring parameters
--
b9fb5916593fe552a7b02bff379ebf2f3b3cf69f by Edward Funnekotter <efunneko@gmail.com>:
Fix annoying comments
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/552 from efunneko:efunneko/122/copy_doc_string_for_tool d9bc24343d9f32376b5647c4309d6cb172833534
PiperOrigin-RevId: 765470363
Right now the agent builder has to specify the bigquery scope explicitly for bigquery tools, which is somewhat unnecessary. With this change the user does not have to specify scopes, although they would still have the ability to overrides scopes if necessary.
PiperOrigin-RevId: 765354010
Copybara import of the project:
--
db506da1c38f0a27df51b0e672ef78d62077af78 by Cristopher Hugo Olivares Del Real <crissins041196@gmail.com>:
fix: typos in documentation
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/840 from crissins:main 76a5e9bfbe73e7744b144010741a4e80425282a9
PiperOrigin-RevId: 765347788
--
8baeb0b569eaedc638b20e46894178a3b878dbd6 by Amulya Bhatia <amulya.bhatia@t-online.de>:
test: unit tests for built_in_code_executor and unsafe_code_executor
--
cfac73b9271557ead96eb5fb419e05d88c6e8cd4 by Amulya Bhatia <amulya.bhatia@t-online.de>:
test: unit tests for built_in_code_executor and unsafe_code_executor
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/971 from iamulya:code-executor-tests 55290e27b5e58ef3835905aec88639e936318d01
PiperOrigin-RevId: 764976316
--
d9b0a6f822f773a61bcc507d252ca46da660b70b by Eugen-Bleck <eugenbleck@gmail.com>:
fix: match arg case in errors
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/724 from bl3ck:fix/preserve-arg-case-in-errors 3ac43ef2090f5e4b4158ea97cbcf16399aabe2e5
PiperOrigin-RevId: 764953570
Copybara import of the project:
--
e246af5965dfd4d032e0a3ce29513f3e2e874f73 by Alankrit Verma <alankrit386@gmail.com>:
tools: allow transfer_to_agent to accept extra kwargs
transfer_to_agent now takes **kwargs to swallow unexpected keyword args
Added integration tests covering single and multiple extra kwargs.
Fixes#458.
--
55fea786a9b7eb19b830dc67d7a2e37fe7937608 by Alankrit Verma <alankrit386@gmail.com>:
fix(tests): correct indentation in test_transfer.py for better readability
--
0c04f2d777bd4f3d8951dadd5e4e105530bd6281 by Alankrit Verma <alankrit386@gmail.com>:
fix(transfer_to_agent): restore strict two-arg signature and clarify usage
Revert the earlier **kwargs change so transfer_to_agent again only accepts
(agent_name, tool_context). Improve the doc-string to make clear that no
other parameters should be passed to this tool.
Fixes#458
--
d37448dd0ef9fc6199ca0e42b211b3cd9c886eb0 by Alankrit Verma <alankrit386@gmail.com>:
fix(transfer_to_agent): update docstring for clarity and accuracy
--
ea827af78fc2c9abdf030ad50e24bba8c996df75 by Wei Sun (Jack) <Jacksunwei@gmail.com>:
Update transfer_to_agent_tool docstring for better prompt
--
a144069a67b2e5652ffd50224b1ce68ddea14783 by Wei Sun (Jack) <Jacksunwei@gmail.com>:
Update transfer_to_agent_tool.py
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/466 from AlankritVerma01:tools/transfer-accept-kwargs 686d436457e3141d128c6e81452fddc546a14a7e
PiperOrigin-RevId: 764940463
--
cd9130aca29b5d07b069cfc4a9aa022455e005e9 by Yongsul Kim <ystory84@gmail.com>:
docs: Fix broken link to A2A example
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/1021 from ystory:patch-1 5d827f7834ca33120bd2a87d63e29ac5b93eb7c9
PiperOrigin-RevId: 764937930
--
cef3ca1ed3493eebaeab3e03bdf5e56b35c0b8ef by Lucas Nobre <lucaas.sn@gmail.com>:
feat: Add index tracking to handle parallel tool call using litellm
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/759 from lucasnobre212:fix/issue_484 65e22934bf839f9ea03963b9ec6c23fdce03f59f
PiperOrigin-RevId: 764902433
Copybara import of the project:
--
c62a0a6da4317497b991f83d4d8561bdbe7292aa by Jacky W <wjx_colstu@hotmail.com>:
--
59c0606ac08ddb45ce469a4d1e1c6e515ef94df4 by Jacky W <wjx_colstu@hotmail.com>:
fix: add cache_ok option to remove sa warning.
--
1922599075af935a63544762765d6f0e6224907a by Jacky W <wjx_colstu@hotmail.com>:
chore: format code.
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/1001 from Colstuwjx:fix/issue-480-precise-mysql-timestamp 50e764fb9646e326ad0204ff7adb2a5b65bf875a
PiperOrigin-RevId: 764853016
Previously if you add `from __future__ import annotations` in your code, the parsing code would fail because the type hints will be a string instead of the class itself (e.g. input: 'str' instead of input: str).
Also added "_" to the util file name.
PiperOrigin-RevId: 764817339
Copybara import of the project:
--
f56fd74efecc2cf6fbe6db70e91dfa7780fb9c68 by Mohammad <mohammaddevgermany@gmail.com>:
build(package): add py.typed and include it in flit config
This adds a py.typed marker file to the google.adk package and updates
the Flit configuration in pyproject.toml to include it in the distribution.
This ensures the package is PEP 561 compliant and allows static type
checkers (like mypy and pyright) to recognize that the package supports type hints.
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/913 from mohamadghaffari:add-py-typed f56fd74efecc2cf6fbe6db70e91dfa7780fb9c68
PiperOrigin-RevId: 764603119
Copybara import of the project:
--
79962881ca1c17eb6d7bd9dcf31a44df93c9badd by Almas Akchabayev <almas.akchabayev@gmail.com>:
fix: separate thinking from text parts in streaming mode
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/777 from almeynman:separate-thinking-and-text-parts-in-stream-mode b63dcc7fd0fc3973888dcbb9d4cc7e7e0a66e7f7
PiperOrigin-RevId: 764561932
When the user id contains special characters (i.e. an email), we have added in extra url parsing to address those characters. We have also added an if statement to use the correct url when there is no user_id supplied.
Copybara import of the project:
--
ef8499001afaea40bd037c4e9946b883e23a5854 by Danny Park <dpark@calicolabs.com>:
--
773cd2b50d15b9b056b47b6155df492b0ca8034c by Danny Park <dpark@calicolabs.com>:
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/996 from dpark27:fix/list_vertex_ai_sessions d351d7f6017c03165129adc7d0212f21d1340d88
PiperOrigin-RevId: 764522026
Copybara import of the project:
--
824b4379d59a375191f8ce10997efd4021d5d0b3 by Andres Videla <andres.videla@trademe.co.nz>:
Adding regex for claude-4 models to anthropic_llm and updating tests
--
8fa2a2df1931026dc803eee0e9b60e82e90c9efa by Wei Sun (Jack) <Jacksunwei@gmail.com>:
Adds trailing comma.
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/934 from avidelatm:feature/add-support-for-claude-4-models-to-anthropic_llm 8d10bacdbec952ec9832180ac6c1d220916641da
PiperOrigin-RevId: 764396694
--
50b09bbe9735c889a9c815eddcee6715ebe848da by Yuan Chai <350365422@qq.com>:
fix: improve json serialization by allowing non-ascii characters
--
c66977ae6ec4edc71a2d633eb09918eb2a226461 by Yuan Chai <350365422@qq.com>:
fix: serialize function call arguments to JSON string
Previously accepted JSON objects directly, which was less robust. Now serialize arguments to JSON strings using `_safe_json_serialize`, ensuring stability and handling non-ASCII characters correctly.
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/605 from nauyiahc:fix_non_ascii_char a52513c5747296b717acee989684324e1b072d34
PiperOrigin-RevId: 764396496
Copybara import of the project:
--
bbd21e72e46227d5bbcaef6601f4a81724e7829f by Sanchit Rk <sanchitrrk@gmail.com>:
Fix: add missing kwargs to db session service
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/946 from sanchitrk:fix/missing-kwargs-db-session-service ebb699b04d8420ad14244cf3d43a2982b01d6b7f
PiperOrigin-RevId: 764392251
Copybara import of the project:
--
a6e3a220a507a27523e427e88a803f4fec40db9c by Alankrit Verma <alankrit386@gmail.com>:
test(base_llm_flow): add test for infinite loop on truncated responses
--
b5f2245788b8ed51189d1ad057372989452f070d by Alankrit Verma <alankrit386@gmail.com>:
feat(base_llm_flow): break run_async loop on partial/truncated events
--
cbbae4c468a4de3b5a737aef07cb4615f8418c38 by Wei Sun (Jack) <Jacksunwei@gmail.com>:
Raise ValueError if the last event is partial.
This is invalid state for llm flow.
--
6eebae0bc27c664eee4743ff7278ae5803415c9f by Wei Sun (Jack) <Jacksunwei@gmail.com>:
Delete tests/unittests/flows/llm_flows/test_base_llm_flow_truncation.py
--
e08b0ab19ca6eb88eb84f044bf72e815b2cf317c by Wei Sun (Jack) <Jacksunwei@gmail.com>:
format base_llm_flow.py
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/659 from AlankritVerma01:fix/522-base-llm-flow-truncation e08b0ab19ca6eb88eb84f044bf72e815b2cf317c
PiperOrigin-RevId: 764380150
Structures supported:
a) agents_dir/agent_name.py (with root_agent or agent.root_agent in it)
b) agents_dir/agent_name_folder/__init__.py (with root_agent or agent.root_agent in the package)
c) agents_dir/agent_name_folder/agent.py (where agent.py has root_agent)
PiperOrigin-RevId: 763943716
This was introduced to work around google-auth kills all logs via `google` root logging namespace. Given we're now using `google_adk` as root logging namesapce, we don't need additional Stream log handler now.
PiperOrigin-RevId: 763924531
--
b781880d9bfb9786bd5e50314eaedc441fc2a93e by Stephen Smith <stephen.smith@newfront.com>:
Telemetry unit test for non-serializable data.
--
179da9db997bb3f992e126c9c64193ff7df67b3d by Stephen Smith <stephen.smith@newfront.com>:
When converting the llm_request to JSON, skip non-serializable data.
--
5dc68f4f5a6d12b753fdb81d1449716d13490afb by Stephen Smith <stephen.smith@newfront.com>:
Update _create_invocation_context() return type to InvocationContext.
--
23a33f754409fcd2a7641098d68cef7e4f1c72c6 by Stephen Smith <stephen.smith@newfront.com>:
Oops, remove unnecessary import.
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/879 from stephensmithnewfront:main f71e195a9ed157e4c0b3abfa74ae078b0c1a920a
PiperOrigin-RevId: 763922003
Copybara import of the project:
--
d01a8fd5f079bc4fca9e4b71796dbe65312ce9ff by Leo Yongsul Kim <ystory84@gmail.com>:
fix(DatabaseSessionService): Align event filtering and ordering logic
This commit addresses inconsistencies in how DatabaseSessionService
handles config.after_timestamp and config.num_recent_events
parameters, aligning its behavior with InMemorySessionService and
VertexAiSessionService.
Key changes:
- Made after_timestamp filtering inclusive
- Corrected num_recent_events behavior to fetch the N most recent events
- Refined timezone handling for after_timestamp
- Updated the unit test test_get_session_with_config to includeSessionServiceType.DATABASE, allowing verification of these fixes.
Fixes#911
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/915 from ystory:fix/database-session-timestamp-recency 5cc8cf5f5a5c0cb3e87f6ab178a5725d3f696c88
PiperOrigin-RevId: 763874840
--
73826d258b136f92a8da8171f7dc14d5f07de8dd by Calvin Giles <calvin.giles@trademe.co.nz>:
fix: Enable InMemoryRunner to be used in async tests
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/868 from calvingiles:enable-test-runner-in-async fb9033ed6f350a3114859715cae51798f864ecf6
PiperOrigin-RevId: 763233472
--
76f579c8f75e28c79e322dc60c9dca56ac96d0fa by Hangfei Lin <hangfei@google.com>:
doc: Update README.md
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/901 from google:hangfei-patch-3 6c5e264c8134e8eb164114992f3d8f2f2efe83fc
PiperOrigin-RevId: 762603928
--
aa92081193ccf4710e5aefb93c715791eab2c2ef by Stephen Smith <stephen.smith@newfront.com>:
docs: Fix typos in issue templates.
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/880 from stephensmithnewfront:stephensmithnewfront/address-typos-in-issue-templates-pr 65b7f85e26fca76b3e076ef0b826189353e8ab13
PiperOrigin-RevId: 762259304
--
004eb36c16b042ba2d8be0cca39b739c0c8ca6c1 by sudu <teric@outlook.com>:
Update tools.yaml
When search hotels with some LLM, the date format shows as bellow
```
**Check-in Date:** April 23, 2024
```
So i update the SQL in tools.yaml to be compatible with following instruction:
```sql
update checkin date to 'April 24,2024' and checkout date to 'April 26,2024' of Best Western Bern
```
--
1300688ee1407212658d57712c1ad6ee61b052fe by qidu <qidu@outlook.com>:
Fix the tools of `ToolboxToolset` initialization bugs for
`samples/toolbox_agent`
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/794 from qidu:main 5b3199da564efdd07915e24e75659055a17dad82
PiperOrigin-RevId: 762259287
--
cd8c580cbd4a2dc1c49c690ea81c4111860aa52c by Hangfei Lin <hangfei@google.com>:
doc: Update README.md
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/842 from google:hangfei-patch-2 aa9842a43d8c464a8999beb2f6f5d491aa63ef6c
PiperOrigin-RevId: 761722188
This is useful for injecting artifacts and session state variable into instruction template typically in instruction providers.
PiperOrigin-RevId: 761595473
Copybara import of the project:
--
9e51865a6dd4de4d20088e8a7ac9f3a75501aa6b by Amulya Bhatia <amulya.bhatia@t-online.de>:
test: unit tests for code_executor_context.py
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/780 from iamulya:test-code-executor-context 907b1712e43b8ce90cd8786780bef863adfcc167
PiperOrigin-RevId: 761294975
The default version for Cloud Run deployment is changed to the version in the dev environment instead of the latest version.
PiperOrigin-RevId: 759767654
Copybara import of the project:
--
9cefcdde97685bc6966a13019bfb80cc232a399b by Jack Wotherspoon <jackwoth@google.com>:
chore: delete toolbox_tool.py
--
b2607eb0397e72b6b616ac592920f74d42a8ee5d by jackwotherspoon <jackwoth@google.com>:
feat: expose toolbox
--
a4a0859997af9a68e240f78ff351f0fded6a52e2 by Jack Wotherspoon <jackwoth@google.com>:
chore: update formatting
--
070dc93cdc289a5ee5935bd5995d3005bf8396a0 by jackwotherspoon <jackwoth@google.com>:
chore: add base toolbox tests
--
ab84a0f49eccc9b993317b3ffe2b5b6cad278d70 by jackwotherspoon <jackwoth@google.com>:
chore: remove ToolboxTool
--
87f4f909acc294468bcb3053e300f4df252bdb27 by Jack Wotherspoon <jackwoth@google.com>:
chore: update formatting
--
ddc1a11c0ce45fe34e5f2dd43c808d88a7d6af0b by Jack Wotherspoon <jackwoth@google.com>:
chore: Update pyproject.toml
--
aee173d8df40ffefe535b266e1bd6528c9aeb1b9 by Jack Wotherspoon <jackwoth@google.com>:
chore: Update pyproject.toml
--
22fc95922b500ddb0ec4901dccbe2fbfcc53b35f by Jack Wotherspoon <jackwoth@google.com>:
chore: Update __init__.py
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/763 from jackwotherspoon:expose-toolbox 3cb629a9d0d18aaeeeed59fb0d0d1e1b225b7437
PiperOrigin-RevId: 759744557
--
aa863ca851d4c689fbdb431d91189d5ebbc59932 by Jack Wotherspoon <jackwoth@google.com>:
chore: fix variable name in test
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/769 from jackwotherspoon:test-fix aa863ca851d4c689fbdb431d91189d5ebbc59932
PiperOrigin-RevId: 759731577
When the user provides instruction provider, we assume that they will inject the session state parameters if needed. This assumption allows users to return code snippets in the instruction provider without any template replacement.
PiperOrigin-RevId: 759705471
--
636685818a512e9de30d5119f0244261cf16af27 by Adrian Cole <64215+codefromthecrypt@users.noreply.github.com>:
fix: corrects typo in bigquery sample
Noticed while reading that google was spelled wrong.
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/709 from codefromthecrypt:patch-1 b30e819979f81962a2e44922bfd2dadd539fe3ea
PiperOrigin-RevId: 759641065
Copybara import of the project:
--
cec6f5044307e3ecdd20a513e0d8202b0854ff4c by ZhiNing <574775237@qq.com>:
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/705 from czn574775237:fix/issue-655 c15f116d4bc0328e8a90a437958042ef1b087c14
PiperOrigin-RevId: 759381068
Also included a token_usage sample that showcases the token usage of subagents with different models under a parent agent.
PiperOrigin-RevId: 759347015
Copybara import of the project:
--
dcfb9ff720562802f9ce15c90a71b4cd40f77280 by Eugen-Bleck <eugenbleck@gmail.com>:
fix: Display full help text for adk create CLI command when arguments are missing
--
f2eea8d1e5947b1631ac2de3824d8bf0cf833cbc by Eugen-Bleck <eugenbleck@gmail.com>:
fix: Display full help text for adk run and eval CLI command when arguments are missing
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/443 from bl3ck:fix/cli-help-display c2bca420b00aa3391ab8cfb6baedc9ea0dbfb7e1
PiperOrigin-RevId: 758498242
Add a `task_completed` function to the agent so when a model finished the task, it can send a signal and the program knows it can go to next agent.
This cl include:
* Implements the `_run_live_impl` in `sequential_agent` so it can handle live case.
* Add an example for sequential agent.
* Improve error message for unimplemented _run_live_impl in other agents.
Note:
1. Compared to non-live case, live agents process a continuous streams of audio
or video, so it doesn't have a native way to tell if it's finished and should pass
to next agent or not. So we introduce a task_compelted() function so the
model can call this function to signal that it's finished the task and we
can move on to next agent.
2. live agents doesn't seems to be very useful or natural in parallel or loop agents so we don't implement it for now. If there is user demand, we can implement it easily using similar approach.
PiperOrigin-RevId: 758315430
The old implementation:
1. We only started transcription at the beginning of agent transferring.
2. The transcription service we used is not as good / fast as the model/native transcription.
In the current implementation, the live agent will rely on the llm's transcription, instead of our transcription when llm support audio transcription in the input. And in that case, the live agent won't use our own audio transcriber. This reduces the latency from 5secs to 2 secs during agent transferring. It also improves the transcription quality.
When the llm doesn't support audio transcription, we still use our audio transcriber to transcribe audio input.
PiperOrigin-RevId: 758296647
Details:
- Add a in-memory SpanExporter to capture all trace information.
- Add /debug/trace/session/{session_id} endpoint to retrieve traces from the in-memory exporter.
- Add Session ID in Telemetry spans.
PiperOrigin-RevId: 757984565
--
d481e0604a79470e2c1308827b3ecb78bfb5327e by Alan B <alan@nerds.ai>:
feat: 🚧 catch user transcription
--
bba436bb76d1d2f9d5ba969fce38ff8b8a443254 by Alan B <alan@nerds.ai>:
feat: ✨ send user transcription event as llm_response
--
ad2abf540c60895b79c50f9051a6289ce394b98d by Alan B <death1027@outlook.com>:
style: 💄 update lint problems
--
744703c06716300c0f9f41633d3bafdf4cb180a1 by Hangfei Lin <hangfeilin@gmail.com>:
fix: set right order for input transcription
--
31a5d42d6155b0e5caad0c73c8df43255322016f by Hangfei Lin <hangfeilin@gmail.com>:
remove print
--
59e5d9c72060f97d124883150989315401a4c1b5 by Hangfei Lin <hangfeilin@gmail.com>:
remove api version
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/590 from BloodBoy21:feat/api-version-vertex 1ed855249cae398b40691b91c6e468bccec07a3a
PiperOrigin-RevId: 757840099
--
84abc07d2342e88e601949faa67a3014c0f491e8 by mukundjha-mj <mukundjha204@gmail.com>:
Fix spelling mistakes, reorder sections, and improve readability in pyproject.toml
--
122c19d4be0fad394fbd02720734aa4625877637 by mukundjha-mj <mukundjha204@gmail.com>:
fix(pyproject): correct spelling and reorder config sections for clarity
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/669 from mukundjha-mj:fix/typos-pyproject 122c19d4be0fad394fbd02720734aa4625877637
PiperOrigin-RevId: 757318920
Copybara import of the project:
--
ade1d98e030a966183f56cb5c9c1b04cf51f5337 by Thiago Neves <thiagohneves@gmail.com>:
fix(tests): use mock GCS client in artifact service tests to avoid real credentials
--
becd2925feebf60196129b029a0ab8d490f7b19e by Thiago Neves <thiagohneves@gmail.com>:
test(agents): add unit tests for live_request_queue, readonly_context, and run_config
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/641 from thiagoneves:feature/increase-test-coverage 0f7a9fc55d97902e190a394f099324fbeb1541af
PiperOrigin-RevId: 756798390
Copybara import of the project:
--
f60707a22905f30040808b41b7e3510a47a80fc6 by K <51281148+K-dash@users.noreply.github.com>:
test(cli): Add unit tests for CLI functionality
This commit introduces unit tests for the following CLI-related components:
- cli_deploy.py: Tests for the cloud deployment feature.
- cli_create.py: Tests for the agent creation feature.
- cli.py: Tests for the main CLI execution logic.
- cli_tools_click.py: Tests for the Click-based CLI tools.
--
7be2159a475d0785619fea5e40c70e6461a7f4e1 by K <51281148+K-dash@users.noreply.github.com>:
fix test_cli_eval_success_path
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/577 from K-dash:test/add-unit-tests-for-cli 69f12d3a27d9c50a46ef269075e050f498dee67a
PiperOrigin-RevId: 756602765
(before/after) tool callbacks are invoked throughout the provided chain until one callback does not return None. Callbacks can be async and sync.
PiperOrigin-RevId: 756526507
--
0723b0915550a0af9d1eb2952ee193238eee8178 by Thiago Neves <thiagohneves@gmail.com>:
fix(tests): use mock GCS client in artifact service tests to avoid real credentials
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/601 from thiagoneves:fix/mock-gcs-client-in-tests e7d16719b9c3116b652988d2ed1b1f8893686f3e
PiperOrigin-RevId: 756381115
Copybara import of the project:
--
a4a998d5418af47a4f263823810e8ab85a9ae4d6 by 魏超 <nneverwei@gmail.com>:
fix(cli): Disable auto-reload feature on Windows system
Fixed the issue caused by the auto-reload feature when running the CLI tool on Windows system. By detecting the operating system type, the auto-reload is disabled on Windows system to avoid potential errors: When mcp is asynchronously loaded, it will enter the _make_subprocess_transport NotImplementedError logic due to uvicorn reload=True in fastapi.
--
46c9bb600e4530d3f9c22369c4a99774efa024c9 by 魏超 <nneverwei@gmail.com>:
add an option in the CLI to enable or disable the reload feature. So users(esp. windows) can disable this if they come across the '_make_subprocess_transport NotImplementedError' bug on windows.
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/415 from nneverwei:win-subprocess-NotImplError-with-mcp fbb9ab03350bb0a98769cf1a4cf930983ba9fa78
PiperOrigin-RevId: 756360981
(before/after) agent callbacks are invoked throughout the provided chain until one callback does not return None. Callbacks can be async and sync.
PiperOrigin-RevId: 756359693
--session_id : The session ID to save the session to on exit when --save_session is set to true. User will be prompted to enter a session ID if not set.
PiperOrigin-RevId: 756335619
--
5eabc6c1fe339e87637b9ed6d0516a3edcbcb060 by kavinkumarbaskar <kavinkumarbaskar@gmail.com>:
fix readme pip install
--
bb21018aea7a4b8d8a60e6ef42b084dae51d7845 by kavinkumarbaskar <kavinkumarbaskar@gmail.com>:
fix: added build and local testing command
--
aa1f2305b098b79480eab9ab37b744d0273a5fcf by kavinkumarbaskar <kavinkumarbaskar@gmail.com>:
fix: added example
--
69b649d81e6757d6305c481e3415ec8f017a75ac by kavinkumarbaskar <kavinkumarbaskar@gmail.com>:
fix: updated the windows command
--
bd5202308bf08b9b44099c4cd016af23f2e2350e by kavinkumarbaskar <kavinkumarbaskar@gmail.com>:
fix: removed redundant code
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/529 from kavinkumar807:fix-readme-pip-install a49d82d49a0cecb4cee399620c62ae10c1f3370a
PiperOrigin-RevId: 756122021
--
8d5e7f017d975d4ecd5ad6004079fec0f6b417e1 by Mrigank Khandelwal <mrigankkhandelwal300@gmail.com>:
fix: Fixed incorrect difinition of MCP in function docstring
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/594 from Mrigankkh:main 0d52a8059a7c3438207a86c03cfd3f25204d4b2e
PiperOrigin-RevId: 755698357
--
09b10cd96fc095061c6891a0d3cc3cc83948a126 by pratikmahajan <pmahajan@redhat.com>:
fix: change litellm request log level to debug
Litellm was previously logging every request at the info level,
which could clutter the logs with unnecessary detail in production environments.
This commit changes the log statement to use the debug level instead,
ensuring that request details are only logged when debug mode is active.
This helps keep the standard logs focused on more critical information.
Co-authored-by: pratikmahajan<pmahajan@redhat.com>
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/583 from PratikMahajan:litellm-log-levels 04fcd7247693e0c733318789f1ea47ecec81add4
PiperOrigin-RevId: 755691209
Copybara import of the project:
--
93cc9c0b71a92991a888c93675ddc8aee11f21dc by luaifei <lu.aifei@thoughtworks.com>:
fix: Update skipped tests in test_auth_handlers
--
06ddf559c76c113231719bff549d41801a93daf4 by luaifei <lu.aifei@thoughtworks.com>:
fix: Update skipped & failed tests in test_connections_client and test_streaming
--
b8f2d357c1101c59ee9b65fa89a75f216e014a7c by luaifei <lu.aifei@thoughtworks.com>:
fix: Remove ignored test file from Python unit tests workflow
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/553 from luaifei:fix-tests d51e42841e71d388c16cc719a4798b029182084f
PiperOrigin-RevId: 755669644
(before/after) model callbacks are invoked throughout the provided chain until one callback does not return None. Callbacks can be async and sync.
PiperOrigin-RevId: 755565583
Copybara import of the project:
--
c1d0d649b5aae1322a02dbaa586822d69b8546f6 by allengour <allengour@google.com>:
fix: fix and test `config.after_timestamp` behavior in `InMemorySessionService.get_session()`
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/438 from allengour:fix/issue-437-after_timestamp-behavior 4b49a5e6509b5ad9dd9103a6dc357fd44c101f31
PiperOrigin-RevId: 755492201
Copybara import of the project:
--
d481e0604a79470e2c1308827b3ecb78bfb5327e by Alan B <alan@nerds.ai>:
feat: 🚧 catch user transcription
--
bba436bb76d1d2f9d5ba969fce38ff8b8a443254 by Alan B <alan@nerds.ai>:
feat: ✨ send user transcription event as llm_response
--
ad2abf540c60895b79c50f9051a6289ce394b98d by Alan B <death1027@outlook.com>:
style: 💄 update lint problems
--
744703c06716300c0f9f41633d3bafdf4cb180a1 by Hangfei Lin <hangfeilin@gmail.com>:
fix: set right order for input transcription
--
31a5d42d6155b0e5caad0c73c8df43255322016f by Hangfei Lin <hangfeilin@gmail.com>:
remove print
--
59e5d9c72060f97d124883150989315401a4c1b5 by Hangfei Lin <hangfeilin@gmail.com>:
remove api version
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/495 from BloodBoy21:main ea29015af041f9785abaa8583e2c767f9d8c8bc8
PiperOrigin-RevId: 755401615
* Fix install command for Zsh compatibility. Wrapped extras list in quotes to prevent Zsh from expanding it as a glob pattern.
* Fix install command for Zsh compatibility. Wrapped extras list in quotes to prevent Zsh from expanding it as a glob pattern.
---------
Co-authored-by: Hangfei Lin <hangfei@google.com>
--
ec246aeee44156db8a94661b7e997cf2012f2e4e by Yuwei Fu <fuyuweiwill@gmail.com>:
Fix install command for Zsh compatibility. Wrapped extras list in quotes to prevent Zsh from expanding it as a glob pattern.
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/520 from Imfuyuwei:main 6cd4ecc9216ea2f03c3fed43e37d18d1838cac05
PiperOrigin-RevId: 754625822
--
41329f091a31b3d32af3025000951295477c717b by Hangfei Lin <hangfei@google.com>:
doc: Update CONTRIBUTING.md to include testing requirements
--
380b82e00fa8f16cbfd9e113ef45e1fc8e8c0932 by Hangfei Lin <hangfei@google.com>:
doc: Update CONTRIBUTING.md
--
61e81d848c275d4be3da2cb60a93e84bc68b3b4b by Hangfei Lin <hangfei@google.com>:
doc: Update CONTRIBUTING.md
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/541 from google:hangfei-patch-1 63d5c56e663cdfe6f6e78be85d9686873aeb2a5a
PiperOrigin-RevId: 754541490
--
1ca16aba5b7b869afa8e0a0cddaea539acd737f5 by bart.lee(이철민)/kakao <bart.lee@kakaocorp.com>:
chore: Improves session update time validation message
Enhances the error message when a session's last update time is later than the storage update time.
This provides better readability by formatting the timestamps in the error message.
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/446 from kakao-bart-lee:main a2a0cff036429b61bd7cf1600fc4c2c0cf50089d
PiperOrigin-RevId: 754452381
Enhances the error message when a session's last update time is later than the storage update time.
This provides better readability by formatting the timestamps in the error message.
Co-authored-by: Hangfei Lin <hangfei@google.com>
--
ad923c2c8c503ba73c62db695e88f1a3ea1aeeea by YU MING HSU <abego452@gmail.com>:
docs: enhance Contribution process within CONTRIBUTING.md
--
8022924fb7e975ac278d38fce3b5fd593d874536 by YU MING HSU <abego452@gmail.com>:
fix: move _maybe_append_user_content from google_llm.py to base_llm.py,
so subclass can get benefit from it, call _maybe_append_user_content
from generate_content_async within lite_llm.py
--
cf891fb1a3bbccaaf9d0055b23f614ce52449977 by YU MING HSU <abego452@gmail.com>:
fix: modify install dependencies cmd, and use pyink to format codebase
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/428 from hsuyuming:fix_litellm_error_issue_427 dbec4949798e6399a0410d1b8ba7cc6a7cad7bdd
PiperOrigin-RevId: 754124679
2025-05-02 13:59:50 -07:00
605 changed files with 101845 additions and 6212 deletions
echo "❌ Do not import from the cli package outside of the cli package. If you need to reuse the code elsewhere, please move the code outside of the cli package."
echo "The following files contain the forbidden pattern:"
echo "$FILES_WITH_FORBIDDEN_IMPORT"
exit 1
else
echo "✅ No instances of importing from the cli package found in relevant changed Python files."
# Step 3: Check if the commit count is greater than 1
# This step uses the output from the previous step to decide whether to pass or fail.
- name:Check Commit Count
# This step only runs if the 'commit_count' output from the 'count_commits' step is greater than 1.
if:steps.count_commits.outputs.commit_count > 1
# If the condition is met, the workflow will exit with a failure status.
run:|
echo "This pull request has ${{ steps.count_commits.outputs.commit_count }} commits."
echo "Please squash them into a single commit before merging."
echo "You can use git rebase -i HEAD~N"
echo "...where N is the number of commits you want to squash together. The PR check conveniently tells you this number! For example, if the check says you have 3 commits, you would run: git rebase -i HEAD~3."
echo "Because you have rewritten the commit history, you must use the --force flag to update the pull request: git push --force"
exit 1
# Step 4: Success message
# This step runs if the commit count is not greater than 1 (i.e., it's 1).
- name:Success
if:steps.count_commits.outputs.commit_count <= 1
run:|
echo "This pull request has a single commit. Great job!"
This document provides context for the Gemini CLI and Gemini Code Assist to understand the project and assist with development.
## Project Overview
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.
## Project Architecture
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.
### ADK Live (Bidi-streaming)
- ADK live feature can be accessed from runner.run_live(...) and corresponding FAST api endpoint.
- ADK live feature is built on top of [Gemini Live API](https://cloud.google.com/vertex-ai/generative-ai/docs/live-api). We integrate Gemini Live API through [GenAI SDK](https://github.com/googleapis/python-genai).
- ADK live related configs are in [run_config.py](https://github.com/google/adk-python/blob/main/src/google/adk/agents/run_config.py).
- ADK live under multi-agent scenario: we convert the audio into text. This text will be passed to next agent as context.
- Most logics are in [base_llm_flow.py](https://github.com/google/adk-python/blob/main/src/google/adk/flows/llm_flows/base_llm_flow.py) and [gemini_llm_connection.py](https://github.com/google/adk-python/blob/main/src/google/adk/models/gemini_llm_connection.py).
- Tests are in [tests/unittests/streaming](https://github.com/google/adk-python/tree/main/tests/unittests/streaming).
## ADK: Style Guides
### Python Style Guide
The project follows the Google Python Style Guide. Key conventions are enforced using `pylint` with the provided `pylintrc` configuration file. Here are some of the key style points:
***Indentation**: 2 spaces.
***Line Length**: Maximum 80 characters.
***Naming Conventions**:
*`function_and_variable_names`: `snake_case`
*`ClassNames`: `CamelCase`
*`CONSTANTS`: `UPPERCASE_SNAKE_CASE`
***Docstrings**: Required for all public modules, functions, classes, and methods.
***Imports**: Organized and sorted.
***Error Handling**: Specific exceptions should be caught, not general ones like `Exception`.
### Autoformat
We have autoformat.sh to help solve import organize and formatting issues.
```bash
# Run in open_source_workspace/
$ ./autoformat.sh
```
### In ADK source
Below styles applies to the ADK source code (under `src/` folder of the Github.
repo).
#### Use relative imports
```python
# DO
from..agents.llm_agentimportLlmAgent
# DON'T
fromgoogle.adk.agents.llm_agentimportLlmAgent
```
#### Import from module, not from `__init__.py`
```python
# DO
from..agents.llm_agentimportLlmAgent
# DON'T
from..agentsimportLlmAgent# import from agents/__init__.py
```
#### Always do `from __future__ import annotations`
```python
# DO THIS, right after the open-source header.
from__future__importannotations
```
Like below:
```python
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from__future__importannotations
# ... the rest of the file.
```
This allows us to forward-reference a class without quotes.
Check out go/pep563 for details.
### In ADK tests
#### Use absolute imports
In tests, we use `google.adk` same as how our users uses.
```python
# DO
fromgoogle.adk.agents.llm_agentimportLlmAgent
# DON'T
from..agents.llm_agentimportLlmAgent
```
## ADK: Local testing
### Unit tests
Run below command:
```bash
$ pytest tests/unittests
```
## Docstring and comments
### Comments - Explaining the Why, Not the What
Philosophy: Well-written code should be largely self-documenting. Comments
serve a different purpose: they should explain the complex algorithms,
non-obvious business logic, or the rationale behind a particular implementation
choice—the things the code cannot express on its own. Avoid comments that
merely restate what the code does (e.g., # increment i above i += 1).
Style: Comments should be written as complete sentences. Block comments must
begin with a # followed by a single space.
## Versioning
ADK adherence to Semantic Versioning 2.0.0
Core Principle: The adk-python project strictly adheres to the Semantic
Versioning 2.0.0 specification. All release versions will follow the
MAJOR.MINOR.PATCH format.
### Breaking Change
A breaking change is any modification that introduces backward-incompatible
changes to the public API. In the context of the ADK, this means a change that
could force a developer using the framework to alter their existing code to
upgrade to the new version. The public API is not limited to just the Python
function and class signatures; it also encompasses data schemas for stored
information (like evaluation datasets), the command-line interface (CLI),
and the data format used for server communications.
### Public API Surface Definition
The "public API" of ADK is a broad contract that extends beyond its Python
function signatures. A breaking change in any of the following areas can
disrupt user workflows and the wider ecosystem of agents and tools built with
ADK. The analysis of the breaking changes introduced in v1.0.0 demonstrates the
expansive nature of this contract. For the purposes of versioning, the ADK
Public API Surface is defined as:
- All public classes, methods, and functions in the google.adk namespace.
- The names, required parameters, and expected behavior of all built-in Tools
(e.g., google_search, BuiltInCodeExecutor).
- The structure and schema of persisted data, including Session data, Memory,
and Evaluation datasets.
- The JSON request/response format of the ADK API server(FastAPI server)
used by adk web, including field casing conventions.
- The command-line interface (CLI) commands, arguments, and flags (e.g., adk deploy).
- The expected file structure for agent definitions that are loaded by the
framework (e.g., the agent.py convention).
#### Checklist for Breaking Changes:
The following changes are considered breaking and necessitate a MAJOR version
bump.
- API Signature Change: Renaming, removing, or altering the required parameters
of any public class, method, or function (e.g., the removal of the list_events
method from BaseSessionService).
- Architectural Shift: A fundamental change to a core component's behavior
(e.g., making all service methods async, which requires consumers to use await).
- Data Schema Change: A non-additive change to a persisted data schema that
renders old data unreadable or invalid (e.g., the redesign of the
MemoryService and evaluation dataset schemas).
- Tool Interface Change: Renaming a built-in tool, changing its required
parameters, or altering its fundamental purpose (e.g., replacing
BuiltInCodeExecutionTool with BuiltInCodeExecutor and moving it from the tools
parameter to the code_executor parameter of an Agent).
- Configuration Change: Altering the required structure of configuration files
or agent definition files that the framework loads (e.g., the simplification
of the agent.py structure for MCPToolset).
- Wire Format Change: Modifying the data format for API server interactions
(e.g., the switch from snake_case to camelCase for all JSON payloads).
- Dependency Removal: Removing support for a previously integrated third-party
library or tool type.
## Commit Message Format
- Please use [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/)
format.
- If it's not a breaking change, please add #non-breaking tag. If it's a
* Add ability to send state change with message [3f9f773](https://github.com/google/adk-python/commit/3f9f773d9b5fcca343e32f76f6d5677b7cf4c327)
* [Eval] Support for persisting eval run results [bab3be2](https://github.com/google/adk-python/commit/bab3be2cf31dc9afd00bcce70103bdaa5460f1a3)
* Introduce [Plugin]: Plugin is simply a class that packages these individual callback functions together for a broader purpose[162228d](https://github.com/google/adk-python/commit/162228d208dca39550a75221030edf9876bf8e3a)
### Bug Fixes
* Create correct object for image and video content in litellm [bf7745f](https://github.com/google/adk-python/commit/bf7745f42811de3c9c80ec0998001ae50960dafc)
* Support project-based gemini model path for BuiltInCodeExecutor and all built-in tools [a5d6f1e](https://github.com/google/adk-python/commit/a5d6f1e52ee36d84f94693086f74e4ca2d0bed65)
* Add instruction in long running tool description to avoid being invoked again by model [62a6119](https://github.com/google/adk-python/commit/62a611956f8907e0580955adb23dfb6d7799bf4f)
* [A2A] Import A2A well known path from A2A sdk [a6716a5](https://github.com/google/adk-python/commit/a6716a55140f63834ae4e3507b38786da9fdbee2)
* Fix the long running function response event merge logic [134ec0d](https://github.com/google/adk-python/commit/134ec0d71e8de4cf9bcbe370c7e739e7ada123f3)
* [A2A] Return final task result in task artifact instead of status message [a8fcc1b](https://github.com/google/adk-python/commit/a8fcc1b8ab0d47eccf6612a6eb8be021bff5ed3a)
* Make InMemoryMemoryService thread-safe [10197db](https://github.com/google/adk-python/commit/10197db0d752defc5976d1f276c7b5405a94c75b)
### Improvements
* Improve partial event handling and streaming aggregation [584c8c6](https://github.com/google/adk-python/commit/584c8c6d91308e62285c94629f020f2746e88f6f)
### Documentation
* Update agent transfer related doc string and comments [b1fa383](https://github.com/google/adk-python/commit/b1fa383e739d923399b3a23ca10435c0fba3460b)
* Update doc string for GcsArtifactService [498ce90](https://github.com/google/adk-python/commit/498ce906dd9b323b6277bc8118e1bcc68c38c1b5)
* Add BaseEvalService declaration and surrounding data models [b0d88bf](https://github.com/google/adk-python/commit/b0d88bf17242e738bcd409b3d106deed8ce4d407)
* Minor features
* Add `custom_metadata` to VertexAiSessionService when adding events [a021222](https://github.com/google/adk-python/commit/a02122207734cabb26f7c23e84d2336c4b8b0375)
* Support protected write in BigQuery `execute_sql` tool [dc43d51](https://github.com/google/adk-python/commit/dc43d518c90b44932b3fdedd33fca9e6c87704e2)
* Added clone() method to BaseAgent to allow users to create copies of an agent [d263afd] (https://github.com/google/adk-python/commit/d263afd91ba4a3444e5321c0e1801c499dec4c68)
### Bug Fixes
* Support project-based gemini model path to use enterprise_web_search_tool [e33161b](https://github.com/google/adk-python/commit/e33161b4f8650e8bcb36c650c4e2d1fe79ae2526)
* Use inspect.signature() instead of typing.get_type_hints for examining function signatures[4ca77bc](https://github.com/google/adk-python/commit/4ca77bc056daa575621a80d3c8d5014b78209233)
* Replace Event ID generation with UUID4 to prevent SQLite integrity constraint failures [e437c7a](https://github.com/google/adk-python/commit/e437c7aac650ac6a53fcfa71bd740e3e5ec0f230)
* Remove duplicate options from `adk deploy` [3fa2ea7](https://github.com/google/adk-python/commit/3fa2ea7cb923c9f8606d98b45a23bd58a7027436)
* Fix scenario where a user can access another users events given the same session id [362fb3f](https://github.com/google/adk-python/commit/362fb3f2b7ac4ad15852d00ce4f3935249d097f6)
* Handle unexpected 'parameters' argument in FunctionTool.run_async [0959b06](https://github.com/google/adk-python/commit/0959b06dbdf3037fe4121f12b6d25edca8fb9afc)
* Make sure each partial event has different timestamp [17d6042](https://github.com/google/adk-python/commit/17d604299505c448fcb55268f0cbaeb6c4fa314a)
* Avoid pydantic.ValidationError when the model stream returns empty final chunk [9b75e24](https://github.com/google/adk-python/commit/9b75e24d8c01878c153fec26ccfea4490417d23b)
* Fix google_search_tool.py to support updated Gemini LIVE model naming [77b869f](https://github.com/google/adk-python/commit/77b869f5e35a66682cba35563824fd23a9028d7c)
* Adding detailed information on each metric evaluation [04de3e1](https://github.com/google/adk-python/commit/04de3e197d7a57935488eb7bfa647c7ab62cd9d9)
* 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)
* Treat SQLite database update time as UTC for session's last update time [3f621ae](https://github.com/google/adk-python/commit/3f621ae6f2a5fac7f992d3d833a5311b4d4e7091)
* Raise ValueError when sessionId and userId are incorrect combination(#1653) [4e765ae](https://github.com/google/adk-python/commit/4e765ae2f3821318e581c26a52e11d392aaf72a4)
* Support API-Key for MCP Tool authentication [045aea9](https://github.com/google/adk-python/commit/045aea9b15ad0190a960f064d6e1e1fc7f964c69)
* Lock LangGraph version to <= 0.4.10 [9029b8a](https://github.com/google/adk-python/commit/9029b8a66e9d5e0d29d9a6df0e5590cc7c0e9038)
* Update the retry logic of create session polling [3d2f13c](https://github.com/google/adk-python/commit/3d2f13cecd3fef5adfa1c98bf23d7b68ff355f4d)
### Chores
* Extract mcp client creation logic to a separate method [45d60a1](https://github.com/google/adk-python/commit/45d60a1906bfe7c43df376a829377e2112ea3d17)
* Add tests for live streaming configs [bf39c00](https://github.com/google/adk-python/commit/bf39c006102ef3f01e762e7bb744596a4589f171)
* Update ResponseEvaluator to use newer version of Eval SDK [62c4a85](https://github.com/google/adk-python/commit/62c4a8591780a9a3fdb03a0de11092d84118a1b9)
* Add util to build our llms.txt and llms-full.txt files [a903c54](https://github.com/google/adk-python/commit/a903c54bacfcb150dc315bec9c67bf7ce9551c07)
* Create an example for multi agent live streaming [a58cc3d](https://github.com/google/adk-python/commit/a58cc3d882e59358553e8ea16d166b1ab6d3aa71)
* Refactor the ADK Triaging Agent to make the code easier to read [b6c7b5b](https://github.com/google/adk-python/commit/b6c7b5b64fcd2e83ed43f7b96ea43791733955d8)
### Documentation
* Update the a2a exmaple link in README.md [d0fdfb8](https://github.com/google/adk-python/commit/d0fdfb8c8e2e32801999c81de8d8ed0be3f88e76)
* Adds AGENTS.md to provide relevant project context for the Gemini CLI [37108be](https://github.com/google/adk-python/commit/37108be8557e011f321de76683835448213f8515)
* Add adk project overview and architecture [28d0ea8](https://github.com/google/adk-python/commit/28d0ea876f2f8de952f1eccbc788e98e39f50cf5)
* Add docstring to clarify that inmemory service are not suitable for production [dc414cb](https://github.com/google/adk-python/commit/dc414cb5078326b8c582b3b9072cbda748766286)
* Update agents.md to include versioning strategy [6a39c85](https://github.com/google/adk-python/commit/6a39c854e032bda3bc15f0e4fe159b41cf2f474b)
* Add tenacity into project.toml [df141db](https://github.com/google/adk-python/commit/df141db60c1137a6bcddd6d46aad3dc506868543)
* Updating CONTRIBUTING.md with missing extra [e153d07](https://github.com/google/adk-python/commit/e153d075939fb628a7dc42b12e1b3461842db541)
* Add a new option `eval_storage_uri` in adk web & adk eval to specify GCS bucket to store eval data ([fa025d7](https://github.com/google/adk-python/commit/fa025d755978e1506fa0da1fecc49775bebc1045))
* Add ADK examples for litellm with add_function_to_prompt ([f33e090](https://github.com/google/adk-python/commit/f33e0903b21b752168db3006dd034d7d43f7e84d))
* Add implementation of VertexAiMemoryBankService and support in FastAPI endpoint ([abc89d2](https://github.com/google/adk-python/commit/abc89d2c811ba00805f81b27a3a07d56bdf55a0b))
* Add rouge_score library to ADK eval dependencies, and implement RougeEvaluator that is computes ROUGE-1 for "response_match_score" metric ([9597a44](https://github.com/google/adk-python/commit/9597a446fdec63ad9e4c2692d6966b14f80ff8e2))
* Add usage span attributes to telemetry ([#356](https://github.com/google/adk-python/issues/356)) ([ea69c90](https://github.com/google/adk-python/commit/ea69c9093a16489afdf72657136c96f61c69cafd))
* Add Vertex Express mode compatibility for VertexAiSessionService ([00cc8cd](https://github.com/google/adk-python/commit/00cc8cd6433fc45ecfc2dbaa04dbbc1a81213b4d))
### Bug Fixes
* Include current turn context when include_contents='none' ([9e473e0](https://github.com/google/adk-python/commit/9e473e0abdded24e710fd857782356c15d04b515))
* Make LiteLLM streaming truly asynchronous ([bd67e84](https://github.com/google/adk-python/commit/bd67e8480f6e8b4b0f8c22b94f15a8cda1336339))
* Make raw_auth_credential and exchanged_auth_credential optional given their default value is None ([acbdca0](https://github.com/google/adk-python/commit/acbdca0d8400e292ba5525931175e0d6feab15f1))
* Minor typo fix in the agent instruction ([ef3c745](https://github.com/google/adk-python/commit/ef3c745d655538ebd1ed735671be615f842341a8))
* Typo fix in sample agent instruction ([ef3c745](https://github.com/google/adk-python/commit/ef3c745d655538ebd1ed735671be615f842341a8))
* Use starred tuple unpacking on GCS artifact blob names ([3b1d9a8](https://github.com/google/adk-python/commit/3b1d9a8a3e631ca2d86d30f09640497f1728986c))
### Chore
* Do not send api request when session does not have events ([88a4402](https://github.com/google/adk-python/commit/88a4402d142672171d0a8ceae74671f47fa14289))
* Leverage official uv action for install([09f1269](https://github.com/google/adk-python/commit/09f1269bf7fa46ab4b9324e7f92b4f70ffc923e5))
* Update google-genai package and related deps to latest([ed7a21e](https://github.com/google/adk-python/commit/ed7a21e1890466fcdf04f7025775305dc71f603d))
* Add credential service backed by session state([29cd183](https://github.com/google/adk-python/commit/29cd183aa1b47dc4f5d8afe22f410f8546634abc))
* Clarify the behavior of Event.invocation_id([f033e40](https://github.com/google/adk-python/commit/f033e405c10ff8d86550d1419a9d63c0099182f9))
* Send user message to the agent that returned a corresponding function call if user message is a function response([7c670f6](https://github.com/google/adk-python/commit/7c670f638bc17374ceb08740bdd057e55c9c2e12))
* Add request converter to convert a2a request to ADK request([fb13963](https://github.com/google/adk-python/commit/fb13963deda0ff0650ac27771711ea0411474bf5))
* Support allow_origins in cloud_run deployment ([2fd8feb](https://github.com/google/adk-python/commit/2fd8feb65d6ae59732fb3ec0652d5650f47132cc))
* Add type checking to handle different response type of genai API client ([4d72d31](https://github.com/google/adk-python/commit/4d72d31b13f352245baa72b78502206dcbe25406))
* This fixes the broken VertexAiSessionService
* Allow more credentials types for BigQuery tools ([2f716ad](https://github.com/google/adk-python/commit/2f716ada7fbcf8e03ff5ae16ce26a80ca6fd7bf6))
* Add enable_affective_dialog and proactivity to run_config and llm_request ([fe1d5aa](https://github.com/google/adk-python/commit/fe1d5aa439cc56b89d248a52556c0a9b4cbd15e4))
* Add import session API in the fast API ([233fd20](https://github.com/google/adk-python/commit/233fd2024346abd7f89a16c444de0cf26da5c1a1))
* Add integration tests for litellm with and without turning on add_function_to_prompt ([8e28587](https://github.com/google/adk-python/commit/8e285874da7f5188ea228eb4d7262dbb33b1ae6f))
* Allow data_store_specs pass into ADK VAIS built-in tool ([675faef](https://github.com/google/adk-python/commit/675faefc670b5cd41991939fe0fc604df331111a))
* Implement GcsEvalSetResultsManager to handle storage of eval sets on GCS, and refactor eval set results manager ([0a5cf45](https://github.com/google/adk-python/commit/0a5cf45a75aca7b0322136b65ca5504a0c3c7362))
* Re-factor some eval sets manager logic, and implement GcsEvalSetsManager to handle storage of eval sets on GCS ([1551bd4](https://github.com/google/adk-python/commit/1551bd4f4d7042fffb497d9308b05f92d45d818f))
* Support real time input config ([d22920b](https://github.com/google/adk-python/commit/d22920bd7f827461afd649601326b0c58aea6716))
* Support refresh access token automatically for rest_api_tool ([1779801](https://github.com/google/adk-python/commit/177980106b2f7be9a8c0a02f395ff0f85faa0c5a))
* Fix liteLLM test failures ([fef8778](https://github.com/google/adk-python/commit/fef87784297b806914de307f48c51d83f977298f))
* Fix tracing for live ([58e07ca](https://github.com/google/adk-python/commit/58e07cae83048d5213d822be5197a96be9ce2950))
* Merge custom http options with adk specific http options in model api request ([4ccda99](https://github.com/google/adk-python/commit/4ccda99e8ec7aa715399b4b83c3f101c299a95e8))
* Remove unnecessary double quote on Claude docstring ([bbceb4f](https://github.com/google/adk-python/commit/bbceb4f2e89f720533b99cf356c532024a120dc4))
* Set explicit project in the BigQuery client ([6d174eb](https://github.com/google/adk-python/commit/6d174eba305a51fcf2122c0fd481378752d690ef))
* Support streaming in litellm + adk and add corresponding integration tests ([aafa80b](https://github.com/google/adk-python/commit/aafa80bd85a49fb1c1a255ac797587cffd3fa567))
* Support project-based gemini model path to use google_search_tool ([b2fc774](https://github.com/google/adk-python/commit/b2fc7740b363a4e33ec99c7377f396f5cee40b5a))
* Update conversion between Celsius and Fahrenheit ([1ae176a](https://github.com/google/adk-python/commit/1ae176ad2fa2b691714ac979aec21f1cf7d35e45))
### Chores
* Set `agent_engine_id` in the VertexAiSessionService constructor, also use the `agent_engine_id` field instead of overriding `app_name` in FastAPI endpoint ([fc65873](https://github.com/google/adk-python/commit/fc65873d7c31be607f6cd6690f142a031631582a))
* Add memory_service option to CLI ([416dc6f](https://github.com/google/adk-python/commit/416dc6feed26e55586d28f8c5132b31413834c88))
* Add support for display_name and description when deploying to agent engine ([aaf1f9b](https://github.com/google/adk-python/commit/aaf1f9b930d12657bfc9b9d0abd8e2248c1fc469))
* Dev UI: Trace View
* New trace tab which contains all traces grouped by user messages
* Click each row will open corresponding event details
* Hover each row will highlight the corresponding message in dialog
* Dev UI: Evaluation
* Evaluation Configuration: users can now configure custom threshold for the metrics used for each eval run ([d1b0587](https://github.com/google/adk-python/commit/d1b058707eed72fd4987d8ec8f3b47941a9f7d64))
* Each eval case added can now be viewed and edited. Right now we only support edit of text.
* Show the used metric in evaluation history ([6ed6351](https://github.com/google/adk-python/commit/6ed635190c86d5b2ba0409064cf7bcd797fd08da))
* Support to customize timeout for mcpstdio connections ([54367dc](https://github.com/google/adk-python/commit/54367dcc567a2b00e80368ea753a4fc0550e5b57))
* Introduce write protected mode to BigQuery tools ([6c999ca](https://github.com/google/adk-python/commit/6c999caa41dca3a6ec146ea42b0a794b14238ec2))
### Bug Fixes
* Agent Engine deployment:
* Correct help text formatting for `adk deploy agent_engine` ([13f98c3](https://github.com/google/adk-python/commit/13f98c396a2fa21747e455bb5eed503a553b5b22))
* Handle project and location in the .env properly when deploying to Agent Engine ([0c40542](https://github.com/google/adk-python/commit/0c4054200fd50041f0dce4b1c8e56292b99a8ea8))
* Forward `__annotations__` to the fake func for FunctionTool inspection ([9abb841](https://github.com/google/adk-python/commit/9abb8414da1055ab2f130194b986803779cd5cc5))
* Handle the case when agent loading error doesn't have msg attribute in agent loader ([c224626](https://github.com/google/adk-python/commit/c224626ae189d02e5c410959b3631f6bd4d4d5c1))
* Prevent agent_graph.py throwing when workflow agent is root agent ([4b1c218](https://github.com/google/adk-python/commit/4b1c218cbe69f7fb309b5a223aa2487b7c196038))
* Remove display_name for non-Vertex file uploads ([cf5d701](https://github.com/google/adk-python/commit/cf5d7016a0a6ccf2b522df6f2d608774803b6be4))
### Documentation
* Add DeepWiki badge to README ([f38c08b](https://github.com/google/adk-python/commit/f38c08b3057b081859178d44fa2832bed46561a9))
* Update code example in tool declaration to reflect BigQuery artifact description ([3ae6ce1](https://github.com/google/adk-python/commit/3ae6ce10bc5a120c48d84045328c5d78f6eb85d4))
* Add agent engine as a deployment option to the ADK CLI ([2409c3e](https://github.com/google/adk-python/commit/2409c3ef192262c80f5328121f6dc4f34265f5cf))
* Add an option to use gcs artifact service in adk web. ([8d36dbd](https://github.com/google/adk-python/commit/8d36dbda520b1c0dec148e1e1d84e36ddcb9cb95))
* Add index tracking to handle parallel tool call using litellm ([05f4834](https://github.com/google/adk-python/commit/05f4834759c9b1f0c0af9d89adb7b81ea67d82c8))
* Add sortByColumn functionality to List Operation ([af95dd2](https://github.com/google/adk-python/commit/af95dd29325865ec30a1945b98e65e457760e003))
* Add implementation for `get_eval_case`, `update_eval_case` and `delete_eval_case` for the local eval sets manager. ([a7575e0](https://github.com/google/adk-python/commit/a7575e078a564af6db3f42f650e94ebc4f338918))
* Expose more config of VertexAiSearchTool from latest Google GenAI SDK ([2b5c89b](https://github.com/google/adk-python/commit/2b5c89b3a94e82ea4a40363ea8de33d9473d7cf0))
* New Agent Visualization ([da4bc0e](https://github.com/google/adk-python/commit/da4bc0efc0dd96096724559008205854e97c3fd1))
* Set the max width and height of view image dialog to be 90% ([98a635a](https://github.com/google/adk-python/commit/98a635afee399f64e0a813d681cd8521fbb49500))
* Support Langchain StructuredTool for Langchain tool ([7e637d3](https://github.com/google/adk-python/commit/7e637d3fa05ca3e43a937e7158008d2b146b1b81))
* Support Langchain tools that has run_manager in _run args and don't have args_schema populated ([3616bb5](https://github.com/google/adk-python/commit/3616bb5fc4da90e79eb89039fb5e302d6a0a14ec))
* Update for anthropic models ([16f7d98](https://github.com/google/adk-python/commit/16f7d98acf039f21ec8a99f19eabf0ef4cb5268c))
* Use bigquery scope by default in bigquery credentials. ([ba5b80d](https://github.com/google/adk-python/commit/ba5b80d5d774ff5fdb61bd43b7849057da2b4edf))
* Render HTML artifact in chat window ([5c2ad32](https://github.com/google/adk-python/commit/5c2ad327bf4262257c3bc91010c3f8c303d3a5f5))
* Add export to json button in the chat window ([fc3e374](https://github.com/google/adk-python/commit/fc3e374c86c4de87b4935ee9c56b6259f00e8ea2))
* Add tooltip to the export session button ([2735942](https://github.com/google/adk-python/commit/273594215efe9dbed44d4ef85e6234bd7ba7b7ae))
### Bug Fixes
* Add adk icon for UI ([2623c71](https://github.com/google/adk-python/commit/2623c710868d832b6d5119f38e22d82adb3de66b))
* Add cache_ok option to remove sa warning. ([841e10a](https://github.com/google/adk-python/commit/841e10ae353e0b1b3d020a26d6cac6f37981550e))
* Add support for running python main function in UnsafeLocalCodeExecutor when the code has an if __name__ == "__main__" statement. ([95e33ba](https://github.com/google/adk-python/commit/95e33baf57e9c267a758e08108cde76adf8af69b))
* Adk web not working on some env for windows, fixes https://github.com/google/adk-web/issues/34 ([daac8ce](https://github.com/google/adk-python/commit/daac8cedfe6d894f77ea52784f0a6d19003b2c00))
* Assign empty inputSchema to MCP tool when converting an ADK tool that wraps a function which takes no parameters. ([2a65c41](https://github.com/google/adk-python/commit/2a65c4118bb2aa97f2a13064db884bd63c14a5f7))
* Call all tools in parallel calls during partial authentication ([0e72efb](https://github.com/google/adk-python/commit/0e72efb4398ce6a5d782bcdcb770b2473eb5af2e))
* Continue fetching events if there are multiple pages. ([6506302](https://github.com/google/adk-python/commit/65063023a5a7cb6cd5db43db14a411213dc8acf5))
* Do not convert "false" value to dict ([60ceea7](https://github.com/google/adk-python/commit/60ceea72bde2143eb102c60cf33b365e1ab07d8f))
* Enhance agent loader exception handler and expose precise error information ([7b51ae9](https://github.com/google/adk-python/commit/7b51ae97245f6990c089183734aad41fe59b3330))
* Ensure function description is copied when ignoring parameters ([7fdc6b4](https://github.com/google/adk-python/commit/7fdc6b4417e5cf0fbc72d3117531914353d3984a))
* Filter memory by app_name and user_id. ([db4bc98](https://github.com/google/adk-python/commit/db4bc9809c7bb6b0d261973ca7cfd87b392694be))
* Fix filtering by user_id for vertex ai session service listing ([9d4ca4e](https://github.com/google/adk-python/commit/9d4ca4ed44cf10bc87f577873faa49af469acc25))
* fix parameter schema generation for gemini ([5a67a94](https://github.com/google/adk-python/commit/5a67a946d2168b80dd6eba008218468c2db2e74e))
* Handle non-indexed function call chunks with incremental fallback index ([b181cbc](https://github.com/google/adk-python/commit/b181cbc8bc629d1c9bfd50054e47a0a1b04f7410))
* Handles function tool parsing corner case where type hints are stored as strings. ([a8a2074](https://github.com/google/adk-python/commit/a8a20743f92cd63c3d287a3d503c1913dd5ad5ae))
* Introduce PreciseTimestamp to fix mysql datetime precision issue. ([841e10a](https://github.com/google/adk-python/commit/841e10ae353e0b1b3d020a26d6cac6f37981550e))
* match arg case in errors ([b226a06](https://github.com/google/adk-python/commit/b226a06c0bf798f85a53c591ad12ee582703af6d))
* ParallelAgent should only append to its immediate sub-agent, not transitive descendants ([ec8bc73](https://github.com/google/adk-python/commit/ec8bc7387c84c3f261c44cedfe76eb1f702e7b17))
* Relax openapi spec to gemini schema conversion to tolerate more cases ([b1a74d0](https://github.com/google/adk-python/commit/b1a74d099fae44d41750b79e58455282d919dd78))
* Remove labels from config when using API key from Google AI Studio to call model ([5d29716](https://github.com/google/adk-python/commit/5d297169d08a2d0ea1a07641da2ac39fa46b68a4))
* **sample:** Correct text artifact saving in artifact_save_text sample ([5c6001d](https://github.com/google/adk-python/commit/5c6001d90fe6e1d15a2db6b30ecf9e7b6c26eee4))
* Separate thinking from text parts in streaming mode ([795605a](https://github.com/google/adk-python/commit/795605a37e1141e37d86c9b3fa484a3a03e7e9a6))
* Simplify content for ollama provider ([eaee49b](https://github.com/google/adk-python/commit/eaee49bc897c20231ecacde6855cccfa5e80d849))
* Timeout issues for mcpstdio server when mcp tools are incorrect. ([45ef668](https://github.com/google/adk-python/commit/45ef6684352e3c8082958bece8610df60048f4a3))
* **transfer_to_agent:** update docstring for clarity and accuracy ([854a544](https://github.com/google/adk-python/commit/854a5440614590c2a3466cf652688ba57d637205))
* Update unit test code for test_connection ([b0403b2](https://github.com/google/adk-python/commit/b0403b2d98b2776d15475f6b525409670e2841fc))
* Use inspect.cleandoc on function docstrings in generate_function_declaration. ([f7cb666](https://github.com/google/adk-python/commit/f7cb66620be843b8d9f3d197d6e8988e9ee0dfca))
* Unused import for deprecated ([ccd05e0](https://github.com/google/adk-python/commit/ccd05e0b00d0327186e3b1156f1b0216293efe21))
* Prevent JSON parsing errors and preserve non-ascii characters in telemetry ([d587270](https://github.com/google/adk-python/commit/d587270327a8de9f33b3268de5811ac756959850))
* Raise HTTPException when running evals in fast_api if google-adk[eval] is not installed ([1de5c34](https://github.com/google/adk-python/commit/1de5c340d8da1cedee223f6f5a8c90070a9f0298))
* Fix typos in README for sample bigquery_agent and oauth_calendar_agent ([9bdd813](https://github.com/google/adk-python/commit/9bdd813be15935af5c5d2a6982a2391a640cab23))
* Make tool_call one span for telemetry and renamed to execute_tool ([999a7fe](https://github.com/google/adk-python/commit/999a7fe69d511b1401b295d23ab3c2f40bccdc6f))
* Use media type in chat window. Remove isArtifactImage and isArtifactAudio reference ([1452dac](https://github.com/google/adk-python/commit/1452dacfeb6b9970284e1ddeee6c4f3cb56781f8))
* Set output_schema correctly for LiteLllm ([6157db7](https://github.com/google/adk-python/commit/6157db77f2fba4a44d075b51c83bff844027a147))
* Remove the gap between event holder and image ([63822c3](https://github.com/google/adk-python/commit/63822c3fa8b0bdce2527bd0d909c038e2b66dd98))
### Documentation
* Adds a sample agent to illustrate state usage via `callbacks`. ([18fbe3c](https://github.com/google/adk-python/commit/18fbe3cbfc9f2af97e4b744ec0a7552331b1d8e3))
* Fix typos in documentation ([7aaf811](https://github.com/google/adk-python/commit/7aaf8116169c210ceda35c649b5b49fb65bbb740))
* Change eval_dataset to eval_dataset_file_path_or_dir ([62d7bf5](https://github.com/google/adk-python/commit/62d7bf58bb1c874caaf3c56a614500ae3b52f215))
* Fix broken link to A2A example ([0d66a78](https://github.com/google/adk-python/commit/0d66a7888b68380241b92f7de394a06df5a0cc06))
* Fix typo in envs.py ([bd588bc](https://github.com/google/adk-python/commit/bd588bce50ccd0e70b96c7291db035a327ad4d24))
* Updates CONTRIBUTING.md to refine setup process using uv. ([04e07b4](https://github.com/google/adk-python/commit/04e07b4a1451123272641a256c6af1528ea6523e))
* Create and update project documentation including README.md and CONTRIBUTING.md ([f180331](https://github.com/google/adk-python/commit/f1803312c6a046f94c23cfeaed3e8656afccf7c3))
* Rename the root agent in the example to match the example name ([94c0aca](https://github.com/google/adk-python/commit/94c0aca685f1dfa4edb44caaedc2de25cc0caa41))
* Added unit test coverage for local_eval_sets_manager.py ([174afb3](https://github.com/google/adk-python/commit/174afb3975bdc7e5f10c26f3eebb17d2efa0dd59))
* Extract common options for `adk web` and `adk api_server` ([01965bd](https://github.com/google/adk-python/commit/01965bdd74a9dbdb0ce91a924db8dee5961478b8))
## 1.1.1
### Features
* Add BigQuery first-party tools. See [here](https://github.com/google/adk-python/commit/d6c6bb4b2489a8b7a4713e4747c30d6df0c07961) for more details.
## 1.1.0
### Features
* Extract agent loading logic from fast_api.py to a separate AgentLoader class and support more agent definition folder/file structure.
* Added audio play in web UI.
* Added input transcription support for live/streaming.
* Added support for storing eval run history locally in adk eval cli.
* Image artifacts can now be clicked directly in chat message to view.
* Left side panel can now be resized.
### Bug Fixes
* Avoid duplicating log in stderr.
* Align event filtering and ordering logic.
* Add handling for None param.annotation.
* Fixed several minor bugs regarding eval tab in web UI.
### Miscellaneous Chores
* Updates mypy config in pyproject.toml.
* Add google search agent in samples.
* Update filtered schema parameters for Gemini API.
* Adds autoformat.sh for formatting codebase.
## 1.0.0
### ⚠ BREAKING CHANGES
* Evaluation dataset schema is finalized with strong-type pydantic models.
(previously saved eval file needs re-generation, for both adk eval cli and
the eval tab in adk web UI).
*`BuiltInCodeExecutor` (in code_executors package) replaces
`BuiltInCodeExecutionTool` (previously in tools package).
* All methods in services are now async, including session service, artifact
service and memory service.
*`list_events` and `close_session` methods are removed from session service.
* agent.py file structure with MCP tools are now easier and simpler ([now](https://github.com/google/adk-python/blob/3b5232c14f48e1d5b170f3698d91639b079722c8/contributing/samples/mcp_stdio_server_agent/agent.py#L33) vs [before](https://github.com/google/adk-python/blob/a4adb739c0d86b9ae4587547d2653d568f6567f2/contributing/samples/mcp_agent/agent.py#L41)).
Old format is not working anymore.
*`Memory` schema and `MemoryService` is redesigned.
* Mark various class attributes as private in the classes in the `tools` package.
* Disabled session state injection if instruction provider is used.
(so that you can have `{var_name}` in the instruction, which is required for code snippets)
* Toolbox integration is revamped: tools/toolbox_tool.py → tools/toolbox_toolset.py.
* Removes the experimental `remote_agent.py`. We'll redesign it and bring it back.
### Features
* Dev UI:
* A brand new trace view for overall agent invocation.
* A revamped evaluation tab and comparison view for checking eval results.
* Introduced `BaseToolset` to allow dynamically add/remove tools for agents.
* Revamped MCPToolset with the new BaseToolset interface.
* Revamped GoogleApiTool, GoogleApiToolset and ApplicationIntegrationToolset with the new BaseToolset interface.
* Resigned agent.py file structure when needing MCPToolset.
@@ -18,27 +34,177 @@ was for a different project), you probably don't need to do it again.
Visit <https://cla.developers.google.com/> to see your current agreements or to
sign a new one.
### Review our community guidelines
## Review our community guidelines
This project follows
[Google's Open Source Community Guidelines](https://opensource.google/conduct/).
## Contribution process
# Contribution workflow
### Requirement for PRs
## Finding Issues to Work On
-All PRs, other than small documentation or typo fixes, should have a Issue assoicated. If not, please create one.
-Browse issues labeled **`good first issue`** (newcomer-friendly) or **`help wanted`** (general contributions).
- For other issues, please kindly ask before contributing to avoid duplication.
## Requirement for PRs
- Each PR should only have one commit. Please squash it if there are multiple PRs.
- All PRs, other than small documentation or typo fixes, should have a Issue assoicated. If not, please create one.
- Small, focused PRs. Keep changes minimal—one concern per PR.
- For bug fixes or features, please provide logs or screenshot after the fix is applied to help reviewers better understand the fix.
- Please add corresponding testing for your code change if it's not covered by existing tests.
- Please include a `testing plan` section in your PR to talk about how you will test. This will save time for PR review. See `Testing Requirements` section for more details.
### Large or Complex Changes
## Large or Complex Changes
For substantial features or architectural revisions:
- Open an Issue First: Outline your proposal, including design considerations and impact.
- Gather Feedback: Discuss with maintainers and the community to ensure alignment and avoid duplicate work
### Code reviews
## Testing Requirements
To maintain code quality and prevent regressions, all code changes must include comprehensive tests and verifiable end-to-end (E2E) evidence.
### Unit Tests
Please add or update unit tests for your change. Please include a summary of passed `pytest` results.
Requirements for unit tests:
- **Coverage:** Cover new features, edge cases, error conditions, and typical use cases.
- **Location:** Add or update tests under `tests/unittests/`, following existing naming conventions (e.g., `test_<module>_<feature>.py`).
- **Framework:** Use `pytest`. Tests should be:
- Fast and isolated.
- Written clearly with descriptive names.
- Free of external dependencies (use mocks or fixtures as needed).
- **Quality:** Aim for high readability and maintainability; include docstrings or comments for complex scenarios.
### Manual End-to-End (E2E) Tests
Manual E2E tests ensure integrated flows work as intended. Your tests should cover all scenarios. Sometimes, it's also good to ensure relevant functionality is not impacted.
Depending on your change:
- **ADK Web:**
- Use the `adk web` to verify functionality.
- Capture and attach relevant screenshots demonstrating the UI/UX changes or outputs.
- Label screenshots clearly in your PR description.
- **Runner:**
- Provide the testing setup. For example, the agent definition, and the runner setup.
- Execute the `runner` tool to reproduce workflows.
- Include the command used and console output showing test results.
- Highlight sections of the log that directly relate to your change.
## Documentation
For any changes that impact user-facing documentation (guides, API reference, tutorials), please open a PR in the [adk-docs](https://github.com/google/adk-docs) repository to update relevant part before or alongside your code PR.
## Development Setup
1.**Clone the repository:**
```shell
gh repo clone google/adk-python
cd adk-python
```
2. **Install uv:**
Check out [uv installation guide](https://docs.astral.sh/uv/getting-started/installation/).
3. **Create and activate a virtual environment:**
**NOTE**: ADK supports Python 3.9+. Python 3.11 and above is strongly recommended.
Create a workspace venv using uv.
```shell
uv venv --python "python3.11" ".venv"
```
Activate the workspace venv.
```shell
source .venv/bin/activate
```
**windows**
```shell
source .\.venv\Scripts\activate
```
4. **Install dependencies:**
```shell
uv sync --all-extras
```
**NOTE**: for convenience, installing all extra deps as a starting point.
5. **Run unit tests:**
```shell
pytest ./tests/unittests
```
NOTE: for accurate repro of test failure, only include `test`, `eval` and
`a2a` as extra dependencies.
```shell
uv sync --extra test --extra eval --extra a2a
pytest ./tests/unittests
```
6. **Auto-format the code:**
**NOTE**: We use `isort` and `pyink` for styles. Use the included
autoformat.sh to auto-format.
```shell
./autoformat.sh
```
7. **Build the wheel file:**
```shell
uv build
```
8. **Test the locally built wheel file:**
Have a simple testing folder setup as mentioned in the
[](https://github.com/google/adk-python/actions/workflows/python-unit-tests.yml)
For remote agent-to-agent communication, ADK integrates with the
[A2A protocol](https://github.com/google/A2A/).
See this [example](https://github.com/google/A2A/tree/main/samples/python/agents/google_adk)
for how they can work together.
## 🤝 Contributing
We welcome contributions from the community! Whether it's bug reports, feature requests, documentation improvements, or code contributions, please see our
- [General contribution guideline and flow](https://google.github.io/adk-docs/contributing-guide/#questions).
We welcome contributions from the community! Whether it's bug reports, feature requests, documentation improvements, or code contributions, please see our
- [General contribution guideline and flow](https://google.github.io/adk-docs/contributing-guide/).
- Then if you want to contribute code, please read [Code Contributing Guidelines](./CONTRIBUTING.md) to get started.
## 📄 License
This project is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details.
## Preview
This feature is subject to the "Pre-GA Offerings Terms" in the General Service Terms section of the [Service Specific Terms](https://cloud.google.com/terms/service-terms#1). Pre-GA features are available "as is" and might have limited support. For more information, see the [launch stage descriptions](https://cloud.google.com/products?hl=en#product-launch-stages).
This folder host resources for ADK contributors, for example, testing samples etc.
## Samples
Samples folder host samples to test different features. The samples are usually minimal and simplistic to test one or a few scenarios.
**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.
## ADK project and architecture overview
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.
This is helpful for contributors to understand the project and design philosophy.
- Code-First: Everything is defined in Python code for versioning, testing, and IDE support. Avoid GUI-based logic.
- Modularity & Composition: We build complex multi-agent systems by composing multiple, smaller, specialized agents.
- 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.
## Foundational Abstractions (Our Vocabulary)
- Agent: The blueprint. It defines an agent's identity, instructions, and tools. It's a declarative configuration object.
- Tool: A capability. A Python function an agent can call to interact with the world (e.g., search, API call).
- Runner: The engine. It orchestrates the "Reason-Act" loop, manages LLM calls, and executes tools.
- Session: The conversation state. It holds the history for a single, continuous dialogue.
- Memory: Long-term recall across different sessions.
- Artifact Service: Manages non-textual data like files.
## Canonical Project Structure
Adhere to this structure for compatibility with ADK tooling.
agent.py: Must define the agent and assign it to a variable named root_agent. This is how ADK's tools find it.
__init__.py: In each agent directory, it must contain from. import agent to make the agent discoverable.
## Local Development & Debugging
Interactive UI (adk web): This is our primary debugging tool. It's a decoupled system:
Backend: A FastAPI server started with adk api_server.
Frontend: An Angular app that connects to the backend.
Use the "Events" tab to inspect the full execution trace (prompts, tool calls, responses).
CLI (adk run): For quick, stateless functional checks in the terminal.
Programmatic (pytest): For writing automated unit and integration tests.
## The API Layer (FastAPI)
We expose agents as production APIs using FastAPI.
- 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.
- Standard Endpoints: The generated app includes standard routes like /list-apps and /run_sse for streaming responses. The wire format is camelCase.
- Custom Endpoints: We can add our own routes (e.g., /health) to the app object returned by the helper.
Python
from google.adk.cli.fast_api import get_fast_api_app
app = get_fast_api_app(agent_dir="./agents")
@app.get("/health")
async def health_check():
return {"status": "ok"}
## Deployment to Production
The adk cli provides the "adk deploy" command to deploy to Google Vertex Agent Engine, Google CloudRun, Google GKE.
## Testing & Evaluation Strategy
Testing is layered, like a pyramid.
### Layer 1: Unit Tests (Base)
What: Test individual Tool functions in isolation.
How: Use pytest in tests/test_tools.py. Verify deterministic logic.
### Layer 2: Integration Tests (Middle)
What: Test the agent's internal logic and interaction with tools.
How: Use pytest in tests/test_agent.py, often with mocked LLMs or services.
### Layer 3: Evaluation Tests (Top)
What: Assess end-to-end performance with a live LLM. This is about quality, not just pass/fail.
How: Use the ADK Evaluation Framework.
Test Cases: Create JSON files with input and a reference (expected tool calls and final response).
Metrics: tool_trajectory_avg_score (does it use tools correctly?) and response_match_score (is the final answer good?).
Run via: adk web (UI), pytest (for CI/CD), or adk eval (CLI).
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.