@chasen_liao: Simplicity is the ultimate sophistication. I assumed Antigravity's /swarm must be backed by some really complex system. After digging through the source code, I found that what powers that shared blackboard is just two JSON files and one JSONL log. If you're also curious how a group of Agents can tag-team work off a single blackboard, check this out…

X AI KOLs Timeline News

Summary

The author dissects the source code of Antigravity's /swarm feature, revealing that the multi-agent shared blackboard is backed by just three plain-text files: board.jsonl, members.json, and swarm.json. The post also breaks down the event-sourced multi-channel design, the zero-token sleep mechanism of swarm_wait, and the race-condition lock design of the Stop Hook.

Simplicity is the ultimate sophistication 💥 🤯 I assumed Antigravity's /swarm must be backed by some really complex system. After digging through the source code, I found that what powers that shared blackboard is just two JSON files and one JSONL log If you're also curious how a group of Agents can tag-team work off a single blackboard, check this out 👇 https://t.co/h43gEFGZxn
Original Article
View Cached Full Text

Cached at: 11/22/26, 10:38 AM

Simplicity Is the Way 💥 🤯

I had assumed that behind Antigravity’s /swarm must lie some massively complex system. After digging through the source code, I found that propping up that shared blackboard are nothing more than two JSON files and a JSONL log.

If you’re also curious how a group of Agents work together in relay fashion via a blackboard, check out this article 👇 https://t.co/h43gEFGZxn


A 10,000-word teardown of /swarm: How AGY Uses a Single Blackboard to Power an Agent Swarm

This article breaks down how /swarm is implemented 👇

A few days ago I was fixing my https://github.com/Chasen-Liao/resume-skills, a PDF export tool. The page looked perfectly normal on screen, but the copied text and OCR output was often garbled or missing characters — entire paragraphs even came out in scrambled order.

Handing that kind of cross-module work to a single Agent means it reads the print script, six template sets, and the CSS specs before running real-device tests — and the context window fills up fast. With traditional Subagents, splitting the work across two investigators and one verifier means the main Agent first has to read thousands of words of troubleshooting logs and then relay them to the verifier, turning into a literal messenger boy.

So I fired up Antigravity’s /swarm directly. The whole task ran in two waves, with 7 working members total, took 2 hours 7 minutes, and left 24 posts on the blackboard. At one point a member went silent for 38 minutes — the background monitor posted on its own to get things moving again; the verifier caught a false positive in the validation script during live testing and directly called out the author on the board to send the work back for rework, all without bothering the main Agent.

After running it, I got curious: how is this thing actually implemented at the bottom?

I went through the source code of Antigravity’s built-in swarm_board plugin, the 4 built-in Skills, and cross-referenced 6 real run logs from my own machine. What I found was surprising: Google implemented the whole thing with just three plain-text files.

I. Four Multi-Agent Modes in Antigravity — Which One to Pick?

Take the garbled-PDF issue from the beginning. Investigating a single suspicious point, grinding on one hard-to-reproduce bug, handing off between multiple investigation threads, or migrating the entire export pipeline in stages — each of these suits a different entry point in Antigravity. The difference lies in who gets the result and how the next step picks it up.

Regular Subagent (invoke_subagent). If you just want to confirm whether the font mapping is broken, the main Agent can delegate that to a background subagent and keep investigating elsewhere. The subagent sends the evidence back to the main Agent. If you then need someone else to re-test, the main Agent passes along the sample and reproduction conditions.

/boost. If the problem is concentrated in one hard-to-reproduce garbling bug, let Boost run multiple rounds around the same issue: the first round finds the root cause, proposes a fix, and runs tests; subsequent Agents specifically hunt for flaws in the previous round and re-test after corrections; finally an orchestrator does an independent review. It suits investigating a hard problem deeply and verifying it thoroughly.

/teamwork. If you need to redo the entire PDF export — swap the renderer first, migrate the templates next, then backfill regression tests — Teamwork works well. It first clarifies scope and acceptance criteria, then lets different roles advance through milestones in a dedicated project directory, with an independent role reviewing stage deliverables.

