Every order is a loop that runs to its outcome.
Draw a flow from catalog nodes: pricing, credit, approvals, payments, shipping, AI triage. Order Loop runs each order through it as a durable Workflow with its own live agent, on Workers, Workflows, Durable Objects, Workers AI, D1 and R2.
What it runs
Section titled “What it runs”Purchase requests, B2B orders, reorders, subscriptions and storefront orders. Each order type ships with a built-in flow you can open in the editor, change and republish.
- Flows are data. A flow is a JSON graph of catalog nodes. Publishing makes an immutable version, and each order pins the version it started on.
- One Workflow interprets every flow. Each node is a memoized
step.do, so an order survives restarts, waits days for a person or a payment, and rolls back its reservations, holds and shipments when it fails. - Each order has an agent. A Durable Object holds the order’s live state, delivers approvals and events to the waiting node, and streams every change to the order page.
- AI never blocks an order. Every model call has a schema, a 20-second cap and a deterministic fallback.
Where next
Section titled “Where next”Getting startedInstall, migrate D1, run web and engine together, start a scenario.
Building flowsNodes, branches, joins, loops, expressions and publishing.
Node catalogEvery node type, its config fields and its output branches.
ArchitectureHow the web app, the engine, the Workflow and the agent fit together.