Commit Graph

347 Commits

Author SHA1 Message Date
Xiang (Sean) Zhou
bdd678db31 refactor: refactor google api toolset to expose class instead of instance
PiperOrigin-RevId: 759289358
2025-05-15 13:59:57 -07:00
Yifan Wang
f298d07579 ADK changes
PiperOrigin-RevId: 759276411
2025-05-15 13:28:50 -07:00
Liang Wu
c399c50be5 Add --host argument to adk web and adk api_server commands and change the default binding host to localhost.
PiperOrigin-RevId: 759276079
2025-05-15 13:27:49 -07:00
Google Team Member
05917cabbd ADK changes
PiperOrigin-RevId: 759259620
2025-05-15 12:46:44 -07:00
Google Team Member
1804ca39a6 feat! Update session service interface to be async.
Also keep the sync version in the InMemorySessionService as create_session_sync() as a temporary migration option.

PiperOrigin-RevId: 759252188
2025-05-15 12:24:13 -07:00
Shangjie Chen
5b3204c356 feat! Update session service interface to be async.
Also keep the sync version in the InMemorySessionService as create_session_sync() as a temporary migration option.

PiperOrigin-RevId: 759224250
2025-05-15 11:17:13 -07:00
Yifan Wang
d161a2c3f7 ADK changes
PiperOrigin-RevId: 759218509
2025-05-15 11:04:21 -07:00
Ankur Sharma
95f994d7ca chore:add in memory session service to in memory runner.
PiperOrigin-RevId: 759206471
2025-05-15 10:35:21 -07:00
Shangjie Chen
3ea9eca929 feat! Remove list_events from session service interface as it has many overlap with get_session.
PiperOrigin-RevId: 759184310
2025-05-15 09:41:16 -07:00
Xiang (Sean) Zhou
2214c1558f fix: fix the typo in MCPToolset when parsing the errlog argument to MCPSessionManager
PiperOrigin-RevId: 759018462
2025-05-15 00:31:18 -07:00
Xiang (Sean) Zhou
4a0751941b fix: fix application integration toolset
PiperOrigin-RevId: 759018346
2025-05-15 00:30:19 -07:00
Liang Wu
9c2358e2a5 Update the usage of built-in code execution in documentation and sample agent.
PiperOrigin-RevId: 758997215
2025-05-14 23:17:13 -07:00
Ankur Sharma
3686608f8d Fixes test_cli_eval_success_path test.
PiperOrigin-RevId: 758981214
2025-05-14 22:20:59 -07:00
Ankur Sharma
ada24d7171 Update Response Evaluators to use the new eval schema.
PiperOrigin-RevId: 758929683
2025-05-14 19:26:29 -07:00
Ankur Sharma
ee674ce0ef Update Eval Run and TrajectoryEvaluator to use the new schema.
PiperOrigin-RevId: 758927160
2025-05-14 19:16:33 -07:00
Ankur Sharma
2cb74dd20e Update Eval Set Manager to use new EvalSet and EvalCase schema.
PiperOrigin-RevId: 758921365
2025-05-14 18:51:38 -07:00
Shangjie Chen
293f406148 fix: fix breaking delete_session.
PiperOrigin-RevId: 758862440
2025-05-14 15:42:44 -07:00
Shangjie Chen
bc43a1196a feat: add _sync implementation in the inmemory session sevice.
PiperOrigin-RevId: 758832846
2025-05-14 14:22:46 -07:00
Google Team Member
dc90c91ed1 Fix typo in import
PiperOrigin-RevId: 758736571
2025-05-14 10:20:24 -07:00
Liang Wu
22e4210b47 Deprecate BuiltInCodeExecutionTool in favor of BuiltInCodeExecutor.
PiperOrigin-RevId: 758713057
2025-05-14 09:22:49 -07:00
Wei Sun (Jack)
b67182c50f chore: Adds docstring for LlmAgent.disallow_transfer_to_parent to clarify the expected behavior.
PiperOrigin-RevId: 758676926
2025-05-14 07:36:51 -07:00
Wei Sun (Jack)
71bd808a14 Fixes: eval_result endpoint throws due to folder not existing.
PiperOrigin-RevId: 758508672
2025-05-13 22:03:38 -07:00
Tanue Eugen-Bleck Mbunwo
b33bdb9a03 fix: Display full help text for adk create CLI command when argument…
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
2025-05-13 21:22:05 -07:00
Xiang (Sean) Zhou
fc40226ec0 refactor: refactor mcp toolset to hide non-public field
PiperOrigin-RevId: 758494601
2025-05-13 21:06:03 -07:00
Xiang (Sean) Zhou
14cf910ce6 refactor: refactor application integration toolset to hide non-public field
PiperOrigin-RevId: 758469938
2025-05-13 19:28:01 -07:00
Xiang (Sean) Zhou
00e0035c8a refactor: refactor google api toolset to hide non-public field
PiperOrigin-RevId: 758469484
2025-05-13 19:26:05 -07:00
Wei Sun (Jack)
30947b48b8 feat(memory)!: Uses the new MemoryEntry schema for all memory related components.
BREAKING CHANGE. This commit changes all memory related interface to using the newly introduced MemoryEntry class.

