Skip to content
AI NEWS JOURNAL
VercelAI NEWS / JOURNAL

Delete a run's data on demand in Workflow SDK

The Vercel Workflow SDK now enables users to delete stored data from finished runs on demand, helping meet compliance and security requirements by purging sensitive information from run payloads. This action removes inputs, outputs, hook payloads, and error traces but preserves metadata, including attributes, hook tokens, and step timings. Deletion can be performed via the Vercel Dashboard, CLI commands, or programmatically using the deleteRuns() function. The feature is available for finished runs only and requires workflow@5.7.0 or higher.

The Workflow SDK now lets you delete a finished run's stored data on demand. This feature gives you the ability to quickly meet compliance and security requirements when sensitive data needs to be purged from run payloads. Deleting a run's data deletes any inputs, outputs, hook payloads, and error traces for the run and its related entities. This does not delete the run's metadata: the run is still listed in observability. Attributes, hook tokens, and timings for steps and events can still be inspected. You can delete a run's data from the Vercel Dashboard, or via the CLI: # Locallypnpx workflow delete # For runs on Vercelpnpx workflow delete --backend vercel --env preview You can also delete a run's data programmatically from your code: import { deleteRuns, getRun } from 'workflow/api'; await getRun(runId).delete(); // one runawait deleteRuns([runIdA, runIdB]); // up to 100 runs Deletion applies to finished runs only, so a run that is still going is skipped and keeps running. If you want to delete a run's payload as soon as it finishes, use the retention settings instead. Upgrade to workflow@5.7.0 or higher to use this feature. Learn more in the deleteRuns() reference. Contributors Peter Wielander, Pranay Prakash

Sources

Read original ↗

Related topics

← Continue to all updates