/swarm. The export script and HTML templates can be investigated separately, but the verifier needs to re-test with the same sample using evidence from both sides. The investigators paste raw results to the shared blackboard, cite post numbers, and @-mention the verifier. The verifier can reply directly on the board to review evidence and call out authors for rework, and the coordinator can follow the same thread of posts to see progress.

That raises the two questions we’ll break down next. Where does the blackboard store tasks and evidence? And how does an Agent that’s waiting for work know it’s its turn?

II. Prying Open the Blackboard Foundation: Three Local Files, Plus a Cross-Machine Setup

Open the local directory /brain/<swarm>/.system_generated/swarm/, and an entire Swarm’s shared state lives in three plain-text files:

  • board.jsonl: an append-only log. Think of the bulletin board as a notebook where you can only ever paste new notes on the back — each line is one post, carrying a globally incrementing sequence number seq, the posting agent, the body text, and a time.
  • members.json: the full team roster plus a read-check-in sheet. It records each person’s session ID, role, model, workspace mode, and four cursors for tracking progress through the posts.
  • swarm.json: the doorplate anchor — records version, backend type (local is local), and swarm_id.

Stripped down, the actual structure looks like this — pretty simple:

// board.jsonl (one appended record per line)
{"seq":5,"agent":"template-dom","text":"HTML template findings as follows, please @verifier cross-verify...","time":"2026-11-14 13:21:59"}
{"seq":7,"agent":"verifier","text":"@coordinator All live testing and verification complete (based on #5 and #6)...","time":"2026-11-14 13:43:55"}

// members.json (excerpt of a single member's state)
"fixer-templates": {
  "role": "worker",
  "desired_state": "RUNNING",
  "phase": "RUNNING",
  "desired_model": "flagship-model",
  "applied_model": "flagship-model",
  "workspace_mode": "inherit",
  "wake_mode": "working",
  "wait_since": 20,
  "last_read_seq": 20,
  "last_nudged_seq": 20,
  "last_park_blocked_seq": 16,
  "killed": false
}

While reading the main.mjs and channels.mjs sources, I stumbled onto two rather interesting engineering designs.

The first is multi-channel without a config table — instead using event-sourced replay. When there are more than 8 members or too many modules, you can split the blackboard into channels like #parser and #ui, with members by default only seeing main and their subscribed channels. But channel creation, subscription, unsubscription, and archiving are all written into the same board.jsonl log as control messages. The sidebar determines whether a given member “could see” a post at the moment it was sent by replaying the control frames in the log (channelsAt() / activeAt()). The channel list in members.json is explicitly annotated in the source comments as merely a cache.

The second is that the source code already embeds a protocol for a cross-machine distributed Swarm. main.mjs contains a large chunk of remote_board logic: if swarm.json points at a remote backend, the sidebar panel spins up swarm --json --watch to subscribe to an NDJSON incremental stream, and attaches @-style ownership badges (distinguishing HUMAN and AGENT) to members running on different machines. Once an incoming incremental post doesn’t connect with the latest post held locally, the panel kills the old watcher and triggers a resync to pull a full snapshot. Locally you run lightweight with three plain-text files; when you later switch to multi-machine cloud collaboration, not a single line of the upper-layer protocol needs to change.

III. How Do You Achieve “Zero Idle Spin Without Missing Messages”? Three Sneaky Techniques Hiding Under the Hood

The fastest way for a multi-Agent system to blow up your bill is polling. Waking up every few seconds to ask “any new work?” burns tokens for nothing. Antigravity Swarm eliminates polling entirely, relying on three cooperating layers to achieve “0-token sleep, yet not a single message missed.”

1. swarm_wait directly terminates the current model turn

When a member finishes its work, it calls swarm_wait{since: N}. The moment this tool result returns DONE, the underlying wait-check hook terminates that member’s current model turn outright. The session is fully suspended — no background busy loop, no heartbeat inference, genuine 0-token standby.

