Appendix A: DSL Reference

REAL

Generated

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.kind is closed to the kinds this server accepts. Semantic rules (a start step, unique step names, existing next targets) are enforced by the server's validator, not by this schema.

Top-level keys

KeyTypeRequiredDescriptionTaught in
apiVersionstringyesAPI version (noetl.io/v2).Ch. 4.1
keychainarray of KeychainDef | nullKeychain definitions for credentials and tokens.Ch. 4.4
kindstringyesResource kind (Playbook).Ch. 4.1
metadataMetadatayesMetadata (name, path, labels).Ch. 4.1
varsobject | nullTop-level variables (canonical format).Ch. 4.2
workbookarray of WorkbookTask | nullReusable tasks.Ch. 4.5
workflowarray of StepyesWorkflow steps.Ch. 4.3
workloadanyGlobal 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.

KeyTypeRequiredDefaultDescriptionTaught in
argsobject | nullArguments to pass to target step.Ch. 6.1
stepstringyesTarget step name.Ch. 6.1
whenstring | nullTransition 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.

KeyTypeRequiredDefaultDescriptionTaught in
authstring | nullCredential alias for the claim tool.Ch. 6.3
claimstringyesThe claim SQL (atomic lease, e.g. ... FOR UPDATE SKIP LOCKED ... RETURNING ...).Ch. 6.3
kindstring"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.

KeyTypeRequiredDefaultDescriptionTaught in
attemptsinteger | nullRetry attempts (for do: retry).Ch. 6.5
backoffstring | nullRetry backoff strategy: linear or exponential.Ch. 6.5
delaynumber | nullRetry delay in seconds.Ch. 6.5
dostringyesAction to take: continue, retry, break, jump, failCh. 6.5
exprstring | nullJinja2 expression to evaluate. Access outcome object: outcome.status, outcome.error, outcome.resultCh. 6.5
set_varsobject | nullVariables to set (step-scoped).Ch. 6.5
targetstring | nullTarget step (for do: jump).Ch. 6.5

EvalElse

Else clause for eval conditions.

Taught in Ch. 6.5.

KeyTypeRequiredDefaultDescriptionTaught in
dostringyesAction to take.Ch. 6.5
set_varsobject | nullVariables 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.

