From 492f3616343d43f0e649d4a7432a35d37442fe76 Mon Sep 17 00:00:00 2001 From: Joao Moura Date: Wed, 15 Nov 2023 00:41:17 -0300 Subject: [PATCH] adding extra detail on delegtion errors so LLM can recover --- crewai/tools/agent_tools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crewai/tools/agent_tools.py b/crewai/tools/agent_tools.py index 06ea9f68e..53ea92b3b 100644 --- a/crewai/tools/agent_tools.py +++ b/crewai/tools/agent_tools.py @@ -45,12 +45,12 @@ class AgentTools(BaseModel): """Execute the command.""" agent, task, information = command.split("|") if not agent or not task or not information: - return "Error executing tool." + return "Error executing tool. Missing 3 pipe (|) separated values." agent = [available_agent for available_agent in self.agents if available_agent.role == agent] if len(agent) == 0: - return "Error executing tool." + return "Error executing tool. Co-worker not found, double check the co-worker." agent = agent[0] result = agent.execute_task(task, information)