Commit Graph

417 Commits

Author SHA1 Message Date
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
Xiang (Sean) Zhou
2d84b13219 fix toolset codes to make it work with python 3.9
PiperOrigin-RevId: 757991503
2025-05-12 18:23:18 -07:00
Yifan Wang
80813a75cf Add debug trace endpoint in api server
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
2025-05-12 17:56:50 -07:00
Xiang (Sean) Zhou
d35b99e6dd update mcp toolset and sample agent based on new tool_filter definition
PiperOrigin-RevId: 757969950
2025-05-12 17:05:24 -07:00
Xiang (Sean) Zhou
722028801a update application integration toolset agent based on new toolset interface
PiperOrigin-RevId: 757963384
2025-05-12 16:43:41 -07:00
Xiang (Sean) Zhou
57d1315533 adapt application integration toolset to new toolset interface
PiperOrigin-RevId: 757960706
2025-05-12 16:36:43 -07:00
Xiang (Sean) Zhou
d19927b1bc update bigquery agent and oauth calendar agent according to new toolset interface
PiperOrigin-RevId: 757949732
2025-05-12 16:06:45 -07:00
Xiang (Sean) Zhou
6a04ff84ba adapt google api toolset and api hub toolset to new toolset interface
PiperOrigin-RevId: 757946541
2025-05-12 15:58:39 -07:00
Google Team Member
27b229719e chore: Migrate json field names to camelCase (2/n)
PiperOrigin-RevId: 757937550
2025-05-12 15:33:34 -07:00
Google Team Member
05a0c6b307 Add 'get_eval_report' and 'list_eval_reports' endpoints.
PiperOrigin-RevId: 757936497
2025-05-12 15:30:53 -07:00
Selcuk Gun
df0892a7b8 Update import for override decorator in mcp_toolset for python version < 3.12
PiperOrigin-RevId: 757934273
2025-05-12 15:24:37 -07:00
Google Team Member
660c2efa4d Define EvalReport data model.
PiperOrigin-RevId: 757933585
2025-05-12 15:22:57 -07:00
Ankur Sharma
1237d5334f Adding Pydantic data models for eval set and eval case.
PiperOrigin-RevId: 757920694
2025-05-12 14:48:21 -07:00
Google Team Member
993f9971bb Add new GeminiCodeExecutor to code_executors/ folder.
PiperOrigin-RevId: 757895291
2025-05-12 13:44:17 -07:00
Xiang (Sean) Zhou
5462862795 fix eval unittests failure
PiperOrigin-RevId: 757872670
2025-05-12 12:42:19 -07:00
Shangjie Chen
c39f24f072 fix: Refine the confusing error message.
PiperOrigin-RevId: 757841288
2025-05-12 11:20:54 -07:00
Alan
847c8fd11a 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/590 from BloodBoy21:feat/api-version-vertex 1ed855249cae398b40691b91c6e468bccec07a3a
PiperOrigin-RevId: 757840099
2025-05-12 11:18:01 -07:00
Google Team Member
f15f64af0f chore: Migrate json field names to camelCase (1/n)
PiperOrigin-RevId: 757832114
2025-05-12 10:59:35 -07:00
Shangjie Chen
70a6bfae90 fix: Explictly throw execption when custom id is set for vertex ai session service.
PiperOrigin-RevId: 757815469
2025-05-12 10:19:25 -07:00
Selcuk Gun
4c4cfb74ae Support async instruction and global instruction provider
PiperOrigin-RevId: 757808335
2025-05-12 10:03:34 -07:00
Selcuk Gun
812485fdfa Move callback samples to dedicated directory
Sample chained callback logs can we seen running asyncio_run.py

PiperOrigin-RevId: 757793406
2025-05-12 09:24:29 -07:00
Mukund Jha
cdb4cac237 Copybara import of the project:
--
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
2025-05-10 22:53:20 -07:00
Yifan Wang
16014764b6 Fix eval run without engaging agent result in api key missing error
PiperOrigin-RevId: 757015581
2025-05-09 21:02:23 -07:00
Google Team Member
9a8c77e04a Added filterClause in Update and Delete Request
PiperOrigin-RevId: 757013222
2025-05-09 20:50:36 -07:00
Selcuk Gun
4c191ba6b9 Move uv install under install dependencies
PiperOrigin-RevId: 757008562
2025-05-09 20:33:42 -07:00
Google Team Member
2a0524692b feat: Typo fixes in a few files.
PiperOrigin-RevId: 756921945
2025-05-09 15:10:23 -07:00
Xiang (Sean) Zhou
166df01236 fix eval in api server and cli for below issue:
https://github.com/google/adk-python/issues/651

PiperOrigin-RevId: 756906937
2025-05-09 14:26:29 -07:00
Shangjie Chen
c4ecef54bc fix: Generate event id at beginning, and regen for every new yield event. This is because trace module requires an event id.
PiperOrigin-RevId: 756905471
2025-05-09 14:22:42 -07:00
Yifan Wang
415104743d the agent evetn graph is not able to be shown due to missing await keyword. this change is to fix missing await for build_graph
PiperOrigin-RevId: 756876056
2025-05-09 13:01:25 -07:00
Wei Sun (Jack)
33acb26565 chore: Bump min version for google-genai sdk to 1.13.0.
PiperOrigin-RevId: 756806752
2025-05-09 09:57:08 -07:00
Thiago Neves
ac97fc638f fix(tests): use mock GCS client in artifact service tests to avoid real credentials
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
2025-05-09 09:33:40 -07:00