mirror of
https://github.com/googleapis/genai-toolbox.git
synced 2026-02-11 23:55:07 -05:00
`ToolboxTool` has been removed from `google-adk` package in
11ca528090
Instead `toolbox-core` should be used directly to remove the need for a
dependency on `toolbox-langchain` and `langchain`.
The new recommendation is to install `toolbox-core`.
```shell
pip install toolbox-core
```
And then load toolbox tools directly and pass it to the ADK agent.
```python
from google.adk.agents import Agent
# NEW IMPORT
from toolbox_core import ToolboxSyncClient
# Full control over MCP Toolbox
toolbox_client = ToolboxSyncClient("http://127.0.0.1:5000")
toolbox_tools = toolbox_client.load_toolset("my-toolset")
root_agent = Agent(
model="gemini-2.0-flash",
name="root_agent",
instruction=agent_instruction,
# Add Toolbox tools to ADK agent
tools=toolbox_tools,
)
```