Vercel Workflow SDK v5.2.0 switches to WebSocket writes for 4.2x faster streaming

·2026.11.09 09:00

Key point

Upgrading to [email protected] replaces per-write HTTP requests with a single WebSocket connection, reducing latency and costs for multi-step workflows.

Details

  • Workflow SDK v5.2.0 sends event and stream writes to Vercel Workflows over a WebSocket by default, replacing one HTTP request per write or write group.
  • In a benchmark replaying an AI agent's token stream, v5.2.0 delivered the full response 4.2x faster than v4.8.12, with no chunk delayed over a second.
  • Existing streaming code works without changes; a step writing a burst of chunks, such as AI tokens, sends them over the WebSocket once it opens.
  • Every step start and completion is an event write sent over the WebSocket, reducing HTTP requests for workflows with many steps.
  • No code change is needed beyond upgrading to [email protected] or later; new runs use the WebSocket after deployment, while in-flight runs finish on their original deployment.
  • Users on version 4.x should consult the upgrade guide, as v5 is a major release.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.