create_swarm_transition
autogen.agentchat.contrib.swarm_agent.create_swarm_transition #
create_swarm_transition(initial_agent, tool_execution, swarm_agent_names, user_agent, swarm_after_work)
Creates a transition function for swarm chat with enclosed state for the use_initial_agent.
PARAMETER | DESCRIPTION |
---|---|
initial_agent | The first agent to speak TYPE: |
tool_execution | The tool execution agent TYPE: |
swarm_agent_names | List of all agent names |
user_agent | Optional user proxy agent TYPE: |
swarm_after_work | Swarm-level after work TYPE: |
RETURNS | DESCRIPTION |
---|---|
Callable[[ConversableAgent, GroupChat], Optional[Union[Agent, Literal['auto']]]] | Callable transition function (for sync and async swarm chats) |