Vercel Workflow SDK 可按需求刪除已完成工作流程的資料
Delete a run's data on demand in Workflow SDK
有些工作流程會碰到敏感資料,完成後若需要清掉,Vercel Workflow SDK 現在可以刪除該次執行留下的輸入、輸出、回呼資料和錯誤紀錄。
- 你可以在 Vercel Dashboard、命令列或程式碼裡刪除資料。
- 例如,一次可刪除最多 100 次執行的資料。刪除後,這次執行仍會留在觀測紀錄中,但相關內容已清除。功能只適用於已完成的執行。
- 還在進行中的執行會略過,繼續運作。使用此功能需要 workflow 5.7.0 或更新版本。
AI 伴隨問答
針對這篇報導有疑問?可直接點選快捷問題或向 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
Ask AIDashboard
- * *
Products
Agent Stack
Core Platform
Tools
Resources
Learn
Build
Explore
Delete a run's data on demand in Workflow SDK

Peter WielanderSoftware Engineer, Workflows
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


Peter Wielander, Pranay Prakash
Agent Stack
Core Platform
Security
Tools
Frameworks
SDKs
Build
Learn
Explore
Company
Legal & Trust
- Privacy Policy
- Terms of Service
- Cookie Policy
- DPA
- Acceptable Use Policy
- Legal (all documents)
- Trust Center
- Status
- Cookie Preferences
Social
Select a display theme:system light dark