PiperOrigin-RevId: 758464887
2025-05-13 19:07:11 -07:00
Wei Sun (Jack)
825f5d4f2e feat: Adds new interface for MemoryEntry.
PiperOrigin-RevId: 758448993
2025-05-13 18:01:33 -07:00
Yifan Wang
6f00df3df0 ADK changes
PiperOrigin-RevId: 758444575
2025-05-13 17:43:53 -07:00
Xiang (Sean) Zhou
da55b5a943 fix: update google api toolset to remove 'match' for python 3.9 compliant
PiperOrigin-RevId: 758438091
2025-05-13 17:21:05 -07:00
Wei Sun (Jack)
d046367826 chore: Removes logging config in tools/google_api_tool/googleapi_to_openapi_converter.py.
PiperOrigin-RevId: 758436692
2025-05-13 17:16:03 -07:00
Xiang (Sean) Zhou
9647426500 refactor: refactor openapi toolset and tool parser to hide non public field
PiperOrigin-RevId: 758436303
2025-05-13 17:14:20 -07:00
Alec Daling
1f0fd7bfce Copybara import of the project:
--
e4aceb8428b8d2c321e7b44a16869997dd5f0dff by ajdaling <ajdaling@gmail.com>:

Fixes issue #311: Add usage_metadata to llm_response

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/694 from chapelhillnorth:fix-issue-311 2735bc01a6a57a5302b58af33266bfbeafc8e184
PiperOrigin-RevId: 758435162
2025-05-13 17:10:34 -07:00
Wei Sun (Jack)
66553b18c6 chore: Treats google.adk as known_third_party in pyproject.toml for organizing imports in samples.
PiperOrigin-RevId: 758434037
2025-05-13 17:06:52 -07:00
Liang Wu
933f01b89f fix: Concatenate all text Parts from an AgentTool agent's response.
PiperOrigin-RevId: 758424011
2025-05-13 16:38:54 -07:00
Google Team Member
d6cf660506 chore: Migrate json field names to camelCase (4/4)
PiperOrigin-RevId: 758423361
2025-05-13 16:36:45 -07:00
Xiang (Sean) Zhou
931fb338f8 rename tool_set to toolset to uniform the naming
PiperOrigin-RevId: 758422703
2025-05-13 16:34:23 -07:00
Xiang (Sean) Zhou
af978fe194 fix apihub toolset ut
PiperOrigin-RevId: 758400203
2025-05-13 15:32:28 -07:00
Google Team Member
4def3f1bd3 chore: Migrate json field names to camelCase (3/n)
PiperOrigin-RevId: 758394880
2025-05-13 15:16:16 -07:00
Selcuk Gun
ff9de71869 Add role to the event returned in agent callback sample
Events without a role are filtered out in the next turns.

PiperOrigin-RevId: 758393355
2025-05-13 15:12:06 -07:00
Xiang (Sean) Zhou
f6bdd555fb refactor apihub toolset to hide non public field
PiperOrigin-RevId: 758378396
2025-05-13 14:34:04 -07:00
Ankur Sharma
cf06cc507a Refactor Eval Set Management into its own class.
PiperOrigin-RevId: 758378377
2025-05-13 14:32:38 -07:00
Selcuk Gun
303af440ee Await canonical instructions in test_llm_agent_fields.py
PiperOrigin-RevId: 758372807
2025-05-13 14:17:31 -07:00
Ankur Sharma
82b8e304ec Convert Session To Invocation.
PiperOrigin-RevId: 758356942
2025-05-13 13:39:52 -07:00
Hangfei Lin
4188673b0f feat(live): Support live mode of sequential agent
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
2025-05-13 11:56:16 -07:00
Hangfei Lin
39f78dc28f feat(live): Support native(model-side) audio transcription for agent transferring in live mode.
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
2025-05-13 11:13:08 -07:00
Hangfei Lin
c4d5e3b298 feat: Align run_live interface with run_async etc
PiperOrigin-RevId: 758289318
2025-05-13 10:57:26 -07:00
Yanfei Chen
08c9cf86c3 feat: Add an enterprise web search tool for web grounding.
PiperOrigin-RevId: 758206509
2025-05-13 07:15:46 -07:00
Xiang (Sean) Zhou
dd8e9b71e5 fix application integration toolset unit tests
PiperOrigin-RevId: 758080966
2025-05-13 00:06:56 -07:00
Google Team Member
d740b93e03 feat: trigger in ApplicationIntegrationTools is changed to triggers and is a list of strings
PiperOrigin-RevId: 758034458
2025-05-12 21:13:27 -07:00