Commit Graph

18 Commits

Author SHA1 Message Date
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
Selcuk Gun
d45084f311 Support chaining for agent callbacks
(before/after) agent callbacks are invoked throughout the provided chain until one callback does not return None. Callbacks can be async and sync.

PiperOrigin-RevId: 756359693
2025-05-08 10:09:33 -07:00
Hangfei Lin
a4adb739c0 Create a developer folder and add samples.
PiperOrigin-RevId: 755885332
2025-05-07 09:26:19 -07:00