Commit Graph

492 Commits

Author SHA1 Message Date
Shangjie Chen
65063023a5 fix: Continue fetching events if there are multiple pages.
Fixes https://github.com/google/adk-python/issues/920

PiperOrigin-RevId: 764985371
2025-05-29 19:42:50 -07:00
Wei Sun (Jack)
18fbe3cbfc docs: Adds a sample agent to illustrate state usage via callbacks.
PiperOrigin-RevId: 764981675
2025-05-29 19:30:44 -07:00
Wei Sun (Jack)
4214c7eddd chore: auto-format files.
PiperOrigin-RevId: 764980009
2025-05-29 19:24:16 -07:00
Amulya Bhatia
face2e8cf2 Copybara import of the project:
--
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
2025-05-29 19:08:55 -07:00
Wei Sun (Jack)
04e07b4a14 docs: updates CONTRIBUTING.md to refine setup process using uv.
PiperOrigin-RevId: 764974667
2025-05-29 19:03:22 -07:00
Eugen-Bleck
b226a06c0b fix: match arg case in errors
--
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
2025-05-29 17:40:12 -07:00
Google Team Member
5c2ad327bf Render HTML artifact in chat window.
PiperOrigin-RevId: 764942273
2025-05-29 17:02:36 -07:00
Alankrit Verma
854a544061 fix(transfer_to_agent): update docstring for clarity and accuracy
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
2025-05-29 16:57:27 -07:00
Yongsul Kim
0d66a7888b Copybara import of the project:
--
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
2025-05-29 16:50:10 -07:00
Xiang (Sean) Zhou
ae7d3a79c8 chore: autoformat the test_litellm.py
PiperOrigin-RevId: 764937761
2025-05-29 16:49:20 -07:00
Xiang (Sean) Zhou
2b41824e46 chore: fix fast api ut
PiperOrigin-RevId: 764935253
2025-05-29 16:40:40 -07:00
Liang Wu
41ba2d1c8a chore: reformat the code using autoformat.sh.
PiperOrigin-RevId: 764918729
2025-05-29 15:56:29 -07:00
Shangjie Chen
db4bc9809c fix: Filter memory by app_name and user_id.
Fixing https://github.com/google/adk-python/issues/1019.

PiperOrigin-RevId: 764903966
2025-05-29 15:15:59 -07:00
LucasNobre
05f4834759 Copybara import of the project:
--
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
2025-05-29 15:11:23 -07:00
Jacky Wu
841e10ae35 fix: introduce PreciseTimestamp to fix mysql datetime precision issue.
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
2025-05-29 13:10:13 -07:00
Wei Sun (Jack)
a9dcc588ad ADK changes
PiperOrigin-RevId: 764820494
2025-05-29 12:10:41 -07:00
Liang Wu
a8a20743f9 fix: handles function tool parsing corner case where type hints are stored as strings.
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
2025-05-29 11:48:35 -07:00
Selcuk Gun
d587270327 Prevent JSON parsing errors and preserve non-ascii characters in telemetry
PiperOrigin-RevId: 764801572
2025-05-29 11:48:28 -07:00
Google Team Member
1de5c340d8 Raise HTTPException when running evals in fast_api if google-adk[eval] is not installed.
PiperOrigin-RevId: 764798561
2025-05-29 11:48:22 -07:00
Xiang (Sean) Zhou
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
Google Team Member
2a65c4118b fix: Assign empty inputSchema to MCP tool when converting an ADK tool that wraps a function which takes no parameters.
Fixes https://github.com/google/adk-python/issues/948

PiperOrigin-RevId: 764780248
2025-05-29 11:48:08 -07:00
Google Team Member
9bdd813be1 Fix typos in README for sample bigquery_agent and oauth_calendar_agent
PiperOrigin-RevId: 764777424
2025-05-29 11:48:01 -07:00
Google Team Member
ac52eab88e ADK changes
PiperOrigin-RevId: 764776124
2025-05-29 11:47:55 -07:00
Mohammad Ghaffarifar
a9345a072e chore: add py.typed and include it in flit config
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
2025-05-29 11:47:46 -07:00
Selcuk Gun
999a7fe69d Make tool_call one span for telemetry
Also renamed tool_call as execute_tool and added attributes as recommended in https://opentelemetry.io/docs/specs/semconv/gen-ai/gen-ai-spans/#execute-tool-span.

PiperOrigin-RevId: 764594179
2025-05-29 11:47:40 -07:00
Xiang (Sean) Zhou
96b36b70dc chore: fix base_llm_flow ut
PiperOrigin-RevId: 764585592
2025-05-29 11:47:31 -07:00
Xiang (Sean) Zhou
0250d9e3ac chore: reformat codes using autoformat.sh
PiperOrigin-RevId: 764584699
2025-05-29 11:47:22 -07:00
Xiang (Sean) Zhou
2b5c89b3a9 feat: expose more config of VertexAiSearchTool from latest Google GenAI SDK
for fixing: https://github.com/google/adk-python/issues/955

