Stream
autogen.beta.context.Stream #
Bases: Protocol
pending_messages instance-attribute #
Inbox of follow-up turns produced asynchronously (e.g. by background tasks). The agent loop drains this before each model call; whatever lands here while no ask is running is consumed by the next ask on this stream and merged into its initial request.
send async #
Source code in autogen/beta/context.py
enqueue #
spawn_background #
Start a fire-and-forget task in this stream's scope.
The task is not awaited by the agent loop. Tasks deliver their results via self.enqueue(...) — anything enqueued while an ask is live feeds the next model call; anything enqueued after ask returned sits in pending_messages and is consumed by the next ask on the same stream.