State machines that run anywhere
Define finite state machines in JSON, publish versioned definitions, and run instances on Cloudflare Durable Objects. The same runtime artifact runs three ways: fully managed, inside your own Cloudflare account, or air-gapped on open-source workerd. No platform lock-in.
// 1. Define a machine
const sdk = new OrchestateClient({ apiKey: 'orch_...' });
const machine = await sdk.machines.publish({
slug: 'order-flow',
definition: {
initial: 'pending',
states: {
pending: { on: { CONFIRM: 'confirmed', CANCEL: 'cancelled' } },
confirmed: { on: { SHIP: 'shipped' } },
shipped: { on: { DELIVER: 'delivered' } },
delivered: { type: 'final' },
cancelled: { type: 'final' },
}
}
});
// 2. Create an instance
const instance = await sdk.instances.create({ machineSlug: 'order-flow' });
// 3. Send events
await sdk.instances.send(instance.id, { type: 'CONFIRM' });
// 4. Subscribe to live state
sdk.instances.subscribe(instance.id, (state) => {
console.log('Current state:', state.value); // 'confirmed'
});See the shape of governance
States and guarded transitions as a graph — the same model the authenticated console explorer uses. Demo fixture only.
Everything a state machine needs
Edge-native runtime
Each instance runs as a Cloudflare Durable Object. Sub-millisecond event processing, globally consistent state.
Versioned definitions
Publish new machine versions without breaking running instances. Each instance pins to its published version.
Live inspector
Subscribe to state transitions via WebSocket. Watch your machines run in real-time from the console.
Usage analytics
Per-org dashboards for transitions, active instances, and API call volume, all from Analytics Engine.
Scoped API keys
Issue org-scoped API keys for your team, each with an optional expiry and instant revocation. Keys are stored as SHA-256 hashes and shown only once.
Team collaboration
Org-level access with owner/admin/editor/viewer roles. Invite teammates, manage permissions.
No platform lock-in
The same runtime artifact runs fully managed, in your own Cloudflare account, or air-gapped on open-source workerd. workerd is Apache-2.0 and runs the same code as the hosted platform.
Ready to orchestate?
Orchestate is in a private beta. We are onboarding a small number of pilot teams. Request access and we will set you up.
Request access