KeyTypeRequiredDefaultDescriptionTaught in
heartbeat_secondsnumber | nullCh. 6.3
lease_secondsnumber | nullCh. 6.3
max_bytesinteger | nullCh. 6.3
max_rowsinteger | nullMax rows claimed per frame (the claim SQL's LIMIT { { __frame_max_rows } }).Ch. 6.3
max_secondsnumber | nullCh. 6.3
processstring | nullrow (default) binds iter.<name> to one row; frame is reserved.Ch. 6.3
row_concurrencyinteger | nullRows 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.

KeyTypeRequiredDefaultDescriptionTaught in
allowed_regionsarray 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
authstring | nullCredential 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_renewbooleanfalseAuto-renew flag.Ch. 4.4
credentialstring | nullCredential reference.Ch. 4.4
mapmap of string | nullOutput-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
namestringyesKeychain entry name.Ch. 4.4
no_broker_fallbackbooleanfalseSecrets 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
providerstring | nullSecret-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
regionstring | nullSecrets 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
residencyResidency"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
scopestring | nullScope type.Ch. 4.4
token_typestring | nullToken type.Ch. 4.4

Loop

Step-level loop configuration (canonical format).

Taught in Ch. 6.3.

KeyTypeRequiredDefaultDescriptionTaught in
cursorCursorClaim | nullClaim block for mode: cursor loops.Ch. 6.3
instring | nullJinja expression for collection to iterate over. Required for sequential / parallel; absent for cursor (which claims work).Ch. 6.3
iteratorstringyesVariable name for each item.Ch. 6.3
specLoopSpec | nullLoop 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 the loop.cursor.claim SQL 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.

KeyTypeRequiredDefaultDescriptionTaught in
frameFrameSpec | nullFrame sizing/leasing policy (cursor mode only).Ch. 6.3
max_in_flightinteger | nullMaximum concurrent iterations in parallel mode / frames in cursor mode.Ch. 6.3
modeLoopMode"sequential"Execution mode: sequential, parallel, or cursor.Ch. 6.3

Metadata

Playbook metadata.

Taught in Ch. 4.1.

KeyTypeRequiredDefaultDescriptionTaught in
descriptionstring | nullDescription.Ch. 4.1
labelsmap of string | nullLabels for filtering.Ch. 4.1
namestringyesPlaybook name (required).Ch. 4.1
pathstring | nullResource 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.

KeyTypeRequiredDefaultDescriptionTaught in
setobject | nullArc-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
stepstringyesTarget step name.Ch. 6.1
whenstring | nullTransition 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.

KeyTypeRequiredDefaultDescriptionTaught in
arcsarray of NextArc[]List of arcs (outgoing transitions).Ch. 6.1
specNextRouterSpec | nullRouter specification (mode: exclusive/inclusive).Ch. 6.1

NextRouterSpec

Next router spec for v10 format.

Taught in Ch. 6.1.

KeyTypeRequiredDefaultDescriptionTaught in
modestring | nullRouting 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 the name field; the rest of the fields are an inline ToolSpec. Stored via ToolSpec.extra (the #\[serde(flatten)\] HashMap catch-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.

KeyTypeRequiredDefaultDescriptionTaught in
argsobject | nullInput arguments for this step.Ch. 5.3
descstring | nullStep description.Ch. 4.3
loopLoop | nullLoop configuration with spec.mode.Ch. 6.3
nextNextSpec | nullNext step(s) with optional when conditions for routing.Ch. 6.1
setobject | nullStep-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
specStepSpec | nullStep behavior configuration.Ch. 6.5
stepstringyesStep name (unique identifier).Ch. 4.3
toolToolDefinitionyesTool configuration - single tool or pipeline.Ch. 5
varsobject | nullVariables to extract from step result.Ch. 4.2
whenstring | nullTransition 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.

KeyTypeRequiredDefaultDescriptionTaught in
next_modestring | nullNext evaluation mode: exclusive (first match) or inclusive (all matches).Ch. 6.1
on_errorstring | nullError handling: fail, continue, or retry.Ch. 6.5
timeoutstring | nullStep 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 optional input (the server canonicalises it to args, which becomes the plug-in's input bytes as JSON). path is a string, version an integer, entry the guest export to call (default run). The server only accepts the kind; the worker's wasm-plugin dispatcher 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.

KeyTypeRequiredDefaultDescriptionTaught in
argsanyDefault arguments / inputs passed to the tool runtime.Ch. 5.3
authanyAuthentication configuration.Ch. 4.4
codestring | nullPython code (for python tool).Ch. 5.1
commandanyCommand for the tool runtime.Ch. 5.1
connectionstring | nullConnection string or credential reference.Ch. 5.1
evalarray of EvalEntry | nullTool-level flow control (canonical format). Evaluated after tool execution.Ch. 6.5
headersmap of string | nullHTTP headers.Ch. 5.1
kindToolKindyesTool type. Authored, so flag-gated kinds are refused while their flag is off (ToolKindGates).Ch. 5.1
libsanyLibraries/dependencies.Ch. 5.1
methodstring | nullHTTP method (for http tool).Ch. 5.1
output_selectanyOutput selection strategy (for result externalization).Ch. 5.1
paramsanyTool params. A raw Value, for the same reason command above is one.Ch. 5.1
querystring | nullQuery/SQL (for database tools).Ch. 5.1
urlstring | nullURL (for http tool).Ch. 5.1

WorkbookTask

Reusable task definition in workbook.

Taught in Ch. 4.5.

KeyTypeRequiredDefaultDescriptionTaught in
namestringyesTask name.Ch. 4.5
sinkanyOptional sink configuration.Ch. 4.5
toolToolSpecyesTool configuration.Ch. 4.5

Check your understanding