最終更新:2026-05-14 (木) 20:04:42 (34d)  

agents.RunItemStreamEvent
Top / agents.RunItemStreamEvent

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.

https://openai.github.io/openai-agents-python/ref/stream_events/#agents.stream_events.RunItemStreamEvent

メモ

  • event.type == "run_item_stream_event"
    • event.item.type == "tool_call_item"
    • event.item.type == "tool_call_output_item"
    • event.item.type == "message_output_item"

フィールド

  • typerun_item_stream_event
    nameLiteral (定義済みの文字)
    itemagents.items.RunItem?

nameの一覧

  • nameitem
    message_output_createdagents.items.MessageOutputItem?
    handoff_requested
    handoff_occured
    tool_calledagents.items.ToolCallItem
    tool_search_called
    tool_search_output_created
    tool_outputagents.items.ToolCallOutputItem?
    reasoning_item_created
    mcp_approval_requested
    mcp_approval_response
    mcp_list_tools

呼ばれる順番

  • nametypeitem
    tool_calledtool_call_itemagents.items.ToolCallItem
    message_output_createdmessage_output_itemagents.items.MessageOutputItem?
    tool_outputtool_call_output_itemagents.items.ToolCallOutputItem?ツールの実行結果