Goal: your coding agent writes a short text spec, runs bpmnkit build, and gets a laid-out,
linted, deployable .bpmn (plus a form per user task). Setup is five copy-paste steps.
Writing for the agent itself? See AI setup — for agents.
Set up
# 1. The CLI
npm install -g @bpmnkit/cli # or: npm i -D @bpmnkit/cli, then npx bpmnkit …
# 2. Claude Code plugin (skills such as /bpmnkit:bpmn-script, /bpmnkit:deploy)
# inside Claude Code:
/plugin marketplace add bpmnkit/bpmnkit
/plugin install bpmnkit@bpmnkit
# 3. No plugin? Install the lightweight slash commands into .claude/commands/ instead
bpmnkit skills install
# 4. Offline docs for the agent (BPMN Kit + Camunda 8), no network, no server
npm i -D @bpmnkit/docspack @bpmnkit/camunda-docspack
-
AGENTS.md — add a line telling any agent where to look. Copy this:
BPMN/DMN/forms: run `bpmnkit agent-card bpmn` once, write a spec, run `bpmnkit build <spec> --deploy`. Docs: `npx bpmnkit-docs ask "<question>"` (add `--pack @bpmnkit/camunda-docspack` for Camunda). -
Camunda credentials (only for
--deployto a cluster) — export them in the shell that starts the agent. Without them--deploygoes to a local Reebe engine (bpmnkit reebe start).export ZEEBE_REST_ADDRESS=https://<region>.zeebe.camunda.io/<cluster-id> export CAMUNDA_CLIENT_ID=… CAMUNDA_CLIENT_SECRET=… CAMUNDA_OAUTH_URL=… # self-managed with basic auth: CAMUNDA_BASIC_AUTH_USERNAME / CAMUNDA_BASIC_AUTH_PASSWORDOr save a profile once with
bpmnkit profile create;--target auto(the default) tries the environment, then the profile, then local Reebe. Never commit these values.
Check it works: bpmnkit agent-card bpmn | head prints the cheat sheet.
Use cases
Generate a process inside a bigger agent flow (recommended)
Ask Claude Code for the whole job — “build an expense approval process and deploy it, then
write a worker for the check-budget job”. The agent does the BPMN step like this:
-
Reads the card once:
bpmnkit agent-card bpmn(add--textfor the full line format). -
Writes a spec file with its Write tool, for example
expense.txt:# Expense approval | id=expense [start Expense submitted] > [service Check budget | job=check-budget] > [xor Within budget?] Within budget? >(Yes: within = true) [end Paid] Within budget? >(No: default) [user Review expense | fields=amount:number,reason] > Paid -
Runs
bpmnkit build expense.txt --deployonce. -
Reads the output. One line starting with
✓means built, lint clean and deployed (it also names the forms it wrote). Any✖line is a problem to fix in the spec, then run again. On✓the agent continues with the next step of its flow (the worker, tests, a summary).
The one-line output is the proof — the agent does not need to open the XML or render an image.
Edit an existing diagram, keeping its layout
Ask: “add a fraud check after Request payment in order.bpmn”. The agent writes a module and
runs bpmnkit build edit.mjs --edit order.bpmn; shapes keep their place, only new tasks get forms.
export default (kit, model) =>
kit.Bpmn.continueProcess(model, "order")
.insertAfter("ask")
.serviceTask("fraud", { name: "Check fraud", taskType: "check-fraud" })
Generate forms for user tasks
Every user task without a form gets one by default (fields from fields= or from the variables
the next conditions read). Write your own with bpmnkit agent-card form, put the .form next to
the spec, and it is deployed as it is. --no-forms turns generation off.
Retarget the Camunda version
bpmnkit build edit.mjs --edit order.bpmn --camunda 8.10 sets the file’s
executionPlatformVersion. For a text spec, --camunda 8.10 overrides a camunda= in the spec.
Next
bpmnkit build reference · Agent cards ·
Claude Code plugin · Using BPMN Kit with AI