Skip to main content
Version: 0.1.151 – 0.1.152

Workflows

A workflow is a process of your own that Repave runs on a feature: agents that do work, checks that run a command such as a scanner, and decisions about what happens next — for example, scan a feature for security issues, have an agent fix what the scan found, and scan again until it is clean. You draw it on a canvas, try it with a test run, publish it, and run it.

Workflows are experimental and off in every project until you turn them on (see Turning workflows on and off). Once they are on, open Workflows under Management in the project sidebar to see the project's workflows: what starts each one, how its last run went and what it cost. A workflow marked Needs an owner's approval to run has a newer version waiting for a project owner (see Approval).

Turning workflows on and off​

In Project Settings → General, tick Allow custom workflows in this project under Custom workflows and choose Save Changes. Workflows appears in the sidebar at once. Anyone who can edit the project's settings can turn workflows on or off.

Turning them off hides Workflows, and the workflow pages and their API answer "Custom workflows are turned off for this project." It also stops what workflows are doing: every run that is running or waiting for someone is cancelled, and a draft Repave is writing stops. When there is anything to stop, Save Changes first says what, for example "2 runs will be cancelled: 1 running and 1 waiting for someone. Their branches are kept.", and saves only on Turn off and save.

Nothing is deleted. Workflows, their versions and drafts, finished runs and every run's branch stay, and are all there again when you turn workflows back on. A cancelled run says who cancelled it.

Creating a workflow​

Choose New workflow. You can describe what it should do, or start from a blank canvas:

  • Describe it (the default): write what the workflow should do in your own words, for example "Scan the feature with Opengrep and gitleaks, fix what they find, and scan again until it is clean. Ask me if it is still dirty after 5 tries." Give it a name and choose Create. The editor opens with Ask Repave beside the canvas, and Repave drafts the workflow (see Ask Repave).
  • Blank: a trigger joined to an end, which you build on the canvas.

Either way the workflow is version 1, and names are unique within a project.

Ask Repave​

Ask Repave, in the editor's header, builds or changes the workflow from what you write: "add a gitleaks scan beside Opengrep", "ask me before fixing more than 10 findings".

  • Repave reads the project's code to choose real commands and paths, and knows the project's skills and its other workflows. It cannot change your code or run anything.
  • When something that changes the workflow's shape is unclear — which scanner, whether to fix or only report, when to stop — Repave asks first. Answer, or choose Let Repave decide, and it drafts with what it decided listed.
  • What it builds lands on the canvas as an unpublished change, with a short summary and its cost. Nothing runs until you review it, try a Test run and Publish. A change that adds what needs an owner's approval still needs it.
  • Everything Repave drafts is checked as Publish checks it. If it cannot draft a workflow that passes, the panel says why and the canvas is left as it was.
  • While Repave works, the canvas cannot be edited; Stop ends its turn and changes nothing.
  • Undo puts the canvas back as it was before Repave's change, until you edit the canvas yourself.

The editor​

The editor is a canvas, read from left to right.

  • Add a node with + at the top right of the canvas. With a node selected, the new node goes after it, between it and the node it led to; a node with nothing after it has its own small +. Search the list by name or description.
  • Connect two nodes by dragging from a node's output port, on its right, to another node. A Router and a Human node have a blue port for each new output.
  • Delete a selected node or edge with Delete or Backspace. The trigger cannot be deleted.
  • Double-click a node to open its details: on the left, every value it can read from the steps before it; in the middle, its settings; on the right, what it produces.
  • Move nodes by dragging them, or choose Tidy layout from the ⋯ menu to lay the whole workflow out from left to right.

Every change is saved as you make it — the header says Saving… and then Saved — but runs keep using the published version until you choose Publish. If the workflow cannot run as drawn, a banner lists every problem, each naming its node, and Publish stays disabled until they are fixed.

The nodes​

NodeWhat it does
AgentAn AI agent with a prompt, skills and tools. It returns a structured result in the shape its output schema gives. Read only agents can only read files.
CheckRuns a command, such as a scanner or a test suite, in the run's branch with no network. The command writes JSON to $REPAVE_OUTPUT.
Sub-workflowRuns another workflow of the project, in this run's branch, and uses its result.
RouterChooses what happens next from earlier results: with Conditions, a short JavaScript function, or Ask AI.
HumanAsks the person who started the run a question; each option is an output.
ParallelStarts several branches at once; a Join waits for all of them.
MapRuns a branch once for each item in a list, such as each finding.
EndEnds the run as succeeded or failed, with a summary.

An Agent's and a Check's output schema is edited as a table of fields: choose Edit schema in the node's details. Every output also has a status and a summary. In prompts, questions and summaries, {{out.code.results}} stands for an earlier result — here, the results of the node code.

Test run​

Test run, at the bottom of the canvas, follows the workflow without running anything: no agent runs, no command runs, and nothing is changed. Each Agent, Check and Sub-workflow returns an example of its output, and each Human node and Ask AI Router its first output. Double-click a node to change what it returns on each visit, then step through the run, step back, or run it to the end. The path taken is drawn on the canvas, and a test run that would hit a limit stops where a real run would.

Export and import​

Export YAML in the ⋯ menu downloads the workflow, so it can be reviewed or kept alongside your code. Import YAML… replaces what the canvas shows with a file you exported; it is saved as an unpublished change, like any other edit.

Approval​

A version that lets the workflow do something new — a new tool or skill for an agent, an agent that can edit files, a changed command, a call to another workflow, higher limits — must be approved by a project owner before it runs. The editor says what changed, for example "Version 2 changes the ‘Opengrep’ command.", and runs keep using the last approved version until an owner chooses Approve version 2. A version published by an owner, or one that only changes prompts, schemas, conditions or layout, needs no approval.

Running a workflow​

Choose Run, pick the feature it works on, and choose Run. A feature that has no branch yet is listed but cannot be chosen until it has been implemented. Each run works on a new branch of its own, cut from the feature's branch, so it never changes the feature while it works.

The run opens on the Runs tab, which lists the workflow's runs, newest first, and shows the selected one on the canvas as it goes: each node it reached, how many times, and the path it took. Double-click a node to see that step's input and output; for an Agent, Session opens the agent's conversation.

  • Waiting for you: a Human node, or an Ask AI Router that could not decide, asks a question in a banner over the canvas. Choose an answer to carry on.
  • Cancel run stops the run. Changes made so far stay on the run's branch.
  • When a run ends, the banner says why, and where its changes are. From there you can Open in Repave IDE to look at the branch, Retry from the step it ended on, or Discard branch… to delete the branch and everything on it.

Who can do what​

Everyone on the project can open workflows, read them and follow their runs. Only someone who can edit the project can change, publish, test, run or delete a workflow, ask Repave to change it, or answer a run's question; only a project owner can approve a version.