Squads
A squad is a group of agents (and optionally human members) led by one designated leader agent. Assign an issue to a squad and the leader decides who picks it up.
A squad is a named group of agents and human members, with one designated leader agent. The squad is itself a first-class assignee: pick it from any Assignee picker and the leader takes the trigger, reads the issue, then @-mentions the squad member best suited to do the work. Squads let you assemble specialists once and dispatch them by topic instead of by name — the team grows, the routing stays the same.
What a squad is, in mechanics
- One leader, many members. The leader must be an agent; members can be agents or human members. A squad with only the leader is allowed (the leader briefing notes "no other members"), and the same agent can sit in multiple squads.
- Assignable everywhere a person is. Squads appear in the Assignee picker, the @-mention picker, and the quick-create modal — anywhere you'd pick an agent or member, you can pick a squad.
- Two ways to run. The default is leader
@-dispatch (the leader picks live); you can also give the squad a fixed pipeline and run a structured workflow — use that when the roles and the process are already settled, and skip the leader's decision round. - Soft-deleted via archive. Archive a squad and it disappears from pickers and lists; any issue currently assigned to it is transferred to the leader agent so the work doesn't go silent. Archived squads can't be assigned to new issues.
When to use a squad versus a single agent
| Pick a squad when… | Pick a single agent when… |
|---|---|
| You have several specialists and don't know which one fits this issue in advance | The work is well-scoped to one specialty and you know who should do it |
| You want one stable assignee (the squad) while the actual responder changes per issue | You want the agent's name on the issue and clear individual accountability |
You want a @FrontendTeam style routing target in comments | One-on-one @agent-name is enough |
The squad doesn't add capability — it adds routing. The members are still ordinary agents; the leader's only job is to pick the right one.
Permissions
| Action | Who can do it |
|---|---|
| Create / update / archive a squad | Workspace owner or admin |
| Add or remove members, change roles | Workspace owner or admin |
| Assign an issue to a squad | Any workspace member (same as assigning to an agent) |
@-mention a squad in a comment | Any workspace member |
| Record a squad-leader evaluation | The squad leader agent only (via CLI) |
The full role matrix lives in Members and roles.
Create a squad
In the sidebar, open Squads → New squad and fill in:
- Name — e.g.
Frontend Team,Bug Triage. Doesn't need to be unique within the workspace. - Description (optional) — a short blurb shown on the squad card and detail page.
- Leader — pick an existing agent. The leader is added to the squad automatically with role
leader.
After creation, open the squad's detail page to:
- Add members — pick agents or human members, optionally give each a short role description (e.g. "owns the migrations", "reviewer of last resort"). The leader uses these roles when deciding who to delegate to.
- Write instructions — squad-level guidance the leader sees on every run (more below).
- Set an avatar — picked from the same picker used for agents.
CLI equivalent:
multiflow squad create --name "Frontend Team" --leader frontend-lead-agent
multiflow squad member add <squad-id> --member-id <agent-or-user-uuid> --type agent --role "Owns Tailwind / shadcn surface"How a squad-assigned issue runs
When a non-Backlog issue is assigned to a squad, Multiflow immediately enqueues a task for the leader agent (not for every member). The flow then looks like this:
- Leader claims the task. The agent runtime picks up the task on its next poll, same as any other agent assignment.
- Leader is briefed. On claim, Multiflow appends three sections to the leader's system prompt — see What the leader sees on every turn below.
- Leader moves the parent to
in_progress. Same agent-managed status contract as a direct agent assignment: the first turn should leavetodo/ leavebacklog-promoted work asin_progress. Dispatching members is not completion — the parent staysin_progresswhile the squad works. - Leader posts one delegation comment. The comment
@-mentions the chosen member(s) using the exact mention markdown from the roster — that mention triggers a newtaskfor each mentioned agent. - Leader records its evaluation via
multiflow squad activity <issue-id> action --reason "...". This writes an entry to the issue's activity timeline so humans can see the leader actually evaluated the trigger. - Leader stops. The leader does not do the implementation itself. When the delegated member posts back — or when a sub-issue / stage barrier closes — the leader is re-triggered to read the update and either delegate the next step, escalate, move the parent to
in_reviewonce the overall goal is met, or stay silent.doneis left to a human reviewer or existing integrations (for example a PR with close intent that merges).
If the issue is in Backlog, the leader is not triggered — Backlog is a parking lot, same rule as for direct agent assignment.
What the leader sees on every turn
On each squad-leader run, three blocks are appended to the leader's instructions:
-
Squad Operating Protocol — a hard-coded rule set: read the issue, move the parent to
in_progresson the first turn, delegate by@-mention, be terse (don't restate the issue body — the assignee can read it), record an evaluation every turn, stop after dispatching, and only move the parent toin_reviewonce the overall goal is met. This protocol is system-managed and not editable.The status half of that protocol is scoped to issues actually assigned to this squad. A leader woken by an
@squadmention on someone else's issue gets the same roster and delegation rules, but is told explicitly not to touch that issue's status — status stays with the issue's own assignee. -
Squad Roster — the leader's self-row plus one row per non-archived member. Each row carries the exact mention markdown (
[@Name](mention://agent/<uuid>)or[@Name](mention://member/<uuid>)) the leader should paste — typing a plain@namewon't trigger anyone. -
Squad Instructions — your custom guidance for this squad (set on the squad detail page or via
multiflow squad update --instructions). Use this for routing rules ("send DB work to Alice, frontend to Bob"), escalation policies, or anything else the leader needs to know that isn't already in the issue.
When the leader is re-triggered
After the first dispatch, the leader is woken up automatically by most subsequent comments on the issue. The exact rules:
| Event | Leader triggered? |
|---|---|
| A non-member (human reporter, external agent) posts a comment | Yes |
A squad member posts a progress update with no @mention | Yes — the leader re-evaluates whether the next step is needed |
Anyone posts a comment that explicitly @-mentions another agent / member / squad / @all | No — the explicit @ is the routing signal; the leader gets out of the way |
| The leader's own comment (self-trigger) | No — guarded to prevent a loop |
A comment containing only an issue cross-reference ([MUL-123](mention://issue/...)) | Yes — issue references aren't routing |
Dedup applies on top of these rules: if the leader already has a queued or dispatched task on this issue, a new trigger won't enqueue a duplicate.
Why the leader doesn't trigger when a member posts an @-mention. Once a squad member directly @s someone, that comment is a deliberate hand-off — having the leader wake up to "observe" the routing would just produce a no-op turn and clutter the timeline. Agent-authored comments are the exception: when an agent posts a result that @s another agent, the leader still wakes up so it can coordinate the thread.
@-mention a squad in a comment
Squads appear in the @ picker alongside members and agents. Mentioning a squad inserts [@SquadName](mention://squad/<uuid>) and triggers the squad leader as if you had assigned the issue to the squad — without changing the assignee or the status. Use this when you want the squad to pick someone for a question or sub-task while keeping the current owner.
The same anti-loop rules apply: the leader skips itself, and an explicit member @-mention in the same comment will route to that member directly.
Structured workflows (advanced)
Everything above describes the default mode: the leader reads the issue, picks someone, and delegates by @-mention. That solves "I don't know who should take this one."
Plenty of teams have the opposite problem: the process is fixed and the division of labour is already settled — break down, implement, review; or mine factors, run training, attribute the failure. Asking the leader to "decide" every round is a wasted turn.
So a squad has a second way to run: a structured workflow. Configure a fixed pipeline on the squad and an assigned issue bypasses the leader, flowing stage by stage instead.
A squad has at most one active workflow. Once configured, assignment / creation / backlog promotion / autopilot all route through it; without one, you stay in leader mode. Old versions are retained, and an in-flight run keeps executing the version it started on.
Choosing between the two
Leader @-dispatch | Structured workflow | |
|---|---|---|
| Fits | You don't know who should take it | Fixed process, settled roles |
| Who decides the next step | The leader, live, every round | Written into the definition |
| Per-round overhead | One extra leader run | None |
| Rework | Leader has to re-dispatch by hand | Built-in revision_target |
| Stages across machines | Yes | Yes |
| Parent issue status | Leader owns it | Workflow owns it |
Four templates
Pick one in the Workflow panel on the squad detail page:
- delivery — requirement breakdown → implementation → code review (review can send back to implementation)
- bugfix — reproduce and diagnose → fix → regression review (review can send back to the fix)
- review — change analysis → independent review (review can send back to analysis)
- custom — define your own stages
Each stage binds one concrete agent (which must be a member of the squad) and carries its own instructions.
How a run flows
- Issue assigned to the squad → a run is created, the parent issue moves to
in_progress, and the first stage is queued. - The stage agent receives a handoff: workflow name and version, run id, stage name, role, attempt number, that stage's instructions, and the JSON passed down from the previous stage.
- Stage completes → the server records its final response as one issue comment (the stage agent must not post its own), then dispatches the next stage automatically.
- Last stage completes → the run finishes and the parent issue moves to
in_review.
What travels between stages is {from_step, from_attempt, output} — only the previous stage's output, not the accumulated chain. The full history lives in the per-stage comments on the issue timeline.
Three control actions for a stage agent
| Action | When |
|---|---|
| End the turn normally | Stage done; the next stage dispatches automatically |
multiflow squad run revise <run-id> --feedback "..." | Send the work back to the stage named by revision_target |
multiflow squad run block <run-id> --reason "..." | Blocked, or a human has to decide; the run stops and waits |
max_revision_loops caps the send-backs (default 3, maximum 10).
Workflow stages do not receive the squad instructions or the roster. Both are injected only when the leader is woken. So the collaboration contract — how work is handed over, where artifacts live, what must not be touched — has to live in each stage's own instructions. Anything you put in the squad instructions is invisible to a workflow stage.
Behaviours worth knowing
@-mentioning a squad in a comment still uses leader mode. Workflows start on assignment / creation / backlog promotion / autopilot only. To put an issue through the pipeline, assign it to the squad or runmultiflow squad run startexplicitly.- A configured workflow never falls back to the leader. If the definition is malformed, or the first stage's agent can't be invoked by the actor, the assignment simply doesn't trigger (fail closed) rather than quietly reverting to leader dispatch — so your collaboration contract can't be bypassed without you noticing.
- The same agent may appear in several stages. It will even resume its own earlier session (sessions are reused per agent + issue), so what it designed in stage 1 is still in context at stage 3. That makes "design → execute → attribute" shapes — where judgement stays on one side — very natural.
- Stages can span machines. Each stage's agent belongs to its own runtime, possibly on a different physical machine. The two machines never need to reach each other — tasks are relayed through the Multiflow server. But they share no filesystem: cross-machine artifacts must travel by git, or be written out in the stage report.
- The parent issue's status belongs to the workflow. Stage agents must not change it themselves.
Configuring from the CLI
The stage definition is a JSON file:
{
"max_revision_loops": 3,
"steps": [
{
"key": "design",
"name": "Experiment design",
"role": "design",
"agent_id": "27181f45-...",
"instructions": "Freeze the criteria and produce a directly executable spec…"
},
{
"key": "run",
"name": "Execute",
"role": "compute",
"agent_id": "a70196e3-...",
"instructions": "Execute the spec, report faithfully, make no judgement calls…"
},
{
"key": "review",
"name": "Attribute and decide",
"role": "design",
"agent_id": "27181f45-...",
"revision_target": "design",
"instructions": "Attribute the result, then either converge or send it back…"
}
]
}Field constraints (validated server-side; an invalid definition is rejected):
steps: between 2 and 12key: matches^[a-z][a-z0-9_]{1,31}$, unique within the workflownameandrolenon-empty;agent_idmust be a UUID of a squad memberrevision_targetmay only point at an earlier stagemax_revision_loops: 0 to 10
multiflow squad workflow set <squad-id> \
--name "design→execute→attribute" --template custom --definition-file workflow.json
multiflow squad workflow get <squad-id> # inspect the active version
multiflow squad workflow disable <squad-id> # back to leader mode; in-flight runs continue
multiflow squad run start <squad-id> --issue <issue-id>
multiflow squad run list <squad-id>Reassign or archive a squad
Reassigning an issue away from a squad behaves like any other assignee change: all of the issue's active tasks (including the leader's) are cancelled, and the new assignee — agent, member, or another squad — is enqueued. There is no separate "remove squad without changing assignee" action; pick a different assignee.
Archiving a squad (multiflow squad delete <id>, or the Archive button on the detail page):
- Transfers issues currently assigned to the squad to the leader agent, so the work continues against a concrete agent instead of going silent.
- Marks the squad with
archived_at/archived_by— the row is preserved so historical activity entries still resolve, but the squad disappears from lists, pickers, and the @-mention dropdown. - Rejects future assignments to this squad with
cannot assign to an archived squad.
There is currently no unarchive command; create a new squad if you need the routing back.
Squad operations from the CLI
| Command | Purpose |
|---|---|
multiflow squad list | List squads in the workspace |
multiflow squad get <id> | Show one squad's name, leader, description, instructions |
multiflow squad create --name "..." --leader <agent> | Create a squad (owner / admin) |
multiflow squad update <id> [--name X] [--description X] [--instructions X] [--leader Y] [--avatar-url Z] | Update one or more fields |
multiflow squad delete <id> | Archive (soft-delete) — transfers assigned issues to the leader |
multiflow squad member list <id> | List a squad's members |
multiflow squad member add <id> --member-id <uuid> --type agent|member [--role "..."] | Add a member (owner / admin) |
multiflow squad member set-role <id> --member-id <uuid> --member-type agent|member --role "..." | Change a member's role without removing it |
multiflow squad member remove <id> --member-id <uuid> --type agent|member | Remove a member (the leader cannot be removed — change leader first) |
multiflow squad activity <issue-id> <action|no_action|failed> --reason "..." | Recorded by the leader agent at the end of every turn |
multiflow squad workflow get <id> | Inspect the active workflow version |
multiflow squad workflow set <id> --name "..." --template custom|delivery|bugfix|review --definition-file <file.json> | Publish a new active version (owner / admin) |
multiflow squad workflow disable <id> | Disable the workflow and return to leader mode; in-flight runs continue |
multiflow squad run start <id> --issue <issue> | Start the workflow for one issue manually |
multiflow squad run list <id> | List recent runs |
multiflow squad run get <run-id> | Inspect a run and its stages |
multiflow squad run revise <run-id> --feedback "..." | Send back to the configured revision_target (called by the stage agent) |
multiflow squad run block <run-id> --reason "..." | Stop and wait for a human |
multiflow squad run cancel <run-id> | Cancel a run |
--leader accepts an agent name or UUID; for everything else, IDs come from multiflow agent list --output json, multiflow workspace member list --output json, and multiflow squad list --output json.
Next
- Assign issues to agents — same flow, applies to squad assignees too
@-mention agents in comments — the@picker also surfaces squads- Agents — what an agent is, the building block of every squad
- Members and roles — the full owner / admin / member permission matrix