Skip to main content
reopt Handbook
reopt Handbook
Vercel Enterprise AI Platform

Platform Foundation

Platform ArchitectureAI SDK RuntimeAI Gateway Control Plane

Execution Runtime

Workflow Durable ExecutionSandbox Tool RuntimeMCP Enterprise DataQueues and Async Jobs

Prompt and Quality

Prompt Engineering and GuardrailsRAG and Retrieval-Augmented GenerationObservability and Evaluation

Operations

Security GovernanceCost and ReliabilityDeployment and AI CI/CD

Scenarios

Customer Support Agent ArchitectureInternal Research Agent ArchitectureApproval Backoffice AutomationCoding Orchestration

Orchestration Patterns

Graph-Centric OrchestrationPractical Orchestration PlaybookMulti-Agent Architecture

Appendix

Migration GuideReferencesVerificationUpdates
Handbook›Vercel Enterprise AI Platform›Workflow Durable Execution
한국어KOEnglishEN

Workflow Durable Execution

Use Workflow for long-running, resumable, and approval-oriented AI tasks.

Written and reviewed by Eric Han · Co-founder & CTO, reopt

Key takeaways

  • AI tasks that outgrow request lifetimes need durable execution rather than fragile background promises.
  • Workflow fits human approval pauses, long research across timeouts, multi-step automation with safe retries, scheduled reports, and external-event continuation.
  • Design steps to be idempotent, store task state in durable records, and separate analysis steps from side-effect steps.
  • Add approval gates before irreversible actions, and define retry, timeout, compensation, and escalation behavior before production.

Workflow 5 migration checks

The npm latest checked on 2026-10-23 is workflow@5.2.3. Preserve workflow/step boundaries and review these changes:

  • runStep is removed; call the step function directly.
  • getWorld(), getWorldHandlers(), and createWorld() are async. Await them in self-hosted worker bootstrap.
  • Hook metadata from getHookByToken() or resumeHook() is a Promise.
  • Replace removed experimental_setAttributes with setAttributes.
  • Duplicate step/workflow IDs fail the build; custom bundle and route integrations need the v5 migration review.

Pass AbortSignal into steps to cancel cooperative in-flight work. A step ignoring the signal can finish, and cancellation does not reverse a completed payment or message. Keep idempotency keys and approval checks independent of token retention or force takeover.

Workflow 5 changes.

AI tasks often outgrow request lifetimes. Research, approvals, retries, external events, and multi-step actions need durable execution rather than fragile background promises.

Workflow Fits

Use caseWhy durable execution helps
Human approvalPause and resume around decision points
Long researchPreserve progress across timeouts
Multi-step automationTrack each stage and retry safely
Scheduled reportsRun repeatable tasks with history
External eventsContinue when a webhook or user action arrives

Step Design

  • Make steps idempotent when possible.
  • Store task state in durable records.
  • Separate analysis steps from side-effect steps.
  • Add approval gates before irreversible actions.
  • Emit progress and final artifacts for review.

Failure Rule

Every workflow should define retry, timeout, compensation, and escalation behavior before production.

Related docs

Graph-Centric Orchestration

Model AI workflows as state, nodes, edges, gates, and recovery paths.

Internal Research Agent Architecture

Build internal research agents for long analysis, artifacts, approval, and source tracking.

Ch1. Eve Mental Model

Enterprise Eve Agent Development · Understand Eve as filesystem authoring, durable workflow execution, runtime harness, and channel protocol.

Ch14. Enterprise Patterns

Enterprise Eve Agent Development · Combine Eve features into support, research, code, back-office, analytics, and incident-response agent patterns.

Ch11. Schedules, State, Hooks

Enterprise Eve Agent Development · Connect Eve cron schedules, durable state, and stream-event hooks to automation, memory, and audit.

AI Gateway Control Plane

Centralize model routing, provider fallback, usage policy, and cost governance.

Sandbox Tool Runtime

Isolate code, file, browser, and shell execution for AI agents.

On this page

Workflow 5 migration checksWorkflow FitsStep DesignFailure Rule