First swarm
A team is a leader plus teammates working a shared objective, with signed directives and a member-readable mailbox.
Prerequisites
A running control plane and at least one registered worker (First agent). An admin token (team creation is admin-only).
1. Create a team
curl -X POST http://127.0.0.1:21434/api/v1/teams \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "research-team",
"size": 3,
"model": "<model-slug>",
"mode": "coordinate",
"system_prompt": "You are a research team. Split the work, verify each other, and report sources."
}'
Response: { "ok": true, "team_id": "team-..." }.
Verify: GET /api/v1/teams/:id shows members and queue depth.
2. Inspect members
curl -s http://127.0.0.1:21434/api/v1/teams/<team-id>/members \
-H "Authorization: Bearer $TOKEN"
Members are worker ids with roles (leader/teammate). A directive is delivered to the leader; the leader assigns work.
3. Send a directive
Directives are the fleet-correct assignment plane (the old teamspawn tool is retired). Send a signed directive through the team control path used by your deployment, or drive the team through the chat/agent surface with the leader agent.
4. Use the mailbox
zerg team mail list --team <team-id>
zerg team mail send --team <team-id> --to <member> --body "Status report?"
Member reads require membership (or creator/admin); sends require the creator/admin mutator gate.
Verify: the message appears in the team view and the member can acknowledge it.
5. Cancel the team
curl -X DELETE http://127.0.0.1:21434/api/v1/teams/<team-id> \
-H "Authorization: Bearer $TOKEN"
Cancellation stops members and releases their resources.
Operational notes
Team directives are signed (HMAC) on the wire; a worker refuses an unsigned directive. The mailbox supports targeted delivery and per-channel rate limits. Team state is durable; a leader crash does not silently drop queued work.