Skip to main content
By the end of this guide you have one workflow file in which three agents share a task: a planner writes the plan, an implementer builds it, and a reviewer approves the change or sends it back with feedback. You check it on your own machine without signing in, then run it against a real repository. The handoffs are declared in the file, not left to a prompt. The reviewer answers through a JSON schema, and the workflow routes on that answer with CEL.

Before you begin

  • The reliant CLI, v1.21 or later (reliant version). Validating, linting and scenario runs need no account and no network.
  • A git repository with a test you can run. This guide uses a two-file Python project with a greet.py and a unittest.
  • For the last two steps: a signed-in CLI (Sign in and tokens) and a connected machine that holds the repository (Run a machine from the terminal).
1

Create the workflow file

Save this as .reliant/workflows/plan-build-review.yaml. Reliant finds workflows by their name:, so give the file the same name.
.reliant/workflows/plan-build-review.yaml
Here is how the three agents hand off work:
  • The planner runs builtin://agent in plan mode, which gives it read-only tools. It shares the run’s thread (inherit), so its plan stays in the conversation.
  • The implementer and the reviewer each fork that thread. Each one starts with the plan but works in its own context. The save_message on implement copies the implementer’s summary back to the shared thread, where the reviewer reads it.
  • The reviewer runs builtin://structured-agent, which keeps prompting until the model calls submit_review with an answer that fits the schema. Its tool list has no edit tools, but tag:shell can still run commands.
  • The loop sends work back. Its while reads the verdict, and the reviewer’s feedback is injected into the implementer’s next round. iter.iteration < inputs.max_rounds bounds the loop.
  • The last edge sends an approval to done and anything else to needs_attention. outcome: on those two nodes decides whether the run succeeded.
Each field is listed in the workflow schema and node types references.
2

Validate and lint it

validate checks structure, CEL and types. lint checks whether the workflow still behaves when nobody is watching it.
terminal
The next step clears the one warning. Lint rules describes every rule.
3

Test the send-back path with a scenario

A scenario runs the real workflow engine with mocked agent results, so you can check the loop without spending tokens. This one has the reviewer request changes once and then approve. Mock each agent by its node path:
.reliant/workflows/plan-build-review/scenarios/approved_on_second_round.yaml
Add a second scenario, never_approved.yaml, with inputs: {max_rounds: 1}, one changes_requested review and expect: {outcome: failed, completed: [needs_attention]}, so both endings are tested. Then run them:
terminal
reliant workflow lint now reports 0 lint error(s), 0 warning(s). The scenario file format is in Testing workflows.
4

Run it on your machine

Start a run from the repository. --project-path . finds the Reliant project for this folder, or creates one. --follow streams events until the run ends.
terminal
The run is listed under Runs in the app, not in your sidebar. It runs on the machine that holds the folder. Add --daemon to choose a different one.
5

Verify the result

Check the run’s verdict, then check the code the agents changed:
terminal
Outcome: SUCCESS means the run ended at done, so the reviewer approved. Status alone says only that the run finished: a run that ends at needs_attention is also COMPLETED, with Outcome: FAILURE. Here the reviewer approved round 1. Your scenario covers the send-back path.

What this does not do

  • It does not commit, push or open a pull request. The changes stay in your working tree for you to review. To publish a branch, add a git_publish node.
  • The approval is a model’s judgment. The reviewer runs the tests it chooses to run. To make your test command the gate, add a run node and route on its exit_code, as Get It Right does.
  • Turning off edit tools is not a sandbox. The reviewer can still change files through the shell. Read the diff before you keep it.

Troubleshooting

An edge cannot point back to an earlier node, because a workflow’s edges must not form a cycle. validate refuses one with remove one of the edges to break the cycle. Put the nodes that repeat inside a type: loop node and end the loop with its while condition, as build_loop does above.
The first reliant workflow run --project-path on a new folder creates the project before its machine has synced .reliant/workflows/. Wait a few seconds and run the same command again. Check that the machine is connected with reliant daemon list.
A warning, not an error. Add a scenario under .reliant/workflows/<name>/scenarios/, where <name> is the workflow’s name:, not its file name.

Next steps

Require human approval

Pause the run for a person before the implementer’s work is kept.

Test workflows with scenarios

Cover every trigger and ending before you ship a workflow.

Multi-agent patterns

Parallel agents with join, proposer and critic turns, and a model per role.

Get It Right

The built-in version of this loop, with lint, test and build gates.