Quick Start

Run Argyll end-to-end without writing a service. Register an inline script Step, start a Flow with goal-driven planning, and inspect the result through the API.

Register a Script Step

A Script Step executes inline code without calling external services. Here’s how to register one:

curl -X POST http://localhost:8080/engine/step \
  -H "Content-Type: application/json" \
  -d '{
    "id": "greet",
    "name": "Greet",
    "type": "script",
    "attributes": {
      "name": {"role": "required", "type": "string"},
      "greeting": {"role": "output", "type": "string"}
    },
    "script": {
      "language": "lua",
      "script": "return {greeting = \"Hello, \" .. name .. \"!\"}"
    }
  }'

What this Step declares:

  • It needs a name input (required)
  • It produces a greeting output
  • It runs a Lua script that builds a greeting string

Start a Flow

Now create a Flow that uses this Step:

curl -X POST http://localhost:8080/engine/flow \
  -H "Content-Type: application/json" \
  -d '{
    "id": "flow-1",
    "goals": ["greet"],
    "init": {
      "name": ["World"]
    }
  }'

What this does:

  • Creates a Flow with ID flow-1
  • Sets the goal to run the greet Step
  • Provides initial state: name = “World”

Check the Result

Query the Flow to see the result:

curl http://localhost:8080/engine/flow/flow-1

You’ll get back the full Flow state:

{
  "id": "flow-1",
  "status": "completed",
  "created_at": "2026-05-09T17:00:00Z",
  "completed_at": "2026-05-09T17:00:01Z",
  "attributes": {
    "name": [
      { "value": "World", "set_at": "2026-05-09T17:00:00Z" }
    ],
    "greeting": [
      {
        "value": "Hello, World!",
        "step": "greet",
        "set_at": "2026-05-09T17:00:01Z"
      }
    ]
  },
  "executions": {
    "greet": {
      "status": "completed",
      "started_at": "2026-05-09T17:00:00Z",
      "completed_at": "2026-05-09T17:00:01Z",
      "inputs": { "name": "World" },
      "outputs": { "greeting": "Hello, World!" }
    }
  }
}

Each entry in attributes is an array of value records, since several upstream Steps can produce the same Attribute. Each record carries value, step (which Step produced it, omitted for init values), and set_at.

Key Points

  • Declarative: You specified a Goal (“run greet”) and Argyll executed it
  • Durable: The Flow’s state is recorded. You can query it anytime
  • Deterministic: Same input always produces the same output

Next, read Your First Flow to learn how Steps depend on each other.