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

推荐订阅源

Google DeepMind News
Google DeepMind News
B
Blog
博客园 - 三生石上(FineUI控件)
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
The Blog of Author Tim Ferriss
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园_首页
Vercel News
Vercel News
量子位
A
About on SuperTechFans
博客园 - 聂微东
WordPress大学
WordPress大学
D
DataBreaches.Net
The Cloudflare Blog
M
MIT News - Artificial intelligence
Last Week in AI
Last Week in AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
Docker
雷峰网
雷峰网
C
Check Point Blog
S
SegmentFault 最新的问题
U
Unit 42
月光博客
月光博客
Apple Machine Learning Research
Apple Machine Learning Research

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 Cookbook 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
workflow/nitro
2026-06-12 · via Workflow SDK Documentation

Nitro module for automatic workflow bundling and route registration.

Nitro integration for Workflow SDK. The workflow/nitro entry point's default export is a Nitro module — it has no callable API. You enable it by adding it to the modules array of your Nitro config and configure it via the workflow key.

import { defineConfig } from "nitro";

export default defineConfig({
  serverDir: "./server",
  modules: ["workflow/nitro"], 
});

When enabled, the module:

  • Transforms "use workflow" and "use step" directives during bundling.
  • Builds the workflow, step, and webhook bundles, and rebuilds them on file changes in development.
  • Registers the workflow runtime routes under /.well-known/workflow/v1/.
  • Serves a redirect to the local observability dashboard at /_workflow in development.
  • Configures Vercel function rules (queue triggers and maxDuration) for the workflow routes when deploying to Vercel.

Options are read from the workflow key of your Nitro config. The option type is exported as ModuleOptions:

import { defineConfig } from "nitro";
import type { ModuleOptions } from "workflow/nitro"; 

const workflow: ModuleOptions = {
  runtime: "nodejs22.x",
};

export default defineConfig({
  modules: ["workflow/nitro"],
  workflow, 
});
OptionTypeDefaultDescription
dirsstring[]Directories to scan for workflows and steps. By default, the workflows/ directory is scanned from the project root and all layer source directories.
typescriptPluginbooleanfalseAdds the workflow TypeScript plugin to the generated tsconfig.json for IDE IntelliSense.
runtimestringNode.js runtime version for Vercel Functions (e.g. 'nodejs22.x', 'nodejs24.x'). Only applies when deploying to Vercel.

If you use Nitro through its Vite plugin (nitro/vite) instead of a standalone nitro.config.ts, use the workflow/vite entry point, which wraps this module as a Vite plugin and accepts the same ModuleOptions.