Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: enhance Swarm user guide with notes on tool calling #5103

Merged
merged 2 commits into from
Jan 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"{py:class}`~autogen_agentchat.teams.Swarm` implements a team in which agents can hand off \n",
"task to other agents based on their capabilities. \n",
"It is a multi-agent design pattern first introduced by OpenAI in \n",
"[an experimental project](https://github.com/openai/swarm).\n",
"[Swarm](https://github.com/openai/swarm).\n",
"The key idea is to let agent delegate tasks to other agents using a special tool call, while\n",
"all agents share the same message context.\n",
"This enables agents to make local decisions about task planning, rather than\n",
Expand Down Expand Up @@ -50,6 +50,17 @@
"3. When an agent generates a {py:class}`~autogen_agentchat.messages.HandoffMessage`, the receiving agent takes over the task with the same message context.\n",
"4. The process continues until a termination condition is met.\n",
"\n",
"```{note}\n",
"The {py:class}`~autogen_agentchat.agents.AssistantAgent` uses the tool calling\n",
"capability of the model to generate handoffs. This means that the model must\n",
"support tool calling. If the model does parallel tool calling, multiple handoffs\n",
"may be generated at the same time. This can lead to unexpected behavior.\n",
"To avoid this, you can disable parallel tool calling by configuring the model\n",
"client. For {py:class}`~autogen_ext.models.openai.OpenAIChatCompletionClient`\n",
"and {py:class}`~autogen_ext.models.openai.AzureOpenAIChatCompletionClient`,\n",
"you can set `parallel_tool_calls=False` in the configuration.\n",
"```\n",
"\n",
"In this section, we will show you two examples of how to use the {py:class}`~autogen_agentchat.teams.Swarm` team:\n",
"\n",
"1. A customer support team with human-in-the-loop handoff.\n",
Expand Down Expand Up @@ -524,7 +535,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.5"
"version": "3.12.7"
}
},
"nbformat": 4,
Expand Down
Loading