Skip to main content
A project workflow is a YAML file in your repository’s .reliant/workflows/, so it is natural to work on it where you work on the code: in an editor, with a terminal beside it. The reliant workflow commands support that loop in two halves. The first half needs no sign-in, no machine and no network: validate, validate-tree, lint, scenario, eval and list read the files on disk and run the same checks and the same workflow engine the app uses. That makes them quick enough to run on every save and safe to run in CI. The second half talks to Reliant: run starts a workflow, and watch, status, wait-for-gate, answer and their siblings follow and steer it while it runs. This page walks through one small workflow from first draft to scheduled run. For the YAML format, see Creating custom workflows. For the scenario file format, see Testing workflows.

The example

The workflow runs the project’s tests. If they pass, it records that and stops. If they fail, it hands the failure to an agent to fix. This first draft has a mistake in it, which the next section finds:
.reliant/workflows/test-then-fix.yaml

Validate

reliant workflow validate checks every workflow in .reliant/workflows/, or just the file you name. It covers structure, CEL expressions, input and output types, and references between workflows. Run against the draft above, it finds a real mistake:
A compute node exists to produce values, so it must declare at least one. Give passed an output:
and validate again:
validate exits 1 when any workflow has an error, so it works as a pre-commit hook or a CI step. Add --json for output a program can read. A field the workflow format does not define is an error, and the message names the field and the version of Reliant that rejected it. The server parses the same files with its own version, so a file written for a newer CLI than the server fails there with that message: upgrade the server, or remove the field.

Changes that break activations

Each person who turns on a declared trigger creates an activation of it on the server, bound to the trigger’s name and kind. Deleting the workflow, renaming or removing the trigger, or turning it into another kind leaves every activation of it broken: each firing is refused and nothing runs. Every file can still validate, so give validate the revision you are changing from and it compares the declarations:
These are warnings: the CLI cannot see the activations, and removing a trigger nobody turned on is an ordinary edit. The server can, and lists an enabled activation that a synced change broke in its owner’s Inbox, with Pause and Remove. reliant workflow validate-tree <ref> goes further for one workflow. It follows every workflow the target calls, through project:// and builtin:// references, and checks presets against the inputs they set. This is the check the server runs when a chat starts. Pass the workflow as a file path, project://<name> or builtin://<name>:
If the workflow declares triggers, validate --trigger-payload '{…}' also runs each trigger’s filter, inputs mapping and prompt against a sample event. Automations shows how.

Test with scenarios

Validation proves the file is well formed. A scenario proves it behaves as you intend: it runs the workflow on the real engine, with each node’s result supplied by you instead of a real command or model. No model is called and nothing is spent. A scenario lives in .reliant/workflows/<name>/scenarios/, one per file. These two cover both branches:
.reliant/workflows/test-then-fix/scenarios/green_tests_skip_the_agent.yaml
.reliant/workflows/test-then-fix/scenarios/red_tests_go_to_the_agent.yaml
black_box: true stands in for the whole fix sub-workflow, so the scenario tests this workflow’s routing, not the agent’s.
When a scenario fails, the output says which expectation failed and what actually happened. Here the routing was wrong:
scenario run exits 1 if any scenario fails. --filter runs only scenarios whose name contains a string, and --fail-fast stops at the first failure. The app lists the same scenario files, so the CLI and the app always agree on what is tested.

Try an expression before you commit to it

Conditions and templates are CEL. reliant workflow eval evaluates one against data you supply and prints the value and its type, which is quicker than editing, validating and running a scenario to find out what an expression returns:
Referring to data you did not supply is an error, not null, as it would be in a real run, and the hint says how to guard against it:
For trigger filters, --integration github --event issues.opened --scope trigger generates a realistic event payload for you. CEL expressions is the language reference.

Run it

Running a workflow needs you to be signed in and a project to run in. A run is a chat. reliant workflow run starts one exactly as the app would, so the run appears in the app and you can open it there at any time:
--project-path finds the Reliant project at that path, or creates it, so a new checkout needs no setup. --project-id names a project directly. Inputs come from --input key=value (repeatable) or --input-file inputs.json, and --message sets the chat’s first message. The command prints the chat’s ID, which is also the execution ID every supervision command takes.

Supervise it

Pick the command that fits the person, or program, watching: status prints two separate facts, and it is worth knowing the difference. Status is the lifecycle: did the run finish? Outcome is the run’s own verdict: did the work pass? A workflow that fails its checks and ends at a failure node finishes cleanly, so it reads Status COMPLETED, Outcome FAILURE. watch reports such a run as ✗ workflow ended WITHOUT PASSING rather than a tick. Scripting and CI lists the exit code of each command. When a run asks a question, reliant workflow questions <id> shows it and its options, and reliant workflow answer <id> answers it. Pass --select "<option label>" and/or --text "<feedback>", or give no flags to pick interactively. Combined with wait-for-gate, that makes a supervision loop:
wait-for-gate exits 3 while a gate is open, so the loop continues until the run finishes. pause, resume and terminate do what their names say. A paused run keeps its state and can be resumed later.

Put it on a schedule

There is no reliant workflow schedule. A schedule is a trigger, and you add one in either of two ways. A workflow can declare its own schedule in a triggers: block, which anyone can then turn on with reliant trigger activate (the app’s Enable dialog as a command); Schedules shows the block. Or you create a schedule trigger from the terminal for a workflow that declares none. reliant trigger create runs a workflow on a cron or interval schedule, on a machine you name with --daemon (its ID or hostname). Scheduled runs are unattended, so the agent is told to decide and proceed instead of asking questions:
trigger list, get, fire (run now), events, enable, disable, update and delete manage it afterwards. Turning an automation on is your decision. An agent can call create_trigger_activation, update_trigger_activation, enable_trigger, pause_trigger or delete_trigger. Settings → Automations → Automation approvals decides which of those calls show you an approval card, for your account or one project: when a change widens its power (the default) asks for a new activation, a new or different connection or scope, a change of who it acts as, a new machine, new secrets, a production deploy step or a step that approves or denies requests, and applies every other edit and resume straight away; never applies everything except a change that lets the automation approve or deny requests, which always asks; always asks for everything. Pausing never needs a card. Deleting always does, whatever the setting, because it cannot be undone. Cards an agent’s turn raises together arrive as one batch: approve or deny them all at once from the chat or the Inbox, or decide each one. Approve all first shows what every card in it grants, and approves only what it showed. A card for an automation that can approve or deny requests is never in Approve all. A card raised before cards described their grant in plain words is left out of Approve all and decided on its own. Every change is recorded in the activation’s configuration history, with how it was approved and what it added and removed. An unattended run reaches these tools only when its workflow step names them, and a change that needs a card is refused there. The CLI’s create, update and enable still refuse to run from an agent’s shell; use the approval-backed tools instead. Schedules covers schedule options, catch-up after an outage, and overlapping runs.