ablative docs
↑↓ move↵ openesc close
Stack Notebook ablative.com.au

Workers and SDKs

Choose the workflow authoring language and the worker or caller SDK for each process.

Open .md

Choose a role

AWL
Single-file workflows, worker documents, workloops, roles/bindings and declared assemblies. Direct compilation needs no external Gleam compiler.
Gleam aion_flow
Typed workflow code and deterministic activity, timer, signal, query and child APIs. Targets Erlang bytecode.
Rust aion-rs
The engine library; its Rust library name is aion. It runs the BEAM bytecode through beamr.
Rust aion-worker
Remote activity implementations, typed handlers, heartbeats, registration and reconnect.
Rust aion-client
Caller SDK for starting and operating workflows over gRPC.
Python and TypeScript
Caller and worker SDK source lives under sdks/python and sdks/typescript. They run activities outside the workflow VM.
Gleam aion_client
Caller SDK, separate from the workflow-authoring SDK.
BEAM
The bytecode execution model. Aion runs it on beamr and adds durable history and replay.

Gleam is the typed workflow language. Rust implements the engine and provides worker and caller SDKs. Rust activity bodies run outside deterministic workflow code. See the Gleam, Python and TypeScript references.

Worker admission

A queue name alone is insufficient. Workers advertise action names, input and output schemas, capacity and placement. The server compares the advertisement with the deployed contract before it dispatches work.

A strict queue refuses structurally unserved work. A queue configured for durable pending records a wait until a compatible worker arrives. Read the configured policy when a run remains Running without a worker.

Failure and retry

An activity reports a retryable or terminal failure. The engine applies the declared retry policy for remote work. No policy means one attempt. AWL’s retry count names additional attempts, so two retries allow three total attempts.

Worker loss can redispatch the same attempt. Make external operations safe to repeat. A heartbeat reports progress under a declared heartbeat policy. Completion supplies the activity result.

Cancellation

Aion cannot cancel a single ordinary activity. Workflow cancel stops all of a run’s in-flight activities. A single agent attempt whose harness advertises Cancel can be stopped over HTTP with POST /workflows/intervene; there is no CLI command for this.

Workflow cancellation also reaches Running or Paused descendants recursively. Declared run deadlines start the same cascade. External effects need their own idempotency or compensation rules.

Read activity control for HTTP intervention requirements and the run commands for workflow cancellation.

Workflow and descendants
crates/aion/src/engine/api_workflow_ops.rs:150–190 and lifecycle/cancel_cascade.rs:267–309 record the target cancellation and recursively cancel Running or Paused descendants. Each run uses its own recorder.
Deadline cascade
crates/aion/src/lifecycle/deadline.rs:173–190 starts the same descendant cascade after a declared run deadline.
Single agent intervention
crates/aion-server/src/api/http/router.rs:497–498 and api/http/intervene.rs:66–109 serve HTTP intervention. worker/intervention.rs:301–303 requires the worker’s advertised primitive.
Transport boundary
crates/aion-server/src/state/accessors.rs:229–239 selects liminal intervention transport. state/routing.rs:86–101 supplies an unreachable transport otherwise; an unreachable attempt returns StaleTarget. The CLI has no intervention command.

SDK and integration references

Use aion_flow for workflow code, Python or TypeScript for application callers and external activities, and Norn for the supplied Norn agent adapter.