Squads — Multi-Agent Routing with Leader Delegation
Why
Teams want to assign work to groups, not individuals. @FrontendTeam instead of picking an agent manually. The leader agent decides who picks it up based on availability and expertise. This is the #1 feature Multica has that we do not.
Concept
- A Squad is a group of agents (+ optional humans) under a leader agent
- Work is assigned to the squad, not to an individual agent
- The leader agent receives the assignment and delegates to the best-fit member
- Squad members can be agents or humans (human members get notified)
- Squads have their own instructions/context for the leader
DB Schema
CREATE TABLE squad (
id TEXT PRIMARY KEY,
workspace_id TEXT NOT NULL,
name TEXT NOT NULL,
description TEXT NOT NULL DEFAULT '',
instructions TEXT NOT NULL DEFAULT '', -- leader agent instructions
leader_agent_key TEXT NOT NULL, -- references agent config key
created_at TEXT NOT NULL DEFAULT (datetime('now')),
updated_at TEXT NOT NULL DEFAULT (datetime('now')),
UNIQUE(workspace_id, name)
);
CREATE TABLE squad_member (
id TEXT PRIMARY KEY,
squad_id TEXT NOT NULL REFERENCES squad(id) ON DELETE CASCADE,
member_type TEXT NOT NULL CHECK(member_type IN ('agent', 'user')),
member_id TEXT NOT NULL,
role TEXT NOT NULL DEFAULT '',
created_at TEXT NOT NULL DEFAULT (datetime('now')),
UNIQUE(squad_id, member_type, member_id)
);
Dispatch Flow
- User assigns issue/task to squad
- Leader agent receives prompt: "You are the leader of squad [name]. Members: [list]. A new task arrived: [description]. Which member should handle this?"
- Leader responds with member selection + rationale
- System dispatches task to selected member agent
- Member executes, reports back
- Leader can re-assign if member fails
API Endpoints
GET /v1/squads — list squads
POST /v1/squads — create squad
GET /v1/squads/:id — get squad details
PUT /v1/squads/:id — update squad
DELETE /v1/squads/:id — delete squad
POST /v1/squads/:id/members — add member
DELETE /v1/squads/:id/members/:memberId — remove member
POST /v1/squads/:id/dispatch — assign work to squad (triggers leader delegation)
Frontend
- Squads page: list view with name, leader, member count, status
- Squad detail page: members list, instructions editor, dispatch history
- Create squad dialog: pick leader agent, add members
- Assignment integration: squad appears in assignee picker alongside agents
Acceptance Criteria
Reference
Competitive analysis: references/multica-competitive-analysis.md §2.1
Inspired by Multica Squads (concepts only, our own implementation)
Squads — Multi-Agent Routing with Leader Delegation
Why
Teams want to assign work to groups, not individuals.
@FrontendTeaminstead of picking an agent manually. The leader agent decides who picks it up based on availability and expertise. This is the #1 feature Multica has that we do not.Concept
DB Schema
Dispatch Flow
API Endpoints
GET /v1/squads— list squadsPOST /v1/squads— create squadGET /v1/squads/:id— get squad detailsPUT /v1/squads/:id— update squadDELETE /v1/squads/:id— delete squadPOST /v1/squads/:id/members— add memberDELETE /v1/squads/:id/members/:memberId— remove memberPOST /v1/squads/:id/dispatch— assign work to squad (triggers leader delegation)Frontend
Acceptance Criteria
npm run gatepassesReference
Competitive analysis:
references/multica-competitive-analysis.md§2.1Inspired by Multica Squads (concepts only, our own implementation)