Skip to content

Author processes in APL

APL (Abada Process Language) is how you write a process in Abada: a YAML document (abada.io/v1) that Studio draws as a diagram and the engine compiles directly into the executable graph. BPMN 2.0 files can be imported too; they run on the same engine (see BPMN import and compatibility).

flowchart LR
    Canvas[Studio canvas] <--> YAML[APL YAML abada.io/v1]
    BPMN[BPMN 2.0 XML] -->|import| YAML
    YAML --> Engine[Engine: validate, compile, version]

New to Abada? Start with the tutorial: it builds a complete process in Studio, with screenshots.

  • Readable and reviewable. A process is plain text you can diff, review and keep in version control.
  • Close to the diagram. One node in the YAML is one step on the canvas.
  • A stable target for AI. Small, structured documents make machine-proposed changes easy to validate and review.

A document has three top-level keys:

version: abada.io/v1
metadata:
key: lead_triage # optional — derived from name when omitted
name: Lead Triage
owner: sales-team # optional
variables: # optional — what expressions may read
- name: lead
type: object
required: true
flow:
entry: onStart # id of the single webhook start node
nodes: [ ... ]
  • metadata.key is the process key. Every deployment of a key creates a new immutable version; running instances keep the version they started on.
  • metadata.variables declares the start payload and the variables steps write. The engine then warns about an expression that reads a name nobody declares or writes — usually a typo.
Node What it does
webhook The single start node
agent A model call, run by an agent worker outside the database transaction; the engine checks its result
engine-task Work done by any external worker on a topic (an integration, a system call)
script A small server-side script, run inside the transaction
decision-table Deterministic rules, evaluated inside the transaction and audited
human-input A task for people in the listed groups, optionally with a form and review outcomes
condition Exclusive branch on rules
inclusive Takes every matching branch, then joins
parallel Runs branches in parallel, then joins
event-gateway Waits for the first of several events
message-catch Waits for a correlated message
timer Waits for an ISO-8601 duration
signal Waits for a broadcast signal
end Ends the path

Every node has an id, an optional description (shown as the step name; for a human-input it is the task name) and usually a next. A condition routes with rules (if: "${...}" + then, and an else default), parallel with branches, an event-gateway with its events. approval-gate is a deprecated alias of human-input.

Waiting steps can also route around problems — loops, errors, timeouts, weak AI answers, review decisions, service levels and fallback models. Each has its own section in Loops, routes and review decisions.

  • Agents advise. An agent step proposes a value; the engine checks it against output_schema and confidence_threshold before it enters the process.
  • Rules decide. decision-table and condition are deterministic CEL, evaluated inside the transaction. A table with no match and no otherwise fails loudly instead of guessing.
  • People approve. A human-input step puts a person between the advice and the action; with outcomes, the person’s choice routes the process.
