Module agent_tool

Module agent_tool 

Source
Expand description

AgentTool — wraps an Agent as a ToolFunction for “agent as a tool” dispatch.

When the live model calls this tool, the wrapped agent runs in an isolated context (no live WebSocket). The agent’s text output is collected and returned as the tool result. State changes propagate back to the parent context.

This bridges live<->non-live: the wrapped agent can use regular Gemini API, external services, or pure computation — it doesn’t need a WebSocket.

Structs§

AgentTool
Wraps an Agent as a ToolFunction for “agent as a tool” dispatch.