Skip to content

Commit 48ddd07

Browse files
wuliang229copybara-github
authored andcommitted
chore:clarify the behavior of disallow_transfer_to_parent
The original description is not clear enough and can create confusion like #3081. PiperOrigin-RevId: 824564227
1 parent e0e5384 commit 48ddd07

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/google/adk/agents/llm_agent.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,9 @@ class LlmAgent(BaseAgent):
267267
disallow_transfer_to_parent: bool = False
268268
"""Disallows LLM-controlled transferring to the parent agent.
269269
270-
NOTE: Setting this as True also prevents this agent to continue reply to the
271-
end-user. This behavior prevents one-way transfer, in which end-user may be
270+
NOTE: Setting this as True also prevents this agent from continuing to reply
271+
to the end-user, and will transfer control back to the parent agent in the
272+
next turn. This behavior prevents one-way transfer, in which end-user may be
272273
stuck with one agent that cannot transfer to other agents in the agent tree.
273274
"""
274275
disallow_transfer_to_peers: bool = False

src/google/adk/flows/llm_flows/auto_flow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class AutoFlow(SingleFlow):
3232
For peer-agent transfers, it's only enabled when all below conditions are met:
3333
3434
- The parent agent is also an LlmAgent.
35-
- `disallow_transfer_to_peer` option of this agent is False (default).
35+
- `disallow_transfer_to_peers` option of this agent is False (default).
3636
3737
Depending on the target agent type, the transfer may be automatically
3838
reversed. (see Runner._find_agent_to_run method for which agent will remain

0 commit comments

Comments
 (0)