version: abada.io/v1
metadata:
key: lead_triage
name: Lead Triage
flow:
entry: onStart
nodes:
- id: onStart
type: webhook
next: classify
- id: classify
type: agent
model: gemini-3.6-flash
prompt: Classify the lead. Return HIGH, MEDIUM or LOW.
inputs:
lead: ${lead}
result_variable: lead_priority
output_schema:
type: object
required: [priority]
properties:
priority: { enum: [HIGH, MEDIUM, LOW] }
next: route
- id: route
type: condition
rules:
- if: "${lead_priority.priority == 'HIGH'}"
then: review
- else: done
- id: review
type: human-input
description: Senior sales review
assignees: [sales-directors]
next: done
- id: done
type: end
  • Canvas and YAML are one document. Edit either one; the other follows. Switch with Diagram / APL YAML.

  • Make room for the canvas. Drag the inner edge of the Explorer (left) or the Properties panel (right) to resize it; double-click the edge to reset it. Unpin a panel to fold it into a narrow rail. Click the rail to open the panel over the canvas, and press Esc to close it again. Each panel’s width and pin state are remembered in this browser.

  • New Process creates an empty document, imports a BPMN file, or takes pasted APL. Documents live in the project’s processes/ folder and save automatically; a stale save is refused instead of overwriting someone else’s edit.

  • Describe it. The bar at the bottom of the canvas drafts a process, or a change to the open one, from plain language. Your prompt opens the AI draft workspace; nothing reaches the canvas until you apply. See Drafting with AI.

  • The palette draws every step exactly as the canvas does: circles for events, diamonds for gateways, cards for work. Type in Find a node to filter (by name, purpose or APL type, so dmn finds the decision table); Enter adds the first match. Click a step to add it after the selected one, already connected, or drag it onto the canvas where you want it. Arrow keys move through the list.

  • The Properties panel edits every property of the selected step. It opens with the step’s name and description, then one section per concern (for an agent: model and prompt, output contract, routing, retries, tools, review, evidence). Sections fold and remember how you left them. Each field shows its APL key in small type, and an engine error appears under the field or rule it is about, with the count on the section heading.

  • The process itself is edited in the Properties panel when no step is selected (click empty canvas). Set the name, description, category and owner; the engine does not act on the last three, they are for people reading the process. The key can change only until the process is first saved: its deployed versions and instances are filed under it, so it is fixed after that. Variables declares the start payload and what steps write, each with a type, required and sensitive. Sensitive values are masked in redacted agent evidence. Required documents the start payload but the engine does not check it yet. Declaring any variable turns on the engine’s warning for expressions that read an unknown name. Engine issues about the process, such as a variable declared twice, appear under the field they name; the rest are listed at the top. Metadata keys the panel does not show are kept as written.

  • Decision tables are edited in the panel: the decision key, what happens when several rules match (first match, unique match, collect all), the inputs, the outputs, and the rules in order. Type output values as text, numbers, true/false, or "quoted" text; an empty cell means the rule does not set that output. Reorder rules by dragging the handle, with the arrow buttons, or with Alt+arrow keys on the handle. The otherwise fallback stays last: it applies only when no rule matched. Expand opens the whole table in a wide drawer.

    A decision table in the properties panel: hit policy, inputs, outputs and the rules in order

  • For each, agent evidence and the assignment mode of a human task are edited in the panel too. A step saved as the deprecated approval-gate stays one when you save; the panel offers to convert it to a human task.

  • Agent steps pick their tools from the project’s tool servers, with each tool’s policy: a step may tighten a policy (for example require approval) but never loosen it, and an approval-required tool asks who approves it. Loop limits (turns, tokens, budget), routes, delegates and the inputs and outputs of a call-process step are edited in the inspector, with the engine’s rules checked as you type.

  • Task forms. A human task picks its form in the Properties panel. The form’s fields are listed there for quick changes (label, required, order); Open full editor opens the form designer in a large panel: the field palette on the left, the form in the middle, the selected field’s properties on the right. Drag fields into sections and rows of up to four fields; on a selected field, arrow keys move it or change its width and Delete removes it. A section can start a wizard step. Each field can have rules (required, minimum and maximum, length, a pattern) and a Show only when condition such as vat_registered == true. Preview shows the form as the person filling it sees it, at desktop or phone width: short forms keep generous spacing, long ones tighten and use more columns on a wide screen. Esc closes the designer and asks first when there are unsaved changes. The engine enforces the form, not only the browser: it takes a copy of the form when you deploy the process and checks every completion against that copy. Editing a form therefore applies to tasks of the next deployment; tasks already open keep the rules they started with.

    A task in the Task Inbox with a sectioned form: Employer fields in two columns and a Document section with the scan upload

  • File fields. A File field takes one document, or several with Several files (with a minimum and maximum count). Accepted files lists extensions or types such as .pdf, image/*, and Largest file caps the size within the engine’s limit (10 MB unless configured). The person filling the task drops files on the field, sees each upload’s progress, previews images and PDFs and can remove a file before submitting. The engine checks each file’s actual contents (a picture renamed .pdf is refused, programs always are), keeps the file in RustFS and gives the process a reference: name, type, size and checksum, never the bytes. The file appears as a chip in the instance’s variables, and people who may see the instance download it through the engine. Details: process files.

  • Undo and redo cover every edit of the open process (⌘Z / Ctrl+Z, ⇧⌘Z / Ctrl+Y), 100 steps per process.

The bar at the bottom of the canvas turns a description into a draft. Pin it open, collapse it to a small Draft with AI button, or hide it; the choice is remembered for you in this browser. ⌘K (Ctrl+K on Windows and Linux) opens it whatever its setting, and so do the ✦ button in the canvas toolbar and Use prompt on an empty canvas; Esc puts it back.

On a process that has steps, the bar refines that process; choose New process to start another one. When you send the prompt, the AI draft workspace opens over the Studio:

  • The draft in the centre is drawn as the canvas draws it, and updates with each answer: new steps fade in, removed ones fade out, the others move to their new place. YAML shows the APL source, and Diff vs current marks what the draft adds, changes or removes compared with the process on the canvas. Engine validation is badged on the steps, with the count in the header.
  • The conversation on the right keeps your prompt and each refinement, with the model’s one-line account of what it changed. Undo to here returns the draft to an earlier turn; the later turns are set aside until you restore them or send a new refinement.
  • Your own edits. Click a step to change its properties. Your edit becomes part of the draft, and the next refinement starts from it.
  • While the model works you can read the draft, switch views or cancel. If no valid change comes back, the turn says why and the draft is unchanged; Try again or Edit prompt.

Apply to Studio puts the draft on the canvas as one change: one undo (⌘Z) restores the process as it was. Discard leaves the canvas untouched. Nothing is deployed from the workspace; deploying stays a separate step.

What the model sees: the authoring service sends it the current draft and your latest prompt, not the conversation. It runs in the engine’s authoring service, never inside a running process. The answer comes whole (no streaming), and Cancel stops waiting for it; the engine still finishes the call it started. The draft lives in the page only, so leaving the page asks first. Drafting needs the Owner or Maintainer role in the project and a configured AI provider; without one, the workspace says so and nothing is drafted.

The engine is the only APL validator, and Studio asks it directly:

  • While you type, the draft is sent to POST /api/v1/apl/validate — the same checks a deployment runs, with nothing stored. Each problem is listed with its step and badged on the canvas (⚠ n).
  • Errors (ABADA-APL-VALIDATION-001) block Apply to diagram and Deploy & Start: a broken route, a cycle without a repeat limit, a model outside the engine’s allow-list, an expression that is not valid CEL. Decision-table rules are checked one by one: an empty or invalid condition, a condition reading a name that is not one of the table’s inputs, a second otherwise, and, under unique match, two rules with the same condition. Two different conditions that can both hold under unique match are only caught when the table runs.
  • Warnings never block. ABADA-APL-SCHEMA-001 flags an unknown field — usually a typo such as confidence_treshold — or a wrong type; ABADA-APL-VARIABLE-001 flags an undeclared variable.
  • A refused deployment stores nothing.

The model list and the field limits in the inspector come from the same engine (GET /api/v1/apl/schema), so Studio never offers a model the deployment would refuse.

Dry Run Deploy & Start
Where it runs In your browser On the engine
Saves or deploys No Yes — a new immutable version
Calls models or workers No — you type mocked answers Yes, through workers
Human steps Simulated, every route offered Real tasks in the Task Inbox

Deploying a revision that never passed a Dry Run asks for an explicit confirmation.