Steps
A Step declares one unit of work, the Attributes it consumes, and the Attributes it produces.
Choose a Type
| Type | Use |
|---|---|
| Service | An HTTP service does the work |
| Script | A small Lua transformation runs inside the engine |
| Flow | A reusable set of Goals runs as a child Flow |
See HTTP Steps for the invocation contract and Async Steps for callbacks.
Connect Steps with Attributes
Matching Attribute names connect producers and consumers. This definition makes customer available to every planned Step that consumes it:
{
"id": "load-customer",
"type": "service",
"attributes": {
"customer_id": {"role": "required", "type": "string"},
"customer": {"role": "output", "type": "object"}
},
"http": {
"invoke": {
"method": "GET",
"endpoint": "https://api.example.com/customers/{customer_id}"
}
}
}
Attributes covers roles, collection, defaults, deadlines, mapping, and fan-out.
Run Inline Lua
Script inputs are available as variables. Return a table keyed by output Attribute name:
{
"id": "format-name",
"type": "script",
"attributes": {
"first_name": {"role": "required", "type": "string"},
"last_name": {"role": "required", "type": "string"},
"display_name": {"role": "output", "type": "string"}
},
"script": {
"language": "lua",
"script": "return {display_name = first_name .. ' ' .. last_name}"
}
}
Argyll embeds Lua with the io, os, and debug modules excluded. Keep larger domain operations in the service that owns them so they retain that service’s tests, deployment lifecycle, and telemetry.
Label a Step
Labels are string metadata carried alongside a Step definition:
{
"id": "score-customer",
"type": "service",
"labels": {
"domain": "risk",
"tier": "gold"
}
}
They leave planning untouched and drive grouping instead: a Space selects the Steps whose labels match its selector. Both SDKs set them with WithLabel/with_label, and the Go generator accepts a //argyll:labels directive.
Lifecycle
A planned Step starts as pending, becomes active when its inputs are ready, and finishes as completed, failed, or skipped. A false Predicate or an unsatisfied required match produces skipped; Argyll then releases upstream work whose remaining consumers are already satisfied.
Service Steps choose standard, memoized, or compensated handling. See Memoization and Compensation.