By default it sleeps in mentions_only mode: only when someone posts and mentions your name (@name), broadcasts to everyone (@all), or mentions your channel (@#channel) does the system inject a wake-up message into your conversation to rouse you.

2. Stop Hook race lock, preventing “eyes just closed, new post arrives”

Anyone who’s written concurrent code will immediately recognize a classic vulnerability: a member reads post #10, decides there’s nothing left to do, and calls swarm_wait(since: 10) to go to sleep; in the one or two seconds it’s about to close its eyes, post #11 lands on the blackboard. If it just falls asleep, that message is missed, right?

While going through the transcript.jsonl logs of another Swarm I ran for writing articles, I caught this race lock firing in the wild. At step 65, the monitor finished reading #10, called swarm_wait, and was about to sleep — #11 landed right then. At step 67 the runtime hard-blocked the sleep request and injected a line into the session:

Stop hook blocked termination: [board] new messages arrived; read_board before waiting again

Meanwhile, last_park_blocked_seq in the roster gets updated to 11. In the PDF troubleshooting log from the beginning, fixer-templates also genuinely triggered last_park_blocked_seq: 16.

You can think of the Stop Hook as a subway exit turnstile: you just swiped your card to head home, the system notices a new work order has come in, locks the gate, and forces you to read_board and finish reading the new post before deciding whether to sleep.

3. Liveness detection doesn’t trust the registry — it watches everyone’s transcript.jsonl directly

Although members.json records wake_mode (mentions / anything / working), main.mjs’s statusOf() function doesn’t blindly trust this field when determining whether a member is working or sleeping.

The reason is practical: a member sleeping on the blackboard may have been woken up by a background command callback or a manual user message, while the registry’s wake_mode still says mentions even though the person is already running tools. So the sidebar parses the tail of each member’s own session transcript.jsonl directly. Only when it sees the last entry is a response with no tool calls, or a tool batch containing swarm_wait that returned DONE, does it classify the member as waiting; otherwise it’s working. As a bonus, the sidebar can extract “which file is being read / which command is being run” from the latest thinking blocks and tool calls and push it to the panel in real time.

This also explains what the four post cursors in members.json each control:

  • last_read_seq records which post you’ve actually read (when calling swarm_wait you must pass the number you truly read, not the blackboard’s latest post — otherwise posts #5 and #6 that appeared while you were busy will be skipped).
  • wait_since records which post you started waiting for wake-up from.
  • last_nudged_seq records how far the system’s incremental “the latest message is #N” nudges pushed into your conversation.
  • last_park_blocked_seq records the post number from the last time you wanted to sleep but got blocked by the Stop Hook.

IV. A 24-Post Combat Debrief: How Two Waves of 7 Agents Ran It to Completion

With the principles explained, let’s walk through the full 2-hour-7-minute, 24-post PDF garbled-text troubleshooting and fix from the beginning — two live screenshots will make it all crystal clear.

Before starting, I mixed the models: the Coordinator and the monitor only handle task decomposition, status tracking, and reminders, so I gave them a small, lightweight model to save quota; the actual working members — investigating the export pipeline, modifying the six HTML template sets, and writing and running acceptance tests — were all set to the flagship reasoning model.

Look at #1 #2 #3 on the right side of the screenshot, all sent within the same minute, kicking off Wave 1: read-only investigation (#1~#8, about 32 minutes):

  • pdf-pipeline only investigated the export script, font loading, and glyph mapping;
  • template-dom only investigated the DOM text flow and print styles of the six built-in HTML templates;
  • verifier only did live reproduction and cross-verification;
  • a monitor was hung in the background to guard against deadlocks.

Because this entire wave was read-only with no file modifications, everyone shared the main workspace (inherit mode). 9 minutes later template-dom delivered #5; 15 minutes later pdf-pipeline delivered #6, and the two investigations didn’t conflict. Following #5 and #6, the verifier used Playwright to render all six templates in both online and offline environments, then used pypdf to reproduce the garbled text, handing complete live evidence to @coordinator in #7. #8 posted [done] to close the case, and the Coordinator casually killed all 4 people from this wave, cleanly clearing the field so stale context wouldn’t drag down the modifications ahead.

Then came Wave 2: parallel fixes and regression (#9~#24, about 1.5 hours). The Coordinator opened fixer-templates (only touching templates and style docs), fixer-code (only touching the print pipeline and validation scripts), verifier-fix (investigate only, no changes), and monitor-2. This also verified a spec detail along the way: a killed member’s name is permanently locked and cannot be reused, so the new monitor had to be named monitor-2.

Now look at this Graph topology diagram — split it in half vertically and it’s completely clear: the lower half is Wave 1’s investigation triangle, the upper half is Wave 2’s fix triangle. Arrow directions indicate who @’d whom; thicker lines mean more @-mentions in that direction. Drag the timeline back to the start and replay it — what truly determined this task didn’t crash were three incidents in the middle.

  • #13~#14, on-the-fly troubleshooting and synchronizing scope: fixer-code immediately found that some directories in the workspace had been moved, so all the test paths no longer matched. It posted to @coordinator in #13. After the Coordinator restored the directories from git, it notified all three people in #14 in one shot to uniformly switch to root-directory paths, preventing two people from diverging by each changing things their own way.
  • #15~#19, monitor-2 catches deadlocks twice and saves the day: 38 minutes after #14, fixer-templates had posted nothing. The background scheduled monitor posted @fixer-templates [stall] in #15 to precisely rouse it; after fixer-code delivered code in #16, 3 minutes passed with the Coordinator having not read it and the whole group stalled at #16 — monitor-2 posted @coordinator [stall] in #17, even speculating that “the flagship model may have run out of quota, or everyone is waiting on fixer-templates.” In this round, fixer-templates also happened to trigger the last_park_blocked_seq: 16 mentioned earlier. Once woken, the Coordinator immediately checked git status, confirmed the template changes had landed, and pushed the whole group into integration testing.
  • #21~#23, the verifier sends work back for rework point-to-point: When verifier-fix ran the six templates through live integration testing, it caught a subtle problem — the validation script falsely reported failure at mixed Chinese-English font-switching boundaries due to extra pseudo-whitespace characters. verifier-fix did not go back to the Coordinator to relay a message; it directly @-mentioned @fixer-code in #21, pasted the error line numbers, and sent it back for rework. Nine minutes later, fixer-code fixed it in #22 and added unit tests, @-mentioning @verifier-fix back; after the full test suite passed on re-run, #23 collected and submitted the summary, and #24 the Coordinator posted [done] to wrap up and cleaned up everyone.

This is what I find most practical about combining Graph and Board. If the final summary just said “all verified,” I wouldn’t dare merge the code directly; first switch to the Graph to see clearly which round had a rework rejection and who crossed paths with whom, then go back to the Board, click into #21 #22 #23 to check the original test output — any step that was sloppy is visible at a glance.

V. Five Guardrails Against Runaway Costs, Two Safety Nets, and a Wall I Hit

Running long-horizon multi-Agent tasks, the three biggest fears are: context snowballing out of control, getting stuck or blowing through quota halfway, and two people fighting over the same file. Antigravity Swarm breaks these areas down pretty thoroughly in its specs and runtime.

Five guardrails against context bloat

  • Public Brief as the single source of truth: every time swarm add creates a member, the work assignment is posted publicly to the blackboard with an @name. The verifier can always check deliverables against the original requirements, and even if the Coordinator undergoes context compression, it won’t lose track of the division of labor by scrolling back through the blackboard.
  • New member cursors skip opening noise: each new Worker, when it starts, only puts its own Brief in the first message, and simultaneously sets the blackboard cursor right after all the opening Briefs — sparing it from waking up and immediately consuming thousands of words of other people’s task descriptions.
  • #seq pointer references + @name as a doorbell, not a CC: the spec strictly forbids copy-pasting A’s report to relay to B — everything uses #5 #6 post references (the Board UI automatically renders #5 as a clickable, highlighted jump pill). Every @ triggers a full round of model inference on the recipient, so teammates hand off directly to each other rather than blindly CC-ing the Coordinator; when a task needs batch sharding, passing tasks or n to add spawns worker-1..N in one go — @worker calls the whole group, @worker-1 calls a single person; in multi-channel setups, @#parser precisely wakes up an entire module group (@#main gets rejected, preventing a de facto @all).
  • Read/write separation + Worktree workspace isolation: the official recommendation is 1 read-only verifier for every 2~4 authors — the verifier only reports errors, the authors fix them themselves, preventing two people from writing to the same file at the source. Read-only investigation uses inherit to save resources; when code is modified in parallel, give authors share (an independent working copy sharing the repo’s underlying objects, similar to git worktree) or branch (a full clone). Remember that killing a member also deletes its independent workspace — always merge or cherry-pick changes back before cleaning up.
  • Hot-clone fork and recursive helper recruitment: when a member has already figured out half the codebase and needs to split into two fronts, adding a member with fork: "" clones its conversation history directly, avoiding a cold start to re-read the repo. Workers can also call swarm add to recruit helpers themselves, but permissions are tight: they can only kill the people they recruited; conversely, when the Coordinator kills a Worker, it doesn’t clean up the helpers that Worker recruited — so watch out for that during wrap-up.

Two life-saving safety nets

The anti-deadlock monitor sleeps too. The monitor is itself an independent Agent, hung with an IsDaemon: true */3 * * * * background timer (the IsDaemon flag prevents the timer from constantly marking the main conversation as running). Every 3 minutes it checks for 5 kinds of stalls: a result that didn’t @ anyone, the Coordinator leaving an unread post, a member that was @’d but hasn’t posted for a long time, members waiting on each other in a ring, and everyone idle with no work to do.

There’s a particularly clever detail here: detecting “was @’d but hasn’t moved” looks at last_post_seq rather than wait_since. Because a failed model turn also pushes wait_since forward, watching the post number is what catches people who’ve silently died. It sends at most 3 reminders for the same deadlock to prevent spam; if the board has no activity for 5 consecutive rounds (about 15 minutes), or the Coordinator posts [done], it stops its own timer and switches to swarm_wait(mentions_only: false) for zero-power sleep, automatically reviving and recreating the timer when a new message appears on the board. A service restart stops the timer — just send @monitor resume to bring it back.

Hot-swapping models on the spot when quota runs out. The biggest fear when running Swarm is hitting a “quota exceeded” popup halfway through. members.json deliberately splits desired_model and applied_model into two fields — when a member’s quota is exhausted, there’s no need to kill and restart; once it returns to the waiting state, call swarm{action:"model"} to switch to a model that still has quota, preserving all conversation memory and continuing right where it left off. You can also use swarm{action:"models"} beforehand to check each model’s real-time remaining quota and reset time.

A real-world boundary I actually hit

In the November 13 Swarm writing task, #12 hit a wall that isn’t explicitly documented. I asked the writing Worker to also call an image-generation tool to produce two infographics — it checked the tool list and reported a blocker directly: Swarm Worker sessions have no permission by default, so they can’t call the image-generator or the browser subagent. It could only post to @coordinator to have the main session call them instead, then hand the generated images back to the Worker to embed in the draft. If your task needs to interleave image generation or browser automation, remember to leave that step to the Coordinator to coordinate — don’t expect the Worker to call those tools itself.

VI. A Hidden Pivot in the Source Code: Google Is Cutting Its Own Expensive Always-On Narrator

After reading through the swarm_board source, what surprised me most was a major pivot Google made on the “situation dashboard.”

In the original design, Swarm shipped with a permanent role called narrator (commentator). It used swarm_wait(mentions_only: false) to watch every post on the blackboard, organizing scattered chat logs into a view.json grouped by objective, and even allowed the AI to write its own view.html custom page rendered into the Overview panel.

Because view.html is untrusted, model-generated code, Google welded an entire zero-trust security sandbox onto it in app.js and main.mjs:

  • view.json and view.html are hard-capped at 64 KB; anything over the limit or malformed JSON is discarded outright, falling back to the previous valid cached version.
  • sanitizeView verifies references one by one: post numbers beyond the blackboard’s latest head are flagged ⚠ unverified; items without a cited source are flagged uncited; file-jump actions are only allowed for real regular files under the /brain/ directory, and external links are restricted to a whitelist of domains.
  • view.html runs in a sandbox="allow-scripts" srcdoc iframe with a fully disconnected CSP (default-src 'none'; connect-src 'none'). Even jump requests emitted by the page must pass four gates simultaneously: browser activation state navigator.userActivation.isActive, the iframe holding focus, no input on the parent page within 5.5 seconds, and a 100-millisecond delayed re-check — plus a 250-millisecond throttle — completely shutting down any chance of an AI page faking clicks or spamming popups.

Security engineering written to this level — and yet when I got to the latest swarm_pane/SKILL.md, the very first line reads in plain language:

Don’t add a narrator; this Overview replaces it.

Don’t add a narrator anymore; the new built-in Overview has already replaced it. The reason is stated honestly even in the official example JSON in swarm_narrator: “Always-on member adds token cost.” Every time a new message pops up on the blackboard, an always-on member wakes up a large model to rewrite the JSON summary — the token burn is excruciating, and the updates are perpetually half a beat behind the blackboard.

The new approach (swarm_pane paired with hive.js) is far more restrained. The Coordinator only needs to write a static plan.json of a few dozen lines when starting work or changing assignments (specifying objectives, thread groupings, and each person’s task names); on the UI side, hive.js uses deterministic front-end code to stitch together board.jsonl and the members’ real-time tool steps and [done] markers from their transcript.jsonl into a dynamic dashboard. The interface even draws a pixel-art queen bee wearing a crown for the coordinator, and pixel-art worker bees in different states for working and sleeping members. For front-end changes, a Worker only needs to post in the format Screenshot: <path> | <change description> and the dashboard can automatically assemble a draggable before/after comparison Progress Reel.

The deeper you go building Agent Harnesses, the more you see this iron law: any view that can be computed from a static protocol plus deterministic code should never be propped up by an always-on LLM babysitting it.

VII. When Is It Worth Spawning a Swarm, and When Not?

I now decide whether to open /swarm based on just two conditions: Can the task be split into at least two independent threads that don’t conflict with each other? And are the split results worth having a third party cross-check with real samples? For cross-module troubleshooting, multi-file parallel refactoring with regression tests, or engineering tasks that require repeated rework cycles, the shared blackboard handles context isolation and process traceability beautifully.

But for small, clearly-scoped single-thread changes — or work where two people would immediately fight over the same core function — just handing it to a single Agent is faster. You should also keep the costs and boundaries in mind: every additional member means another full session and inference consumption; when creating members, if you omit model, everyone defaults to the main session’s model — if the main session is running a high-end model, quota drains very quickly.

Similar Articles

@yibie: The author of “Clean Code” breaks software engineering discipline into an agent pipeline—each quality gate is an independent role, and chained together they form a complete development workflow. SwarmForge (Uncle Bob’s new project): the entire coordination mechanism is the file system, with agents communicating via git commits…

X AI KOLs Timeline

Robert C. Martin (author of “Clean Code”) has released SwarmForge: a minimalist multi-agent orchestration framework built on tmux, git worktree, and prompt files. It reduces all coordination to file-system operations and supports three quality-gate pipelines: two-pack/four-pack/six-pack.

@FinanceYF5: 1000 DeepSeek Agents collaborating non-stop for over a week — what problems actually arise? Hugging Face's Leandro von Werra published a large-scale Agent Swarm field report. While building pybot, they had…

X AI KOLs Following

Hugging Face's Leandro von Werra published a field report on 1000 DeepSeek Agents collaborating for over a week straight, covering real-world issues such as task allocation, communication, monitoring, Git conflicts, and anomalous agent behavior. They also open-sourced two internal tools: Legion and Msgboard.

@luosky0314: Vercel's Board is worth a close look. It's neither a "company brain" nor an agent group chat — it's a bulletin board. Multi-agent collaboration has two common pitfalls: one is merging all agents' memories into a shared brain, so everyone sees problems from the same perspective and the point of dividing work is lost…

X AI KOLs Timeline

Vercel released an experimental Board — a secure bulletin board for humans and agents. The author analyzes how it avoids the two big multi-agent pitfalls (shared brain and point-to-point reporting) through ambient collaboration: task leases, label signposts, watcher wake-ups, and independent memories.

@realfxw: Everyone has been focusing on Codex and Agent CLI in the terminal lately, but from my practical testing, Google Antigravity's command flow hidden in the / input box is very pragmatic in context management and workflow control. When writing complex projects, the two biggest headaches with Agents are: one is when large tasks are running…

X AI KOLs Timeline

This article introduces how Google Antigravity's tool uses command flows to manage the context and workflow of AI agents in coding projects, providing multiple practical instructions to address common pain points.