Documentation / Reference
Workflow definition reference
JSON and YAML use the same definition. Start with a runtime group and phases; expand an option group when you need it.
Choose where work runs
| Option | Behavior |
|---|---|
| default_group / group | Select an installed runtime group; a phase group overrides the workflow default. |
| async_sqs | Queue work on the group's managed SQS queue; the runner reports completion later. |
| sync_lambda | Invoke the group's runner Lambda and wait for its response. |
| type: async_tool | Separate external-operation contract: dispatch, durable wait and authenticated callback. |
The operator installs queues and runners once. Workflow authors use group names. Application CDK publishes handler artifacts; it does not install the execution engine.
Minimal example · JSON / YAML
JSON
{
"name": "hello-docs",
"version": "1.0.0",
"default_group": "python-standard",
"phases": {
"start": {
"requires": [],
"service": "hello",
"scope": "root",
"mode": "sync_lambda"
},
"finish": {
"requires": [
"start"
],
"service": "hello",
"scope": "fan_in_all",
"terminal": true,
"mode": "sync_lambda"
}
}
}YAML
name: hello-docs
version: 1.0.0
default_group: python-standard
phases:
start:
requires: []
service: hello
scope: root
mode: sync_lambda
finish:
requires:
- start
service: hello
scope: fan_in_all
terminal: true
mode: sync_lambdaAll definition options
127 fields across 17 objects, checked against pinned main. Publication pins are generated metadata. Memory override fields are recognized only to reject them; choose a runtime group instead.
Workflow
| Option / type | Meaning | When omitted |
|---|---|---|
nameString | Human-readable workflow name. | Empty string |
versionString | Workflow version; string or integer accepted. | 1.0.0 |
controlsOption<crate::controls::WorkflowControlPolicy> | Optional workflow-level execution controls, budgets, gates, and policy hooks (RF-CONTROL-01 Part C). | Omitted (inherits or disables this setting) |
deployment_idOption<String> Aliases: deploymentId | Optional immutable published deployment identifier (`DeploymentManifest.deployment_id`). | Omitted (inherits or disables this setting) |
default_groupOption<String> Aliases: defaultGroup, runtimeGroup | Optional default Runtime Group ID (`"rust-light"`, `"node-standard"`, `"python-heavy"`, etc.) inherited by any phase that does not declare its own `group` override. | Omitted (inherits or disables this setting) |
default_roleOption<String> Aliases: defaultRole | Optional default approved IAM role ARN or alias inherited by any phase that does not declare its own `role`. | Omitted (inherits or disables this setting) |
memory_override_mbOption<Value> Aliases: memoryMb, memory_mb, lambdaMemory, lambda_memory, workerMemoryMib | Captures any forbidden workflow-level Lambda memory override (`memoryMb`, `lambdaMemory`) so validation rejects it. | Omitted (inherits or disables this setting) |
coordinationOption<CoordinationConfig> | Optional workflow-level Valkey coordination retention configuration (`defaultTtl: "15m"`). | Omitted (inherits or disables this setting) |
defaultsOption<WorkflowDefaults> | Optional workflow-level defaults (`phaseTimeout: "5m"`). | Omitted (inherits or disables this setting) |
lanesHashMap<String, LaneDef> | Advanced named bindings to existing SQS queues or Lambda functions; normal workflows use runtime groups. | Empty |
phasesHashMap<String, PhaseDef> | Phase map keyed by ID, or an array with an id on every phase. | Empty |
Phase
| Option / type | Meaning | When omitted |
|---|---|---|
idOption<String> | Optional phase identifier when deserialized from a YAML/JSON sequence (`phases: [{ id: extract, ... }]`). | Omitted (inherits or disables this setting) |
requiresVec<String> | Upstream phase IDs that must complete before this phase runs. Empty means an entry phase. | Empty |
serviceString Aliases: handler | Logical handler or service identifier passed to the client runner layer. | Empty string |
inputsValue | Application input passed to this handler. | null |
lambdaOption<String> | Legacy execution role hint (`"runner"`, `"qa"`, `"orchestrator"`, `"export"`). | Omitted (inherits or disables this setting) |
laneOption<String> | Logical lane name referencing `WorkflowDef::lanes` (or a direct queue URL / ARN). | Omitted (inherits or disables this setting) |
groupOption<String> Aliases: runtimeGroup, runtime_group | Explicit Runtime Group identifier for this phase (e.g. `"rust-light"`, `"node-standard"`, `"python-heavy"`, `"java-standard"`, or a custom group ID). Overrides `WorkflowDef::default_group` when present and routes the phase directly to that group's SQS queue and Runner Lambda. | Omitted (inherits or disables this setting) |
pinned_group_versionOption<u32> Aliases: pinnedGroupVersion | Pinned Runtime Group `config_version` captured when the workflow version was admitted/published (RF-MEM-01 Part F). | Omitted (inherits or disables this setting) |
pinned_worker_memory_mibOption<u32> Aliases: pinnedWorkerMemoryMib | Pinned worker memory in MiB captured when the workflow version was admitted/published (RF-MEM-01 Part F). | Omitted (inherits or disables this setting) |
pinned_handler_slice_limit_mibOption<u32> Aliases: pinnedHandlerSliceLimitMib | Pinned subprocess handler memory slice limit in MiB captured when the workflow version was admitted/published (RF-MEM-01 Part F). | Omitted (inherits or disables this setting) |
pinned_group_timeout_secsOption<u32> Aliases: pinnedGroupTimeoutSecs | Pinned runtime group timeout in seconds captured when the workflow version was admitted/published (RF-MEM-01 Part F). | Omitted (inherits or disables this setting) |
memory_override_mbOption<Value> Aliases: memoryMb, memory_mb, lambdaMemory, lambda_memory, workerMemory, workerMemoryMib, worker_memory_mib | Captures any forbidden user-supplied Lambda memory override (`memoryMb`, `lambdaMemory`, `workerMemoryMib`) so validation rejects it deterministically. | Omitted (inherits or disables this setting) |
roleOption<String> Aliases: iamRole, iam_role | Optional approved IAM role ARN or logical role alias assumed for this phase's execution. Overrides `WorkflowDef::default_role` when present. | Omitted (inherits or disables this setting) |
dedicated_handler_function_arnOption<String> Aliases: dedicatedHandlerFunctionArn, dedicatedFunctionArn | Optional dedicated customer handler Lambda function ARN or name bound to this phase's customer IAM execution role (`IamIsolationBoundary::DedicatedLambdaExecutionRole`). | Omitted (inherits or disables this setting) |
isolation_boundaryOption<crate::iam_isolation::IamIsolationBoundary> Aliases: isolationBoundary | Optional explicit IAM isolation boundary (`dedicated_lambda_execution_role`, `hardened_subprocess_with_scoped_session`, or `shared_runner_no_aws_credentials`). | Omitted (inherits or disables this setting) |
runtimeOption<String> | Target execution runtime family (`"rust"` [default, no managed runtime], `"python"`, `"node"`, `"java"`). Also accepts inline `family:version` syntax such as `"python:3.12"`, `"node:22.x"`, or `"java:21"`. | Omitted (inherits or disables this setting) |
runtime_versionOption<String> Aliases: runtimeVersion | Optional runtime version pin (e.g. `"3.12"`, `"3.13"`, `"22.x"`, `"20.x"`, `"21"`, `"17"`, `"al2023"`). | Omitted (inherits or disables this setting) |
handler_uriOption<String> Aliases: handlerUri, codeUri | Optional S3 URI (`s3://bucket/key`) or local path to pull the phase handler code dynamically into `/tmp/rippflow-handlers/`. | Omitted (inherits or disables this setting) |
handler_sha256Option<String> Aliases: handlerSha256, codeSha256 | Optional expected SHA-256 hex digest of the handler artifact fetched from `handler_uri`. | Omitted (inherits or disables this setting) |
entrypointOption<String> | Optional script, class, or binary entrypoint relative to `/var/task` or the downloaded bundle. | Omitted (inherits or disables this setting) |
scopeOption<PhaseScope> | Execution scope (`root`, `per_shard`, `fan_in_all`). | per_shard; terminal/orchestrator conventions use root |
modeOption<ExecutionMode> | Execution mode (`async_sqs` or `sync_lambda`). | async_sqs via group routing |
terminalbool | Marks this phase as a terminal completion node for the workflow. | false |
outcomesHashMap<String, OutcomeRule> | Named outcome transition rules (e.g. `"completed"`, `"pass"`, `"rework"`, `"skipped"`). | Empty |
timeoutOption<String> | Optional phase execution timeout (e.g. `"2m"`, `"30m"`, `"10m"`, `"300s"`). Separate from Valkey coordination TTL; Rippflow derives active coordination retention so it is never shorter than `effective_phase_timeout_secs + recovery_margin`. | Omitted (inherits or disables this setting) |
wait_durationOption<String> Aliases: waitDuration | Optional durable timer wait duration (e.g. `"30m"`, `"2h"`, `"1d"`). Suspends the phase in DynamoDB with zero active Lambda compute until `wakeAtEpochSecs`. | Omitted (inherits or disables this setting) |
wait_for_callbackbool Aliases: waitForCallback | Optional external callback wait gate (`true` when the phase suspends until an authenticated callback arrives). | false |
callback_timeoutOption<String> Aliases: callbackTimeout | Optional callback expiration window (e.g. `"1h"`, `"24h"`, default `"1h"` = 3600s). | 1h when callback waiting is enabled |
slaOption<SlaPolicy> | SLA timeout and retry bounds. | Omitted (inherits or disables this setting) |
typeOption<String> | Optional phase type (`"standard"` [default], `"loop"`, `"async_tool"`, `"governed_tool"`, or `"mcp_tool"`, RF-CONTROL-01 Part G, RF-AGENT-03 & RF-AGENT-04). | Omitted (inherits or disables this setting) |
toolOption<String> Aliases: toolName, tool_name, toolId, tool_id | Optional logical tool identifier when `type: async_tool`, `type: governed_tool`, or `type: mcp_tool` (RF-AGENT-03 & RF-AGENT-04). | Omitted (inherits or disables this setting) |
tool_versionOption<String> Aliases: toolVersion | Optional pinned tool version when `type: governed_tool` or `type: mcp_tool` (e.g. `"1.0.0"`, RF-AGENT-04). | Omitted (inherits or disables this setting) |
tool_digestOption<String> Aliases: toolDigest | Optional immutable tool definition digest (`rftool_v1_<sha256>`) pinned at workflow publication/admission (RF-AGENT-04). | Omitted (inherits or disables this setting) |
server_refOption<String> Aliases: serverRef | Optional registered MCP server reference when `type: mcp_tool` or `type: governed_tool` (e.g. `"internal-crm"`, RF-AGENT-04). | Omitted (inherits or disables this setting) |
callbackOption<crate::async_execution::AsyncCallbackSpec> | Optional authenticated callback contract when `type: async_tool` (RF-AGENT-03). | Omitted (inherits or disables this setting) |
retryOption<crate::async_execution::AsyncRetrySpec> | Optional retry and backoff configuration when `type: async_tool` (RF-AGENT-03). | Omitted (inherits or disables this setting) |
adapterOption<crate::async_execution::AsyncAdapterSpec> Aliases: asyncTarget, asyncAdapter | Optional provider-neutral external execution adapter when `type: async_tool` (RF-AGENT-03). | Omitted (inherits or disables this setting) |
controlsOption<crate::controls::WorkflowControlPolicy> | Optional phase-level execution controls (`limits`, `budgets`, `budget`, `hooks`, `gates`, RF-CONTROL-01 Part C & RF-AGENT-03). | Omitted (inherits or disables this setting) |
untilOption<crate::controls::LoopUntilSpec> | Required termination predicate (`resultPath`, `equals`) when `type: loop` (RF-CONTROL-01 Part G). | Omitted (inherits or disables this setting) |
bodyVec<crate::controls::LoopBodySubPhase> | Optional sub-phases executed inside a `type: loop` phase body (RF-CONTROL-01 Part G). | Empty |
External lane
| Option / type | Meaning | When omitted |
|---|---|---|
modeExecutionMode | async_sqs queues work; sync_lambda waits for a Lambda result. | See enum/default policy below |
targetString | SQS Queue URL (when `mode == AsyncSqs`) or Lambda Function ARN/name (when `mode == SyncLambda`). | Required |
concurrency_groupOption<String> | Optional JSONPath or key used for FIFO `MessageGroupId` / per-tenant concurrency grouping. | Omitted (inherits or disables this setting) |
Outcome routing
| Option / type | Meaning | When omitted |
|---|---|---|
nextVec<String> | Explicit downstream phase keys to trigger for this outcome. | Empty |
rerun_phaseOption<String> | Optional upstream or current phase to re-run (e.g., QA rework loop back to a processor phase). | Omitted (inherits or disables this setting) |
max_loopsOption<u32> | Maximum number of rework loops permitted before escalating or failing (`default = 2`). | 2 at execution |
advance_barrierbool | Whether this outcome counts as a completed shard toward the phase's fan-in barrier. | false |
override_inputsOption<Value> | Optional JSON object merged into the target phase's `inputs` when routing/rerunning. | Omitted (inherits or disables this setting) |
Attempt SLA
| Option / type | Meaning | When omitted |
|---|---|---|
timeout_secsu32 | Runner/watchdog attempt timeout in seconds. | 300 |
max_attemptsu32 | Maximum attempts, including the initial attempt. | 3 |
Coordination retention
| Option / type | Meaning | When omitted |
|---|---|---|
defaultTtlOption<String> Aliases: default_ttl | Default Valkey coordination TTL (e.g. `"15m"` or `"900s"`, default `900s` = 15 minutes). | Omitted (inherits or disables this setting) |
defaultTtlSecsOption<u32> Aliases: default_ttl_secs | Optional explicit integer seconds for default coordination TTL. | Omitted (inherits or disables this setting) |
Phase defaults
| Option / type | Meaning | When omitted |
|---|---|---|
phaseTimeoutOption<String> Aliases: phase_timeout | Default phase execution timeout (e.g. `"5m"` or `"300s"`, default `300s` = 5 minutes). | Omitted (inherits or disables this setting) |
phaseTimeoutSecsOption<u32> Aliases: phase_timeout_secs | Optional explicit integer seconds for default phase execution timeout. | Omitted (inherits or disables this setting) |
Controls
| Option / type | Meaning | When omitted |
|---|---|---|
policyVersionu32 | Control policy version; currently use 1. | 1 |
scopeOption<ControlScope> | Counter ownership boundary; see ControlScope values. | Omitted (inherits or disables this setting) |
budgetOption<String> | Optional shorthand reference to a workflow-level budget rule `id` (e.g. `controls: { budget: "research-budget" }`, RF-AGENT-03). | Omitted (inherits or disables this setting) |
limitsOption<ControlLimitsSpec> | Execution limits; nested fields cap counts, duration or concurrency. | Omitted (inherits or disables this setting) |
budgetsVec<BudgetRuleSpec> | Resource allowance rules. | Empty |
hooksBTreeMap<ControlEnforcementPoint, DecisionHookSpec> | Decision handlers keyed by enforcement point. | Empty |
gatesVec<GateRuleSpec> | Approval gates before selected actions. | Empty |
Execution limits
| Option / type | Meaning | When omitted |
|---|---|---|
maxIterationsOption<u64> | Maximum loop iterations. | Omitted (inherits or disables this setting) |
maxPhaseExecutionsOption<u64> | Maximum phase executions, including rework. | Omitted (inherits or disables this setting) |
maxHandlerInvocationsOption<u64> | Maximum handler invocations. | Omitted (inherits or disables this setting) |
maxToolCallsOption<u64> | Maximum tool calls. | Omitted (inherits or disables this setting) |
maxExternalRequestsOption<u64> | Maximum external requests. | Omitted (inherits or disables this setting) |
maxDurationOption<String> | Maximum elapsed duration, e.g. 30m. | Omitted (inherits or disables this setting) |
maxConcurrentOperationsOption<u32> | Maximum simultaneous operations. | Omitted (inherits or disables this setting) |
maxChildWorkflowsOption<u32> | Maximum child workflows. | Omitted (inherits or disables this setting) |
maxRetriesOption<u32> | Maximum retries. | Omitted (inherits or disables this setting) |
maxRecoveryAttemptsOption<u32> | Maximum recovery attempts. | Omitted (inherits or disables this setting) |
violationOption<ViolationAction> | Action when the limit is exceeded; see ViolationAction values. | Omitted (inherits or disables this setting) |
scopeOption<ControlScope> | Counter ownership boundary; see ControlScope values. | Omitted (inherits or disables this setting) |
resetOption<ControlResetBehavior> | Counter reset policy; see ControlResetBehavior values. | Omitted (inherits or disables this setting) |
Budget rule
| Option / type | Meaning | When omitted |
|---|---|---|
idOption<String> Aliases: name | Identifier within this containing object. | Omitted (inherits or disables this setting) |
resourceMeterResource | Metered resource; see MeterResource values below. Custom resource strings are also supported. | Required |
unitString | Resource unit; use usd or usd_micros for money, tokens/calls/requests for counts, seconds or ms for compute. | Required |
limitValue | Nonnegative allowance. USD is converted to fixed micro-dollars; count units require integers. | Required |
violationViolationAction | Action when the limit is exceeded; see ViolationAction values. | terminate |
enforcementBudgetEnforcementMode | hard reserves before work; advisory records a soft limit. | hard |
maxExposurePerOpOption<Value> | Maximum amount reserved for one operation before dispatch. | Omitted (inherits or disables this setting) |
scopeControlScope | Counter ownership boundary; see ControlScope values. | workflow_run |
resetControlResetBehavior | Counter reset policy; see ControlResetBehavior values. | never |
Decision hook
| Option / type | Meaning | When omitted |
|---|---|---|
handlerString | Registered decision handler identifier. | Required |
timeoutString | Positive execution/expiration duration; see timeout precedence below. | 5s |
onFailureHookFailureAction | Hook failure action; see HookFailureAction values. | deny |
allowOpenOnNonSecuritybool | Explicit opt-in for allow-on-error behavior; retain fail-closed policy for security decisions. | false |
Approval gate
| Option / type | Meaning | When omitted |
|---|---|---|
idString | Identifier within this containing object. | Required |
enforcementPointControlEnforcementPoint | Control check at which the gate is evaluated. | before_external_side_effect |
actionString | Action that requires approval. | Required |
targetString | Target resource or operation. | Required |
timeoutString | Positive execution/expiration duration; see timeout precedence below. | 1h |
onTimeoutViolationAction | Action when approval expires; see ViolationAction values. | terminate |
Loop completion
| Option / type | Meaning | When omitted |
|---|---|---|
resultPathString | JSON result path tested for loop completion. | Required |
equalsValue | Value that ends the loop when matched. | Required |
Loop body
| Option / type | Meaning | When omitted |
|---|---|---|
idString | Identifier within this containing object. | Required |
handlerString Aliases: service | Handler/service identifier executed inside the loop body. | Required |
kindOption<String> | Optional loop sub-phase kind; use a handler for executable work. | Omitted (inherits or disables this setting) |
typeOption<String> | Sub-phase type; standard by default. | Omitted (inherits or disables this setting) |
inputsValue | Application input passed to this handler. | null |
Async callback
| Option / type | Meaning | When omitted |
|---|---|---|
requiredbool | Require the async completion callback. | true |
authenticatedbool | Require callback authentication. | true |
timeoutOption<String> | Maximum authenticated callback wait duration. | Inherits phase execution timeout |
allowedPrincipalArnOption<String> | Approved IAM callback principal when IAM authentication is used. | Omitted (inherits or disables this setting) |
authModeAsyncCallbackAuthMode | scoped_token_hmac, verified_iam_principal or dual_token_and_iam. | scoped_token_hmac |
Async retry
| Option / type | Meaning | When omitted |
|---|---|---|
maxAttemptsu32 Aliases: max_attempts | Maximum attempts, including the initial attempt. | 3 |
backoffAsyncBackoffStrategy | exponential, linear or fixed retry delay. | exponential |
initialIntervalOption<String> Aliases: initial_interval | Initial async retry interval; falls back to 2s. | Omitted (inherits or disables this setting) |
maxIntervalOption<String> Aliases: max_interval | Maximum async retry interval; falls back to 60s. | Omitted (inherits or disables this setting) |
External adapter
| Option / type | Meaning | When omitted |
|---|---|---|
kindAsyncAdapterKind | aws_lambda, external_https, ecs_task, cloud_run_job, azure_function or managed_ai_provider. Installation adapter support is required. | aws_lambda |
targetString | Target Lambda function ARN/name, HTTPS endpoint URL, container task definition, or provider URI. | Required |
idempotentDispatchbool | Whether the external provider guarantees idempotent execution when supplied `idempotencyKey` / `invocationId`. | true |
supportsStatusLookupbool | Whether the adapter supports querying operation status by `invocationId` when dispatch acknowledgement is lost. | false |
supportsRemoteCancelbool | Whether the adapter supports active remote cancellation of an already-running external operation. | false |
providerNameOption<String> | Optional external provider name. | Omitted (inherits or disables this setting) |
modelIdOption<String> | Optional provider model identifier. | Omitted (inherits or disables this setting) |
Enum values
| Type | Accepted values |
|---|---|
| ExecutionMode | async_sqs, sync_lambda |
| ControlScope | organization, tenant, project, workflow_definition, workflow_run, phase, loop, child_workflow, tool_invocation |
| ControlEnforcementPoint | before_admission, before_phase_dispatch, before_handler_invoke, before_external_side_effect, after_phase_completion, before_retry, before_callback_resume, before_child_workflow, before_recovery, on_budget_violation, on_deadline_exceeded |
| ViolationAction | deny, pause, retry_after, require_approval, terminate, quarantine |
| HookFailureAction | deny, pause, terminate, quarantine, allow |
| BudgetEnforcementMode | hard, advisory |
| ControlResetBehavior | never, per_phase, per_iteration, operator_amendment_only |
| MeterResource | iterations, handler_invocations, tool_calls, external_requests, tokens_input, tokens_output, model_cost, compute_seconds |
| AsyncCallbackAuthMode | scoped_token_hmac, verified_iam_principal, dual_token_and_iam |
| AsyncBackoffStrategy | exponential, linear, fixed |
| AsyncAdapterKind | aws_lambda, external_https, ecs_task, cloud_run_job, azure_function, managed_ai_provider |
| IamIsolationBoundary | dedicated_lambda_execution_role, hardened_subprocess_with_scoped_session, shared_runner_no_aws_credentials |
| PhaseScope | root, per_shard, fan_in_all |
Defaults & interactions
- Execution timeout: phase
timeout→sla.timeout_secs→defaults.phaseTimeout→ 300 seconds. SLA attempts default to 3. - Timer waits use
waitDuration; callback waits usewaitForCallbackandcallbackTimeout(default 1h). Async-toolcallback.timeoutinherits its phase timeout. - Durations accept integer seconds or ms, s, m, h, d suffixes. Use positive durations. Coordination retention is separate from execution deadlines.
Advanced: external resources
A named lane overrides group routing. Its target may be an existing queue URL or Lambda ARN. External resources require appropriate IAM permissions.
name: external-resource-example
version: "1.0.0"
default_group: python-standard
lanes:
external_check:
mode: sync_lambda
target: arn:aws:lambda:us-east-1:111122223333:function:external-check
phases:
check:
lane: external_check
service: external-check
terminal: trueLocal CLI caveat: explicit phase-level groups normalize to queued execution. Use default_group for local mixed sync/async examples. Unknown phase keys and malformed wait durations can pass control validation; validation alone does not certify deployment.
Verified sources
Checked 2026-11-05.
- workflow_def.rs 04cb082 · main
- controls.rs 04cb082 · main
- async_execution.rs 04cb082 · main
- Managed runtime queues 3a3be99 · main
- Application publication 7f5ea32 · main
