You've already forked adk-python
mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
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:
committed by
Copybara-Service
parent
e0e5384e33
commit
48ddd07894
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user