Streaming events
StreamEventmodule-attribute
StreamEvent:TypeAlias=Union[RawResponsesStreamEvent,RunItemStreamEvent,AgentUpdatedStreamEvent,]A streaming event from an agent.
RawResponsesStreamEventdataclass
Streaming event from the LLM. These are 'raw' events, i.e. they are directly passed throughfrom the LLM.
Source code insrc/agents/stream_events.py
RunItemStreamEventdataclass
Streaming events that wrap aRunItem. As the agent processes the LLM response, it willgenerate these events for new messages, tool calls, tool outputs, handoffs, etc.
Source code insrc/agents/stream_events.py
AgentUpdatedStreamEventdataclass
Event that notifies that there is a new agent running.