-
Notifications
You must be signed in to change notification settings - Fork 811
transfer_to_agent tool fails with unexpected kwarg #458
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
Comments
transfer_to_agent now takes **kwargs to swallow unexpected keyword args Added integration tests covering single and multiple extra kwargs. Fixes google#458.
@Jacksunwei @hangfei |
As I mentioned in the PR. I think the better approach could be improving the docstring, which will be in the prompt. I guess the Could you try adding docstring for agent_name argument will work? |
…usage Revert the earlier **kwargs change so transfer_to_agent again only accepts (agent_name, tool_context). Improve the doc-string to make clear that no other parameters should be passed to this tool. Fixes google#458
Hey @Jacksunwei |
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:
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:
Desktop:
Additional context
This error was encountered using gemini-2.5-pro-preview-03-25 and gemini-2.0-flash-001.
The text was updated successfully, but these errors were encountered: