Commit Graph

52 Commits

Author SHA1 Message Date
Hangfei Lin
d052e8f13a
chore: Update agent.py 2025-06-04 09:29:33 -07:00
Hangfei Lin
e21ea161f5 chore: Update agent.py
Merge https://github.com/google/adk-python/pull/1136

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/1136 from google:hangfei-patch-1 63ff81eb2f152cf74a8a610562999101a6362ef8
PiperOrigin-RevId: 766913586
2025-06-03 18:59:23 -07:00
Hangfei Lin
0724a83aa9 ADK changes
PiperOrigin-RevId: 766902914
2025-06-03 18:20:10 -07:00
Liang Wu
433c423d35 chore: include contributing/ folder in autoformat.sh
Also formatted the files in that folder in this same commit.

PiperOrigin-RevId: 766885306
2025-06-03 17:20:52 -07:00
Hangfei Lin
349a414120 chore:ADK: add section comment
PiperOrigin-RevId: 766877814
2025-06-03 16:57:49 -07:00
Google Team Member
16f7d98acf feat: Update for anthropic models
Enable parallel tools for anthropic models, and add agent examples, and also added functional test for anthropic models.

PiperOrigin-RevId: 766703018
2025-06-03 16:55:34 -07:00
Xiang (Sean) Zhou
821f751b5a chore: add agent for testing Notion MCP server
PiperOrigin-RevId: 766325293
2025-06-02 13:41:56 -07:00
Hangfei Lin
94c0aca685 ADK: Rename the root agent in the example to match the example name.
This makes logs a bit less confusing.

PiperOrigin-RevId: 766312673
2025-06-02 13:10:42 -07:00
Hangfei Lin
f1803312c6 Copybara import of the project:
--
618add7d297cbe26f26f45aa01b39c3d086a13e8 by Hangfei Lin <hangfei@google.com>:

doc: Create readme.md
--
5ba85d653cac11b2858ee5d53d175c1c16d933ec by Hangfei Lin <hangfei@google.com>:

doc: Update CONTRIBUTING.md
--
02606a34babba6a660886a073332979fb2b12fc3 by Wei Sun (Jack) <weisun@google.com>:

Rename readme.md to README.md
--
08a38bd5727bf554f6fb043c73623d367e9b138e by Hangfei Lin <hangfei@google.com>:

Update README.md
--
92e7ee6d498dfce35f1c6df44c1ec0f86ae5d513 by Wei Sun (Jack) <weisun@google.com>:

Update README.md
--
69c3a44e6946b3541746ded43dae8a70d47d538f by Wei Sun (Jack) <weisun@google.com>:

Update README.md
--
9de40783990ae9935463b37225c186e91c93025d by Wei Sun (Jack) <weisun@google.com>:

Update README.md
--
0f8a011ddc5b22ba8361ce7b34413a34cfcf15ba by Wei Sun (Jack) <weisun@google.com>:

Update README.md

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/1058 from google:hangfei-patch-2 81eacedef69468fa554312a187880ccf4c30c559
PiperOrigin-RevId: 766234622
2025-06-02 09:57:35 -07:00
Yongsul Kim
5c6001d90f fix(sample): Correct text artifact saving in artifact_save_text sample
Copybara import of the project:
--
95292471f6dba29b55a17239670cdc6cc14619b5 by Yongsul Kim <ystory84@gmail.com>:

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/936 from ystory:fix/artifact-sample-save 7b0babc53266afadb8421ccafa0f3de092eeeae5
PiperOrigin-RevId: 766220649
2025-06-02 09:19:19 -07:00
Xiang (Sean) Zhou
3ec496dd81 chore: add requirements.txt for langchain_youtube_search_agent
PiperOrigin-RevId: 765409052
2025-05-30 18:19:01 -07:00
Xiang (Sean) Zhou
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
Google Team Member
ba5b80d5d7 feat: use bigquery scope by default in bigquery credentials.
Right now the agent builder has to specify the bigquery scope explicitly for bigquery tools, which is somewhat unnecessary. With this change the user does not have to specify scopes, although they would still have the ability to overrides scopes if necessary.

PiperOrigin-RevId: 765354010
2025-05-30 15:12:49 -07:00
Karthigayan Devan
8759a25251 Copybara import of the project:
--
e1c479d037d37e1ee1ddd86a4cd180f2692d952f by Karthigayan Devan <karthidec@gmail.com>:

add jira_agent adk samples code which connect Jira cloud

--
ef9fe57538252ad69f825f3ff77023b1f9eb004f by Karthigayan Devan <karthidec@gmail.com>:

update variables comment

--
f6adaaddd2decdd1e35aa06ba88031ec3b8a8521 by Karthigayan Devan <karthidec@gmail.com>:

renamed tool name to match exactly align with tool naming standard, removed keyword

--
150e63d4270b141e21195c5be7d67dce72e216fb by Karthigayan Devan <karthidec@gmail.com>:

updated tool and agent instructions

--
5048043195a5b1d397d9d439b3f6c6e650b4a6a3 by Karthigayan Devan <karthidec@gmail.com>:

add image application integration

--
bf3ee1553929d6d031f7b14f0b28f8f0ae7b84cc by Karthigayan Devan <karthidec@gmail.com>:

update read me instructions on configure app integration connector

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/785 from karthidec:adk-samples-jira-agent 2b984fa8c242e164541353b4597aebf4fd422288
PiperOrigin-RevId: 765351338
2025-05-30 15:04:38 -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
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
9bdd813be1 Fix typos in README for sample bigquery_agent and oauth_calendar_agent
PiperOrigin-RevId: 764777424
2025-05-29 11:48:01 -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
Selcuk Gun
609b3a572c Provide sample LongRunningFunctionTool runner script and documentation
PiperOrigin-RevId: 764475345
2025-05-28 16:59:52 -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
Google Team Member
d6c6bb4b24 feat: add BigQuery first-party tools.
These tools support getting BigQuery dataset/table metadata and query results.

