You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Offer a simpler high-level programming interface for common orchestration patterns such as Swarm-style handsoff.
Extend it to incorporate group chat, nested chat and sequential chats.
Offer builtin tools that an agent can register for these common chat patterns.
Enable self-execution for swarm-style agents.
Describe the solution you'd like
fromautogenimportSwarmAgent, autobuild_groupchat, initiate_chatcaptain=SwarmAgent("captain", llm_config=..., human_input_mode="NEVER")
user_proxy=SwarmAgent("user_proxy")
planner=SwarmAgent("planner", llm_config=..., human_input_mode="NEVER")
team_creator=SwarmAgent("team_creator", llm_config=..., human_input_mode="NEVER", functions=[autobuild_groupchat])
user_proxy.register_handoff(hand_to=captain) # always hand off to captain after human inputcaptain.register_handoff(
hand_to=[
ON_CONDITION(nested_chat=[chat_with_planner, chat_with_team_creator, ...], condition="You need help from a planner. The user does not need to be involved in the planning."),
ON_CONDITION(agent=planner, condition="You need help from a planner. The user would like to be involved in the planning"),
ON_CONDITION(agent=team_creator, condition="The plan has been generated. A team is needed to execute the next step in the plan.")
AFTER_WORK(user_proxy), # After work, choose user proxy
]
)
planner.register_handoff(
hand_to=[
AFTER_WORK("If the user would like to be involved in the planning and has't approved the latest plan, hand off to user proxy. Otherwise handoff to captain."),
]
)
team_creator.register_handoff(hand_to=[AFTER_WORK(captain)])
initiate_chat(sender=captain, message="How can I help you?") # a default group chat is created automatically when omitted
Benefits:
Simplify user's code in tool use, group chat, nested chat etc. They are handled by the library automatically.
Offer built-in tools like autobuild_groupchat.
Can still leverage all the conversation patterns we support and expand the ways to use them.
Compatible with swarm-style handsoff.
Note:
Only one AFTER_WORK is allowed. Multiple ON_CONDITION is allowed.
ON_CONDITION corresponds to tool-based handoff.
AFTER_WORK corresponds to speaker selection after the work of the agent is done and no other agent is selected by a tool call. It can be both NL-based selection or PL-based.
Additional context
Will create a task list to break down the implementation plan.
The text was updated successfully, but these errors were encountered:
With Nested Chat, #107, complete and merged. Will close this. Swarm will continue to develop with additional features and these can be created in a new Issue.
Is your feature request related to a problem? Please describe.
Offer a simpler high-level programming interface for common orchestration patterns such as Swarm-style handsoff.
Extend it to incorporate group chat, nested chat and sequential chats.
Offer builtin tools that an agent can register for these common chat patterns.
Enable self-execution for swarm-style agents.
Describe the solution you'd like
Benefits:
Note:
Only one AFTER_WORK is allowed. Multiple ON_CONDITION is allowed.
ON_CONDITION corresponds to tool-based handoff.
AFTER_WORK corresponds to speaker selection after the work of the agent is done and no other agent is selected by a tool call. It can be both NL-based selection or PL-based.
Additional context
Will create a task list to break down the implementation plan.
The text was updated successfully, but these errors were encountered: