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

AWL roles and bindings

Compose portable role contracts with venue queues and harness settings at deploy time.

Open .md

Binding words

role awl 20

Declares a worker with its venue-varying half lifted out: the action contracts and the closed set of harness kinds stay here, and a binding supplies the queue and the launch at deploy.

  • form declaration
  • positions top-level
//! One flow, any venue: the contracts stay here, the seat arrives at deploy.
workflow review_change
  input repo: String
  input diff: String
  outcome reviewed: type Verdict, route success

type Verdict { text: String, final_message: String, stop_reason: String, session_id: String }

role judge
  kind norn | acp
  action review(repo: String, prompt: String) -> Verdict
    agent, timeout 10m

step review
  review(repo: repo, prompt: diff) -> verdict
  route reviewed(verdict)
binding awl 20

Opens a `.awlb` document and names the venue; the name is what every module this binding mints is known by, so two venues of one source never collide on routing.

  • form declaration
  • positions binding-header
//! The dean box: a Norn seat, three at a time, on that box's own paths.
binding dean
  bind judge
    queue judge_dean
    harness
      kind norn
      concurrency 3
      reconnect_initial_backoff 1s
      reconnect_max_backoff 30s
      reconnect_max_attempts 100
      env_pass "PATH", "HOME", "USER"
      args "--account", "default"
      cwd from repo
bind awl 20

Supplies one role's venue facts — its task queue and its `harness` section — and states every one of them, because a binding has no defaults.

  • form declaration
  • positions binding-header
//! The rocketfish box serves the same role through an ACP agent instead.
binding rocketfish
  bind judge
    queue judge_rf
    harness
      kind acp
      concurrency 1
      reconnect_initial_backoff 1s
      reconnect_max_backoff 30s
      reconnect_max_attempts 100
      env_pass "PATH", "HOME", "USER", "ANTHROPIC_MODEL"
      command "/usr/bin/bunx"
      args "@agentclientprotocol/claude-agent-acp"
      cwd from repo
      permission "allow-once"
      exit_grace 30s
queue awl 20

Names the task queue one venue serves a role on; it is the composed worker's name, and it is the venue's choice rather than the flow's.

  • form header-clause
  • positions bind-block
//! Two venues, two queues, one role: the queue name is the venue's to choose.
binding lab
  bind judge
    queue judge_lab
    harness
      kind norn
      concurrency 1
      reconnect_initial_backoff 1s
      reconnect_max_backoff 30s
      reconnect_max_attempts 100
      env_pass "PATH", "HOME"
      args "--account", "lab"
      cwd from repo

Source and venue forms

//! One flow, any venue: the contracts stay here, the seat arrives at deploy.
workflow review_change
  input repo: String
  input diff: String
  outcome reviewed: type Verdict, route success

type Verdict { text: String, final_message: String, stop_reason: String, session_id: String }

role judge
  kind norn | acp
  action review(repo: String, prompt: String) -> Verdict
    agent, timeout 10m

step review
  review(repo: repo, prompt: diff) -> verdict
  route reviewed(verdict)
aion deploy review_change.awl --bind venues/dean.awlb
//! The dean box: a Norn seat, three at a time, on that box's own paths.
binding dean
  bind judge
    queue judge_dean
    harness
      kind norn
      concurrency 3
      reconnect_initial_backoff 1s
      reconnect_max_backoff 30s
      reconnect_max_attempts 100
      env_pass "PATH", "HOME", "USER"
      args "--account", "default"
      cwd from repo

A role admits a closed set of harness kinds. A binding supplies exactly the roles the source requires and must choose an admitted kind. Missing, extra or duplicate binds and incompatible contracts are refused with the source file that must change.

Composition

Use the check command’s repeatable bind option to validate every venue pair. Deployment composes the source and binding locally before upload. An archive cannot be bound again.

The binding names a venue-distinct workflow type. Carry the type returned by the deployment receipt when starting it. The venue reading reports which deployed venue versions lag the newest source deployment.

Read deploy and venues for the command help.