Quick Start
Run a multi-step Flow locally using inline scripts.
Start Argyll
From the Argyll repository:
docker compose up
The engine listens on http://localhost:8080.
Register Three Script Steps
This example prepares an order summary. Two Steps derive values from the initial state, and the Goal Step combines their outputs. Because the first two Steps are independent, Argyll can run them in parallel.
curl -X POST http://localhost:8080/engine/steps \
-H "Content-Type: application/json" \
-d '{
"id": "normalize-order",
"type": "script",
"attributes": {
"order_id": {"role": "required", "type": "string"},
"normalized_id": {"role": "output", "type": "string"}
},
"script": {"language": "lua", "script": "return {normalized_id = string.upper(order_id)}"}
}'
curl -X POST http://localhost:8080/engine/steps \
-H "Content-Type: application/json" \
-d '{
"id": "calculate-total",
"type": "script",
"attributes": {
"unit_price": {"role": "required", "type": "number"},
"quantity": {"role": "required", "type": "number"},
"total": {"role": "output", "type": "number"}
},
"script": {"language": "lua", "script": "return {total = unit_price * quantity}"}
}'
curl -X POST http://localhost:8080/engine/steps \
-H "Content-Type: application/json" \
-d '{
"id": "summarize-order",
"type": "script",
"attributes": {
"normalized_id": {"role": "required", "type": "string"},
"total": {"role": "required", "type": "number"},
"summary": {"role": "output", "type": "string"}
},
"script": {"language": "lua", "script": "return {summary = normalized_id .. \": \" .. tostring(total)}"}
}'
Start the Flow
Set summarize-order as the Goal. Its required normalized_id and total Attributes lead Argyll to build an Execution Plan containing both producer Steps and the Goal.
curl -X POST http://localhost:8080/engine/flows \
-H "Content-Type: application/json" \
-d '{
"id": "order-123",
"goals": ["summarize-order"],
"init": {
"order_id": ["ord-123"],
"unit_price": [12.5],
"quantity": [2]
}
}'
Inspect the Result
curl http://localhost:8080/engine/flows/order-123
The completed Flow contains summary: "ORD-123: 25". Its execution state shows normalize-order and calculate-total running independently before summarize-order.
Continue with Steps for Step types and Flows for planning and lifecycle.