惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

有赞技术团队
有赞技术团队
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
P
Palo Alto Networks Blog
C
Cisco Blogs
The Hacker News
The Hacker News
T
Threatpost
S
Schneier on Security
K
Kaspersky official blog
Spread Privacy
Spread Privacy
博客园_首页
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
NISL@THU
NISL@THU
量子位
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Google DeepMind News
Google DeepMind News
Security Latest
Security Latest
博客园 - 司徒正美
云风的 BLOG
云风的 BLOG
博客园 - 叶小钗
H
Hackread – Cybersecurity News, Data Breaches, AI and More
N
News and Events Feed by Topic
爱范儿
爱范儿
P
Proofpoint News Feed
C
CERT Recently Published Vulnerability Notes
Project Zero
Project Zero
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Cisco Talos Blog
Cisco Talos Blog
GbyAI
GbyAI
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Apple Machine Learning Research
Apple Machine Learning Research
T
Tenable Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
V
Vulnerabilities – Threatpost
Forbes - Security
Forbes - Security
博客园 - 三生石上(FineUI控件)
C
Cyber Attacks, Cyber Crime and Cyber Security
N
News and Events Feed by Topic
V
V2EX
Webroot Blog
Webroot Blog
The Register - Security
The Register - Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
阮一峰的网络日志
阮一峰的网络日志
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Blog — PlanetScale
Blog — PlanetScale
M
MIT News - Artificial intelligence
Scott Helme
Scott Helme
Simon Willison's Weblog
Simon Willison's Weblog
L
LangChain Blog
W
WeLiveSecurity
Cloudbric
Cloudbric

Workflow SDK Documentation

Patterns for Defining Tools Human-in-the-Loop Building Durable AI Agents Queueing User Messages Resumable Streams Sleep, Suspense, and Scheduling Streaming Updates from Tools API Reference Workflow Globals Changelog Resilient run start Building a World Deploying Astro Express Fastify Hono Getting Started NestJS Next.js Nitro Nuxt Python SvelteKit Vite corrupted-event-log fetch-in-workflow hook-conflict Errors node-js-module-in-workflow serialization-failed start-invalid-workflow-function step-not-registered timeout-in-workflow webhook-invalid-respond-with-value webhook-response-not-sent workflow-not-registered Errors & Retrying Hooks & Webhooks Idempotency Foundations Serialization Starting Workflows Streaming Versioning Workflows and Steps How the Directives Work Encryption Event Sourcing Framework Integrations Understanding Directives Migration Guides Migrating from AWS Step Functions Migrating from Inngest Migrating from Temporal Observability Testing Server-Based Testing createHook createWebhook defineHook FatalError fetch getStepMetadata getWorkflowMetadata getWritable workflow RetryableError sleep @workflow/vitest DurableAgent @workflow/ai WorkflowChatTransport getHookByToken getRun getWorld workflow/api resumeHook resumeWebhook Chat Session Modeling runtime-decryption-failed Upgrading Workflows abort-signal-timeout-in-workflow Cancellation How Cancellation Works Internal Serializable AbortController and AbortSignal Eager Processing of Steps & Incremental Event Replay TanStack Start Agent Cancellation Sequential & Parallel Execution Workflow Composition Local World | Workflow SDK Postgres World | Workflow SDK Vercel World | Workflow SDK Migrating from trigger.dev Secure Credential Handling Local World | Workflow SDK Postgres World | Workflow SDK Vercel World | Workflow SDK
Cookbook
2026-05-31 · via Workflow SDK Documentation

Best-practice workflow patterns with copy-paste code examples.

A curated collection of workflow patterns with clean, copy-paste code examples for real use cases.

  • Durable Agent — Replace a stateless AI agent with one that survives crashes and retries tool calls
  • Human-in-the-Loop — Pause an agent for human approval, then resume based on the decision
  • Agent Cancellation — Stop a running agent immediately via run.cancel() or gracefully via a hook + Promise.race
  • Sequential & Parallel Execution — Compose steps with await, Promise.all, and Promise.race against durable sleeps and webhooks
  • Workflow Composition — Call workflows from other workflows by direct await or background spawn via start()
  • Saga — Coordinate multi-step transactions with automatic rollback when a step fails
  • Batching — Process large collections in parallel batches with failure isolation
  • Rate Limiting — Handle 429 responses and transient failures with RetryableError and backoff
  • Scheduling — Use durable sleep to schedule actions minutes, hours, or weeks ahead
  • Timeouts — Add deadlines to slow steps, hooks, and webhooks by racing them against a durable sleep
  • Idempotency — Ensure side effects happen exactly once, even when steps retry
  • Webhooks — Receive HTTP callbacks from external services and process them durably
  • AI SDK — Use streamText() directly inside a workflow for lower-level control over model calls and tool execution
  • Chat SDK — Build durable chat sessions with workflow persistence and AI SDK chat primitives
  • Sandbox — Orchestrate Vercel Sandbox lifecycle inside durable workflows
  • Child Workflows — Spawn and orchestrate child workflows from a parent
  • Distributed Abort Controller — Build a cross-process abort controller using workflow streams and hooks
  • Upgrading Workflows — Identify a clean upgrade point in a long-running workflow and spawn a fresh run on the latest deployment carrying state forward
  • Serializable Steps — Wrap non-serializable third-party objects so they cross the workflow boundary
  • Publishing Libraries — Ship npm packages that export reusable workflow functions