Appendix A: DSL Reference
REAL
Generated from noetl/server v3.161.2 (commit 983e36e3ec4c, 2026-11-12), file orchestrate-core/schema/playbook.schema.json. The server's own tests fail if these files drift from the code that defines the grammar, so this page is as current as the pin.
Every key of a NoETL playbook (https://noetl.ai/schema/v2/playbook.schema.json), as the grammar defines it. Chapters 4–6 teach these keys; the Taught in column links to the chapter.
NoETL playbook grammar (noetl.io/v2), generated from the Rust authoring types in noetl-orchestrate-core 0.1.0. Permissive like the parser (unknown keys are not rejected);
tool.kindis closed to the kinds this server accepts. Semantic rules (astartstep, unique step names, existingnexttargets) are enforced by the server's validator, not by this schema.
Top-level keys
| Key | Type | Required | Description | Taught in |
|---|---|---|---|---|
apiVersion | string | yes | API version (noetl.io/v2). | Ch. 4.1 |
keychain | array of KeychainDef | null | Keychain definitions for credentials and tokens. | Ch. 4.4 | |
kind | string | yes | Resource kind (Playbook). | Ch. 4.1 |
metadata | Metadata | yes | Metadata (name, path, labels). | Ch. 4.1 |
vars | object | null | Top-level variables (canonical format). | Ch. 4.2 | |
workbook | array of WorkbookTask | null | Reusable tasks. | Ch. 4.5 | |
workflow | array of Step | yes | Workflow steps. | Ch. 4.3 |
workload | any | Global workflow variables. | Ch. 4.2 |
Types
Each type below is a $defs entry of the schema. Types are listed alphabetically.
CanonicalNextTarget
Legacy target for transition (deprecated, use NextArc).
Taught in Ch. 6.1.
| Key | Type | Required | Default | Description | Taught in |
|---|---|---|---|---|---|
args | object | null | Arguments to pass to target step. | Ch. 6.1 | ||
step | string | yes | Target step name. | Ch. 6.1 | |
when | string | null | Transition guard expression (Jinja2). | Ch. 6.2 |
CursorClaim
The claim block of a mode: cursor loop — a SQL tool that atomically leases a frame of work rows and returns them (its RETURNING columns become the per-row iter.<iterator> object).
Taught in Ch. 6.3.
| Key | Type | Required | Default | Description | Taught in |
|---|---|---|---|---|---|
auth | string | null | Credential alias for the claim tool. | Ch. 6.3 | ||
claim | string | yes | The claim SQL (atomic lease, e.g. ... FOR UPDATE SKIP LOCKED ... RETURNING ...). | Ch. 6.3 | |
kind | string | "postgres" | Tool kind running the claim (default postgres). | Ch. 6.3 |
EvalCondition
Eval condition for per-task flow control. Evaluated after each tool execution.
Taught in Ch. 6.5.
| Key | Type | Required | Default | Description | Taught in |
|---|---|---|---|---|---|
attempts | integer | null | Retry attempts (for do: retry). | Ch. 6.5 | ||
backoff | string | null | Retry backoff strategy: linear or exponential. | Ch. 6.5 | ||
delay | number | null | Retry delay in seconds. | Ch. 6.5 | ||
do | string | yes | Action to take: continue, retry, break, jump, fail | Ch. 6.5 | |
expr | string | null | Jinja2 expression to evaluate. Access outcome object: outcome.status, outcome.error, outcome.result | Ch. 6.5 | ||
set_vars | object | null | Variables to set (step-scoped). | Ch. 6.5 | ||
target | string | null | Target step (for do: jump). | Ch. 6.5 |
EvalElse
Else clause for eval conditions.
Taught in Ch. 6.5.
| Key | Type | Required | Default | Description | Taught in |
|---|---|---|---|---|---|
do | string | yes | Action to take. | Ch. 6.5 | |
set_vars | object | null | Variables to set. | Ch. 6.5 |
EvalEntry
Eval entry - can be a condition or an else clause.
Taught in Ch. 6.5.
One of:
- EvalCondition: Conditional eval with expr.
- object: Else clause (no condition).
FrameSpec
Frame sizing / leasing policy for a mode: cursor loop.
Taught in Ch. 6.3.
| Key | Type | Required | Default | Description | Taught in |
|---|---|---|---|---|---|
heartbeat_seconds | number | null | Ch. 6.3 | |||
lease_seconds | number | null | Ch. 6.3 | |||
max_bytes | integer | null | Ch. 6.3 | |||
max_rows | integer | null | Max rows claimed per frame (the claim SQL's LIMIT { { __frame_max_rows } }). | Ch. 6.3 | ||
max_seconds | number | null | Ch. 6.3 | |||
process | string | null | row (default) binds iter.<name> to one row; frame is reserved. | Ch. 6.3 | ||
row_concurrency | integer | null | Rows of one frame to dispatch concurrently (1 = sequential within frame). | Ch. 6.3 |
KeychainDef
Keychain entry for credential/token definitions.
Taught in Ch. 4.4.
| Key | Type | Required | Default | Description | Taught in |
|---|---|---|---|---|---|
allowed_regions | array of string | [] | Secrets Wallet Phase 6c — extra regions (besides the entry's own region) from which resolution is allowed when residency is strict or advisory. Empty by default. | Ch. 4.4 | |
auth | string | null | Credential alias used to authenticate to provider (e.g. a service account). On a provider that authenticates by ambient identity (GCP Workload Identity), this is unused. | Ch. 4.4 | ||
auto_renew | boolean | false | Auto-renew flag. | Ch. 4.4 | |
credential | string | null | Credential reference. | Ch. 4.4 | ||
map | map of string | null | Output-key → secret-reference map. Each value is a secret-path template (rendered against the workload at resolution time); the resolved entry is the object { <key>: <secret-value>, ... } — the "auth object as a map" shape. Absent for single-value entries. | Ch. 4.4 | ||
name | string | yes | Keychain entry name. | Ch. 4.4 | |
no_broker_fallback | boolean | false | Secrets Wallet Phase 6e — opt-out for the cross-region broker fallback. When true, a strict-mode residency denial bubbles up as ResidencyViolation even if a broker is configured for the entry's region — used for credentials whose policy says "this data physically cannot leave its home region, full stop." Default false (broker fallback honoured when registered). | Ch. 4.4 | |
provider | string | null | Secret-source backend that resolves this entry: gcp (Google Secret Manager), aws, azure, vault, k8s. When set, the server-side keychain resolver fetches the value(s) from this provider on a cache miss (Secrets Wallet Phase 3b). None means the entry is supplied by other means (pre-registered credential, minted token). | Ch. 4.4 | ||
region | string | null | Secrets Wallet Phase 6a — home region of this secret (e.g. us-east-1, europe-west4). When set, the resolver passes it to the chosen crate::secrets::SecretProvider: AWS uses it as the regional endpoint host; Azure / Vault use it for vault / cluster routing; GCP uses it as part of the resource id. None falls back to the server's NOETL_SERVER_REGION env. Per agents/rules/safety.md, the region is a routing hint, not a secret — public-safe. | Ch. 4.4 | ||
residency | Residency | "none" | Secrets Wallet Phase 6c — residency policy. Controls whether a server in a different region than this entry's region is allowed to resolve it. See crate::secrets::residency::Residency. | Ch. 4.4 | |
scope | string | null | Scope type. | Ch. 4.4 | ||
token_type | string | null | Token type. | Ch. 4.4 |
Loop
Step-level loop configuration (canonical format).
Taught in Ch. 6.3.
| Key | Type | Required | Default | Description | Taught in |
|---|---|---|---|---|---|
cursor | CursorClaim | null | Claim block for mode: cursor loops. | Ch. 6.3 | ||
in | string | null | Jinja expression for collection to iterate over. Required for sequential / parallel; absent for cursor (which claims work). | Ch. 6.3 | ||
iterator | string | yes | Variable name for each item. | Ch. 6.3 | |
spec | LoopSpec | null | Loop spec with mode (canonical format). | Ch. 6.3 |
LoopMode
Loop execution mode.
Taught in Ch. 6.3.
One of:
- "sequential" | "parallel"
- "cursor": Claim-based work-distribution loop (noetl/ai-meta#100). Instead of a fixed
in:collection, the orchestrator repeatedly runs theloop.cursor.claimSQL to lease a frame of work rows, fans out the step body per claimed row, then re-claims — until the claim returns zero rows (drained). Honors the Rust execution model: the claim runs as a normal postgres tool command on a worker; no long-lived worker.
LoopSpec
Loop runtime specification (canonical format).
Taught in Ch. 6.3.
| Key | Type | Required | Default | Description | Taught in |
|---|---|---|---|---|---|
frame | FrameSpec | null | Frame sizing/leasing policy (cursor mode only). | Ch. 6.3 | ||
max_in_flight | integer | null | Maximum concurrent iterations in parallel mode / frames in cursor mode. | Ch. 6.3 | ||
mode | LoopMode | "sequential" | Execution mode: sequential, parallel, or cursor. | Ch. 6.3 |
Metadata
Playbook metadata.
Taught in Ch. 4.1.
| Key | Type | Required | Default | Description | Taught in |
|---|---|---|---|---|---|
description | string | null | Description. | Ch. 4.1 | ||
labels | map of string | null | Labels for filtering. | Ch. 4.1 | ||
name | string | yes | Playbook name (required). | Ch. 4.1 | |
path | string | null | Resource path. | Ch. 4.1 |
NextArc
Arc specification for v10 next router format. Canonical format: next.arcs[].when for conditional routing (Petri-net arcs).
Taught in Ch. 6.1.
| Key | Type | Required | Default | Description | Taught in |
|---|---|---|---|---|---|
set | object | null | Arc-level variable mutations to apply to execution context before dispatching the downstream step. Mirrors Python's set: on arcs. Scope-prefixed keys (ctx.x, iter.x, step.x) are stripped to the bare key; bare keys and unknown-scope dotted keys are written as-is. Values are Jinja2 templates rendered against the producing step's completion context before being applied. | Ch. 6.1 | ||
step | string | yes | Target step name. | Ch. 6.1 | |
when | string | null | Transition guard expression (Jinja2). Evaluated by server after step completion. | Ch. 6.2 |
NextRouter
Canonical v10 next router format with spec and arcs.
Taught in Ch. 6.1.
| Key | Type | Required | Default | Description | Taught in |
|---|---|---|---|---|---|
arcs | array of NextArc | [] | List of arcs (outgoing transitions). | Ch. 6.1 | |
spec | NextRouterSpec | null | Router specification (mode: exclusive/inclusive). | Ch. 6.1 |
NextRouterSpec
Next router spec for v10 format.
Taught in Ch. 6.1.
| Key | Type | Required | Default | Description | Taught in |
|---|---|---|---|---|---|
mode | string | null | Routing mode: exclusive (first match) or inclusive (all matches). | Ch. 6.1 |
NextSpec
Next step specification - supports multiple formats for compatibility.
Taught in Ch. 6.1.
One of:
- array of CanonicalNextTarget: List of step targets with optional
when(legacy canonical): a sequence of{ step, when?, args? }maps. - array of string: List of bare step names.
- string: Single step name.
- NextRouter: Canonical v10 router format:
{ spec: { mode: ... }, arcs: \[...\] }— a map. Declared last so a sequence never deserializes into it positionally (see the type-level note above).
PipelineItem
One item in a pipeline. Untagged so serde tries each variant in declaration order and picks the first that decodes.
Taught in Ch. 5.2.
One of:
- ToolSpec: Flat shape:
{ name: "label", kind: "python", code: "...", ... }. The pipeline-item label lives in thenamefield; the rest of the fields are an inlineToolSpec. Stored viaToolSpec.extra(the#\[serde(flatten)\] HashMapcatch-all), so no schema change is needed on ToolSpec itself. - map of ToolSpec: Nested shape:
{ "label": { kind: "python", code: "...", ... } }. Single-key map — the key is the label, the value is the spec.
Residency
Residency policy for a KeychainDef — part of the playbook model, so it lives in the core with the rest of the types (noetl/ai-meta#108). The server's secrets::residency module re-exports this enum and holds the region-check logic (which needs server-only deps); the enum itself is pure data.
Taught in Ch. 4.4.
One of:
- "none": No check; resolution proceeds regardless of server region. Back-compat default for entries without an explicit policy.
- "advisory": Check but proceed on mismatch — observability without enforcement. Used during the migration window before flipping to
strict. - "strict": Fail-closed on mismatch; resolution short-circuits before any provider call (the server maps this to an
AppError::ResidencyViolation).
Step
Workflow step with canonical format control flow.
Taught in Ch. 4.3.
| Key | Type | Required | Default | Description | Taught in |
|---|---|---|---|---|---|
args | object | null | Input arguments for this step. | Ch. 5.3 | ||
desc | string | null | Step description. | Ch. 4.3 | ||
loop | Loop | null | Loop configuration with spec.mode. | Ch. 6.3 | ||
next | NextSpec | null | Next step(s) with optional when conditions for routing. | Ch. 6.1 | ||
set | object | null | Step-level set: mutations — template expressions rendered against the producing step's completion context, then applied via scope-prefix stripping (ctx.x → x) exactly like arc-level set:. Mirrors Python's step-level set: in noetl/core/dsl/engine/executor/transitions.py. | Ch. 4.2 | ||
spec | StepSpec | null | Step behavior configuration. | Ch. 6.5 | ||
step | string | yes | Step name (unique identifier). | Ch. 4.3 | |
tool | ToolDefinition | yes | Tool configuration - single tool or pipeline. | Ch. 5 | |
vars | object | null | Variables to extract from step result. | Ch. 4.2 | ||
when | string | null | Transition enable guard (canonical format). Jinja2 expression evaluated by server before step runs. | Ch. 6.2 |
StepSpec
Step-level behavior configuration.
Taught in Ch. 6.5.
| Key | Type | Required | Default | Description | Taught in |
|---|---|---|---|---|---|
next_mode | string | null | Next evaluation mode: exclusive (first match) or inclusive (all matches). | Ch. 6.1 | ||
on_error | string | null | Error handling: fail, continue, or retry. | Ch. 6.5 | ||
timeout | string | null | Step timeout (e.g., "30s", "5m"). | Ch. 6.5 |
ToolDefinition
Tool definition - can be single tool or pipeline.
Taught in Ch. 5.2.
One of:
- ToolSpec: Single tool (shorthand).
- array of PipelineItem: Pipeline - list of labeled tasks.
ToolKind
Supported tool kinds.
Taught in Ch. 5.1.
One of:
- "http" | "postgres" | "duckdb" | "ducklake" | "python" | "workbook" | "playbook" | "playbooks" | "secrets" | "iterator" | "container" | "script" | "snowflake" | "transfer" | "snowflake_transfer" | "gcs" | "gateway" | "nats" | "shell" | "artifact" | "noop" | "task_sequence" | "rhai"
- "subscription": Bounded-drain message subscription poll (NATS / Pub/Sub / Kafka). noetl/ai-meta#90 Phase 1 — dispatched generically by the worker through the noetl-tools registry; the server only needs to accept the kind so playbook validation passes.
- "wasm": Compiled WASM plug-in (noetl/ai-meta#105). The step's tool carries
plugin: { path, version, entry? }and an optionalinput(the server canonicalises it toargs, which becomes the plug-in's input bytes as JSON).pathis a string,versionan integer,entrythe guest export to call (defaultrun). The server only accepts the kind; the worker'swasm-plugindispatcher loads the module from the catalog, runs it and flushes its capability intents.
ToolSpec
Tool specification with tool.kind pattern. All execution-specific fields live under tool.
Taught in Ch. 5.1.
| Key | Type | Required | Default | Description | Taught in |
|---|---|---|---|---|---|
args | any | Default arguments / inputs passed to the tool runtime. | Ch. 5.3 | ||
auth | any | Authentication configuration. | Ch. 4.4 | ||
code | string | null | Python code (for python tool). | Ch. 5.1 | ||
command | any | Command for the tool runtime. | Ch. 5.1 | ||
connection | string | null | Connection string or credential reference. | Ch. 5.1 | ||
eval | array of EvalEntry | null | Tool-level flow control (canonical format). Evaluated after tool execution. | Ch. 6.5 | ||
headers | map of string | null | HTTP headers. | Ch. 5.1 | ||
kind | ToolKind | yes | Tool type. Authored, so flag-gated kinds are refused while their flag is off (ToolKindGates). | Ch. 5.1 | |
libs | any | Libraries/dependencies. | Ch. 5.1 | ||
method | string | null | HTTP method (for http tool). | Ch. 5.1 | ||
output_select | any | Output selection strategy (for result externalization). | Ch. 5.1 | ||
params | any | Tool params. A raw Value, for the same reason command above is one. | Ch. 5.1 | ||
query | string | null | Query/SQL (for database tools). | Ch. 5.1 | ||
url | string | null | URL (for http tool). | Ch. 5.1 |
WorkbookTask
Reusable task definition in workbook.
Taught in Ch. 4.5.
| Key | Type | Required | Default | Description | Taught in |
|---|---|---|---|---|---|
name | string | yes | Task name. | Ch. 4.5 | |
sink | any | Optional sink configuration. | Ch. 4.5 | ||
tool | ToolSpec | yes | Tool configuration. | Ch. 4.5 |