PiperOrigin-RevId: 764139132
2025-05-28 00:59:19 -07:00
Ariz Chang
f1a92e9674 chore: add google search agent for testing
PiperOrigin-RevId: 762571269
2025-05-23 14:36:27 -07:00
sudu
68de9adc18 Copybara import of the project:
--
004eb36c16b042ba2d8be0cca39b739c0c8ca6c1 by sudu <teric@outlook.com>:

Update tools.yaml

When search hotels with some LLM, the date format shows as bellow
```
**Check-in Date:** April 23, 2024
```
So i update the SQL in tools.yaml to be compatible with following instruction:
```sql
update checkin date to 'April 24,2024' and checkout date to 'April 26,2024' of Best Western Bern
```
--
1300688ee1407212658d57712c1ad6ee61b052fe by qidu <qidu@outlook.com>:

Fix the tools of `ToolboxToolset` initialization bugs for
`samples/toolbox_agent`

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/794 from qidu:main 5b3199da564efdd07915e24e75659055a17dad82
PiperOrigin-RevId: 762259287
2025-05-22 21:56:18 -07:00
Google Team Member
62a543bd58 Add dynamicAuthConfig to ExecuteCustomQuery. Add sample agent for ApplicationIntegrationToolset which uses Integration Connectors with end user credentials.
PiperOrigin-RevId: 761356343
2025-05-20 21:45:27 -07:00
Xiang (Sean) Zhou
9eef4464c6 fix: fix toolbox import path in sample toolbox agent
PiperOrigin-RevId: 760837908
2025-05-19 17:43:41 -07:00
Wei Sun (Jack)
3f21a52853 chore: Fixes the main.py for memory/agent.py sample.
PiperOrigin-RevId: 760741263
2025-05-19 13:08:57 -07:00
Xiang (Sean) Zhou
3b5232c14f feat: add sample mcp agent that connects to mcp server via sse endpoint directly
PiperOrigin-RevId: 760388717
2025-05-18 17:00:03 -07:00
Wei Sun (Jack)
9e767b3fe1 chore: Creates a sample main.py to demonstrate how to use adk as a library for the workflow agent in docs.
For Issue #573.

PiperOrigin-RevId: 760380509
2025-05-18 16:17:16 -07:00
Wei Sun (Jack)
e278ca9541 chore: Refines mcp_agent instruction to include the allowed folder in the instruction.
PiperOrigin-RevId: 760057162
2025-05-17 12:57:11 -07:00
Wei Sun (Jack)
021aaddf32 chore: Allows BaseAgent in the constructor of InMemoryRunner.
PiperOrigin-RevId: 759818175
2025-05-16 17:42:58 -07:00
Xiang (Sean) Zhou
f83504dffb chore: add toolbox sample agent
PiperOrigin-RevId: 759746416
2025-05-16 14:01:53 -07:00
Adrian Cole
dcb50effef Copybara import of the project:
--
636685818a512e9de30d5119f0244261cf16af27 by Adrian Cole <64215+codefromthecrypt@users.noreply.github.com>:

fix: corrects typo in bigquery sample

Noticed while reading that google was spelled wrong.

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/709 from codefromthecrypt:patch-1 b30e819979f81962a2e44922bfd2dadd539fe3ea
PiperOrigin-RevId: 759641065
2025-05-16 09:18:48 -07:00
Xiang (Sean) Zhou
f384793649 fix: fix mcp agent filter logic
PiperOrigin-RevId: 759638254
2025-05-16 09:10:49 -07:00
Selcuk Gun
69f7ed8d0e Rename ollama sample script and await create_session
PiperOrigin-RevId: 759369988
2025-05-15 17:29:56 -07:00
Selcuk Gun
01cf186299 Update samples for async session changes and remove exp suffix from gemini model
PiperOrigin-RevId: 759364113
2025-05-15 17:12:07 -07:00
Wei Sun (Jack)
04820cb0a7 chore: Fixes a few samples for the breaking session service change.
PiperOrigin-RevId: 759354632
2025-05-15 16:44:23 -07:00
Selcuk Gun
509db3f9fb Add token usage to gemini (streaming), litellm and anthropic
Also included a token_usage sample that showcases the token usage of subagents with different models under a parent agent.

PiperOrigin-RevId: 759347015
2025-05-15 16:22:36 -07:00
Xiang (Sean) Zhou
fccd17df6f fix: adapt oauth calendar agent and bigquery agent to new Google API toolset interface
PiperOrigin-RevId: 759298612
2025-05-15 14:21:45 -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
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
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
Xiang (Sean) Zhou
931fb338f8 rename tool_set to toolset to uniform the naming
PiperOrigin-RevId: 758422703
2025-05-13 16:34:23 -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
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
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
d19927b1bc update bigquery agent and oauth calendar agent according to new toolset interface
PiperOrigin-RevId: 757949732
2025-05-12 16:06:45 -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
Xiang (Sean) Zhou
8c78945ec9 update mcp agent to use latest toolset interface
PiperOrigin-RevId: 756613972
2025-05-08 22:57:49 -07:00
Selcuk Gun
2cbbf88135 Support chaining for tool callbacks
(before/after) tool callbacks are invoked throughout the provided chain until one callback does not return None. Callbacks can be async and sync.

PiperOrigin-RevId: 756526507
2025-05-08 17:38:04 -07:00