Skip to content

chore: allow "from google.adk.tools import AgentTool" #2026

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/google/adk/tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@


from ..auth.auth_tool import AuthToolArguments
from .agent_tool import AgentTool
from .apihub_tool.apihub_toolset import APIHubToolset
from .base_tool import BaseTool
from .example_tool import ExampleTool
Expand All @@ -31,6 +32,7 @@
from .vertex_ai_search_tool import VertexAiSearchTool

__all__ = [
'AgentTool',
'APIHubToolset',
'AuthToolArguments',
'BaseTool',
Expand Down
5 changes: 2 additions & 3 deletions src/google/adk/tools/agent_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,12 @@

from . import _automatic_function_calling_util
from ..memory.in_memory_memory_service import InMemoryMemoryService
from ..runners import Runner
from ..sessions.in_memory_session_service import InMemorySessionService
from ._forwarding_artifact_service import ForwardingArtifactService
from .base_tool import BaseTool
from .tool_context import ToolContext

if TYPE_CHECKING:
from ..agents.base_agent import BaseAgent
from ..agents.llm_agent import LlmAgent


class AgentTool(BaseTool):
Expand Down Expand Up @@ -103,6 +100,8 @@ async def run_async(
tool_context: ToolContext,
) -> Any:
from ..agents.llm_agent import LlmAgent
from ..runners import Runner
from ..sessions.in_memory_session_service import InMemorySessionService

if self.skip_summarization:
tool_context.actions.skip_summarization = True
Expand Down