Xiang (Sean) Zhou and Copybara-Service
bf7745f428
fix: Create correct object for image and video content in litellm
...
PiperOrigin-RevId: 783478779
2025-07-15 14:44:14 -07:00
Xiang (Sean) Zhou and Copybara-Service
3c6e18fd1c
fix: Don't set error_code and error_message when model stop response in normal case
...
PiperOrigin-RevId: 783415488
2025-07-15 11:47:53 -07:00
Xiang (Sean) Zhou and Copybara-Service
a5d6f1e52e
fix: Support project-based gemini model path for BuiltInCodeExecutor and all built-in tools
...
This is to support model path like :
projects/265104255505/locations/us-central1/publishers/google/models/gemini-2.0-flash-001"
PiperOrigin-RevId: 783413351
2025-07-15 11:41:37 -07:00
Xiang (Sean) Zhou and Copybara-Service
30d7b37069
refactor: Move list_artifacts from tool_context to callback_context
...
1. users may want to list_artifacts in callbacks
2. save/load artifacts are already in callback_context
PiperOrigin-RevId: 783399941
2025-07-15 11:08:17 -07:00
Xiang (Sean) Zhou and Copybara-Service
498ce906dd
docs: Update doc string for GcsArtifactService
...
PiperOrigin-RevId: 783157778
2025-07-14 20:41:16 -07:00
Xiang (Sean) Zhou and Copybara-Service
dea1ee14ab
docs: Fix docstring and update module public name list for generating API references
...
To fix https://github.com/google/adk-docs/issues/131
PiperOrigin-RevId: 783080206
2025-07-14 16:16:57 -07:00
Xiang (Sean) Zhou and Copybara-Service
62a611956f
fix: Add instruction in long running tool description to avoid being invoked again by model
...
PiperOrigin-RevId: 783039620
2025-07-14 14:18:49 -07:00
Xiang (Sean) Zhou and Copybara-Service
134ec0d71e
fix: Fix the long running function response event merge logic
...
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
2025-07-11 16:48:59 -07:00
Xiang (Sean) Zhou and Copybara-Service
a8fcc1b8ab
fix: Return final task result in task artifact instead of status message
...
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
2025-07-11 16:47:28 -07:00
Xiang (Sean) Zhou and Copybara-Service
a57d629bb9
chore: Update the README of a2a sample agent
...
PiperOrigin-RevId: 782153753
2025-07-11 16:44:58 -07:00
Sean Zhou
0a187b4a7d
auto format the codes
2025-07-11 14:42:12 -07:00
Sean Zhou
8acfcfeb5d
auto format codes
2025-07-11 13:14:33 -07:00
Sean Zhou
4c5ef1e235
feat: Add configure service account auth for google_api_tool_set
2025-07-10 21:23:59 -07:00
Xiang (Sean) Zhou and Copybara-Service
584c8c6d91
fix: improve partial event handling and streaming aggregation
...
- 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
2025-07-09 23:03:33 -07:00
Xiang (Sean) Zhou and Copybara-Service
da34692231
chore: Release 1.6.0
...
PiperOrigin-RevId: 781272837
2025-07-09 17:16:08 -07:00
Xiang (Sean) Zhou and Copybara-Service
b5d9f8f3e3
chore: Update gemini model to 2.0 for a2a samples
...
PiperOrigin-RevId: 780657476
2025-07-08 11:56:28 -07:00
Xiang (Sean) Zhou and Copybara-Service
45d60a1906
refactor: extract mcp client creation logic to a separate method
...
PiperOrigin-RevId: 780609120
2025-07-08 10:04:15 -07:00
Xiang (Sean) Zhou and Copybara-Service
e2748b3ed5
chore: Add an a2a agent to demo oauth flow
...
PiperOrigin-RevId: 776661038
2025-06-27 11:43:05 -07:00
Xiang (Sean) Zhou and Copybara-Service
379810dd6a
chore: Add a human in the loop a2a agent demo sample
...
PiperOrigin-RevId: 776660876
2025-06-27 11:41:47 -07:00
Xiang (Sean) Zhou and Copybara-Service
1cf5cf0d0a
chore: Add a basic a2a agent demo sample
...
PiperOrigin-RevId: 776660703
2025-06-27 11:40:26 -07:00
Xiang (Sean) Zhou and Copybara-Service
f0183a9b98
feat: Enable A2A features as experimental
...
PiperOrigin-RevId: 776656783
2025-06-27 11:28:28 -07:00
Xiang (Sean) Zhou and Copybara-Service
c13c9875cf
feat: Add remote a2a agent
...
PiperOrigin-RevId: 776643130
2025-06-27 10:52:01 -07:00
Xiang (Sean) Zhou and Copybara-Service
045aea9b15
fix: Support API-Key for MCP Tool authentication
...
PiperOrigin-RevId: 776641474
2025-06-27 10:47:42 -07:00
Xiang (Sean) Zhou and Copybara-Service
20279d9a50
fix: Save output in state via output_key only when the event is authored by current agent
...
PiperOrigin-RevId: 776640671
2025-06-27 10:45:34 -07:00
Xiang (Sean) Zhou and Copybara-Service
09e487df3c
chore: Use context_id as session_id and construct temp user_id from context_id
...
PiperOrigin-RevId: 776639713
2025-06-27 10:42:15 -07:00
Xiang (Sean) Zhou and Copybara-Service
1fe9c47cc6
chore: Enhance a2a_agent_executor module to raise error with meaningful error message to ask user upgrade python when python version < 3.10
...
PiperOrigin-RevId: 776631647
2025-06-27 10:21:26 -07:00
Xiang (Sean) Zhou and Copybara-Service
31e41bdd06
chore: Enhance part_converter module to only import sys when needed and update the import error message
...
PiperOrigin-RevId: 776631415
2025-06-27 10:19:50 -07:00
Xiang (Sean) Zhou and Copybara-Service
e79651cd86
feat: Add A2A endpoints to fast api server when --a2a option is specified (WIP)
...
PiperOrigin-RevId: 776211580
2025-06-26 11:18:44 -07:00
Xiang (Sean) Zhou and Copybara-Service
5356f20ead
chore: Add a2a log utils for formatting a2a reqeust/response logs
...
PiperOrigin-RevId: 776026554
2025-06-26 01:12:23 -07:00
Xiang (Sean) Zhou and Copybara-Service
ed09cd840f
chore: Add enable_a2a option to adk command line
...
PiperOrigin-RevId: 775991652
2025-06-25 23:05:08 -07:00
Xiang (Sean) Zhou and Copybara-Service
630f1674cb
chore: Add a2a agent executor
...
PiperOrigin-RevId: 775983689
2025-06-25 22:32:17 -07:00
Xiang (Sean) Zhou and Copybara-Service
2f55de6ded
chore: Add a2a task result aggregator
...
PiperOrigin-RevId: 775975982
2025-06-25 22:02:28 -07:00
Xiang (Sean) Zhou and Copybara-Service
a71dbdf9e2
chore: Enhance a2a event converter
...
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
2025-06-25 15:32:17 -07:00
Xiang (Sean) Zhou and Copybara-Service
832a633351
chore: Enhance a2a part converters
...
a. fix binary data conversion
b. support thoughts, code execution result, executable codes conversion
PiperOrigin-RevId: 775827259
2025-06-25 13:58:49 -07:00
Xiang (Sean) Zhou and Copybara-Service
a623467299
chore: Enhance a2a context id parsing and construction logic
...
PiperOrigin-RevId: 775718282
2025-06-25 09:19:16 -07:00
Xiang (Sean) Zhou and Copybara-Service
f54b9b6ad1
chore: Add unit tests for contents.py
...
PiperOrigin-RevId: 775713101
2025-06-25 09:06:01 -07:00
Xiang (Sean) Zhou and Copybara-Service
917a8a19f7
chore: Adapt oauth calendar agent to use authenticated tool
...
PiperOrigin-RevId: 775433950
2025-06-24 16:46:20 -07:00
Xiang (Sean) Zhou and Copybara-Service
acbdca0d84
fix: Make raw_auth_credential and exchanged_auth_credential optional given their default value is None
...
PiperOrigin-RevId: 775397286
2025-06-24 15:03:54 -07:00
Xiang (Sean) Zhou and Copybara-Service
120cbabeb2
refactor: Rename long util function name in runner.py and move it to functions.py
...
PiperOrigin-RevId: 774880990
2025-06-23 12:24:10 -07:00
Xiang (Sean) Zhou and Copybara-Service
29cd183aa1
chore: Add credential service backed by session state
...
PiperOrigin-RevId: 774878336
2025-06-23 12:16:03 -07:00
Xiang (Sean) Zhou and Copybara-Service
7c670f638b
chore: Send user message to the agent that returned a corresponding function call if user message is a function response
...
PiperOrigin-RevId: 773895971
2025-06-20 17:15:29 -07:00
Xiang (Sean) Zhou and Copybara-Service
fb13963ded
chore: Add request converter to convert a2a request to ADK request
...
PiperOrigin-RevId: 773894462
2025-06-20 17:09:05 -07:00
Xiang (Sean) Zhou and Copybara-Service
742478fdb7
chore: Add event converters to convert adk event to a2a event (WIP)
...
PiperOrigin-RevId: 773795427
2025-06-20 12:14:12 -07:00
Xiang (Sean) Zhou and Copybara-Service
ffcba70686
chore: skip mcp and a2a tests for python 3.9
...
PiperOrigin-RevId: 773785385
2025-06-20 11:46:31 -07:00
Xiang (Sean) Zhou and Copybara-Service
7f8dc8927a
chore: fix the mcp_sse_agent
...
PiperOrigin-RevId: 773140021
2025-06-18 18:32:06 -07:00
Xiang (Sean) Zhou and Copybara-Service
9a1115c504
chore: Remove service account support
...
given it was not correctly supported.
PiperOrigin-RevId: 773137317
2025-06-18 18:19:05 -07:00
Xiang (Sean) Zhou and Copybara-Service
913d771d6d
chore: Raise meaningful errors when importing a2a modules for python 3.9
...
PiperOrigin-RevId: 773128206
2025-06-18 17:43:11 -07:00
Xiang (Sean) Zhou and Copybara-Service
157d9be88d
feat: Enable MCP Tool Auth (Experimental)
...
PiperOrigin-RevId: 773002759
2025-06-18 11:44:02 -07:00
Xiang (Sean) Zhou and Copybara-Service
18a541c8fa
chore: Ignore mcp_tool ut tests for python 3.9 given mcp sdk only supports 3.10+
...
PiperOrigin-RevId: 772999037
2025-06-18 11:34:10 -07:00
Xiang (Sean) Zhou and Copybara-Service
dcea7767c6
feat: Add Authenticated Tool (Experimental)
...
PiperOrigin-RevId: 772992074
2025-06-18 11:17:01 -07:00
Xiang (Sean) Zhou and Copybara-Service
2c739ab581
chore: Add Credential Manager for managing tools credential (Experimental)
...
PiperOrigin-RevId: 772986051
2025-06-18 11:01:38 -07:00
Xiang (Sean) Zhou and Copybara-Service
9a207cb832
refactor: Refactor oauth2_credential_exchanger to exchanger and refresher separately
...
PiperOrigin-RevId: 772979993
2025-06-18 10:46:39 -07:00
Xiang (Sean) Zhou and Copybara-Service
a17ebe6ebd
chore: Add a credential refresher registry
...
PiperOrigin-RevId: 772747251
2025-06-17 21:12:30 -07:00
Xiang (Sean) Zhou and Copybara-Service
55201cb6a1
chore: Add credential exchanger registry (Experimentals)
...
PiperOrigin-RevId: 772713412
2025-06-17 19:09:21 -07:00
Xiang (Sean) Zhou and Copybara-Service
0a9625317a
refactor: Adapt service account credential exchanger to base credential exchanger interface
...
PiperOrigin-RevId: 772710438
2025-06-17 18:55:46 -07:00
Xiang (Sean) Zhou and Copybara-Service
5f89a469ec
chore: Add credential service to runner and invocation context
...
PiperOrigin-RevId: 772697298
2025-06-17 18:08:43 -07:00
Xiang (Sean) Zhou and Copybara-Service
c04adaade1
chore: Add in memory credential service (Experimental)
...
PiperOrigin-RevId: 772534962
2025-06-17 10:45:49 -07:00
Xiang (Sean) Zhou and Copybara-Service
e1812797ad
chore: Add A2A Part converter (WIP)
...
PiperOrigin-RevId: 772282116
2025-06-16 20:35:09 -07:00
Xiang (Sean) Zhou and Copybara-Service
c755cf23c5
chore: Ignore a2a ut tests for python 3.9 given a2a-sdk only supports 3.10+
...
PiperOrigin-RevId: 772270172
2025-06-16 19:53:46 -07:00
Xiang (Sean) Zhou and Copybara-Service
94caccc148
refactor: Extract util method from OAuth2 credential fetcher for reuse
...
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
2025-06-16 19:03:16 -07:00
Xiang (Sean) Zhou and Copybara-Service
476805d5b9
chore: Add a2a extra dependency for github UT workflows
...
PiperOrigin-RevId: 772251530
2025-06-16 18:34:18 -07:00
Xiang (Sean) Zhou and Copybara-Service
e2a81365ec
chore: Add a base credential refresher interface
...
PiperOrigin-RevId: 772248299
2025-06-16 18:21:35 -07:00
Xiang (Sean) Zhou and Copybara-Service
28dfcd2512
chore: Add experimental decorator to Oauth2 credential fethcer
...
PiperOrigin-RevId: 772236406
2025-06-16 17:36:48 -07:00
Xiang (Sean) Zhou and Copybara-Service
a6b1baa61b
chore: Add base credential exchanger (Experimental)
...
PiperOrigin-RevId: 772227201
2025-06-16 17:05:20 -07:00
Xiang (Sean) Zhou and Copybara-Service
4bda245171
chore: fix oauth_calendar_agent example
...
PiperOrigin-RevId: 772214855
2025-06-16 16:26:59 -07:00
Xiang (Sean) Zhou and Copybara-Service
31b81a342d
chore: Update streamable http mcp example agent
...
PiperOrigin-RevId: 772213323
2025-06-16 16:22:09 -07:00
Xiang (Sean) Zhou and Copybara-Service
a4d432a9e6
chore: Add Service Account Credential Exchanger (Experimental)
...
PiperOrigin-RevId: 771507089
2025-06-14 13:39:50 -07:00
Xiang (Sean) Zhou and Copybara-Service
d1bda9d946
chore: Allow working_in_progress feature for unittests
...
PiperOrigin-RevId: 771500394
2025-06-14 12:56:02 -07:00
Xiang (Sean) Zhou and Copybara-Service
a19d617ed8
chore: Add experimental decorator to BigQuery tools
...
PiperOrigin-RevId: 771359886
2025-06-13 23:32:33 -07:00
Xiang (Sean) Zhou and Copybara-Service
8ebf229c47
chore: Add base credential service interface (WIP)
...
PiperOrigin-RevId: 771358480
2025-06-13 23:24:30 -07:00
Xiang (Sean) Zhou and Copybara-Service
b51a1f45fd
chore: support @working_in_progress and @expremental without calling parameters
...
PiperOrigin-RevId: 771357728
2025-06-13 23:18:43 -07:00
Xiang (Sean) Zhou and Copybara-Service
8932106246
chore: Raise error when using features decorated by working_in_progress decorator
...
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
2025-06-13 21:17:31 -07:00
Xiang (Sean) Zhou and Copybara-Service
d129fd636b
chore: Update the comments of MCPTool
...
PiperOrigin-RevId: 771234262
2025-06-13 14:53:41 -07:00
Xiang (Sean) Zhou and Copybara-Service
40b15ad278
refactor: enhance mcp tool session management
...
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
2025-06-12 23:11:06 -07:00
Xiang (Sean) Zhou and Copybara-Service
dbdeb49090
chore: Add a2a-sdk to pyproject.toml
...
PiperOrigin-RevId: 770908052
2025-06-12 20:30:14 -07:00
Xiang (Sean) Zhou and Copybara-Service
177980106b
feat: Support refresh access token automatically for rest_api_tool
...
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
2025-06-12 20:07:43 -07:00
Xiang (Sean) Zhou and Copybara-Service
c5b063f1ff
feat: Add an Oauth2 credential fetcher to exchange and refresh oauth2 token
...
PiperOrigin-RevId: 770892243
2025-06-12 19:40:16 -07:00
Xiang (Sean) Zhou and Copybara-Service
29e4ca9152
chore: Add empty a2a package
...
PiperOrigin-RevId: 770851838
2025-06-12 17:07:05 -07:00
Xiang (Sean) Zhou and Copybara-Service
4ccda99e8e
fix: Merge custom http options with adk specific http options in model api request
...
PiperOrigin-RevId: 770836112
2025-06-12 16:20:31 -07:00
Xiang (Sean) Zhou and Copybara-Service
77f44a4e45
refactor: remove the examples filed of LlmAgent which are no longer needed after migrating to example tool
...
PiperOrigin-RevId: 769757803
2025-06-10 12:55:48 -07:00
Xiang (Sean) Zhou and Copybara-Service
fa110c22f2
chore: refine doc string of global_instruction
...
PiperOrigin-RevId: 769650108
2025-06-10 08:48:43 -07:00
Xiang (Sean) Zhou and Copybara-Service
309a656f49
refactor: extract credentail key building logic to auth_config
...
PiperOrigin-RevId: 768124459
2025-06-06 10:19:20 -07:00
Xiang (Sean) Zhou and Copybara-Service
078ac842d7
chore: replace print with logger.info
...
PiperOrigin-RevId: 767732597
2025-06-05 13:09:07 -07:00
Xiang (Sean) Zhou and Copybara-Service
4269cac953
chore: change import path to import directly from module instead of package
...
PiperOrigin-RevId: 767697759
2025-06-05 11:40:24 -07:00
Xiang (Sean) Zhou and Copybara-Service
c224626ae1
fix: handle the case when agent loading error doesn't have msg attribute in agent loader
...
PiperOrigin-RevId: 767447874
2025-06-04 23:13:12 -07:00
Xiang (Sean) Zhou and Copybara-Service
b1a74d099f
fix: relax openapi spec to gemini schema conversion to tolerate more cases
...
PiperOrigin-RevId: 766985694
2025-06-03 22:59:34 -07:00
Xiang (Sean) Zhou and Copybara-Service
7b51ae9724
fix: enhance agent loader exception handler and expose precise error information
...
PiperOrigin-RevId: 766876662
2025-06-03 16:56:29 -07:00
Xiang (Sean) Zhou and Copybara-Service
821f751b5a
chore: add agent for testing Notion MCP server
...
PiperOrigin-RevId: 766325293
2025-06-02 13:41:56 -07:00
Xiang (Sean) Zhou and Copybara-Service
5a67a946d2
fix: fix parameter schema generation for gemini
...
this fixes https://github.com/google/adk-python/issues/1055
and https://github.com/google/adk-python/issues/881
PiperOrigin-RevId: 766288394
2025-06-02 12:03:02 -07:00
Xiang (Sean) Zhou and Copybara-Service
15a45a68fd
chore: move fast api test case to cli package to match source codes package structure
...
PiperOrigin-RevId: 766268528
2025-06-02 11:16:14 -07:00
Xiang (Sean) Zhou and Copybara-Service
f07abcc09c
chore: fix ut for test_functions_request_euc.py
...
PiperOrigin-RevId: 766268126
2025-06-02 11:15:13 -07:00
Xiang (Sean) Zhou and Copybara-Service
036f954a2a
refactor: uniform Google LLM variant and parsing logic and make contant value consistent with Google GenAI SDK : https://github.com/googleapis/python-genai/blob/903e0729ce5198f48193ac7301727f0c3d72f2b8/google/genai/_automatic_function_calling_util.py#L96
...
PiperOrigin-RevId: 765639681
2025-05-31 13:12:25 -07:00
Xiang (Sean) Zhou and Copybara-Service
2623c71086
fix: add adk icon for UI
...
PiperOrigin-RevId: 765453471
2025-05-30 21:21:30 -07:00
Xiang (Sean) Zhou and Copybara-Service
af2180c6d0
chore: add more comments to MCPTooset and MCPSessionManager
...
PiperOrigin-RevId: 765448413
2025-05-30 21:01:16 -07:00
Xiang (Sean) Zhou and Copybara-Service
5d297169d0
fix: remove labels from config when using API key from Google AI Studio to call model
...
PiperOrigin-RevId: 765448305
2025-05-30 21:00:23 -07:00
Xiang (Sean) Zhou and Copybara-Service
3ec496dd81
chore: add requirements.txt for langchain_youtube_search_agent
...
PiperOrigin-RevId: 765409052
2025-05-30 18:19:01 -07:00
Xiang (Sean) Zhou and Copybara-Service
3616bb5fc4
feat:support Langchain tools that has run_manager in _run args and don't have args_schema populated
...
PiperOrigin-RevId: 765405793
2025-05-30 18:05:42 -07:00
Xiang (Sean) Zhou and Copybara-Service
ae7d3a79c8
chore: autoformat the test_litellm.py
...
PiperOrigin-RevId: 764937761
2025-05-29 16:49:20 -07:00
Xiang (Sean) Zhou and Copybara-Service
2b41824e46
chore: fix fast api ut
...
PiperOrigin-RevId: 764935253
2025-05-29 16:40:40 -07:00
Xiang (Sean) Zhou and Copybara-Service
7e637d3fa0
feat: support Langchain StructuredTool for Langchain tool
...
for fixing: https://github.com/google/adk-python/issues/707
PiperOrigin-RevId: 764781197
2025-05-29 11:48:15 -07:00