Design Patterns
Design patterns are complete, runnable workflow definitions for common orchestration problems. Each page takes one problem, such as parallel fan-out, sagas, timers, or human approval, and gives you a working definition to register, run, and adapt to your own tasks. This section covers workflow patterns. Agentic patterns and agent recipes live in AI Cookbook.
Microservice orchestrationHTTP service chains, conditional branching, parallel HTTP calls with Fork/Join.
Dynamic parallelismDynamic forks, per-branch tasks, same-task fan-out, and parallel sub-workflows.
Wait and timer patternsFixed delays, scheduled execution, external signals, and human approvals.
Sending signals to workflowsComplete a blocked wait from an approval UI, webhook, or external callback.
Task timeouts and retriesExponential backoff, leases, hard SLAs, and thundering-herd prevention.
Saga and compensationUndo a partially completed transaction: failureWorkflow, reverse-order rollback, idempotent undo.
Polling a long-running jobWait on a slow third-party API with one HTTP_POLL task, backoff, and a poll ceiling.
Scheduled workflowsCron execution, downtime catchup, bounded windows, and concurrent runs.
Event-driven recipesKafka, NATS, RabbitMQ, and SQS events that start or advance workflows.
AI CookbookAgentic workflows and SDK-authored agents: RAG, MCP tools, guardrails, human approval, deep research, handoffs, and memory.
Dynamic workflows as codePython-defined chains, branches, parallel work, loops, and generated definitions.