Philipp Schmid 解說 AI 助理群如何分工,並示範 Google Antigravity 的 /swarm
Philipp Schmid 解析 Agent Swarm 的四個核心元件與 /swarm 實踐用法
一個大型任務交給單一 AI 助理時,可能太慢,也可能超出它一次能處理的資料量。
- Philipp Schmid 說明 AI 助理群的四個常見部分:協調者拆分工作、各自獨立工作的 AI 助理、分享進度的留言板,以及檢查成果的驗證者。像是新增 API 功能時,研究、寫程式、更新檔案和測試可以同時進行,工作者也能在留言板交換線索。文章提到,4 個 AI 助理大約能比 1 個快一倍,但會用掉約 2 倍的 token。
- 小而快的任務則可能不適合平行處理。
AI 伴隨問答
針對這篇報導有疑問?可直接點選快捷問題或向 AI 追問背景脈絡與技術細節:
文章拆解協調者、獨立工作者、共用留言板與驗證者的分工,也說明平行協作約能加快完成速度,但會增加 token 花費。
What are agent swarms, and how do they differ from sub-agents? Agents running in parallel on 1 goal, collaborating via message boards, mostly 4 core parts
- Coordinator or queue
- Isolated workers
- Shared message board
- Independent verifier
more below.

Since the OpenAI and Hugging Face incident, multi-agent collaboration has become one of the hottest topics in AI. Until recently, most setups used 1 orchestrator handing fixed subtasks to sub-agents that ran in silos and only reported back when done.
Swarms work much closer to how humans collaborate on a team. Peers take different slices of a problem at the same time, share leads in a common channel, and challenge each other's work before anything is finalized.
Agent swarms allow you to use extra compute for parallel execution, clean context windows, independent verification, and flexible model routing.

The 4 parts of a swarm
An LLM call became an LLM with tools. Put that in a loop with a sandbox and you get an agent, working in 1 context from a user task.
A swarm runs several of those agents at once toward 1 goal. Think of it like a school group project: instead of 1 student researching, writing, and fact-checking everything alone, 4 students split the work, compare notes as they go, and check each other's sections before turning it in.
Implementations vary, but most working swarms share 4 parts:
- Coordinator or task queue: Splits a broad goal into slices that won't collide, then posts briefs stating what each worker owns and what done looks like.
- Isolated workers: Each worker gets a fresh context window and its own sandbox or worktree. Noisy searches and intermediate files stay out of peer contexts, and parallel edits can't overwrite each other.
- Shared message board: Workers post updates, ask questions, and ping peers with @mentions across an append-only feed or topic channels. Idle agents sleep on the board for 0 tokens and wake only when mentioned.
- Independent verifier: Parallel workers make conflicting assumptions and miss their own mistakes. A separate verifier checks outputs against the goal, verifies sources or runs tests, and posts fix requests back to the shared board for the owning worker before anything is finalized.
Not every swarm uses all 4 parts. Some drop the coordinator and verifier altogether, letting peer agents share a board while roles emerge naturally.
How a swarm works
The runtime loop stays simple whether you run 3 agents or 300. Below is a basic coordinated example for shipping a new API feature across research, code, docs, and tests: the coordinator posts public briefs, @researcher maps existing endpoints and edge cases, @builder implements the feature in its own worktree, @docs updates the reference and examples, and @verifier runs the test suite before sign-off. Each agent has tools to read the board and post messages while it works, so peers trade leads mid-task instead of waiting for a handoff.

In practice, each agent keeps its normal sandbox tools and gets 3 board tools: board_read, board_post, and board_park. Here is an illustrative trace of how a run plays out:
# @researcher (sandbox-1)
-> grep("retry", "src/webhooks/")
-> read_file("src/webhooks/client.ts")
...
-> board_post("#updates", "@builder Retries must send the X-Webhook-Id header.")
-> board_park()
# @builder (worktree-2): checks board mid-task and adjusts before finishing
-> read_file("src/webhooks/retry.ts")
-> board_read("#updates")
-> edit_file("src/webhooks/retry.ts")
-> bash("npm test src/webhooks/retry.test.ts")
...
-> board_post("#review", "@verifier Ready in worktree-2. @docs API unchanged.")
# @docs (sandbox-3): wakes on @mention while @verifier runs
-> board_read("#review")
-> edit_file("docs/webhooks.md")
...
# @verifier (sandbox-4): wakes on @mention, runs full suite, posts fix back
-> bash("npm test src/webhooks/")
-> read_file("src/webhooks/retry.ts")
-> board_post("#review", "@builder 429 test failed on Retry-After header.")
Some setups run a tight hierarchy where the coordinator checks every milestone. Others let workers explore freely and pivot the moment a peer posts a working lead. Because the board is append-only, every decision stays visible in 1 log.
When swarms pay off
Swarms pay off when a task is too big for 1 context window or too slow to run step by step:
- Deep research and due diligence: Send agents across filings, docs, and customer forums in parallel, share leads in a channel, and have a verifier fact-check every source.
- Multi-package refactors: Put 1 worker on each module in its own sandbox or worktree so edits land in parallel without merge conflicts.
- Parallel investigations and bug hunts: Point agents at different logs, subsystems, or hypotheses at the same time. As soon as 1 agent finds the root cause, it posts the lead and the rest switch to verifying and fixing.
- Independent quality review: Pair writers or builders with a separate verifier to catch broken assumptions, bad citations, or flaky tests before a human reviews the final result.
- Model routing by role: Pin a strong reasoning model to coordination, planning, and verification, and let faster models handle routine extraction, drafts, or test boilerplate.
These tasks favor swarms over a fixed orchestrator tree because the work shifts as agents learn. Any worker can message any peer as often as needed, share a lead the moment it appears, and steer the rest of the team without waiting for a central parent to relay messages.
The tradeoff is token spend. Swarm scaling analysis shows that 4 agents finish roughly twice as fast as 1, but cost about 2x the total tokens. If a task lives in 1 file and takes 2 minutes, a single agent finishes cheaper and cleaner.
Try it with Gemini 4 Neon
You can try swarms today with Gemini 4 Neon using the native /swarm command in Google Antigravity.
Running /swarm turns your conversation into the coordinator. Neon splits your goal into parallel slices, spawns isolated workers, and adds a @verifier to check the results.
/swarm Add webhook retries across src/webhooks/ and docs/webhooks.md, run npm test to verify, and pin @verifier to a separate model.
Open the Swarm UI in the App, or run /swarm board in the CLI, to watch the live board and steer workers mid-run.
What comes next
Swarms follow Rich Sutton's Bitter Lesson: scale search with compute instead of hand-crafted rules. Current models aren't trained for swarm collaboration, so almost all of it today is harness engineering: collaboration prompts, isolated sandboxes, and scheduled sync points.
Early research already shows that agents can be post-trained to know when to work solo and when to share leads, solving over 25x more coordination tasks at 2x team size. Hugging Face replicated this on 4 Qwen3-0.6B agents for about $50, lifting accuracy from 6.6% to 82.3% while cutting tokens 37.4%.
Once models learn collaboration natively, they will eat these harness engineering primitives into something simple again. Until then, give /swarm a try on a task that's too big for 1 context window.