Skip to content
Closed
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
8 changes: 3 additions & 5 deletions src/google/adk/tools/transfer_to_agent_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,12 @@ def transfer_to_agent(agent_name: str, tool_context: ToolContext) -> None:
This tool hands off control to another agent when it's more suitable to
answer the user's question according to the agent's description.

Note:
For most use cases, you should use TransferToAgentTool instead of this
function directly. TransferToAgentTool provides additional enum constraints
that prevent LLMs from hallucinating invalid agent names.

Args:
agent_name: the agent name to transfer to.
"""
# Developer note: For most use cases, prefer TransferToAgentTool over
# calling this function directly. TransferToAgentTool adds enum
# constraints that prevent LLMs from hallucinating invalid agent names.
Comment on lines +35 to +37
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

According to the PEP 8 style guide, lines in a block comment should be limited to 72 characters for readability. The first line of this comment exceeds this limit. Please re-wrap the comment to adhere to this guideline.

Suggested change
# Developer note: For most use cases, prefer TransferToAgentTool over
# calling this function directly. TransferToAgentTool adds enum
# constraints that prevent LLMs from hallucinating invalid agent names.
# Developer note: For most use cases, prefer TransferToAgentTool
# over calling this function directly. TransferToAgentTool adds enum
# constraints that prevent LLMs from hallucinating invalid agent names.
References
  1. PEP 8 recommends limiting lines of block comments to 72 characters to improve readability. (link)

tool_context.actions.transfer_to_agent = agent_name


Expand Down