workflows.do
Business Workflows That Optimize Themselves
Declarative TypeScript workflows with automatic execution, intelligent retry logic, and AI-powered optimization. Build complex multi-step processes with durable execution and automatic state persistence.
import { Workflows } from 'workflows.do' // Declarative workflows with automatic retriesconst workflow = Workflows.define({ steps: [validateOrder, chargePayment, checkInventory, ship], retries: { max: 3, backoff: 'exponential' }, durable: true}) on.Order.created($ => workflow.execute({ order: $ })) // AI optimizes workflows autonomouslyon.Workflow.completed($ => $.AI.optimize.workflow($))
One of 48 primitives
workflows.do sits in Workflows: triggers, steps and functions. Every .do shares one grammar, Business-as-Code, and one SDK.
Data
Records, vocabulary and search
Insight
Measure, test and trace
Frequently asked questions
Workflows.do uses declarative TypeScript—no visual builders, no XML, no proprietary DSLs. Just code that reads like business logic. Automatic execution, retry with exponential backoff, and monitoring built-in. Unlike Zapier or n8n, workflows run at the edge with <10ms latency and scale to millions of executions. Durable execution persists state automatically—workflows survive restarts, network failures, or hours-long waits.
Automatic retry with configurable policies: exponential backoff, max attempts, timeout per step. Dead letter queue captures permanently failed executions for manual review. Define compensation logic (sagas) for rollback scenarios: refund payment if inventory check fails. Circuit breakers prevent cascading failures by skipping steps that consistently fail. Full execution history and error diagnostics for debugging.
Yes. Durable execution with automatic state persistence to edge storage. Workflows can wait for external events (webhook received, human approval, scheduled time) without consuming resources. Pause execution, resume exactly where it stopped, even days later. Perfect for long-running business processes: multi-day approval chains, scheduled reports, or time-delayed actions.
Full local testing with Vitest or Jest—no cloud deployment required. Mock external services (APIs, databases, payment providers) using built-in mocking utilities. Simulate failures, timeouts, and retries to validate error handling. Time-travel debugging lets you inspect workflow state at any step. Record/replay production executions for regression testing. Dry-run mode executes workflows without side effects.
Yes. Workflows are semantic objects that agents can read, analyze, and optimize autonomously. Agents add error handling, insert monitoring steps, parallelize independent steps, add caching, or restructure workflows based on execution metrics. Agents can create new workflows from natural language descriptions. All agent modifications go through approval gates for safety. Rollback to previous workflow versions instantly.