From cf9b6e1212d7d083358530293d2a378398c568b4 Mon Sep 17 00:00:00 2001 From: Vardaan Grover Date: Sat, 25 Jan 2025 20:06:59 +0530 Subject: [PATCH] feat: add debug print statement in task execution and simplify return message in agent tool --- src/crewai/crew.py | 2 +- src/crewai/tools/agent_tools/base_agent_tools.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/crewai/crew.py b/src/crewai/crew.py index 1d4a65608..d01e3d28d 100644 --- a/src/crewai/crew.py +++ b/src/crewai/crew.py @@ -707,7 +707,7 @@ class Crew(BaseModel): Returns: CrewOutput: Final output of the crew """ - + print("DEBUG: EXECUTE TASKS CALLED") task_outputs: List[TaskOutput] = [] futures: List[Tuple[Task, Future[TaskOutput], int]] = [] last_sync_output: Optional[TaskOutput] = None diff --git a/src/crewai/tools/agent_tools/base_agent_tools.py b/src/crewai/tools/agent_tools/base_agent_tools.py index 743f7f57c..449bdb2e1 100644 --- a/src/crewai/tools/agent_tools/base_agent_tools.py +++ b/src/crewai/tools/agent_tools/base_agent_tools.py @@ -90,7 +90,7 @@ class BaseAgentTool(BaseTool): result = target_agent.execute_task(new_task, context, tools) print("\n=== Delegation Complete ===") - return f"Task delegated to and completed by {target_agent.role}. Result: {result}" + return result except Exception as e: return self.i18n.errors("agent_tool_execution_error").format( agent_role=sanitized_name,