StateLayer — API-First Workflow Orchestration Platform | StateLayer
Built for production orchestration

Ship API-first workflows without building a workflow engine

StateLayer gives engineering teams durable execution, idempotent signals, environment isolation, and real-time instance visibility on top of a .NET + Dapr runtime.

Read the Docs

No orchestration boilerplate

Model workflows once and execute them through a stable API instead of custom job runners and fragile cron glue.

Reliable by default

Actor-backed runtime state, retries, and idempotent signal handling keep long-running processes consistent under failure.

Designed for teams

Draft/Published versioning, environment-aware APIs, and operational timelines support safe iteration from staging to production.

Capabilities

Workflow runtime primitives for real product operations

Durable Execution

Workflow progress is persisted step-by-step so instances survive crashes, deploys, and transient network failures.

API-First Workflow DSL

Define workflows as JSON and execute via API for backend services, internal tools, and customer-facing product flows.

Live Operational Visibility

Track each run with status timelines, suspension reasons, and transition paths to debug incidents quickly.

Environment Scoped

Separate Development, Staging, and Production behavior with environment headers and isolated registry/config data.

Real workflow JSON for real product use-cases

Start with practical examples, then adapt step configs and transitions to your own domain.

Workflow Blueprints

SaaS customer onboarding with KYC + provisioning

Automates account setup, compliance checks, and workspace provisioning while pausing for required user input.

Outcomes

  • Auto-provisions tenant resources
  • Pauses safely for KYC documents
  • Resumes with idempotent approval signals
customer-onboarding.json
{
  "settings": {
    "name": "customer-onboarding"
  },
  "startStep": "create-customer-record",
  "steps": {
    "create-customer-record": {
      "type": "action:custom",
      "nodeType": "crm.createCustomer",
      "inputs": {
        "email": "{{ event.email }}",
        "plan": "{{ event.plan }}"
      },
      "transitions": {
        "default": "run-kyc"
      }
    },
    "run-kyc": {
      "type": "action:custom",
      "nodeType": "kyc.submitReview",
      "inputs": {
        "customerId": "{{ steps.create-customer-record.output.customerId }}"
      },
      "transitions": {
        "default": "await-kyc-signal",
        "failure": "notify-ops"
      }
    },
    "await-kyc-signal": {
      "type": "system:wait_signal",
      "config": {
        "signal": "kyc.approved",
        "timeout": "24h"
      },
      "transitions": {
        "default": "provision-workspace",
        "timeout": "notify-ops"
      }
    },
    "provision-workspace": {
      "type": "action:custom",
      "nodeType": "provisioning.createWorkspace",
      "inputs": {
        "customerId": "{{ steps.create-customer-record.output.customerId }}"
      },
      "transitions": {
        "default": "complete"
      }
    },
    "notify-ops": {
      "type": "action:custom",
      "nodeType": "notifications.sendSlack",
      "inputs": {
        "channel": "#ops-alerts"
      },
      "transitions": {
        "default": "complete"
      }
    },
    "complete": {
      "type": "system:end"
    }
  }
}
How it works

Define, publish, and operate with one workflow model

1

Model

Define a Draft workflow as structured steps and transitions with typed config fields and custom node inputs.

2

Publish

Publish an immutable version and start instances through API calls from your backend, workers, or event handlers.

3

Operate

Monitor runs in real time, inspect timelines, and resume suspended instances with idempotent signals.

Build workflow reliability into your product

Use StateLayer to orchestrate onboarding, approvals, incident handling, and operational automations with confidence.

Star on GitHub