AI-Native · TypeScript · Zero Dependencies

BPMN diagrams
from code, not clicks

A fluent TypeScript API that generates production-ready BPMN 2.0 diagrams with auto-layout. Built for AI agents, automation platforms, and workflow builders.

Get Started Try the Editor GitHub →
Why BPMN SDK

Everything you need,
nothing you don't

AI-Native Design

LLMs call a fluent API instead of wrestling with raw XML. A compact intermediate format makes the entire diagram fit in a single prompt — AI generates it, the SDK validates and renders it.

const compact = compactify(defs)
const xml = Bpmn.export(expand(compact))

Zero
Dependencies

Pure ESM, tree-shakeable. Runs in browsers, Node, Deno, Bun, and edge runtimes.

0
runtime deps

Auto-Layout

Sugiyama layout engine produces clean, readable diagrams with orthogonal edge routing. No coordinate math.

Type-Safe

Strict TypeScript throughout. Every element, attribute, and Zeebe extension is fully typed. Invalid processes fail at compile time.

Roundtrip Fidelity

Parse → modify → export without data loss. All Zeebe extensions, custom namespaces, and diagram info preserved perfectly.

Parse Modify Export

Camunda 8 Ready

Native Zeebe task definitions, IO mappings, connectors, forms, and modeler templates. Deploy directly to Camunda Cloud.

Developer Experience

Stop writing XML.
Start building workflows.

Drag the divider to compare

Without SDK
<bpmn:definitions
  xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL"
  xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
  xmlns:zeebe="http://camunda.org/schema/zeebe/1.0">
  <bpmn:process id="p" isExecutable="true">
    <bpmn:startEvent id="s">
      <bpmn:outgoing>Flow_1</bpmn:outgoing>
    </bpmn:startEvent>
    <bpmn:serviceTask id="t">
      <bpmn:extensionElements>
        <zeebe:taskDefinition
          type="worker"/>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_1</bpmn:incoming>
      <bpmn:outgoing>Flow_2</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:endEvent id="e">
      <bpmn:incoming>Flow_2</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:sequenceFlow id="Flow_1"
      sourceRef="s" targetRef="t"/>
    <bpmn:sequenceFlow id="Flow_2"
      sourceRef="t" targetRef="e"/>
  </bpmn:process>
  <bpmndi:BPMNDiagram>
    <bpmndi:BPMNPlane>
      <bpmndi:BPMNShape
        bpmnElement="s">
        <dc:Bounds x="152" y="82"
          width="36" height="36"/>
      </bpmndi:BPMNShape>
      <!-- ...more shapes + edges... -->
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>
With BPMN SDK
import { Bpmn } from "@bpmn-sdk/core";

const xml = Bpmn.export(
  Bpmn.createProcess("my-flow") // fluent API
    .startEvent("start")        // trigger
    .serviceTask("task", {
      name: "Do Something",
      taskType: "my-worker",    // Zeebe type
    })
    .endEvent("end")
    .withAutoLayout()            // Sugiyama
    .build()
);

// ✓ Valid BPMN 2.0 XML
// ✓ Auto-layout applied
// ✓ Zeebe extensions set
Interactive Examples

See it in action

Watch TypeScript code generate a live BPMN diagram in real time — every method call updates the preview.

REST API Client

Camunda 8 API,
fully typed

client.ts
import { CamundaClient } from "@bpmn-sdk/api";

const client = new CamundaClient({
  baseUrl: "https://api.cloud.camunda.io",
  auth: {
    type: "oauth2",
    clientId:     process.env.CAMUNDA_CLIENT_ID,
    clientSecret: process.env.CAMUNDA_CLIENT_SECRET,
    audience:     process.env.CAMUNDA_AUDIENCE,
  },
});

// Deploy a process definition
await client.process.deploy({ resources: [{ content: xml }] });

// Start a new instance
const instance = await client.process.startInstance({
  bpmnProcessId: "my-flow",
  variables: { orderId: "ord-123" },
});

// React to lifecycle events
client.on("request", (e) => console.log(e.method, e.url));
client.on("error",   (e) => metrics.inc("api.error"));
180
typed methods
30+
resource classes
3
auth modes
retry & backoff

A complete TypeScript client for the Camunda 8 REST API. Every endpoint is typed end-to-end — from request body to response shape. Drop it into any Node.js or edge runtime.

OAuth2 / Bearer / Basic LRU + TTL cache Exponential backoff TypedEventEmitter ESM tree-shakeable Processes Jobs & Workers Decisions Messages Incidents Variables Signals
Command-Line Interface

Manage Camunda 8
from your terminal

Interactive TUI

Arrow-key navigation through menus, commands, and input forms. No flags to memorize.

Connection Profiles

Store multiple Camunda clusters. Switch between dev, staging, and prod in one keystroke.

Full API Coverage

Processes, jobs, incidents, decisions, variables, messages — all accessible from the terminal.

Tabular Results

Query results rendered as scrollable tables with detail view on enter. Copy-friendly output.

casen
Quickstart

Up and running
in 3 steps

01

Install

pnpm add @bpmn-sdk/core
bun add @bpmn-sdk/core
npm install @bpmn-sdk/core
yarn add @bpmn-sdk/core
02

Create a process

import { Bpmn } from "@bpmn-sdk/core";

const xml = Bpmn.export(
  Bpmn.createProcess("hello")
    .startEvent("start")
    .serviceTask("task", {
      name: "Hello World",
      taskType: "greet",
    })
    .endEvent("end")
    .withAutoLayout()
    .build()
);
03

Deploy & run

import { Engine } from "@bpmn-sdk/engine";

const engine = new Engine();
await engine.deploy({ bpmn: xml });

engine.registerJobWorker(
  "greet",
  async (job) => {
    console.log("Hello!");
    await job.complete();
  }
);
engine.start("hello");