Before you begin
- The
reliantCLI, 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.pyand 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 Here is how the three agents hand off work:
.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
- The planner runs
builtin://agentinplanmode, 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
forkthat thread. Each one starts with the plan but works in its own context. Thesave_messageonimplementcopies 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 callssubmit_reviewwith an answer that fits the schema. Its tool list has no edit tools, buttag:shellcan still run commands. - The loop sends work back. Its
whilereads the verdict, and the reviewer’sfeedbackis injected into the implementer’s next round.iter.iteration < inputs.max_roundsbounds the loop. - The last edge sends an approval to
doneand anything else toneeds_attention.outcome:on those two nodes decides whether the run succeeded.
2
Validate and lint it
validate checks structure, CEL and types. lint checks whether the workflow still behaves when nobody is watching it.terminal
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:Add a second scenario,
.reliant/workflows/plan-build-review/scenarios/approved_on_second_round.yaml
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. The run is listed under Runs in the app, not in your sidebar. It runs on the machine that holds the folder. Add
--project-path . finds the Reliant project for this folder, or creates one. --follow streams events until the run ends.terminal
--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_publishnode. - 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
runnode and route on itsexit_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
cycle detected: implement -> review -> implement
cycle detected: implement -> review -> implement
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.no machine has synced this project's workflows yet
no machine has synced this project's workflows yet
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.[scenario-none] the workflow has no scenarios
[scenario-none] the workflow has no scenarios
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.