From 8423fff2c71d34be07155cfb246c7bd55a65474a Mon Sep 17 00:00:00 2001 From: akhisud3195 Date: Tue, 4 Feb 2025 21:39:14 +0530 Subject: [PATCH] Exclude escalation agents from giving up chat control --- apps/agents/src/graph/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/agents/src/graph/core.py b/apps/agents/src/graph/core.py index f3992054..5e2d8dca 100644 --- a/apps/agents/src/graph/core.py +++ b/apps/agents/src/graph/core.py @@ -173,7 +173,7 @@ def get_agents(agent_configs, tool_configs, localize_history, available_tool_map child.candidate_parent_functions[agent.name] = func for agent in agents: - if agent.candidate_parent_functions: + if agent.candidate_parent_functions and agent.type != "escalation": agent = add_transfer_instructions_to_child_agents( child=agent, children_aware_of_parent=children_aware_of_parent