google / google/adk-docs

What is the correct way to import and implement `AgentTool`?

Open
#645 5 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.