DocsWorkflows

The workflow editor

A reference for every switch, menu and field in the Behaviors tab and the Agent Mode workflow bar.

Workflows are edited in the Behaviors tab and run from the workflow bar in Agent Mode. This page lists every control in both, in the order you meet them. To learn by doing, follow Your first workflow. For the JSON files behind the editor, see Profiles & workflows.

Note

A workflow is a graph of steps. A profile says what one agent step may do: its instructions, tools, limits, rules and completion checks. A workflow step names a profile. The two live side by side in the editor and are saved as .rusty/workflows/<id>.json and .rusty/profiles/<id>.json.

The workflow bar in Agent Mode

The bar sits above the message box. It decides what the chat follows and shows a run's progress.

Control What it does
Mode menu Chooses what the chat follows. Single agent is one loop that decides its own path. Auto lets Rusty choose for each message. Every other entry is a workflow, labelled Stage: (a short run that stops at a written result) or Workflow: (a whole job). Your own workflows are listed here too.
Auto entry Appears only when OpenRouter and a decision model are connected. Otherwise a chat that already used it shows Auto (needs OpenRouter and a JEV model). See Auto flows.
Name chip, × Shows the workflow the chat follows. The × (Stop following this workflow) returns the chat to Single agent. It disappears while a run is going.
Step list The steps in the order they run, with each one's state: not run, running, waiting for permission, waiting for your answer, retrying, done or failed. A ×2 beside a step means its second attempt. Hover a step for its message.
Summary text While running, for example Running step 2 of 4: Build, with (waiting for permission), (waiting for your answer) or (attempt 2) when it applies.
Allow flow switching A checkbox, shown when the chat follows a workflow or Auto. When on, Rusty checks after each step whether what it found means another workflow is the right one, and hands over with the work so far. It does not ask first; when the new workflow can change files, the chat says so. It is greyed while a run is going. See Auto flows.
Auto mode A checkbox, always shown and never greyed. When on, nothing waits for you: approval steps (including those marked Always ask a person) are approved, a stuck task is tried once more and then skipped, and commands and questions are answered for you. It applies to every chat at once and is remembered. See Auto mode.
No-activity notice Appears after a minute without any sign of life from the running step, with how long it has been quiet and Stop workflow. When the workflow has a stall timeout, it also says when the step will be cancelled and retried. Waiting for your permission or your answer does not count.
Chevron Hides or shows the bar. Hidden, it keeps a one-line summary. Rusty remembers your choice.

The approval card

When a step needs you, a card opens between the bar and the message box, headed needs your answer. It shows the step's question, the result to review (rendered as Markdown; a list such as the manual checks reads as one block per item), a Notes box and the step's buttons. The workflow waits for your answer.

