Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
yiranwu0 committed Nov 22, 2024
1 parent 90b90c6 commit f9dd74d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion notebook/agentchat_swarm_w_groupchat_legacy.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
9 changes: 9 additions & 0 deletions website/blog/2024-11-17-Swarm/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)

0 comments on commit f9dd74d

Please sign in to comment.