Real-time agent experiences keep users engaged: streaming responses as the agent thinks, progress indicators, and interactive conversations. The SDK supports streaming—both agent reasoning and tool execution can emit events.
Tool streaming is straightforward: tools can emit progress events as they work, shown live to users. Agent reasoning can stream too, showing how the agent is approaching the problem. Interactive chat means the agent can prompt for missing information mid-conversation.
The UI responsibility: handle streaming events, update state, show progress. WebSockets for real-time, polling for simpler cases. Consider token budgets—both for cost and response time. The best real-time experiences feel responsive despite the underlying compute.