PatternsAgent Patterns

Orchestrator-Worker Workflow Pattern

Loading pattern preview

Loading preview…

Problems solved

Technical challenges this implementation handles out of the box.
  • Coordinate create, modify, and delete workers from an orchestrator
  • Run specialized workers in parallel under Workflow DevKit
  • Plan multi-file change sets before worker execution
  • Persist orchestrated steps with durable workflow execution

Use cases

Products and workflows this pattern is designed to support.
  • Feature implementation planning workflows
  • Parallel code-change worker demos
  • Multi-file change coordination
  • Workflow DevKit orchestrator-worker tutorials

Setup

Requirements, wiring steps, and what this pattern adds to your project.

Getting started

Pick how you want to pull this pattern in — then wire env vars and routes the same way.

  1. 1

    Install from the preview toolbar

    Shadcn Icon

    Copy the install command above and run it in your project — Pro patterns include a short-lived token.

  2. 2

    Add environment variables to .env.local

    OPENAI_API_KEY

  3. 3

    Run your dev server and open the pattern route

    Install dependencies if needed, then start the app and verify responses.

Environment variables

Capabilities

AI SDK APIs

generateObject

Providers

OpenAI

Files added

3 files
  • app/page.tsx
  • app/layout.tsx
  • workflows/evaluator-workflow.ts

Dependencies

8 total

npm packages

6
AISDKNext.jsReactsonnerworkflowZod

Shadcn IconRegistry components

2
buttonselect

Requirements

Complexity
Advanced
Setup time
~15 minutes
Node
24+
Memory
512MB
Workflow DevKit setup