AI agents now work inside Duna processesSee agentic orchestration
Documentation/Build processes

Definitions and state types

A definition declares its key, schema version, initial state, variables, states and transitions. JSONC supports comments and trailing commas for authoring; the formal JSON Schema lives in schema/.

State kinds

KindPurpose
automaticRun actions and select an eligible transition.
waitPark until a matching external event or broker message arrives.
humanCreate a task and wait for a human resolution.
timerPark until the configured timer releases the process.
callInvoke a child process according to its configuration.
terminalEnd the process with an outcome.
forkStart configured parallel branches.
joinMeet the fork’s branches under its join rules.

Transitions and actions

Transitions name a target state and can use guards and priorities. A default transition provides a fallback. Actions can run on entry, on exit, or on the transition itself. A dynamic value is an expression node with $expr and an optional $lang.

json
{
  "id": "approve-small-request",
  "to": "approved",
  "guard": { "$expr": "vars.amount < 1000" }
}

This is a transition fragment, not a full definition. Guards are pure expressions: do not put I/O in them.

Variables

The variable schema can specify type, required values, enumerations, item types and defaults. Strict writes constrain undeclared paths. Required initial variables are validated when an instance starts.

Versions and lifecycle

Publication uses server-assigned versions. Saved versions have an active, deprecated or disabled lifecycle. The operational UI includes version history and JSON comparison. Review lifecycle rules before changing how new starts select a version.

The authoring reference is the authority for fork joins, variable merges, nested actions and validation limits.