Vercel

Workflow SDK 5 Beta Adds Automatic Compression for Faster, Cheaper Workflows


Executive Summary

The Workflow SDK version 5 beta now automatically compresses large workflow inputs and outputs using the zstd algorithm. This enhancement is designed to reduce storage costs and improve execution speed by making data persistence more efficient. The benefits extend to applications built on the SDK, like `eve` durable agents, with no code changes required for developers to implement the feature.

Key Takeaways

* Automatic Compression: The SDK now uses `zstd` to automatically compress run, hook, and step inputs/outputs, but only for larger payloads where it is beneficial.

* Performance & Cost Savings: Compressed data uses less storage and has faster read/write times, resulting in quicker and less expensive workflow execution.

* Significant Reduction for AI: Storage size and cost can drop by up to 85% for JSON payloads, which are common in AI conversation histories.

* Zero-Configuration: The feature is enabled by default upon updating and requires no code changes from developers.

* Availability: This capability is included in the beta release, version `workflow@5.0.0-beta.19` and later.

Strategic Importance

This update makes the SDK more efficient and cost-effective for data-heavy use cases, strengthening its value proposition for developers building scalable AI agents and complex workflows.

Original article