8000 fix(transfer_to_agent): update docstring for clarity and accuracy · nx90/adk-python@854a544 · GitHub
[go: up one dir, main page]

Skip to content

Commit 854a544

Browse files
AlankritVerma01copybara-github
authored andcommitted
fix(transfer_to_agent): update docstring for clarity and accuracy
Copybara import of the project: -- e246af5 by Alankrit Verma <alankr 8000 it386@gmail.com>: tools: allow transfer_to_agent to accept extra kwargs transfer_to_agent now takes **kwargs to swallow unexpected keyword args Added integration tests covering single and multiple extra kwargs. Fixes google#458. -- 55fea78 by Alankrit Verma <alankrit386@gmail.com>: fix(tests): correct indentation in test_transfer.py for better readability -- 0c04f2d by Alankrit Verma <alankrit386@gmail.com>: fix(transfer_to_agent): restore strict two-arg signature and clarify 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 -- d37448d by Alankrit Verma <alankrit386@gmail.com>: fix(transfer_to_agent): update docstring for clarity and accuracy -- ea827af by Wei Sun (Jack) <Jacksunwei@gmail.com>: Update transfer_to_agent_tool docstring for better prompt -- a144069 by Wei Sun (Jack) <Jacksunwei@gmail.com>: Update transfer_to_agent_tool.py COPYBARA_INTEGRATE_REVIEW=google#466 from AlankritVerma01:tools/transfer-accept-kwargs 686d436 PiperOrigin-RevId: 764940463
1 parent 0d66a78 commit 854a544

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/google/adk/tools/transfer_to_agent_tool.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,12 @@
1616

1717

1818
def transfer_to_agent(agent_name: str, tool_context: ToolContext):
19-
"""Transfer the question to another agent."""
19+
"""Transfer the question to another agent.
20+
21+
This tool hands off control to another agent when it's more suitable to
22+
answer the user's question according to the agent's description.
23+
24+
Args:
25+
agent_name: the agent name to transfer to.
26+
"""
2027
tool_context.actions.transfer_to_agent = agent_name

0 commit comments

Comments
 (0)
0