Enable Event Deltas for Lower Latency UI in Managed Agents
Enable real-time text streaming to eliminate user-perceived latency in agent responses.
Opt into event deltas using the `event_deltas[]` query parameter on the session event stream to display agent output as it is generated.
The Scenario
You are building a real-time chat interface using Claude Managed Agents and need to eliminate the delay users experience while waiting for the full response to generate.
Before & after
Developers usually had to wait for the complete `agent.message` event to arrive before displaying the response to the user. This creates a perceived lag of 5-15 seconds depending on the length of the response.
Query the streaming endpoint with the `event_deltas[]` parameter to start processing the agent's text as it's generated. This reduces the 'wait time' to near-zero as text flows in immediately.
The Prompt
GET /v1/sessions/[YOUR_SESSION_ID]/events/stream?event_deltas[]=text_delta
By opting into event deltas, you can provide a much more responsive UI that mirrors the 'typing' effect users expect from modern AI interfaces.
Source
Claude Platform - Claude Platform Docs"The event_start and event_delta events preview an agent message's text as it's generated, before the complete agent.message event arrives."
