← AI PulseAug 20, 2026

Wire · news · Single-source brief

xAI Introduces WebSocket Mode for Responses API

xAI has launched a new WebSocket mode for its Responses API, designed to reduce latency in workflows that involve frequent tool calls.

By Illumora Editorial

Source · Aug 20, 2026, 3:13 PM · On Illumora · Aug 20, 2026, 3:38 PM

Media from the primary source — shown here so you can stay on Illumora.

Rewritten from one allowlisted primary — not independent enterprise reporting. Lanes →

Brief drafted by Illumora’s editorial model from the linked primary source. Ops desk reviews flagged pieces. How we write →

Read the source →xAI Docs — WebSocket Mode | SpaceXAI Docs
Save

xAI has introduced a new WebSocket mode for its Responses API, intended to support lower-latency interactions, particularly for agentic workloads. This feature allows developers to use a persistent WebSocket connection to /v1/responses instead of initiating a new HTTP request for each turn in a conversation.

Key Points

  • The new WebSocket mode is available for the Responses API.
  • It utilizes a single, long-lived WebSocket connection to /v1/responses.
  • Subsequent turns after the first response only require sending new input items and a previous_response_id.
  • The server maintains prior state in memory on the open socket.
  • This mode is compatible with Zero Data Retention (ZDR) and store=false settings.
  • It is specifically designed for agentic workloads that involve numerous sequential tool calls.
  • Internal benchmarks by xAI showed up to 20% lower end-to-end latency for agentic workloads with many tool calls, compared to repeated HTTP requests using previous_response_id chaining.

Context

According to xAI, the WebSocket mode addresses the overhead of connection setup and re-sending full conversation histories in long interactions. By maintaining an open socket and only transmitting new input items, the system aims to optimize performance for conversational agents and orchestration loops that engage in dozens of back-and-forth exchanges with the model.

Why It Matters

This update offers builders a method to decrease latency and improve efficiency for applications requiring extensive, rapid interactions with xAI's models, such as coding agents or complex orchestration systems. The reported latency reduction could translate to more responsive and fluid user experiences in these demanding scenarios.

What To Do

  • Review the xAI documentation on WebSocket Mode for implementation details.
  • Test the WebSocket mode with existing agentic workloads to evaluate latency improvements.
  • Compare the performance of WebSocket connections against traditional HTTP requests for tool-call-heavy applications.
  • Note the requirement to send response.create messages after the WebSocket upgrade.