Quick Start
Give Argyll an order and follow the work that produces its completed summary.
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",
"name": "Normalize Order",
"type": "script",
"attributes": {
"order_id": {"role": "required"},
"normalized_id": {"role": "output"}
},
"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",
"name": "Calculate Total",
"type": "script",
"attributes": {
"unit_price": {"role": "required"},
"quantity": {"role": "required"},
"total": {"role": "output"}
},
"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",
"name": "Summarize Order",
"type": "script",
"attributes": {
"normalized_id": {"role": "required"},
"total": {"role": "required"},
"summary": {"role": "output"}
},
"script": {"language": "lua", "script": "return {summary = normalized_id .. \": \" .. tostring(total)}"}
}'
Start the Flow
Set summarize-order as the Goal. Argyll includes the two producer Steps because they supply its required normalized_id and total Attributes.
curl -X POST http://localhost:8080/engine/flows \
-H "Content-Type: application/json" \
-d '{
"id": "order-123",
"goals": {"steps": ["summarize-order"]},
"init": {
"order_id": ["ord-123"],
"unit_price": [12.5],
"quantity": [2]
}
}'
Inspect the Result
curl http://localhost:8080/engine/flows/order-123
Wait for status to become completed. Repeat the GET if the Flow is still active. Read executions["summarize-order"].outputs.summary, which is "ORD-123: 25". The same value appears in attributes.summary[0].value.
Continue with Steps for Step types and Flows for planning and lifecycle.