From f9dd74d03ca0a790ecea8504edcd342678f019cf Mon Sep 17 00:00:00 2001 From: Yiran Wu <32823396+kevin666aa@users.noreply.github.com> Date: Thu, 21 Nov 2024 20:06:27 -0500 Subject: [PATCH] update --- notebook/agentchat_swarm_w_groupchat_legacy.ipynb | 3 ++- website/blog/2024-11-17-Swarm/index.mdx | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/notebook/agentchat_swarm_w_groupchat_legacy.ipynb b/notebook/agentchat_swarm_w_groupchat_legacy.ipynb index ed09c7473..a87cd0676 100644 --- a/notebook/agentchat_swarm_w_groupchat_legacy.ipynb +++ b/notebook/agentchat_swarm_w_groupchat_legacy.ipynb @@ -4,6 +4,8 @@ "cell_type": "markdown", "metadata": {}, "source": [ + "# (Legacy) Implement Swarm-style orchestration with GroupChat\n", + "\n", "````{=mdx}\n", ":::tip\n", "This notebook shows you how to implement a swarm-like orchestration using AG2's group chat.\n", @@ -17,7 +19,6 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# (Legacy) Implement Swarm-style orchestration with GroupChat\n", "\n", "\n", "AG2 offers conversable agents, powered by LLMs, tools or a human, that can perform tasks collectively via an automated chat. Recently, OpenAI has released a [Swarm](https://github.com/openai/swarm) framework that focuses on making agent coordination and execution lightweight.\n", diff --git a/website/blog/2024-11-17-Swarm/index.mdx b/website/blog/2024-11-17-Swarm/index.mdx index 3d23fda7d..d5f8e5ce5 100644 --- a/website/blog/2024-11-17-Swarm/index.mdx +++ b/website/blog/2024-11-17-Swarm/index.mdx @@ -19,6 +19,8 @@ Besides these core features, AG2 provides: - **Transition Beyond Tool Calls**: We enable the ability to automatically transfer to a nominated swarm agent when an agent has completed their task. We will extend this to allow other transitions in the future (e.g., use a function to determine the next agent ). - **Built-in human-in-the-loop**: Adding a user agent (UserProxyAgent) to your swarm will allow swarm agents to transition back to the user. Provides a means to clarify and confirm with the user without breaking out of the swarm. +This feature builds on GroupChat, offering a simpler interface to use swarm orchestration. For comparison, see two implementations of the same example: one [using swarm orchestration](/docs/notebooks/agentchat_swarm) and another [naive implementation with GroupChat (Legacy)](/docs/notebooks/agentchat_swarm_w_groupchat_legacy). + ## Handoffs Before we dive into a swarm example, an important concept in swarm orchestration is when and how an agent hands off to another agent. @@ -328,3 +330,10 @@ Context Variables: - Behind-the-scenes, swarm agents are supported by a tool execution agent, that executes tools on their behalf. Hence, the appearance of `Tool Execution` in the output. - Currently only swarm agents can be added to a swarm. This is to maintain their ability to manage context variables, auto-execute functions, and support hand offs. Eventually, we may allow ConversableAgent to have the same capability and make "SwarmAgent" a simpler subclass with certain defaults changed (like AssistantAgent and UserProxyAgent). - Would you like to enhance the swarm feature or have found a bug? Please let us know by creating an issue on the [AG2 GitHub](https://github.com/ag2ai/ag2/issues). + +## For Further Reading + +* [Swarm Orchestration Documentation](/docs/topics/swarm) +* [Swarm Orchestration notebook](/docs/notebooks/agentchat_swarm) +* [(Legacy) Implement Swarm-style orchestration with GroupChat +](/docs/notebooks/agentchat_swarm_w_groupchat_legacy)