Skip to content

WorkflowState

autogen.beta.network.adapters.workflow.WorkflowState dataclass #

WorkflowState(participant_order=list(), expected_next_speaker=None, last_speaker_id=None, last_envelope_id=None, turn_count=0, pending_close_reason='', creator_id='', graph_data=dict(), context_vars=dict())

Folded state for a workflow session.

graph_data is the JSON-friendly TransitionGraph.to_dict() snapshot taken at initial_state. fold deserialises it on each call (cheap; the graph is small) so the adapter stays stateless across sessions.

creator_id is snapshotted so RevertToInitiatorTarget can resolve without metadata access (fold has no metadata).

participant_order class-attribute instance-attribute #

participant_order = field(default_factory=list)

expected_next_speaker class-attribute instance-attribute #

expected_next_speaker = None

last_speaker_id class-attribute instance-attribute #

last_speaker_id = None

last_envelope_id class-attribute instance-attribute #

last_envelope_id = None

turn_count class-attribute instance-attribute #

turn_count = 0

pending_close_reason class-attribute instance-attribute #

pending_close_reason = ''

creator_id class-attribute instance-attribute #

creator_id = ''

graph_data class-attribute instance-attribute #

graph_data = field(default_factory=dict)

context_vars class-attribute instance-attribute #

context_vars = field(default_factory=dict)