chore:clarify the behavior of disallow_transfer_to_parent

The original description is not clear enough and can create confusion like https://github.com/google/adk-python/issues/3081.

PiperOrigin-RevId: 824564227
This commit is contained in:
Liang Wu
2025-10-27 10:00:37 -07:00
committed by Copybara-Service
parent e0e5384e33
commit 48ddd07894
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -267,8 +267,9 @@ class LlmAgent(BaseAgent):
disallow_transfer_to_parent: bool = False
"""Disallows LLM-controlled transferring to the parent agent.
NOTE: Setting this as True also prevents this agent to continue reply to the
end-user. This behavior prevents one-way transfer, in which end-user may be
NOTE: Setting this as True also prevents this agent from continuing to reply
to the end-user, and will transfer control back to the parent agent in the
next turn. This behavior prevents one-way transfer, in which end-user may be
stuck with one agent that cannot transfer to other agents in the agent tree.
"""
disallow_transfer_to_peers: bool = False
+1 -1
View File
@@ -32,7 +32,7 @@ class AutoFlow(SingleFlow):
For peer-agent transfers, it's only enabled when all below conditions are met:
- The parent agent is also an LlmAgent.
- `disallow_transfer_to_peer` option of this agent is False (default).
- `disallow_transfer_to_peers` option of this agent is False (default).
Depending on the target agent type, the transfer may be automatically
reversed. (see Runner._find_agent_to_run method for which agent will remain