From 4b802a15c341587ba7d296fdc9e8d2b12fee9cca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Moura?= Date: Sat, 6 Jan 2024 11:40:24 -0300 Subject: [PATCH] Improving agent delegation prompt --- crewai/tools/agent_tools.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/crewai/tools/agent_tools.py b/crewai/tools/agent_tools.py index db663c10b..54786c0dd 100644 --- a/crewai/tools/agent_tools.py +++ b/crewai/tools/agent_tools.py @@ -20,12 +20,12 @@ class AgentTools(BaseModel): description=dedent( f"""\ Useful to delegate a specific task to one of the - following co-workers: [{', '.join([agent.role for agent in self.agents])}]. - The input to this tool should be a pipe (|) separated text of length - three, representing the co-worker you want to ask it to (one of the options), + following co-workers: [{', '.join([agent.role for agent in self.agents])}]. + The input to this tool should be a pipe (|) separated text of length + three, representing the co-worker you want to ask it to (one of the options), the task and all actual context you have for the task. For example, `coworker|task|context`. - """ + """ ), ), Tool.from_function( @@ -34,12 +34,12 @@ class AgentTools(BaseModel): description=dedent( f"""\ Useful to ask a question, opinion or take from on - of the following co-workers: [{', '.join([agent.role for agent in self.agents])}]. - The input to this tool should be a pipe (|) separated text of length - three, representing the co-worker you want to ask it to (one of the options), + of the following co-workers: [{', '.join([agent.role for agent in self.agents])}]. + The input to this tool should be a pipe (|) separated text of length + three, representing the co-worker you want to ask it to (one of the options), the question and all actual context you have for the question. For example, `coworker|question|context`. - """ + """ ), ), ]