Skip to content

TerminationEvent

autogen.events.agent_events.TerminationEvent #

TerminationEvent(*, uuid=None, termination_reason)

Bases: BaseEvent

When a workflow termination condition is met

Source code in autogen/events/agent_events.py
def __init__(
    self,
    *,
    uuid: Optional[UUID] = None,
    termination_reason: str,
):
    super().__init__(
        uuid=uuid,
        termination_reason=termination_reason,
    )

termination_reason instance-attribute #

termination_reason

uuid instance-attribute #

uuid

print #

print(f=None)
Source code in autogen/events/agent_events.py
def print(self, f: Optional[Callable[..., Any]] = None) -> None:
    f = f or print

    f(colored(f"\n>>>>>>>> TERMINATING RUN ({str(self.uuid)}): {self.termination_reason}", "red"), flush=True)