Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Streaming events

StreamEventmodule-attribute

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
@dataclassclassRawResponsesStreamEvent:"""Streaming event from the LLM. These are 'raw' events, i.e. they are directly passed through    from the LLM.    """data:TResponseStreamEvent"""The raw responses streaming event from the LLM."""type:Literal["raw_response_event"]="raw_response_event""""The type of the event."""

datainstance-attribute

The raw responses streaming event from the LLM.

typeclass-attributeinstance-attribute

type:Literal['raw_response_event']='raw_response_event'

The type of the event.

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
@dataclassclassRunItemStreamEvent:"""Streaming events that wrap a `RunItem`. As the agent processes the LLM response, it will    generate these events for new messages, tool calls, tool outputs, handoffs, etc.    """name:Literal["message_output_created","handoff_requested",# This is misspelled, but we can't change it because that would be a breaking change"handoff_occured","tool_called","tool_output","reasoning_item_created","mcp_approval_requested","mcp_approval_response","mcp_list_tools",]"""The name of the event."""item:RunItem"""The item that was created."""type:Literal["run_item_stream_event"]="run_item_stream_event"

nameinstance-attribute

name:Literal["message_output_created","handoff_requested","handoff_occured","tool_called","tool_output","reasoning_item_created","mcp_approval_requested","mcp_approval_response","mcp_list_tools",]

The name of the event.

iteminstance-attribute

item:RunItem

The item that was created.

AgentUpdatedStreamEventdataclass

Event that notifies that there is a new agent running.

Source code insrc/agents/stream_events.py
@dataclassclassAgentUpdatedStreamEvent:"""Event that notifies that there is a new agent running."""new_agent:Agent[Any]"""The new agent."""type:Literal["agent_updated_stream_event"]="agent_updated_stream_event"

new_agentinstance-attribute

new_agent:Agent[Any]

The new agent.


[8]ページ先頭

©2009-2025 Movatter.jp