Before you begin
- A workflow in
.reliant/workflows/that you can validate and run. - The Reliant CLI, signed in (
reliant auth status), and a project on a connected machine to run it in. - The Inbox, where approvals and questions wait for you.
1
Gate the change on an approval node
The first agent runs in The
plan mode, where it has only read-only tools. The approve node holds the run until someone decides. Only the approved edge reaches the agent that edits files..reliant/workflows/propose-then-apply.yaml
title is what the approver is asked to decide. The proposal is the agent’s message just above the approval in the run, because both agents share the run’s thread (mode: inherit).2
Route every status
nodes.approve.status takes one of four values, and the default: edge catches the last two:Always gate on
== 'approved', never on != 'denied'. That way a timeout or an unattended run can never apply the change. undecided declares outcome: failure, so those runs show as failed in Workflows → Runs.3
Test approve and deny with scenarios
A scenario mocks each node’s output, including the decision. Put one file per path in Add the same with
.reliant/workflows/propose-then-apply/scenarios/:.reliant/workflows/propose-then-apply/scenarios/denied_change_is_not_applied.yaml
status: approved (expect apply) and status: timeout (expect outcome: failed and undecided). An unattended scenario sets inputs: {unattended: true} and gives no approve event. Always give the approval a status: with none, the scenario resolves it as approved and prints a warning. Then check everything (the pick-a-fix scenarios belong to the workflow in step 5):terminal
4
Run it and decide
--exit-on-gate stops following and exits 3 as soon as the run waits on you:terminal
reliant workflow watch <id> shows the gate and the decision:apply agent made the edit (-Greeting: helo world / +Greeting: hello world in git diff). A second run with approval_timeout=3m that nobody decided ended in undecided, and reliant workflow status showed Outcome: ✗ FAILURE.5
Ask a question when yes or no is not enough
An An unanswered question resolves with an empty
ask_question node offers options and also accepts free text. Its response is the text the person typed, or else the label they clicked. The metadata must include "type":"ask_user". Without it, the run waits on a question that has no options to answer..reliant/workflows/pick-a-fix.yaml
response after 24 hours, which is why '' also stops. Unlike approvals, the CLI can answer questions:terminal
6
Get a Slack or SMS message when a run is waiting
A run that stops on an approval fires a workflow event with outcome This validates. Lint still asks for an
blocked. A second workflow can post it to Slack, or text it with Twilio’s twilio/message.send@1:.reliant/workflows/notify-on-approval.yaml
on_failure: handler and a scenario before you enable it.Keep the decision with a person
Do not add a workflow step that callsApprovalService/Approve or Deny to satisfy a human approval gate. If lint reports approval-decider, remove the decision step and have a person decide in the app instead.
Declaring permissions: [approvals:decide] or suppressing a lint finding does not authorize automation to decide a human approval. The server refuses a decision made with the credentials a run holds: the CLI login every agent shell inherits, a daemon’s credential, a token bound to a machine, and an ordinary reliant:api token (who can decide an approval). The only token that can decide is an API token you mint yourself with the approvals:decide scope, not bound to a machine (SDK scopes); whatever holds it can approve, so give it only to software you mean to decide. That reference also explains the shared-key limitation of self-hosted AUTH_MODE=apikey deployments; a shared key is not proof of a human decision.
What this does not do
- Automation runs never wait for approval. They resolve as
unattended, so a gated change in a triggered workflow is never applied. Notify someone instead, and have them start the run. - An approval node carries only a
titleand atimeout. Put the details the approver needs in the run, before the gate. - The built-in agent’s
manualmode asks before every tool call. An approval node asks once, at the point you choose.
Troubleshooting
question has no structured ask_user prompts
question has no structured ask_user prompts
Add
"type":"ask_user" to the ask_question metadata. Validation does not catch this yet.CEL compilation error: undefined field 'denial_reason'
CEL compilation error: undefined field 'denial_reason'
The approval’s declared outputs are
approval_id, status, action_taken and data (nodes reference). Route on status.permission_denied: this credential lacks the approvals:decide scope
permission_denied: this credential lacks the approvals:decide scope
Do not try another workflow-held token or add a scope to bypass the gate. Open the approval in the Reliant app and have a signed-in person choose Approve or Deny (who can decide an approval).
Next steps
Write your first multi-agent workflow
Planner, implementer and reviewer agents in one workflow.
Testing workflows
Scenarios, mocked activities and expectations.
Workflow control
Pause, resume and steer a run.
Node reference
Every field of
approval and ask_question.