B
blakebauman/orderloop
An agent loop for the commerce order lifecycle, built on Cloudflare Workers, Workflows and Durable Objects
View on GitHub ↗Link checked 2026-11-12 · HTTP 200 · opens the vendor's own site
- Star count
- 0 ★ · blakebauman/orderloop · read from the GitHub search API · (checked 2026-11-13 20:00:50)
- Source
- read directly from its GitHub page · type: open-source project
- Harvest history
- first seen 2026-10-30 · last seen 2026-11-14 · seen 16× · listed by 1 sources
- Score
- score 103 · 1 sources · repo
FAQ (answers come from our records)
Who is it for?
We filed it under these tags: 开源项目. The tags come from the entry itself, not a taxonomy we imposed.
Who maintains it?
repository
blakebauman/orderloop;first catalogued 2026-10-30;last seen 2026-11-14。There is no official certification or quality rating here — we record sources and dates only.# Order Loop
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
An agent loop for the commerce order lifecycle, built on Cloudflare Workers, Workflows and Durable Objects. Every order is a durable loop that runs from intake to its outcome: B2B, retail and direct-to-consumer, marketplace, subscription, procurement and replenishment orders, from any channel. Each loop is defined as a flow graph you draw in React Flow, and it runs entirely on Cloudflare, with the Agents SDK, Workers AI, D1 and R2 alongside.
## How it works
browser ──► apps/web (React Router on Workers) ──RPC──► apps/engine
│ D1: flows + versions, orders index, ├─ OrderAgent DO (one per order, Agents SDK):
│ approvals, mock back office │ live state, waits, approvals
│ flow editor, live order view, /api/v1 ├─ OrderLoop Workflow: interprets the pinned
├─ /agents/order-agent/:id WebSocket ────────►│ flow graph (step.do / sleep / waitForEvent / rollback)
├─ /agents/assistant-agent/ WebSocket ──────►├─ AssistantAgent DO (one per person): the workspace assistant
├─ /mcp (OAuth, MCP clients) ────────────────►│ its tools, served to MCP clients
└─ /a2a (OAuth, A2A agents) ─────────────────►├─ A2AAgent DO (one per caller): A2A tasks that follow orders
├─ Replenish Workflow (cron schedule): daily stock review
AI shopping platforms ── /.well-known/ucp, /ucp/ (UCP, platform key) ── proxied to the engine's checkout
storefront, marketplace, POS ── POST /api/v1/webhooks/orders (signed, on apps/web)
Shopify, EDI X12 850 ── POST /api/v1/channels/shopify/orders, /api/v1/channels/edi/850
Stripe events (invoice.paid…) ── POST /api/v1/webhooks/stripe ── EngineRpc.paymentEvent
inbound order email ── Cloudflare Email Routing ── email() ─►├─ Email intake: orders@ / po@ / purchasing@ start orders
└─ Workers AI (extract, classify, risk, forecast, router,
copilot, assistant), R2 (POs, invoices, inbound docs)
Flows are data. A flow is a JSON graph of catalog nodes (packages/core/src/catalog.ts):
triggers;
commerce steps (validate, address check, policy check, price, shipping rate, tax, credit, reserve, authorize, invoice, ship, route fulfillment, pickup, hand over, digital delivery, split by seller, seller payouts, return label, refund, …);
control (condition, approval, wait for event, wait, loop, continue-as-new, end);
AI (extract, classify, risk score, forecast, summarize, and an LLM router that chooses a branch).
The editor saves drafts to D1. Publishing creates an immutable version, and each order pins the version it started on.
One generic Workflow interprets every flow (apps/engine/src/workflow.ts). A pure planner in packages/core/src/graph.ts decides what can run:
AND-join that tolerates untaken branches: a node runs once its inputs are resolved, as long as at least one was taken.
Skip propagation: a node whose inputs were all untaken is skipped, and so is everything downstream that depends only on it.
Loops: loops use back-edges into a Loop node's next input.
The Workflow makes each node one memoized step.do named ${nodeId}#${run}, so loop iterations replay deterministically.
Saga rollback is native. Reserve inventory, authorize payment and create shipment register rollback handlers on their step. An End node with outcome failed throws NonRetryableError, and Workflows then runs the compensations in reverse order.
## How it works
browser ──► apps/web (React Router on Workers) ──RPC──► apps/engine
│ D1: flows + versions, orders index, ├─ OrderAgent DO (one per order, Agents SDK):
│ approvals, mock back office │ live state, waits, approvals
│ flow editor, live order view, /api/v1 ├─ OrderLoop Workflow: interprets the pinned
├─ /agents/order-agent/:id WebSocket ────────►│ flow graph (step.do / sleep / waitForEvent / rollback)
├─ /agents/assistant-agent/ WebSocket ──────►├─ AssistantAgent DO (one per person): the workspace assistant
├─ /mcp (OAuth, MCP clients) ────────────────►│ its tools, served to MCP clients
└─ /a2a (OAuth, A2A agents) ─────────────────►├─ A2AAgent DO (one per caller): A2A tasks that follow orders
├─ Replenish Workflow (cron schedule): daily stock review
AI shopping platforms ── /.well-known/ucp, /ucp/ (UCP, platform key) ── proxied to the engine's checkout
storefront, marketplace, POS ── POST /api/v1/webhooks/orders (signed, on apps/web)
Shopify, EDI X12 850 ── POST /api/v1/channels/shopify/orders, /api/v1/channels/edi/850
Stripe events (invoice.paid…) ── POST /api/v1/webhooks/stripe ── EngineRpc.paymentEvent
inbound order email ── Cloudflare Email Routing ── email() ─►├─ Email intake: orders@ / po@ / purchasing@ start orders
└─ Workers AI (extract, classify, risk, forecast, router,
copilot, assistant), R2 (POs, invoices, inbound docs)
Flows are data. A flow is a JSON graph of catalog nodes (packages/core/src/catalog.ts):
triggers;
commerce steps (validate, address check, policy check, price, shipping rate, tax, credit, reserve, authorize, invoice, ship, route fulfillment, pickup, hand over, digital delivery, split by seller, seller payouts, return label, refund, …);
control (condition, approval, wait for event, wait, loop, continue-as-new, end);
AI (extract, classify, risk score, forecast, summarize, and an LLM router that chooses a branch).
The editor saves drafts to D1. Publishing creates an immutable version, and each order pins the version it started on.
One generic Workflow interprets every flow (apps/engine/src/workflow.ts). A pure planner in packages/core/src/graph.ts decides what can run:
AND-join that tolerates untaken branches: a node runs once its inputs are resolved, as long as at least one was taken.
Skip propagation: a node whose inputs were all untaken is skipped, and so is everything downstream that depends only on it.
Loops: loops use back-edges into a Loop node's next input.
The Workflow makes each node one memoized step.do named ${nodeId}#${run}, so loop iterations replay deterministically.
Saga rollback is native. Reserve inventory, authorize payment and create shipment register rollback handlers on their step. An End node with outcome failed throws NonRetryableError, and Workflows then runs the compensations in reverse order.
Listed badge (optional)
Copy this line into the README if you want the listing mark. Optional, and it does not affect being listed.
[](https://anclum.com/en/s/blakebauman-orderloop/)
- Source
- github · https://github.com/blakebauman/orderloop
- Browse by field
- Open source
- added
- today
More like this
Filed under
Every tag opens the full list for that filter. Counts are the live catalogue figures.