We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
disallow_transfer_to_parent=True
1 parent f4c7d78 commit 46282eeCopy full SHA for 46282ee
src/google/adk/flows/llm_flows/agent_transfer.py
@@ -98,11 +98,11 @@ def _build_target_agents_instructions(
98
the function call.
99
"""
100
101
- if agent.parent_agent:
+ if agent.parent_agent and not agent.disallow_transfer_to_parent:
102
si += f"""
103
Your parent agent is {agent.parent_agent.name}. If neither the other agents nor
104
you are best for answering the question according to the descriptions, transfer
105
-to your parent agent. If you don't have parent agent, try answer by yourself.
+to your parent agent.
106
107
return si
108
0 commit comments