autogen
autogen.ON_CONDITION
ON_CONDITION
Defines a condition for transitioning to another agent or nested chats
Parameters:Name | Description |
---|---|
target | The agent to hand off to or the nested chat configuration. Can be a SwarmAgent or a Dict. If a Dict, it should follow the convention of the nested chat configuration, with the exception of a carryover configuration which is unique to Swarms. Swarm Nested chat documentation: https://docs.ag2.ai/docs/topics/swarm#registering-handoffs-to-a-nested-chat Type: ForwardRef('SwarmAgent') | dict[str, typing.Any] Default: None |
condition | The condition for transitioning to the target agent, evaluated by the LLM to determine whether to call the underlying function/tool which does the transition. Type: str Default: ” |
available | Optional condition to determine if this ON_CONDITION is available. Can be a Callable or a string. If a string, it will look up the value of the context variable with that name, which should be a bool. Type: str | Callable | None Default: None |
Class Attributes
available
condition