Xiang (Sean) Zhou and Copybara-Service
0c855877c5
docs: Update documents about the information of viber coding
...
PiperOrigin-RevId: 788217734
2025-07-28 17:18:53 -07:00
Xiang (Sean) Zhou and Copybara-Service
927c75f0ee
chore: Replace imports by importing from actual module instead of from package (__init__.py)
...
PiperOrigin-RevId: 786342250
2025-07-23 10:49:43 -07:00
Xiang (Sean) Zhou and Copybara-Service
430b82024f
chore: Fixed flaky test_update_credential_with_tokens unittest
...
PiperOrigin-RevId: 786340983
2025-07-23 10:45:01 -07:00
Xiang (Sean) Zhou and Copybara-Service
70266abfc2
chore: fix UT failures of test_google_llm.py
...
Mainly it's due to GenAI sdk changed their header of genai SDK versions, we have UT to verify that ADK or ADK users won't override their headers. Updated the header accordingly in the UT.
PiperOrigin-RevId: 786334741
2025-07-23 10:31:16 -07:00
Xiang (Sean) Zhou and Copybara-Service
32df937ebc
chore: Update docstring for is_final_response method
...
PiperOrigin-RevId: 785983329
2025-07-22 13:50:30 -07:00
Xiang (Sean) Zhou and Copybara-Service
083dcb4465
feat: Add ComputerUseToolset
...
PiperOrigin-RevId: 785646071
2025-07-21 18:08:35 -07:00
Xiang (Sean) Zhou and Copybara-Service
b2c2f1bd33
chore: Add an a2a sample agent to demo running the a2a server via unvicorn command and run remote agent as root_agent
...
PiperOrigin-RevId: 785629271
2025-07-21 17:08:35 -07:00
Xiang (Sean) Zhou and Copybara-Service
a77d68964a
feat: Add an to_a2a util to convert adk agent to A2A ASGI application
...
Users can do :
```
a2a_app = to_a2a(root_agent)
```
then use below command to start a2a server:
```
uvicorn user_module:a2a_app --host localhost --port 8000
```
PiperOrigin-RevId: 785625048
2025-07-21 16:54:53 -07:00
Xiang (Sean) Zhou and Copybara-Service
18f5bea411
feat: Add agent card builder
...
PiperOrigin-RevId: 785565665
2025-07-21 13:59:02 -07:00
Xiang (Sean) Zhou and Copybara-Service
9467720919
chore: Remove unused import from hello world sample agent
...
PiperOrigin-RevId: 785501232
2025-07-21 11:03:03 -07:00
Xiang (Sean) Zhou and Copybara-Service
ee3918e34e
chore: Update the error message when A2A is not supported for the installed python version
...
PiperOrigin-RevId: 785490858
2025-07-21 10:37:33 -07:00
Xiang (Sean) Zhou and Copybara-Service
3643b4ae19
feat: Allow toolset to process llm_request before tools returned by it
...
PiperOrigin-RevId: 785480813
2025-07-21 10:11:40 -07:00
Xiang (Sean) Zhou and Copybara-Service
cec400ada3
chore: Autoformat history_management agent codes
...
PiperOrigin-RevId: 785003632
2025-07-19 17:51:54 -07:00
Sean Zhou
6f016609e8
fix: support path level parameters for open_api_spec_parser
...
autoformat the changes
2025-07-17 18:09:40 -07:00
Xiang (Sean) Zhou and Copybara-Service
377b5a9b78
fix: Add response schema for agent tool function declaration even when it's return None
...
PiperOrigin-RevId: 784216811
2025-07-17 09:51:34 -07:00
Xiang (Sean) Zhou and Copybara-Service
33ac8380ad
fix: Set response schema for function that returns None
...
PiperOrigin-RevId: 784053725
2025-07-16 23:59:45 -07:00
Xiang (Sean) Zhou and Copybara-Service
b977d12ea8
refactor: Add save_credential and load_credential in callback context for developer to access credential service
...
developer may want to save/load credentials themselves to/from credential service. see (https://github.com/google/adk-python/issues/1816 )
PiperOrigin-RevId: 783487628
2025-07-15 15:09:19 -07:00
Xiang (Sean) Zhou and Copybara-Service
b1fa383e73
docs: Update agent transfer related doc string and comments
...
This is to address https://github.com/google/adk-python/issues/1907
PiperOrigin-RevId: 783481177
2025-07-15 14:50:33 -07:00
Xiang (Sean) Zhou and Copybara-Service
1a75848391
refactor: Use CallbackContext in credential service for saving/loading credential
...
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
2025-07-15 14:48:38 -07:00
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