Stream Agent Responses While Using MCP

Streaming improves perceived latency when a tool-enabled run takes several seconds. The Agents SDK supports streamed runs with MCP tool activity.

result = Runner.run_streamed(agent, "Summarize the project")
async for event in result.stream_events():
    handle(event)
print(result.final_output)

Do not confuse model token streaming with tool progress

A tool may still perform a long blocking operation. For long jobs, expose explicit progress/task state rather than pretending token streaming solves backend latency.

Approvals in streamed runs

Approval interruptions also work with streaming. Drain the event stream, inspect pending interruptions, resolve them, and resume the run with streaming again if desired.