Card Buttons
An approval step, such as Plan approval or Manual checks Approve, Request changes (needs notes; offered until the step's change limit is reached) and Reject.
A stuck task in a task queue Try again, Skip this task, Revise the plan (needs notes; offered when an agent step wrote the plan) and Stop.

Your answer is logged in the chat, for example Your answer to Plan approval: approve (use the existing helper). What each button does is described in How workflows work.

While a run is going the Mode menu is locked. While a chat follows a workflow, the skill menu stays on build and reads tools set per step; see What each step can do.

The Behaviors tab

Open Behaviors in the left rail. It has a toolbar, a list on the left, a canvas in the middle and an inspector on the right. Edits are validated as you make them, and nothing is written to disk until you save.

Toolbar

Control What it does
Workflows / Profiles The switch at the top left. It changes what the list, the canvas and the buttons mean.
Breadcrumb Where you are. When you open a step's profile, it reads workflow › step › profile, and clicking the workflow or step returns you.
Run in Agent Mode Workflows view only. Saves the workflow if needed, selects it in Agent Mode and opens the chat; your next message there runs it with that chat's model and tools. If the workflow has a blocking problem it says so and does not run.
New workflow / New profile Asks for an Id and creates a file. Ids use lowercase letters, digits, dots, dashes and underscores, must be unused, and cannot start with rusty. (reserved). The new file is saved when you save.
Save N / Saved Writes every changed file. It reads Saved and is disabled when nothing is unsaved. ⌘ S does the same. Rusty saves with a note if validation found problems. New agent sessions in the workspace pick the changes up.

New workflow depends on what is selected. With a built-in workflow selected, it makes an independent copy of it, with revision 1 and the id as its name. With one of your own selected, or nothing, it starts from a small blank flow: Input → Execute → Verify → Output, where Execute and Verify are both agent steps and Verify is told not to edit files.

The list

In Workflows, the list shows the 15 built-ins (tagged Built-in) followed by your own. In Profiles, it shows Workspace profiles first and the Built-in profiles after.

Mark Meaning
Dot The file has unsaved changes.
Red dot The file has a validation problem. Hover for the reason.
Built-in Read-only, shipped with Rusty, available in every project.
default The profile new sessions run under.

If a file in .rusty/ cannot be read, a warning under the list names it.

The workflow canvas

Each step is a node and each connection an edge. Steps show the state of their latest run, and a badge above the canvas summarizes it: Running in Agent Mode…, Last run completed, Last run failed or Last run cancelled.

Control What it does
Input, Agent, Verify, Approval, Subflow, Output Add a step of that kind. Its id is the kind (approval, then approval_2, …). Disabled on a built-in workflow.
Drag a step Moves it. Positions are saved in the file but ignored by the engine.
Drag from a step's right handle to another step Connects them with a succeeds edge.
Click a step or an edge Selects it and shows its settings in the inspector.
Double-click an agent step Opens its profile.
Click the empty canvas Selects the workflow itself.
Open profile (in a step's inspector) Drills into that step's profile.

Loops are drawn as dotted lines below the cards: a Verify step with a retry target draws a retry line back to that step, and an Approval step draws a changes line back to where requested changes go. Nested loops run in separate lanes so they never cross. An edge that fires on failure is red, dashed and labelled on failure.

Each card summarizes its step: its kind and id; for an agent step its tools, the start of its instructions and its profile; for a verify step its number of checks and the step it retries; for an approval step the step it reviews, where changes go, whether auto-approve is allowed, and revise first when notes revise the result; for a subflow the workflow it runs, or a step and that step's instructions.

When you connect two steps and the second step's Response format is Text / Markdown, Rusty also passes the first step's final message to it. Deleting the edge takes that back.

The inspector

At the top: the selection's name, and three buttons. Edit as JSON (Show form to go back) swaps the form for the raw document. Revert unsaved changes undoes your edits since the last save. Delete file removes the file from disk after a confirmation. For a built-in, only the JSON toggle is available and the form is read-only, with Customize a copy at the top. Drag the divider between the canvas and the inspector to resize it.

Workflow settings

Select nothing on the canvas to edit the workflow itself.

Field Meaning
Name and Description How the workflow is listed. The description is what you read when you hover the Mode menu's summary.
Revision A number you bump as you change it.
Status Draft, Published or Deprecated.
Optional limits Budgets for the whole run. Leave a field empty for no limit.
Advanced data contracts Output contract (optional: by default the result is the text of the Output step; set it only to check the result against a schema) and Input schema, as JSON. Rarely needed.

The limits are Steps, Total attempts, Duration (seconds), Stall timeout (seconds), Model requests, Tool calls, Tokens and Cost (USD). The stall timeout cancels and retries a step that shows no sign of life for that long; time spent waiting for your permission or answer does not count. The built-in workflows set Total attempts to 40 and Stall timeout to 600 seconds. You can stop a running workflow at any time regardless. See Limits.

Steps

Select a step to edit it. Every step has a Name and a read-only Id, and at the bottom:

Field Meaning
Attempts How many times the step may run, 1 to 10. One by default; raise it to allow retries after a failure such as a rate limit, and on any step a Verify step sends work back to. Which failures may use the attempts is the step's retry_on list, set with Edit as JSON; a retry target must list verification_failed.
Timeout (seconds) Stops the step after this long. Empty means no limit.
Advanced data mapping Input bindings and Output schema as JSON, for data a form cannot express.
Delete step Removes the step and every edge touching it.

Agent steps

The step that does the work.

Field Meaning
Profile How the step's agent behaves. Session default means no profile: the chat's own settings apply. A name followed by (missing) means the file is gone.
Open profile / Design a profile for this step Opens the profile, or creates a new one named after the step and assigns it.
Instructions What this step should do, added to the request.
Run the plan as a task queue Builds the plan bound to the step one task at a time: each task in a fresh builder session, checked by a read-only reviewer, and saved once accepted. Ticking it fills in Task queue and reviewer (JSON) with the defaults the built-ins use: plan_pointer (where the plan is bound, for example /plan), review_profile, review_instructions, max_repairs (2) and on_task_failure (ask; also skip or stop). An optional flows map names workflows a planned task may run instead of a builder. Four built-in pipelines use it. See Task queues.
Context from earlier steps Text steps only. Tick the Original request and any earlier step whose final message this step should receive.
Tools Everything the session has, Only these tools (with a searchable checklist) or No tools.
Context Isolated: a fresh session that inherits your workspace, model and permissions. Keep it on Isolated: the Shared session option is listed, but the engine does not support it yet and a step set to it fails.
Model A model for this step, or empty for the session's. With automatic model selection on, an empty field lets Rusty rate the step.
Response format Text / Markdown passes the final message straight to the next step. Require the provider's structured output, Provider's, else host validation and JSON with host validation return a checked JSON result, shaped by the step's Output schema, that a Verify step can test. JSON with host validation is the one that works with every provider; the model answers in Markdown sections and Rusty reads them into the schema. Changing the format resets the output schema.

Verify steps

A check on an earlier step's result.

Field Meaning
Checks A JSON list. {"type": "criteria", "pointer": "/check/criteria"} judges a list of {id, status, evidence} criterion by criterion: fail sends the work back, manual moves on and is listed for an approval step; add "plan_pointer": "/plan" to require every criterion of a bound plan. {"type": "schema"} checks the shape. {"type": "required_status", "pointer": "/status", "equals": "done"} requires a field to have a value. {"type": "artifact_exists", "pointer": "/path"} requires a field to be present and not empty, and artifacts_resolvable checks that listed files really exist. A check reads what is bound to the step, so set Input bindings under Advanced data mapping.
On failure, retry Choose a step to re-run, with the failure as feedback, or Nothing (follow on_failure edges). Set it, and give the retried step more Attempts and verification_failed in its retry_on, to make a loop. The step must be an agent step that runs before this one.

Approval steps

A point where the run waits for you. See Approval for what each answer does.

Field Meaning
Review the result of The earlier step whose result the card shows. A new approval step starts on the latest agent step.
Question Shown above the result. Empty uses Review before the workflow continues.
Requested changes go to The step being reviewed, or another agent step that runs earlier. That step runs again with your notes, and so does every step in between.
Times changes may be asked for 0 to 10, 5 by default. After that, the card offers only Approve and Reject.
Skip when empty at A JSON pointer into what is reviewed. When nothing is there (missing, empty text, empty list), the step passes without asking. Empty means never skip.
Always ask a person, even when the run auto-approves The run does not pass the step by itself. Auto mode still approves it, since in auto mode nobody is asked.
Notes given with an approval revise the result first Approve with notes sends the notes back like Request changes, and once the result is revised the approval stands without asking again. Off, notes are only recorded in the approval's result.

Subflow steps

Runs another workflow, or one extra step, inside this one. See Subflow.

Field Meaning
Run A single step or A saved workflow.
Workflow For a saved workflow: any workflow in the list except this one, including the built-in ones under their full ids (rusty-ide.builtin.…). A name followed by (not found) no longer exists.
Profile and Instructions For a single step: the profile it runs under and what it should do.

Whatever is bound to the step (Advanced data mapping, Input bindings) is the child run's whole input; the built-in workflows read request and context, so bind both. The child's result is this step's result.

Input and Output steps

Input receives the run input: request, context and attachments. Input defaults supplies values for fields the run input does not carry; they reach steps that read the Input step's result, not steps that read the run input directly. Output picks the result: Show the final message from a step. Advanced source mapping sets it as JSON, for example with "pointer": "/summary" to show one field of a structured result.

Edges

Follow when the source step is succeeds for the normal path or fails to route a failure somewhere else. A step has exactly one succeeds edge (except an Output step, which has none) and at most one fails edge, and edges cannot form a cycle: use a Verify step's retry target or an Approval step for loops. Delete edge removes it. Deleting a succeeds edge into a Text / Markdown agent step also removes the input that connecting it added.

Profiles

Switch to Profiles. The canvas shows each profile as a node, with switch_profile rules drawn as edges. Drag from one profile's right handle to another to add a rule that switches to it after three turns, then click the edge to edit that rule. Built-in profiles are read-only, so connect from one of yours.

Profile settings

Section Fields
Profile Name, Description, Revision, Status. Sessions load published profiles by default; a workflow run also uses drafts. Make workspace default makes new sessions run under this profile (Workspace default ✓ when it is).
Instructions Mode: Append to the system prompt or Replace the system prompt. Text.
Tools Available tools: Everything the session has, Only these tools or No tools. Under Per-tool settings, choose a tool to set its Permission (Session default, Allow if session permits, Ask before running, Deny) and Extra instructions the model reads about that tool.
Model and limits Model, Reasoning effort (Low, Medium, High), Max turns, Max tool calls, and Final turn prompt, sent on the last allowed turn.
Rules See below.
Completion gate See below.
Child agents Subagents inherit this profile. Other policies are not supported by the current engine and are kept untouched if a file has one.

A profile that allows only some tools can never use the rest. The checklist also lists tools that follow another: Edit Part of a File follows Write Files, and Run Project Checks and Install Dependencies follow Run Commands. Anything written for the main tool applies to the follower, so a read-only profile stays read-only. See Profiles & workflows.

Rules

A rule reacts to an event with an action. Rules are grouped by the event they run on. Pick an event and an action next to Add rule, then click it, and open the new rule to edit it.

Field Meaning
Rule id A name for the rule.
Runs on The event: RunStart (once), BeforeModelRequest (every request), PreToolUse (before a tool runs), PostToolUse (after it succeeds), PostToolUseFailure (after it fails), ProfileEntered (when a switch lands here).
Action inject adds text to the model's context. deny blocks a tool call with a reason the model sees. ask asks you first. allow runs it without asking. stop_run ends the run with a reason. switch_profile hands over to another profile. rewrite_args changes a call's arguments. rewrite_result appends to or replaces a tool's result. A menu entry reads (not for …) when the action does not fit the event.
Max fires The most times the rule may trigger. Empty is unlimited.
When this rule applies An optional condition. See below.

Conditions narrow when a rule or check applies:

Condition True when
Tool matches The tool is one you tick.
Tool argument matches An argument, found by its path such as /path, matches a pattern, contains text or equals a value.
Tool result contains text The result includes the text.
Turn number The turn count is exactly, at least or at most a number.
Tool call count The chosen tools have been called that many times.
Turns since a tool ran That many turns have passed since the chosen tools last ran.
Tools run after another tool After the first tools ran, the second tools ran afterwards.
A tool is available to the agent The tool was offered on the latest request.
Repeated identical calls The same call happened that many times.
Previous profile The run arrived from one of the profiles you tick.
All conditions, Any condition, Condition is not met Combine other conditions.

The counting conditions can be limited to calls that Ran (any result), Succeeded, or Failed.

Completion gate

Checks that run when the model says it is done. A failed check sends its Feedback back and the agent keeps working, up to Additional attempts. If checks still fail is Fail the run or Finish with checks not passed.

Each check has a Check name, a method, and Feedback when this check fails:

Method What it does
Check tool activity Passes when a condition holds, such as Tool call count of Read Files at least 1.
Run a tool Runs a tool you choose with arguments you set.
Ask a model A model reads recent messages against your Review instructions.
Ask a reviewer agent A reviewer agent with its own tools and Reviewer turn limit inspects the work.
Run a command Runs a command. Only when the session trusts profile commands.

For the model, agent and command methods, If the reviewer errors chooses whether an error counts as a failure or a pass. Add check, Remove check and Remove completion gate edit the list.

Tips

  • Click Edit as JSON when the form has no field for what you need. Fields the form does not know are kept when you save.
  • Bump Revision when you change a file you have already run, so you can tell versions apart.
  • Keep Feedback specific. It is the message the agent acts on.
  • Do not rely on an instruction alone to keep a step from writing. Give it a profile whose tool list leaves out Write Files.
Esc

Type to search the docs.