From aac4f05604dd4ca23ea217da3a1dea6261b5a4b0 Mon Sep 17 00:00:00 2001 From: "yongen.loong" Date: Wed, 6 Nov 2024 21:36:21 +0800 Subject: [PATCH] fix: add agent transfer --- examples/software_team/agents.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/examples/software_team/agents.py b/examples/software_team/agents.py index eb0d0b48..342dda8e 100644 --- a/examples/software_team/agents.py +++ b/examples/software_team/agents.py @@ -36,3 +36,20 @@ def get_status(task): instructions="You are responsible for managing the project and coordinating between the Developer and Tester agents.", functions=[manage_project, get_status], ) + +def transfer_to_developer(): + """Function to transfer the conversation to the Developer agent.""" + return developer_agent + +def transfer_to_tester(): + """Function to transfer the conversation to the Tester agent.""" + return tester_agent + +def transfer_to_project_manager(): + """Function to transfer the conversation to the Project Manager agent.""" + return project_manager_agent + +developer_agent.functions.append(transfer_to_project_manager) +tester_agent.functions.append(transfer_to_project_manager) +project_manager_agent.functions.append(transfer_to_developer) +project_manager_agent.functions.append(transfer_to_tester) \ No newline at end of file