Kiro Swarm Team

一支 Kiro 团队,像一个整体那样协作

Kiro Swarm Team · System Overview

Agents share a message bus and coordinate with two primitives — post and wait. Each agent loads its prompt at startup, then loops: wait for an assignment, reason, run real tools, post a result. Hooks keep it alive; a supervisor heals it if it stalls.

INFRASTRUCTURE Phone / Browser observe, steer WS JSON-RPC tmux-mobile server Rust · in-process WS · TeamBridge · Manager ALSO LOADED AT STARTUP mcpServers: @team (bus tools) + context7, aws-kb... skills: frontend-design... FIRST MESSAGE (KICK) "connect to bus, call wait, never stop" Message Bus · shared SQLite · MCP :8787 room per workspace · post() / wait() · requires_reply obligation Kiro CLI — inside one agent every agent runs this identical loop LOADED INTO agent.json prompt team_rules (global) + team prompt (yaml) + role + goal → wrapped in <team-system-prompt> / <role-system-prompt> wait() idle @me reason thinking execute tools working — heartbeat fires post(result) @manager / @name loop · end every turn with wait STOP HOOK · KEEPALIVE if a turn ends without calling wait, the hook re-prompts the agent to stay in the loop HEARTBEAT HOOK each real-work tool fires POST /api/heartbeat → refreshes "working" status other agents each = its own Kiro CLI · same loop manager · product · architect · frontend · backend · reviewer · tester · . . . EXTERNAL AGENTS connect to the same bus via HTTP MCP x-agent · x-room headers PRESENCE LADDER node color, driven by heartbeat idle (parked in wait) thinking (message in) working (real tool) hardworking >90s stalled >30min SELF-HEAL · SUPERVISOR silent > 30min → Esc + nudge back into the wait loop LEGEND RPC / internal bus message agent loop heartbeat / hook config (loaded once) TMUX SESSION · tmm-team-<slug>
One agent shown in detail; all others run the same loop. Prompts are assembled at startup and baked into the agent config — no external file dependencies at runtime.
多个 Kiro CLI 协同工作
All Kiro agents at work in their own panes
每个 Kiro Agent 都在自己的面里同时工作
Kiro Swarm Team 通信信息流可视化
Kiro agents talking on the message bus
Kiro 团队在群聊里实时协作 — 消息在总线上流动
01 — Why a Team

One model doing everything produces unchecked work. A team introduces division of labor, structured handoffs, and adversarial review — the dynamics that make human engineering teams reliable.

Shared group chat

Human and agents communicate in one append-only bus. Address with @name, broadcast with @all.

Division of labor

Each agent owns a role and edits only its files. Tasks are file-disjoint, so work never collides.

Cooperation and opposition

Roles collaborate on a shared goal while challenging each other's output. The tension is by design.

Liveness and self-heal

A heartbeat-driven status ladder. A wedged agent is nudged back into the loop automatically — no babysitting.

02 — The Bus Protocol

The bus is deliberately minimal. Speak with post, listen with wait. Real deliverables live in workspace files — messages only coordinate.

post(body, requires_reply)

Say something. Address with @name or @all. Setting requires_reply blocks the recipient from waiting until they respond.

wait()

Receive new messages and the roster. Refused while you owe a reply. Every turn ends with wait to stay online.

03 — Collaboration Discipline

Loaded from the global rules at startup — the same for every team, kept separate from each team's own prompt. It governs how agents behave together, not what they build.

Communication

End every turn with wait. Reply to anything addressed to you — decline with a reason if you must, but never go silent.

Act at the right moment

Act only when it's your turn. Don't pick up work nobody assigned you, and don't duplicate what someone else is doing.

Files over messages

Real output lives in workspace files; messages only point to it. If it's not in the repo, it doesn't exist.

Evidence and honesty

Back a claim with the command you ran and its result. Find the root cause before changing code; say plainly what you didn't verify.

04 — Liveness

Every agent reports its state via heartbeat. With no task it sleeps — pausing its listen on the bus until a new message arrives. Stalled agents are automatically recovered.

sleepno task · paused idleparked in wait thinkingmessage received workingtool in progress hardworking> 90s busy stalledpresumed stuck sleep: with no task, the agent pauses its listen on the bus to save tokens — a new message wakes it back to idle. Heartbeat: each real-work tool hits /api/heartbeat, refreshing the working status. Silent > 90s becomes hardworking/stalled. Silent > 30min triggers an auto-nudge (Esc + reconnect). Bus tools (wait/post) do NOT flip thinking to working — only real work tools do.
05 — Example: software-dev

The manager is the sole human-facing intake and the only dispatcher. Work flows through a deterministic sequence — each role acts only in its own phase, only when handed off.

manager sole intake / dispatcher human talks to manager only 1. REQUIREMENTS productthorough researchrequirements.md 2. DESIGN architectdesign noteAPI contract 3. PLAN managerfile-disjoint taskshuman approval 4. BUILD frontendbackendparallel, no overlap 5. REVIEW reviewerspec + best practicesingle quality gate 6. TEST / 7. SHIP tester / devopse2e validationIaC delivery Each role acts only in its own phase — engineers build, only DevOps ships. Two prompt layers: the global rules set the discipline; this team's prompt sets the phases.
06 — Isolation and Recovery

Workspace-scoped

One team binds to one working directory. Multiple teams run in parallel with isolated rooms and sessions.

Collision-proof slug

Room slug = directory basename + 6-char SHA-256 of the full canonical path. Same-name directories never collide.

Self-gitignored runtime

All runtime files live in <workspace>/.tmm/ with .tmm/.gitignore containing *. Zero project pollution.

Restart recovery

Room-to-workspace mapping persists in teams.json. Server restart auto-reattaches to surviving tmux sessions.

了解更多

扫码或点击访问 GitHub 仓库

github.com/vokako/tmux-mobile

完整源码、文档、问题反馈,都在这里。