Skip to content

Support for built-in tools within sub-agents #413

@ncvgl

Description

@ncvgl

Currently, built-in tools cannot be used within a sub-agent as listed here. In addition, max one built-in tool can be passed.

Why does ADK have these limitations and are we planning to allow this in the future ?

Seems like it would be very useful for a sub-agent to do built_in_code_execution but not have the main agent do that. The docs say that this will not work even though its very sensible to separate it this way.

search_agent = Agent(
    model='gemini-2.0-flash',
    name='SearchAgent',
    instruction="""
    You're a specialist in Google Search
    """,
    tools=[google_search],
)
coding_agent = Agent(
    model='gemini-2.0-flash',
    name='CodeAgent',
    instruction="""
    You're a specialist in Code Execution
    """,
    tools=[built_in_code_execution],
)
root_agent = Agent(
    name="RootAgent",
    model="gemini-2.0-flash",
    description="Root Agent",
    sub_agents=[
        search_agent,
        coding_agent
    ],
)

Metadata

Metadata

Assignees

Labels

mcp[Component] Issues about MCP supporttools[Component] This issue is related to tools

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions