Workflow SDK 5: built for production
Vercel released Workflow SDK 5, adding end-to-end encryption for workflow data and region-local run storage to improve security and performance.
Workflow SDK 5 introduces built-in AES-256-GCM encryption for all workflow payloads, including inputs, outputs, and stream data, using a unique key per run. The encryption occurs before data leaves the code, ensuring plaintext is only visible in deployments or authorized observability tools. On Vercel, encryption is enabled by default with no setup required, while self-hosted deployments can implement custom encryption via a key management function.
The SDK now supports region-local run storage, meaning each workflow run’s state, queue, and streams are served from the same region where it started. This eliminates cross-region requests on the hot path, improving latency and reducing dependency on a single region. Runs automatically start in the region of the triggering function, aligning workflow execution with user proximity without additional configuration.
New run attributes in Workflow SDK 5 allow developers to attach searchable metadata, such as order IDs, to runs for easier debugging and monitoring. These attributes are plaintext and should not contain sensitive data. The redesigned trace viewer enhances navigation with features like span search, zoom, a minimap, and local inspection during development, streamlining troubleshooting workflows.
Payload retention policies have been expanded, enabling automatic deletion of sensitive inputs, outputs, and stream contents upon run completion or failure. The run’s metadata remains visible in observability tools, ensuring compliance with data retention requirements while maintaining operational visibility. Encryption and retention policies apply uniformly across both Vercel-hosted and self-hosted deployments.