Workflow Patterns

Every Workflow Pattern Your Business Needs

Sequential, parallel, conditional, supervisor, looping, and event-driven — six production-ready orchestration patterns built into the runtime, composable without limits.

Orchestration Patterns

Six Patterns, Infinite Possibilities

The OrchStack Runtime supports six core orchestration patterns. Each is production-hardened, fully traceable, and composable with any other pattern.

Sequential

Chain of Agents
Receive Email
Classify Intent
Extract Entities
Generate Reply

Steps execute one after another in a deterministic order. The output of each step becomes the input of the next. Ideal for linear pipelines where every step depends on the previous result.

Use Case

Email intake: receive message, classify intent, extract entities, generate reply, send response.

Parallel

Fan-out / Merge
Lead Received
fan-out
Query CRM
Check Social
Credit Score
merge
Merged Profile

Multiple steps execute simultaneously and their results are merged when all complete. Dramatically reduces latency when steps are independent of each other.

Use Case

Lead enrichment: simultaneously query CRM, check social profiles, run credit score, and verify email — then merge all data into a single lead profile.

Conditional

Branch by Outcome
Classify Ticket
Check Sentiment
branch
angry
VIP Handler
neutral
Standard Queue
positive
Auto-Resolve

Routes execution to different paths based on the output of a previous step — classification, sentiment, extracted value, or any custom condition. Supports if/else, switch, and weighted routing.

Use Case

Support ticket routing: classify sentiment and urgency, then branch to VIP handler, standard queue, or auto-resolve based on the result.

Supervisor with Skill Graph

Adaptive Orchestration
Supervisor Agent
skill graph
ID Verify
Plan Rec.
Payment
Welcome
dynamic selection based on context

A supervisor agent reasons about which specialist skill to invoke next based on context, not a fixed script. The skill graph exposes available capabilities and the supervisor dynamically plans its execution path. This is the key differentiator from static workflow engines.

Use Case

Customer onboarding: the supervisor dynamically selects identity verification, plan recommendation, payment setup, or welcome messaging based on what has already been completed and what the customer needs next.

Looping

Retry / Iterate Until Done
Draft Content
Quality Check
Score > 0.9?
no
retry
yes
Publish

Repeats a step or sub-workflow until a condition is satisfied — a quality threshold is met, a validation passes, or a maximum iteration count is reached. Supports both fixed-count and condition-based loops.

Use Case

Content generation: draft copy, run quality checks, refine based on feedback — loop until the quality score exceeds the threshold or 5 iterations are reached.

Event-Driven

React to the World
msg
db
hook
cron
events
Runtime Router
Execute Workflow

Workflows trigger in response to external events — incoming messages, database changes, webhook calls, scheduled cron jobs, or manual invocations. The runtime subscribes to event sources and starts workflows automatically.

Use Case

Real-time alerting: when a database row changes status to 'critical', automatically trigger an investigation workflow that analyzes logs, drafts an incident report, and notifies the on-call team.

Key Differentiator

Supervisor with Skill Graph

Unlike static workflow engines, OrchStack's supervisor pattern does not follow a fixed script. It reasons about which skill to invoke based on context, adapting in real-time to changing conditions.

Skill Graph — Customer Onboarding
Supervisor Agent
dynamic routing
Identity Verification
Plan Recommendation
Payment Processing
Welcome Messaging
Compliance Check
Fraud Detection
Supervisor selects next skill based on context and progress

No fixed script. No static DAG.

Traditional workflow engines require you to predefine every path. The supervisor pattern breaks this constraint. The supervisor agent has access to a skill graph — a registry of available capabilities — and dynamically decides which skill to invoke next based on the current state of the conversation, previous results, and the user's goal.

Adaptive Routing

The supervisor reasons about which skill to call next. Add a new skill to the graph, and the supervisor can start using it immediately — no workflow edits needed.

Context-Aware Decisions

Routing decisions are based on the full conversation context, not just the last output. The supervisor considers history, user profile, and intermediate results.

Composable Skills

Skills are self-contained capability modules. Each skill has a clear interface, handles its own errors, and can be tested independently.

Why This Matters

Static workflows break when requirements change. The supervisor pattern lets your workflows evolve without re-engineering the orchestration logic. Add skills, remove skills, update capabilities — the supervisor adapts automatically.

Event-Driven

Five Ways to Trigger a Workflow

Workflows start in response to real-world events. The runtime subscribes to event sources and executes the right workflow automatically.

Message

WhatsApp, SMS, email, Slack, or any messaging channel

Customer sends a WhatsApp message

Database Change

Row insert, update, or delete in Postgres, MySQL, or MongoDB

Order status changes to 'shipped'

Webhook

HTTP POST from any external service or integration

Stripe sends a payment_succeeded event

Schedule

Cron-based scheduling with timezone support

Every Monday at 9 AM, generate weekly report

Manual

Trigger from the Studio UI, API call, or CLI command

Operator clicks 'Run' on a specific workflow
Multi-trigger support
Event filtering & transformation
Exactly-once delivery
Composition

Combine Patterns in Real Workflows

Real business workflows rarely use a single pattern. OrchStack lets you compose patterns freely — nest parallel inside sequential, branch into supervisors, loop within conditionals.

Salon Booking Assistant

Composed Workflow — 6 patterns in one flow

1

Event Trigger

Event-Driven

WhatsApp message arrives

2

Intent Classification

Sequential

Classify intent and extract entities

3

Route by Intent

Conditional

Branch to booking, FAQ, or complaint

4

Handle Booking

Supervisor

Supervisor selects availability check, payment, or confirmation skill

5

Enrich Customer Data

Parallel

Fan-out to CRM, loyalty, and preference systems simultaneously

6

Quality Assurance

Looping

Validate response quality, retry if below threshold

Every combination is supported. No pattern limits, no depth restrictions.

Runtime Capabilities

Built for Production Orchestration

Every pattern is backed by the OrchStack Runtime — with built-in error handling, tracing, retry logic, and composability.

Declarative Pattern API

Define orchestration patterns in code or on the canvas. The runtime compiles them into optimized execution graphs with built-in error handling and retry logic.

Pattern Composition

Nest patterns inside patterns. A sequential chain can contain a parallel fan-out, which itself can branch conditionally. No depth limits.

Adaptive Routing

Supervisor agents dynamically choose which skill to invoke based on context, input classification, and previous outcomes — no fixed script required.

Built-in Retry & Recovery

Every pattern supports configurable retry policies, exponential backoff, dead-letter queues, and graceful degradation on failure.

Timeout & Circuit Breaker

Set per-step and per-pattern timeouts. Circuit breakers prevent cascading failures when downstream services are unresponsive.

Full Execution Tracing

Every pattern execution is traced end-to-end. View step timings, input/output at each node, branch decisions, and retry attempts in the execution log.

Workflow Patterns FAQ

Orchestrate Any Workflow

Start with a single pattern or compose all six. The runtime handles the rest.

All patterns available on free tier -- no limits