-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
core[Component] This issue is related to the core interface and implementation[Component] This issue is related to the core interface and implementation
Milestone
Description
Describe the bug
transfer_to_agent tool fails with unexpected kwarg.
The root agent called the transfer_to_agent tool with a keyword argument query which raised a TypeError.
To Reproduce
Steps to reproduce the behavior:
- Use a multi-agent framework
- Let the root agent call the transfer_to_agent tool
- The agent may pass in an unexpected keyword argument to the tool call.
Expected behavior
Ideally, an agent should never call a tool with unexpected keyword args.
A bandage solution would be to pass kwargs through the function:
def transfer_to_agent(agent_name: str, tool_context: ToolContext, **kwargs):
"""Transfer the question to another agent."""
tool_context.actions.transfer_to_agent = agent_nameDesktop:
- OS: Windows 11
- Python version: 3.13
- ADK version: 0.3.0
Additional context
This error was encountered using gemini-2.5-pro-preview-03-25 and gemini-2.0-flash-001.
AlankritVerma01
Metadata
Metadata
Assignees
Labels
core[Component] This issue is related to the core interface and implementation[Component] This issue is related to the core interface and implementation