Skip to content

BPMN diagrams
from code, not clicks

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.

Zero Dependencies

Pure ESM, tree-shakeable. Runs in browsers, Node.js, Deno, Bun, and edge runtimes with no transitive deps.

Auto-Layout

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

Type-Safe

Strict TypeScript throughout. Every element, attribute, and Zeebe extension 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.

Camunda 8 Ready

Native Zeebe task definitions, IO mappings, connectors, and forms. Full REST API client with 180 typed methods, OAuth2, LRU cache, and exponential backoff. Deploy to Camunda Cloud in one call.

Packages

PackageDescription
@bpmn-sdk/coreFluent builder, parser/serializer, auto-layout, AI-compact format
@bpmn-sdk/engineZero-dep BPMN simulation engine (browser + Node.js)
@bpmn-sdk/apiCamunda 8 REST API client — 180 typed methods
@bpmn-sdk/canvasSVG BPMN viewer with pan/zoom, dark/light theme
@bpmn-sdk/editorFull BPMN editor — canvas + properties panel + AI bridge
casen (CLI)Interactive TUI for managing Camunda 8 from the terminal

Quick Example

import { Bpmn } from "@bpmn-sdk/core";
const xml = Bpmn.export(
Bpmn.createProcess("approval-flow")
.startEvent("start", { name: "Request Submitted" })
.userTask("review", { name: "Review Request" })
.exclusiveGateway("gw", { name: "Approved?" })
.branch("yes", (b) =>
b.condition("= approved")
.serviceTask("notify", { taskType: "send-email" })
.endEvent("done")
)
.branch("no", (b) =>
b.defaultFlow().endEvent("rejected")
)
.withAutoLayout()
.build()
);
// → valid BPMN 2.0 XML, auto-laid-out, Zeebe-ready