---
title: "Orrery Studio Part 5: Multi-Agent Workflow Patterns on a Canvas"
url: "https://tirraflow.com/posts/orrery-studio-part-5-multi-agent-workflow-patterns-on-a-canvas"
author: "taoufiq"
published: "2026-10-25T13:05:49Z"
updated: "2026-10-25T13:03:49Z"
category: "AI Agents"
difficulty: "advanced"
series: "Orrery Studio"
series_part: 5
series_url: "https://tirraflow.com/series/orrery-studio"
tags: ["Agents", "ADK", "Python"]
---

# Orrery Studio Part 5: Multi-Agent Workflow Patterns on a Canvas

> **Status, October 2026:** Orrery 0.10.0's server runs all eight patterns below. Its console still treats only the pipeline as ready and marks the others "needs P0b"; a tested spec imported from `deploy/studio-demo/specs/` runs with _Run anyway_. In the lab, every node uses one model and runs aren't stored.

Multi-agent workflow patterns are the shapes you wire agents into: a pipeline, a router, a critic loop, parallel branches, a supervisor. These agent orchestration patterns ship with Orrery as eight tested specs, ready to import. This part shows each one, how it compiles to a Google ADK workflow, and the limits that stop a loop of agents from running away with your budget.

---

## Eight Patterns, One Canvas

![Eight multi-agent workflow patterns in Orrery Studio: pipeline, router, critic loop, fan-out fan-in, supervisor, debate, map-reduce, and plan and execute, each as a small graph](https://tirraflow.com/uploads/a1eb87c3-530f-4803-ba28-f083939c17d3.png)

They're built from four kinds of connection:

- **Sequence:** an edge from one node to the next. _Pipeline._
- **Choice:** a node answers with a label, and edges marked `when` pick the branch. _Router, critic loop._
- **Parallel:** a `parallel` node starts 2 to 6 branches at once, and a `join` waits for all of them. _Fan-out/fan-in, debate, map-reduce._
- **Delegation:** a `supervisor` holds other agents as tools and decides when to call them. _Supervisor, plan and execute._

---

## How a Pattern Becomes Code

Every spec compiles to one ADK 2.x `Workflow`. The interesting parts:

- **Labels are structured output.** A node with `output.labels` must answer `{label, answer}`. A small function node reads the label and routes. An answer without a valid label fails the run, rather than taking an arbitrary branch.
- **Loops count themselves.** A back edge with `max_iterations` gets a counter. When the cap is hit, the branch ends with the last draft, not the critic's rejection, so the run still succeeds.
- **A join lays answers out.** After ADK's `JoinNode`, each branch's answer becomes a `## branch` section, so the next node reads them in a fixed order.
- **Supervisor helpers are tools.** Each child is wrapped as an ADK `AgentTool`, traced on its own and counted as a delegation.

![Orrery Studio run panel after a critic loop run: every node done, budgets used, and a timeline with node, MCP call, A2A message, route decision and loop iteration events](https://tirraflow.com/uploads/1fc32e8f-6fd4-4dbe-836e-497706c9a4cb.png)

Above, the console after a release-notes critic loop, shown with sample run data: the critic rejects the first draft, the writer goes round once more, and the second draft passes. The red badge is the console gap from the status note; the server accepts the loop.

---

## The Rules That Keep It Bounded

Agents calling agents can loop, fan out and spend tokens faster than anyone notices. So a spec is checked before any model is called:

- at most **30 nodes**, and **2 to 6** parallel branches;
- every cycle needs `max_iterations`, at most **5**;
- loops nest at most **2 deep**, because inner caps multiply: two levels already allow 36 passes;
- supervisors nest at most **3 deep**, one parent each;
- **no loop around a parallel section**.

That last rule came from review. ADK's `JoinNode` doesn't reset between rounds: on the second round it still remembered round one, so it fired early with stale answers. The Studio refuses the shape instead of compiling something subtly wrong. Loop before the `parallel`, or after the join.

---

## One Budget for the Whole Run

On top of the shape rules, one ledger covers every node. Whichever limit runs out first ends the run with a `budget.hit` event:

| Budget | Default ceiling | Catches |
| --- | --- | --- |
| Tokens | 200,000 | cost |
| Tool calls | 60 | a node stuck retrying a tool |
| Delegations | 20 | a supervisor that never decides (remote A2A calls count here too) |
| Remote A2A calls | 20 | ping-pong with a remote agent |
| Deadline | 300 s | everything else |

A spec may ask for less, never more. The person's daily token budget still applies on top.

---

## Comparing Patterns and Models

A node may name its own model from the operator's allowlist. It then runs that model alone, without the deployment's fallback chain, so a comparison is honest: if the chosen model fails, you see it fail. The console's history keeps a tab's runs and puts two side by side, for pattern A against pattern B, or model A against model B.

In the lab, per-node models are off: every node runs Claude Haiku 5.5, and the console's history lives in the browser tab.

![Orrery Studio template gallery with ten pattern templates, the pipeline and release-notes demos ready and the others marked needs P0b](https://tirraflow.com/uploads/93a1f681-715d-43dc-a58d-645a05d37909.png)

Next: [Part 6, running it in production](https://tirraflow.com/posts/orrery-studio-part-6-self-hosting-ai-agents-with-docker-compose).
