agent.stream() is the simpler option: it returns a StreamResult that you can iterate over for text tokens and await for the final output. agent.runStreamEvents() gives you granular event-level control: every turn start, text delta, tool call, and tool result is emitted as a typed event.
Use agent.stream() for most cases. Reach for agent.runStreamEvents() when you need full observability, custom progress indicators, or real-time tool call logging.
Streaming event timeline
agent.stream() - simple streaming
agent.stream() returns a StreamResult<TOutput> immediately. The async iterables deliver data in real time; the promises resolve when the run completes.
outputMode: "tool"):
agent.runStreamEvents() - event stream
agent.runStreamEvents() returns an AsyncIterable<AgentStreamEvent<TOutput>>. Switch on event.kind to handle each event type.
AgentStreamEvent reference
When to use which
StreamResult interface
For reference, the completeStreamResult<TOutput> interface:
Messages
Multi-turn conversations and message history
Results
RunResult and StreamResult interfaces