From 0a6098fb504a596d16101622eae10d593cb0687f Mon Sep 17 00:00:00 2001 From: Brandon Hancock Date: Thu, 13 Mar 2025 15:47:02 -0400 Subject: [PATCH] more fixes --- src/crewai/agent.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/crewai/agent.py b/src/crewai/agent.py index 6a62313c1..c037164a8 100644 --- a/src/crewai/agent.py +++ b/src/crewai/agent.py @@ -344,12 +344,11 @@ class Agent(BaseAgent): def get_delegation_tools(self, agents: Sequence[BaseAgent]) -> Sequence[BaseTool]: # If delegate_to is specified, use those agents instead of all agents + agents_to_use: List[BaseAgent] if self.delegate_to is not None: - agents_to_use: Sequence[BaseAgent] = cast( - List[BaseAgent], list(self.delegate_to) - ) + agents_to_use = cast(List[BaseAgent], list(self.delegate_to)) else: - agents_to_use: Sequence[BaseAgent] = cast(List[BaseAgent], list(agents)) + agents_to_use = list(agents) # Convert to list to match expected type agent_tools = AgentTools(agents=agents_to_use) delegation_tools = agent_tools.tools()