AFTER_WORK

AFTER_WORK(agent: autogen.AfterWorkOption | ForwardRef('SwarmAgent') | str | Callable)

Handles the next step in the conversation when an agent doesn’t suggest a tool call or a handoff

Parameters:
NameDescription
agentThe agent to hand off to or the after work option.

Can be a SwarmAgent, a string name of a SwarmAgent, an AfterWorkOption, or a Callable.

The Callable signature is: def my_after_work_func(last_speaker: SwarmAgent, messages: List[Dict[str, Any]], groupchat: GroupChat) -> Union[AfterWorkOption, SwarmAgent, str]:

Type: autogen.AfterWorkOption | ForwardRef('SwarmAgent') | str | Callable

Class Attributes

agent