From 9aa167c0cd3bb5535ebaaf60340b5932513a00be Mon Sep 17 00:00:00 2001 From: Kye Date: Fri, 22 Sep 2023 16:22:48 -0400 Subject: [PATCH] orchestrate example Former-commit-id: 72d0d60bf8a8cf6dff501952cbcdc747d3d521de --- orchestrator.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 orchestrator.py diff --git a/orchestrator.py b/orchestrator.py new file mode 100644 index 00000000..c52c732a --- /dev/null +++ b/orchestrator.py @@ -0,0 +1,14 @@ +from swarms import Worker, Orchestrator + +node = Worker( + openai_api_key="", + ai_name="Optimus Prime", + +) + + +# Instantiate the Orchestrator with 10 agents +orchestrator = Orchestrator(node, agent_list=[node]*10, task_queue=[]) + +# Agent 7 sends a message to Agent 9 +orchestrator.chat(sender_id=7, receiver_id=9, message="Can you help me with this task?") \ No newline at end of file