PiperOrigin-RevId: 764568728
2025-05-28 22:32:44 -07:00
Xiang (Sean) Zhou
b92e068155 chore: fix function tool UT
PiperOrigin-RevId: 764567867
2025-05-28 22:30:42 -07:00
Xiang (Sean) Zhou
a0714b8afc ADK changes
PiperOrigin-RevId: 764564638
2025-05-28 22:19:24 -07:00
Google Team Member
1452dacfeb Use media type in chat window. Remove isArtifactImage and isArtifactAudio reference.
PiperOrigin-RevId: 764563376
2025-05-28 22:15:28 -07:00
Almas Akchabayev
795605a37e fix: separate thinking from text parts in streaming mode
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
2025-05-28 22:11:14 -07:00
Google Team Member
60ceea72bd fix: do not convert "false" value to dict
This causes information loss, and is unexpected from user.

PiperOrigin-RevId: 764558190
2025-05-28 21:56:52 -07:00
Xiang (Sean) Zhou
b70e74c450 chore: auto format mcp tools
PiperOrigin-RevId: 764547299
2025-05-28 21:14:42 -07:00
Xiang (Sean) Zhou
791ac9eb68 refactor: refactor cli to use agent loader
PiperOrigin-RevId: 764546019
2025-05-28 21:09:40 -07:00
Xiang (Sean) Zhou
623957c0a8 refactor: refine agent_loader to load the most common folder structure first and don't including unnecessary case
PiperOrigin-RevId: 764545194
2025-05-28 21:06:07 -07:00
Arpit R
6157db77f2 Copybara import of the project:
--
bdb2ddff1336db7fbeae71d3d76b4d294d7c4bea by Arpit Roopchandani <17565234+whoisarpit@users.noreply.github.com>:

Fix: Set output_schema correctly for LiteLllm
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/580 from whoisarpit:fix/lite_llm_response_schema 08bdb5a993fc44adf03e985c820c2083de30ba58
PiperOrigin-RevId: 764524765
2025-05-28 19:56:03 -07:00
Danny Park
9d4ca4ed44 fix: Fix filtering by user_id for vertex ai session service listing
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
2025-05-28 19:46:39 -07:00
Google Team Member
fc3e374c86 Add export to json button in the chat window.
PiperOrigin-RevId: 764504072
2025-05-28 18:37:12 -07:00
Yifan Wang
fda34ea9ff chore: bump version number to 1.1.1
Include d6c6bb4b24 in addition to 1.1.0

PiperOrigin-RevId: 764478592
2025-05-28 17:09:01 -07:00
Selcuk Gun
609b3a572c Provide sample LongRunningFunctionTool runner script and documentation
PiperOrigin-RevId: 764475345
2025-05-28 16:59:52 -07:00
Liang Wu
2a8ca06c3e chore: remove reference to genai SDK folder.
Added `from __future__ import annotations` to follow the best practice.

PiperOrigin-RevId: 764473253
2025-05-28 16:54:19 -07:00
Google Team Member
3489bb598d Minor typo fix.
PiperOrigin-RevId: 764468987
2025-05-28 16:41:40 -07:00
Liang Wu
ed63cd86eb chore: re-format import statements in mcp_session_manager.py.
They are causing Kokoro failures.

PiperOrigin-RevId: 764467630
2025-05-28 16:37:56 -07:00
Ankur Sharma
447798d573 Accounting for "references" to be absent in eval files in older format.
PiperOrigin-RevId: 764454937
2025-05-28 16:04:18 -07:00
Google Team Member
958c18db2b Add download object as json function in the download service.
PiperOrigin-RevId: 764421398
2025-05-28 14:37:47 -07:00
Google Team Member
83ba6419cd Allow GOOGLE_AI to support optional args.
PiperOrigin-RevId: 764419789
2025-05-28 14:34:11 -07:00
Omar BENHAMID
d232e6216d feat: google/adk-python#479 support for streamable http MCP servers for MCPToolset
Copybara import of the project:

--
c5b9d49d7b6d858ff0a93bd690e6d653b7c32221 by Omar BENHAMID <omar.benhamid@smart-gts.com>:

feat: google/adk-python#479 support for streamable http MCP servers for MCPToolset

--
9431bc19e6538c1b814aba0b24ff564acf046075 by Omar BENHAMID <omar.benhamid@smart-gts.com>:

feat: google/adk-python#479 streamable http added to right package

--
8b4aabed45a6f0dc828beb61f12985dc7b14f3d0 by Omar BENHAMID <omar.benhamid@smart-gts.com>:

feat: google/adk-python#479 streamable http : review feedbacks + sample agent
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/650 from omarbenhamid:feature/mcp-streamable-http 625f028784c216401d45cb1b5d4d998535ebcb00
PiperOrigin-RevId: 764419586
2025-05-28 14:33:19 -07:00
Xiang (Sean) Zhou
c7ce987676 chore: reformat load_memory_tool
PiperOrigin-RevId: 764402270
2025-05-28 13:52:40 -07:00
Shangjie Chen
bf27f22a95 fix: Make GroundingMetadata JSON serializable. Also use the same logic to simplify content serialization.
PiperOrigin-RevId: 764401248
2025-05-28 13:50:25 -07:00