Flows
One-click reusable agent pairings — peer review, pipeline, watcher — that spawn wired tiles and ask for a task prompt first.
A flow is a reusable canvas subgraph: a set of agent tiles plus the connections between them, saved as a template and instantiated fresh each time you drop it. Instead of spawning two agents by hand and re-configuring a connection's trigger, transform, and loop-protection settings every time, you pick a flow once and get the whole wired subgraph in one action.
Flows sit at the "quick template" end of MadoHub's orchestration options. Pick a flow for an off-the-shelf pattern, ask MadoAgent (⌘⇧M) when you need custom orchestration, or drag between tiles yourself to wire a one-off connection by hand.
The three built-ins
| Flow | Agents | What it does |
|---|---|---|
| Peer review | Claude "Author" → Codex "Reviewer" | Author writes, reviewer critiques, loops until the reviewer says LGTM. |
| Pipeline | Claude "Stage 1" → Codex "Stage 2" | Stage 1 hands its full output to Stage 2 when it completes. |
| Watcher | Claude "Source" → Codex "Watcher" | Watcher reacts when the source emits a keyword like error, warn, fail, done, complete, review, or help. |
These three are always present and cannot be deleted or overwritten. Dropping one produces exactly what you would get spawning two agent tiles yourself and drawing one connection with that preset's settings.
What you can do with it
- Drop a pre-wired agent pairing in one action — pick a flow, type a task prompt, and the tiles and connections appear already wired.
- Save your own flow — capture every agent tile on the current canvas plus the connections among them as a new flow you can drop later.
- Re-drop to refresh in place — dropping the same flow onto a frame that already hosts a live instance of it refreshes that instance instead of duplicating tiles.
- Wire into existing idle agents — when an idle agent of the right type already exists in the same project, the flow wires into it instead of stacking a duplicate.
- Start with or without a task prompt — send the prompt on kickoff, or just add the empty flow if you prefer to type into each tile yourself.
How to use it
- Open the right drawer's Flows tab.
- Click a flow (built-in or saved). A kickoff dialog asks for the task prompt first.
- Type your task and either:
- Press Cmd+Enter (or click Start with task) to instantiate the flow and send the prompt to its entry agent(s).
- Click Add without task to instantiate the flow with nothing sent.
- Click Cancel to create nothing.
- The flow's entry agent(s) receive your prompt as soon as their CLI reports ready.
To save your own flow, click + Save canvas as flow at the bottom of the Flows panel. Only tiles running a recognised agent (Claude, Codex, Amp, or OpenCode) are captured; a bare shell or untyped tile is skipped. Saving an empty canvas (no recognised agent tiles) is rejected with a toast.
Common use cases
- "Peer-review this PR before I merge." — drop the Peer review flow, type the PR description as the task, and Author and Reviewer loop until
LGTM. - "Generate tests, then run them." — drop the Pipeline flow with Claude generating tests in Stage 1 and Codex running them in Stage 2.
- "Watch the dev server log and tell me when something fails." — drop the Watcher flow pointed at the log; the watcher agent reacts when it sees
error,warn, orfail.
Tips and best practices
- Always send a task prompt on kickoff — without it you land on empty terminals and have to type into each one manually.
- Re-dropping a flow onto its own live instance refreshes it in place instead of duplicating tiles. Use this to restart a flow without scattering duplicates across the canvas.
- If you find yourself re-creating the same multi-tile layout, that is a Workspace Template, not a Flow. Flows are for repeatable two-agent patterns.
- Flows wire into existing idle agents of the right type in the same project when one is available, so you do not have to clean up duplicates first.
Related features
- MadoAgent — custom orchestration in natural language when a flow does not fit.
- Connections — what a flow's triggers and transforms actually do.
- Workspace Templates — snapshots of your whole canvas, not just agent pairings.
- Right Drawer — where the Flows tab lives.
Limitations
- Flows capture only tiles running a recognised agent (Claude, Codex, Amp, OpenCode). Bare shells and untyped tiles are skipped.
- Built-in flows cannot be deleted or overwritten.
- The kickoff waits up to 20 seconds for the entry agent to be detected as ready before writing the prompt anyway; Amp and OpenCode get a fixed 5-second boot grace since they have no frontend ready signal.