Commit Graph

9 Commits

Author SHA1 Message Date
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
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
Selcuk Gun
4c4cfb74ae Support async instruction and global instruction provider
PiperOrigin-RevId: 757808335
2025-05-12 10:03:34 -07:00
Xiang (Sean) Zhou
4d7298e4f2 add toolset base class and allow llm agent to accept toolset as tools
PiperOrigin-RevId: 756605470
2025-05-08 22:27:52 -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
Selcuk Gun
e4317c9eb7 Support chaining for model callbacks
(before/after) model callbacks are invoked throughout the provided chain until one callback does not return None. Callbacks can be async and sync.

PiperOrigin-RevId: 755565583
2025-05-06 16:16:02 -07:00
Selcuk Gun
794a70edcd Support async agent and model callbacks
PiperOrigin-RevId: 755542756
2025-05-06 15:14:10 -07:00
Alankrit Verma
27ce65ff50 Copybara import of the project:
--
21736067f9 by Alankrit Verma <alankrit386@gmail.com>:

feat(llm_flows): support async before/after tool callbacks

Previously, callbacks were treated as purely synchronous,
so passing an async coroutine caused “was never awaited”
errors and Pydantic serialization failures.

Now we detect awaitable return values from
before_tool_callback and after_tool_callback,
and `await` them if necessary.

Fixes: #380

--
08ac9a117e by Alankrit Verma <alankrit386@gmail.com>:

Refactor function callback handling and update type signatures

- Simplify variable names in `functions.py`: always use `function_response` and `altered_function_response`
- Update LlmAgent callback type aliases to support async:
  - Import `Awaitable`
  - Change `BeforeToolCallback` and `AfterToolCallback` signatures to return `Awaitable[Optional[dict]]`
- Ensure `after_tool_callback` uses `await` when necessary

--
fcbf57466e by Alankrit Verma <alankrit386@gmail.com>:

refactor: update callback type signatures to support sync and async responses
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/434 from AlankritVerma01:support-async-tool-callbacks 926b0ef1a6
PiperOrigin-RevId: 753005846
2025-04-29 21:40:33 -07:00
hangfei
9827820143 Agent Development Kit(ADK)
An easy-to-use and powerful framework to build AI agents.
2025-04-08 17:25:47 +00:00