跳到正文
Vercel Blog(vercel.com)· Peter Wielander·· 6 天前品質評分48

Vercel Workflow SDK 可按需求刪除已完成工作流程的資料

Delete a run's data on demand in Workflow SDK

重點導讀

有些工作流程會碰到敏感資料,完成後若需要清掉,Vercel Workflow SDK 現在可以刪除該次執行留下的輸入、輸出、回呼資料和錯誤紀錄。

  • 你可以在 Vercel Dashboard、命令列或程式碼裡刪除資料。
  • 例如,一次可刪除最多 100 次執行的資料。刪除後,這次執行仍會留在觀測紀錄中,但相關內容已清除。功能只適用於已完成的執行。
  • 還在進行中的執行會略過,繼續運作。使用此功能需要 workflow 5.7.0 或更新版本。

AI 伴隨問答

自備 Key 深度分析

針對這篇報導有疑問?可直接點選快捷問題或向 AI 追問背景脈絡與技術細節:

正文

# Delete a run's data on demand in Workflow SDK - Vercel
Skip to content

[](https://vercel.com/home)

Copy Wordmark Copy Logo

Download Brand Assets Brand Guidelines

Products

Agent Stack

Core Platform

Tools

Resources

Learn

Build

Explore

EnterprisePricing

Get a DemoLog InSign Up

Ask AIDashboard

Image 1

  • * *

Products

Agent Stack

Core Platform

Tools

Resources

Learn

Build

Explore

Enterprise

Pricing

Get a Demo

Log InSign Up

Delete a run's data on demand in Workflow SDK

Image 2

Peter WielanderSoftware Engineer, Workflows

BlogChangelog

24 Nov 2026

1 min read

Copy

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:

terminal

1# Locally2pnpx workflow delete <runId>3# For runs on Vercel4pnpx workflow delete <runId> --backend vercel --env preview

You can also delete a run's data programmatically from your code:

get-run.ts

1import { deleteRuns, getRun } from 'workflow/api';2
3await getRun(runId).delete();       // one run4await 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

Image 3Image 4

Peter Wielander, Pranay Prakash

Agent Stack

Core Platform

Security

Tools

Frameworks

SDKs

Build

Learn

Explore

Company

Legal & Trust

Social

  • Image 5: VercelImage 6: Vercel

Loading status…

Select a display theme:system light dark

來源: Vercel Blog (vercel.com)
開啟原文

讀者討論

理性交流 · 即時討論