DEV Community

Evan Lin for Google Developer Experts

Posted on Originally published at evanlin.com on

[Antigravity in Action] Building a Fully Automated Dev Team with Google Antigravity Swarm: Playbook & 26-Minute End-to-End Run

Antigravity Swarm Board(Reference: agy-swarm-playbook)

Background

A few days ago, I added a feature to my Dev.to auto-translation tool, kkdai/devto-blog-translation-tool, that also redraws Chinese screenshots into English (see the previous post: Translating Images Too: Redrawing Chinese Screenshots with Nano Banana Pro and Gating with Gemini 4 Neon).

Although adding features kept getting smoother, looking back at the entire codebase, as a developer I knew full well that quite a bit of engineering debt had piled up in the project: mixing both the old and new Gemini Go SDKs simultaneously, zero test coverage in core packages, and a bare-bones CI running only go build and go test.

In the past, when facing this kind of audit and refactoring task, I usually went back and forth slowly with an AI in a single conversation, modifying one file at a time. This time, however, I wanted to put Google Antigravity's /swarm (Swarm) directly to the test—to see what kind of pace and quality a multi-agent collaborative team (PM + multiple dedicated Coders + independent QA + Monitor) could achieve compared to a single agent.

The results were pretty astonishing:

  • Round 1 (3 minutes): Dispatched ux-reviewer and dx-reviewer to run health checks in parallel, delivering prioritized lists backed by line-number evidence from both the user and developer perspectives.
  • Round 2 (26 minutes): pm first opened 3 GitHub Issues (#9, #10, #11), then handed them off sequentially to three Coders in isolated workspaces to implement and open PRs. Each baton pass was verified hands-on by qa, and finally pm accepted and merged the PRs (#12, #13, #14) and closed the Issues.

This article is organized into three parts:

  1. What is Antigravity Swarm (/swarm)?
  2. A practical template for long-running multi-agent workflows: Core breakdown of kazunori279/agy-swarm-playbook
  3. A complete log and takeaways from refactoring devto-blog-translation-tool with /swarm today

1. What is Antigravity Swarm (/swarm)?

According to the official Google Antigravity documentation (Antigravity Swarm Docs), Swarm (/swarm) is Google Antigravity's native multi-agent collaborative orchestration feature (supported in both the desktop app and the agy CLI). Simply type /swarm <your task> in the chat box, and your single conversation immediately transforms into an agent team with clear division of labor—instead of cramming all files, tests, and discussions into a single context window that easily bloats and loses focus.

The core operation of Swarm consists of four key design elements:

Core Component Role & How It Works Pain Point Solved
Coordinator The only entry point you talk to directly. Responsible for breaking down tasks, dispatching briefs, scheduling team members, and gating results—in principle, never writes code itself Prevents the main conversation from getting bogged down in lengthy implementation details and losing sight of overall progress
Named Workers Named according to their responsibilities (e.g., coder-sdk, qa, pm), each with an independent conversation and an independent Git Worktree (workspace: "share") Multiple agents editing files, compiling, or switching branches simultaneously never overwrite each other
Adversarial Verifier Dedicated to reading diffs, running tests, and checking acceptance criteria (AC); only reports issues and never edits code directly, sending issues back to the original developer to fix Avoids the "player and referee" problem where an agent breaks something and still marks it as passed
Shared Message Board An append-only public communication board. Members wake each other up for handoffs using @name, with zero token consumption while idle (waiting) Fully transparent communication that can be monitored in real time anytime via /swarm board (shortcut Alt + S)

On the UI side, Antigravity also provides the Swarm UI & Live Board: you can open the live dashboard via /swarm board (default shortcut Alt + S) to see whether each member is currently working or waiting, view everyone's tool call logs and handoff order, and click in to check progress or intervene through the Coordinator to steer direction whenever needed.

When should you use /swarm? When is a single Agent enough?

  • Good fit for /swarm: Tasks with clear responsibility boundaries or distinct roles—such as cross-module refactoring, dual-perspective parallel reviews (UX vs. DX), or development workflows requiring role isolation and quality gates like "PM files issue → Coder implements → QA verifies → PM merges."
  • No need for /swarm: Small tweaks in a single file, quick one-line bug fixes, or small linear prototypes—in these scenarios, a single agent is faster and uses fewer tokens.

2. Practical Template Breakdown: kazunori279/agy-swarm-playbook

Once you're familiar with the basic mechanics of the official /swarm, the next natural question arises: "If I want /swarm to run not just for 15 minutes, but continuously for hours like a real engineering team clearing dozens of issues, how should I design it?"

Google's Kazunori Sato open-sourced a fantastic hands-on playbook and template repository addressing this exact question: kazunori279/agy-swarm-playbook. Distilled from multiple 12-hour benchmark runs, it is packaged not only as an installable agy skill, but also includes a 5-minute starter example and a real 92-issue full project.

Right at the beginning of the README, the author hits on a remarkably sharp insight:

/swarm is natively designed for 3–20 minute tasks. Once you stretch it across an entire backlog, the Coordinator becomes a bottleneck, the message board gets flooded, and eventually nobody knows what to do next. The solution isn't writing a longer prompt—it's moving "state" and "mechanical workflows" outside of the Swarm.

1. The Playbook's Three Core Principles

  1. State lives outside the board Don't store the task list inside the Coordinator's head (it will get lost as soon as context compaction hits). Instead, use GitHub Issues as the task list, Labels (e.g., claimed:dev-3) as claim locks, and Blocked by: #N to express dependencies; leave only brief one-line signals on the Swarm message board (such as [review] #12, [merged] #12).
  2. Code for mechanics, models for judgment Put claiming issues (ready.sh / claim.sh), rebasing, acquiring merge locks, running checks, and pushing to main (land.sh) entirely into deterministic scripts; let LLM Workers focus on writing code, and Reviewers focus on reviewing diffs.
  3. The swarm fixes, a workflow finds Workers in the Swarm focus purely on draining the backlog; separately, use run_workflow to periodically trigger ux_sweep.py, which operates the deployed app like a real user and files any newly discovered issues straight as new GitHub Issues—giving the team a continuous, clear source of work.

2. Hard-Earned Key Numbers (Highlights from Ten Practices)

The most valuable part of agy-swarm-playbook is that it lays out real data showing what disasters happen if you ignore each practice:

Practice Real Cost of Ignoring It (from 12-Hour Playbook Benchmarks)
Workers claim the next issue themselves After switching to workers proactively claiming issues and landing sequentially, merge conflicts dropped from 47 out of 84 merges to 0
Script mechanical workflows; don't rely on an LLM Coordinator to brute-force it Over-relying on an LLM Coordinator for scheduling once caused a single stall to waste 103 minutes
Review before locking, quick checks inside the lock, full checks after pushing A seemingly clean rebase without re-running the full check suite after pushing once left production broken for 58 minutes
The Coordinator never touches technical work Once the Coordinator starts writing code itself, its context rapidly bloats and slows down, and an unsupervised Swarm quietly grinds to a halt
Scale up gradually, set caps, and retire workers in time Spawning too many at once triggers a Quota Storm; workers kept alive too long start drifting from conventions after 28 compactions
Verify with fresh eyes (screenshots + another Agent) One agent reported "the map is present" for 10 consecutive hours, only for a human and another reviewer to open the screenshot and see a completely blank canvas

3. Two Built-in Examples & Quick Start

The Playbook repository includes two progressive examples that are great for hands-on practice:

  • examples/01-hello-swarm/: Requires only the Python standard library and contains 5 Issues. In roughly 5 minutes, you can watch the full cycle of a Worker claiming #1 → Reviewer approving → land.sh acquiring the lock and merging into main.
  • examples/02-live-ai-concierge/: A heavyweight real-world project complete with a full specification, 12 UI screenshots, starter scaffolding, and a backlog of 92 Issues, designed to validate long-running team collaboration.

As long as you have agy, gh (logged in), git, and Python 3.10+ installed locally, just a few commands will kick off the first 5-minute example:

git clone https://github.com/kazunori279/agy-swarm-playbook
cd agy-swarm-playbook
tools/new_project.sh examples/01-hello-swarm/template examples/01-hello-swarm/backlog.md <your-handle>/hello-swarm --private
cd hello-swarm && agy

Enter fullscreen mode Exit fullscreen mode

3. Hands-On Log: Refactoring devto-blog-translation-tool with /swarm

After reading the official docs and the design philosophy behind agy-swarm-playbook, I ran a full /swarm session directly on my own kkdai/devto-blog-translation-tool today.

The entire process was split into two clear phases: first, a dual-perspective health check, followed by handing the 3 high-priority Developer Experience (DX) requirements to a team of "PM + three Coders + QA + Monitor" to deliver sequentially.

Round 1 (12:07–12:10, 3 minutes): Parallel UX × DX Dual-Perspective Health Check

I first gave the Swarm an open-ended prompt:

/swarm Help me think through what else can be optimized here, from both the user and developer perspectives

Instead of reading the whole repo itself, the Coordinator immediately spun up two read-only reviewers to work in parallel, along with a monitor to guard against stalls:

  • ux-reviewer (User perspective): Reviewed user workflows, CLI interactions, Frontmatter handling, image translation cost transparency, and configuration friction.
  • dx-reviewer (Developer perspective): Ran go test -race -cover ./..., inspected go.mod dependencies, architectural coupling, CI configuration, and security scripts.

In under 3 minutes, both reviewers posted their optimization reports—complete with exact file paths and line numbers—back to the message board, and the Coordinator synthesized them into a prioritized list. Among them, the top three high-priority technical debts from the Developer Experience (DX) perspective were rock-solid:

  1. Coexisting Dual Gemini SDKs & Rebuilding the Client on Every Call: go.mod depended on both the deprecated github.com/google/generative-ai-go and the newer google.golang.org/genai, while every text or image translation created and closed a brand-new connection; text response extraction also failed to filter out Thought parts from thinking models.
  2. Tightly Coupled Core Packages & Zero Test Coverage: translator.Service depended directly on concrete types *devto.Client / *gemini.Client, and devto.Client's baseURL was hardcoded as a constant—resulting in 0% coverage for internal/devto, internal/utils/language.go, and internal/utils/markdown.go, and only 10.9% for internal/translator.
  3. Weak CI Quality Gates & Security Script Unusable in CI: .github/workflows/go.yml only ran go build and go test, with no -race, go vet, gofmt, golangci-lint, govulncheck, or secret scanning; test_security.sh even exited immediately with exit 1 in a clean environment without a .env file.

Round 2 (13:11–13:37, 26 minutes): PM Files Issues → 3 Sequential Coders → QA Verification → PM Acceptance & Merge

Seeing these three high-priority items of technical debt, I borrowed agy-swarm-playbook's principle of "delegating task state to GitHub Issues with strict separation of role responsibilities" and issued a second prompt to the Swarm:

/swarm Start with the high-priority items from the developer perspective. Have the PM file the issues first, then assign them to three coders to implement the three requirements sequentially. After QA verifies each one, have the PM accept, merge, and close the issue.

Here is what the team composition and handoff pipeline looked like:

flowchart LR
  Coord["Coordinator<br/>Scheduling & spawning/retiring members"] --> PM["PM (pm)<br/>Create Issues #9~#11"]
  PM --> C1["Coder 1 (coder-sdk)<br/>Isolated Worktree<br/>Issue #9 → PR #12"]
  C1 --> QA["QA (qa)<br/>Isolated Worktree<br/>Hands-on testing + AC check"]
  QA --> PM2["PM Acceptance<br/>Merge PR + Close Issue<br/>Sync local main"]
  PM2 --> C2["Coder 2 (coder-tests)<br/>Start from latest main<br/>Issue #10 → PR #13"]
  C2 --> QA
  PM2 --> C3["Coder 3 (coder-ci)<br/>Start from latest main<br/>Issue #11 → PR #14"]
  C3 --> QA

Enter fullscreen mode Exit fullscreen mode

Two design choices here were crucial:

  • Every coding and testing role received an isolated Git Worktree (workspace: "share"): Not only were the three Coders isolated from one another, even qa had its own worktree to git fetch && git checkout PR branches for testing—ensuring the root directory where pm operated stayed spotless on main at all times.
  • Retire when done, launch the next baton from the latest main: Each time pm merged the previous PR and ran git pull --ff-only origin main, the Coordinator would kill the finished Coder before starting the next one. That way, the next Coder's workspace naturally started on top of the latest main, yielding 0 Merge Conflicts from start to finish!

Execution Timeline & Results

From issuing the command at 13:11 to closing all three Issues at 13:37, the entire run took just 26 minutes:

Time Owner Issue / PR / Commit Completed Work & Verification Data
13:11–13:12 pm Created Issues #9, #10, #11 Verified gh auth and main status; wrote the 3 DX requirements into GitHub Issues with complete Acceptance Criteria (AC)
13:13–13:19 coder-sdk → qa → pm PR #12 (c7f6ff9)
Closes #9 Fully migrated to google.golang.org/genai, removed generative-ai-go and direct dependency on google.golang.org/api, reused a single *genai.Client in NewClient, filtered out Thought parts, added client_test.go (internal/gemini coverage 38.8% → 75.2%, 7 files +482/-84 lines)
13:19–13:25 coder-tests → qa → pm PR #13 (2f052c3)
Closes #10 Refactored translator.Service to use ArticleClient / TextTranslator interfaces; added WithBaseURL / WithHTTPClient and Retry-After to devto.Client; added +1,300 lines of unit tests, driving coverage sky-high across the board (see table below)
13:26–13:37 coder-ci → qa → pm PR #14 (6759615)
Closes #11 Upgraded .github/workflows/go.yml to 4 CI Jobs (Build, Test & Format, golangci-lint, govulncheck, Secret Scan (gitleaks)), added .golangci.yml (v2), fixed test_security.sh, and cleared all 10 lint warnings in one pass—4/4 GitHub Actions green

Test Coverage Before vs. After

After the first two batons finished, the jump in go test -race -cover ./... was immediately noticeable:

Package Coverage Before Coverage After
internal/translator 10.9% 100.0%
internal/utils 48.9% 100.0%
internal/devto 0.0% 92.7%
internal/images 84.1% 84.1%
internal/gemini 38.8% 75.2%

A Highlight Moment in Practice: The Stall Monitor Actually Proved Its Worth

During the third baton, after coder-ci finished local tests, pushed PR #14, and waited for GitHub Actions to complete, the message board went quiet for a few minutes while the four CI jobs ran. Then at 13:34, the background monitor detected that all members were silent and proactively chimed in with a reminder:

@coder-ci [stall] #18 (posted at 13:26) is for you and has no reply; everyone else is waiting.

Enter fullscreen mode Exit fullscreen mode

That reminder immediately woke coder-ci up. After confirming all four jobs in gh pr checks 14 were green, it smoothly handed off to qa for verification and then to pm to merge and close the issue. This mechanism—"stay quiet and burn zero tokens when everything is fine, wake up the exact person who needs to act when stalled"—is genuinely practical in real development workflows.


4. Takeaways & /swarm Adoption Checklist

After actually applying the official /swarm and agy-swarm-playbook concepts to a real project, I've distilled 5 direct takeaways that you can use as a checklist when trying out /swarm:

  • 1. Lock down role boundaries and permissions upfront: Coders only write code and open PRs, qa only verifies and never sneaks in code edits, and pm only files issues, accepts, and merges. Simply drawing this line clearly eliminates the vast majority of blind spots where "the AI writes the code and tweaks the tests to make itself pass."
  • 2. Ground state in GitHub Issues & PRs: Echoing the first rule of agy-swarm-playbook—write requirements and acceptance criteria into GitHub Issues, and produce real PRs and CI check records at each stage. Even if you need to pause midway or hand off to someone else, all context stays crystal clear on GitHub.
  • 3. Leverage isolated Worktrees + start each baton sequentially from the latest main: When requirements have sequential dependencies (like this run's SDK rewrite → adding tests → adding strict linters), don't force everyone to edit the same repo simultaneously. Wait for the previous PR to merge and sync local main before spinning up the next share worktree to get a zero-conflict development experience.
  • 4. Add a monitor to your Swarm and keep the Coordinator lightweight: The Coordinator should only read reports, make decisions, and spawn/retire workers—never jump in to read huge files or write code itself. Paired with a Stall Monitor, the whole team can practically reach the finish line without a human manually nudging progress.
  • 5. When scaling up, graduate straight to agy-swarm-playbook's scripted approach: If you only have 3–5 issues today, coordinating via Coordinator + PM like this is more than enough. However, if your backlog has dozens of issues and you want it running for hours, bring in ready.sh, claim.sh, land.sh, and ux_sweep.py from kazunori279/agy-swarm-playbook to hand mechanical locking and merging entirely over to code.

References & Project Links

Top comments (1)

Collapse
 
mohamed_karim_2dddebb42bd profile image
mohamed karim •

Thank for sharing antigravity in action