WorkflowAdapter
autogen.beta.network.adapters.workflow.WorkflowAdapter #
Generic orchestrated multi-party channel.
Knobs: {"graph": <TransitionGraph.to_dict()>}. Participants: 2+. Default view: :class:NamedWindowedSummary(recent_n=N*2) with N = participant count — bounded prompt size plus sender labels on non-self projection lines so the orchestrator / next speaker can tell its peers apart in a 3+ party chat (the assistant/user role bit alone collapses every "other" into one indistinguishable stream).
Source code in autogen/beta/network/adapters/workflow.py
manifest instance-attribute #
manifest = ChannelManifest(type=WORKFLOW_TYPE, version=1, participants=ParticipantSchema(min=2), knobs_schema={'graph': 'TransitionGraph'}, default_view_policy=name, expectations=[Expectation(name='turn_within', on_violation='warn', params={'seconds': 120}), Expectation(name='turn_within', on_violation='auto_close', params={'seconds': 600})])
initial_state #
Source code in autogen/beta/network/adapters/workflow.py
fold #
Source code in autogen/beta/network/adapters/workflow.py
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 | |
validate_create #
Source code in autogen/beta/network/adapters/workflow.py
validate_send #
Source code in autogen/beta/network/adapters/workflow.py
on_accepted #
Source code in autogen/beta/network/adapters/workflow.py
expected_next #
Source code in autogen/beta/network/adapters/workflow.py
default_view_policy #
extract_turn_input #
Decode an inbound substantive envelope into the next speaker's prompt. Workflow handles EV_TEXT and EV_PACKET (concatenates the routing-handoff line with the body).
Source code in autogen/beta/network/adapters/workflow.py
build_round_envelope #
Build the EV_PACKET envelope capturing this round.
Walks the agent's local-stream events to determine routing intent (Handoff result first, then ToolCalled match, else text). select_next resolves the target at fold time for static routing; dynamic Handoff carries its resolved target on the packet's routing.target field.
Returns None for silent rounds (no body and no routing tool fired) — matches pre-packet "no envelope" behaviour.
Source code in autogen/beta/network/adapters/workflow.py
render_envelope #
Project EV_PACKET via :func:_packet_text; defer to :func:default_render_envelope for everything else (notably EV_TEXT for participant text emitted outside the workflow's round-end packet).
Source code in autogen/beta/network/adapters/workflow.py
tools_for #
Workflow offers no adapter-level tools.
Handoff routing is encoded by user-authored @tool functions that return :class:Handoff(target=, reason=). The handler merges those tools (already on agent.tools) with the identity-level NetworkPlugin set; the workflow adapter itself contributes nothing.
Source code in autogen/beta/network/adapters/workflow.py
build_text_envelope #
Workflow accepts text seeds (e.g. for an initiator's first turn) as plain EV_TEXT — the adapter folds them into the round-end packet downstream.
Source code in autogen/beta/network/adapters/workflow.py
build_packet_envelope #
build_packet_envelope(channel_id, sender_id, body, *, handoff=None, context_set=None, audience=None, causation_id=None)
Workflow's native round-end shape — handoff + context_set live in routing / context fields.