The WS events transport opens a channel from the queue consumer, which the runtime builds from `getWorldHandlers()`, and looks it up on the write path through `getWorld()` — two `createWorld()` calls cached under two different `globalThis` symbols in @workflow/core. The registry that joins them was a module-scope Map, so the handoff only worked while both calls ran in one module instance of this package. Since #3493 bundled the world into the Next.js server output instead of leaving it external, that is no longer guaranteed: Next gives the instrumentation entry its own copy of the module. An app whose `register()` warms the world (`await getWorld()`) therefore creates the events-writing World in the instrumentation copy and the queue consumer's World in the route entry, and every lookup reads an empty Map — sockets open and carry nothing, silently, for the life of the process. Move the registry and the two once-per-process log latches onto a `Symbol.for()` key on globalThis, the same technique core already uses for the World cache, so the transport is correct however many copies a bundler makes. Signed-off-by: Shalabh Chaturvedi <7066873+shalabhc@users.noreply.github.com> Co-Authored-By: Shalabh Chaturvedi <7066873+shalabhc@users.noreply.github.com> Signed-off-by: Shalabh Chaturvedi <7066873+shalabhc@users.noreply.github.com>
Workflow SDK makes TypeScript and JavaScript functions durable. It persists workflow progress, retries failed steps, and provides built-in observability. Workflows can suspend without using compute while they wait.
Quick start
Install the SDK in an existing project:
npm install workflow
Configure the integration for your framework. For example, with Next.js:
// next.config.ts
import { withWorkflow } from 'workflow/next';
export default withWorkflow({});
Then start a workflow from an API route, Server Action, or other server-side code:
import { start } from 'workflow/api';
import { onboardUser } from './workflows/onboard-user';
await start(onboardUser, ['hello@example.com']);
Run your app, then open the local observability UI in another terminal:
npm run dev
npx workflow web
Choose your framework in the getting-started guides.
Note
The
workflowpackage includes its full documentation, so coding agents can read version-matched guides locally fromnode_modules/workflow/docs.
Run anywhere
Local development uses the bundled backend with no configuration. Deploy to Vercel for managed storage, queuing, scaling, and observability. To self-host, use the Postgres backend or implement a custom World.
There are many third-party Worlds (both self-hosted or managed), see the Worlds page for a list of maintainer-curated third party worlds. Submit your world by opening updating the Worlds Manifest.
Community
The Workflow SDK community lives on GitHub Discussions, where you can ask questions, share ideas, and show what you have built.
Contributing
Contributions are welcome. Use issues and discussions to collaborate with the team and wider community. By participating, you agree to our Code of Conduct.
Security
If you believe you have found a security vulnerability in Workflow SDK, we encourage you to responsibly disclose this and not open a public issue.
To participate in our Open Source Software Bug Bounty program, please email responsible.disclosure@vercel.com. We will add you to the program and provide further instructions for submitting your report.