Worlds

The workflow World is an interface that abstracts how workflows and steps communicate with the outside world, letting you build custom adapters and reuse them across different environments, infrastructure, and hosting providers.

Looking for World implementations? Check out the Worlds Ecosystem page for a complete list of official and community worlds with compatibility status and performance benchmarks.

What is a World?

A World implementation handles three core responsibilities:

  • Workflow Storage - Persisting workflow state and event logs across function invocations
  • Step Execution - Managing step function invocations with retries and error handling
  • Message Passing - Communication between the workflow orchestrator and step functions

Choosing a World

By default, Workflow automatically selects the appropriate world:

  • Local development: Uses the Local World for easy development with no external services
  • Vercel deployment: Automatically switches to the Vercel World for production

To use a different World implementation, set the WORKFLOW_TARGET_WORLD environment variable:

export WORKFLOW_TARGET_WORLD=@my-namespace/my-npm-package
export MY_WORLD_CONFIG=... # implementation-specific configuration

Available Worlds

Visit the Worlds Ecosystem page to explore:

  • Official Worlds - Maintained by the Workflow team
  • Community Worlds - Community-contributed implementations for various backends
  • Compatibility Status - E2E test results for each world
  • Performance Benchmarks - Execution time comparisons

Building a Custom World

Want to create your own World implementation? A World must implement the following interface:

  • Storage methods for runs, steps, hooks, and streams
  • Queue management for step execution
  • Authentication and authorization

See the Local World or Postgres World source code for reference implementations.

To add your World to the ecosystem:

  1. Implement the World interface
  2. Publish to npm
  3. Open a PR to add your world to worlds-manifest.json

Your world will then be automatically tested in CI and appear on the Worlds Ecosystem page.

On this page

GitHubEdit this page on GitHub