What is the correct way to import and implement `AgentTool`?
- Dominant language
- Shell
- Stars
- 1.5k
- Forks
- 1.3k
- Avg merge
- 7d 1h
- Merged PRs (30d)
- 34
Description
In the docs [here]([¶](https://google.github.io/adk-docs/agents/multi-agents/#hierarchical-task-decomposition)) and in the Google blog post [here](https://cloud.google.com/blog/products/ai-machine-learning/build-multi-agentic-systems-using-google-adk) the import is `from google.adk.agents import agent_tool` and the implementation is this:
```
research_assistant = LlmAgent(
name="ResearchAssistant",
model="gemini-2.0-flash",
description="Finds and summarizes information on a topic.",
tools=[agent_tool.AgentTool(agent=web_searcher), agent_tool.AgentTool(agent=summarizer)]
)
```
However this results in the error `ImportError: cannot import name 'agent_tool' from 'google.adk.agents'`.
Elsewhere in the docs [here](https://google.github.io/adk-docs/tools/function-tools/#usage) the following pattern is used
```
tools=[AgentTool(agent=agent_b)]
```
No example of the required import is provided.
Contributor guide
Assessment
This issue has not been assessed yet.