Scenarios & Examples
The repository ships runnable examples. This page maps them to the patterns teams actually build.
Runnable examples
The Node set is the most complete and numbered in a deliberate order:
Work 01 → 09 in order. Each builds on the previous one’s concepts, and 09_full_workflow.js is
the one to read if you only read one.
Rust: basic_usage.rs, error_handling.rs, events_webhooks.rs, validation.rs.
Other languages: python/, go/, java/, kotlin/, swift/, ruby/, dotnet/.
Beyond the basics: agents/, autonomous-agents/, multi-agent/, daemon/, gateway/,
plugins/, plugin-development/, x402/.
Pattern 1 — AI customer support agent
An agent that resolves tickets rather than drafting replies.
Shape: give the agent the MCP server scoped to the
domains it needs, look up the order, apply policy, act.
Watch for: scope the agent’s tools to the domains it needs. The MCP surface has 287 write and
21 delete tools; a support agent needs a fraction of that. Route consequential actions through the
decision gate.
Start from: examples/agents/, plus
CLI safety.
Pattern 2 — offline POS with sync
Run locally on SQLite, reconcile through VES when connectivity returns.
Shape: the engine is in-process, so the till keeps selling with no network. Queued events flush
to the sequencer on reconnect.
Watch for: inventory reserved offline can oversell against another node’s sales. Decide up
front whether a till holds authoritative stock or optimistically reserves and reconciles.
Pattern 3 — subscription billing and invoicing
Shape: plans, subscriptions, renewals, and invoices, with revenue recognised through the
finance layer.
Watch for: recognition is where subscriptions get subtle — ASC 606 obligations and ratable
schedules, not just a monthly charge. Two correctness fixes landed here recently; check the
warning on revenue schedules
if you reconciled against earlier output.
Start from: examples/node/04_subscriptions.js.
Pattern 4 — manufacturing and procurement
Shape: BOMs → work orders → purchase orders, with a full audit trail across inventory and
purchasing.
Watch for: the purchase-order state machine enforces legal transitions, so an illegal one
returns a validation error rather than applying. Received or cancelled documents cannot be
cancelled again.
Start from: examples/node/08_manufacturing.js.