Sulat.com / Writing on AITuesday, December 1, 2026
Enter →
Agent Engineering/1 December 2026

Philipp Schmid’s agent swarm, run on a Laravel app

Google DeepMind's Philipp Schmid says a swarm is four parts. I built them around Gemini 4 Neon and ran a swarm and a single agent on the same Laravel job.

3D Gemini sparkle logo with six robot drones linked to one shared message board
Illustration: Sulat, featuring the Gemini logo

At a glance

  • Philipp Schmid of Google DeepMind says a swarm is a coordinator, isolated workers, a shared board and an independent verifier, and that it costs about twice the tokens for about twice the speed.
  • I didn't run Antigravity's /swarm itself. I rebuilt the four parts around Gemini 4 Neon, with a Carbon verifier, and ran them on a Laravel webhook-retries job.
  • All six clean runs, three single-agent and three swarm, passed all 12 hidden acceptance tests.
  • The swarm took about 1.6 times as long and read about 1.75 times the input tokens, because one worker's slice held the whole critical path.
  • Swarms suit broad work that splits cleanly and has a check the verifier can run; a small coupled job is cheaper with one agent.

Philipp Schmid, who works on agents and the Gemini API at Google DeepMind, published “What Are Agent Swarms?” on X on 30 November. His argument is that a swarm is four parts, that it buys parallel work and independent checking at the price of extra tokens, and that you can try one today with Gemini 4 Neon through /swarm in Google Antigravity.

I didn’t run /swarm itself. I rebuilt the four parts as a small harness over the Gemini API, with Neon as the coordinator and the workers, and ran it against a single Neon agent on the same job in a Laravel 13 app: webhook retries, a queue job and a docs page. Both finished the job correctly every time. The swarm took longer and read more tokens.

What Schmid says a swarm is

Schmid opens by saying multi-agent collaboration has become one of the hottest topics in AI. Until recently, he writes, most setups used one orchestrator handing fixed subtasks to sub-agents that ran in silos and reported back when they finished. Swarms work closer to a human 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 final. He lists four gains: parallel execution, clean context windows, independent verification and flexible model routing.

He breaks a working swarm into four parts and notes that not every swarm uses all four.

Four parts of a swarm: coordinator, workers, message board, verifier
A swarm is a coordinator, isolated workers, a shared board and a separate verifier. Illustration: Sulat
  • Coordinator or task queue. Splits the goal into slices that won’t collide and posts a brief for each worker saying what it owns and what done looks like.
  • Isolated workers. Each gets a fresh context window and its own sandbox or worktree, so noisy searches stay out of peers’ contexts and parallel edits can’t overwrite each other.
  • Shared message board. Workers post updates, ask questions and ping peers with @mentions on an append-only feed. Idle agents sleep on the board for zero tokens and wake only when mentioned.
  • Independent verifier. A separate agent checks outputs against the goal, runs the tests or checks sources, and posts fix requests back to the owning worker before anything is finalised.

In his trace each agent keeps its normal sandbox tools and gets three board tools: board_read, board_post and board_park. He says swarms pay off when a task is too big for one context window or too slow to run step by step, and names deep research, multi-package refactors, parallel bug hunts, independent review and model routing by role.

He also states the price. Citing Toby Ord’s swarm scaling analysis, he says four agents finish roughly twice as fast as one but cost about twice the total tokens, and that if a task lives in one file and takes two minutes, a single agent finishes cheaper and cleaner. His Neon example is a Node project; I’ve kept it as he wrote it:

Code
/swarm Add webhook retries across src/webhooks/ and docs/webhooks.md, run npm test to verify, and pin @verifier to a separate model.

He closes by saying 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. The post doesn’t include a measured comparison of a swarm against a single agent.

What Google’s docs add

Google’s Antigravity docs describe /swarm as a team of named agents that split your task, work on the pieces at the same time and coordinate on one shared board. It’s in preview, on all plans, in both the Antigravity App and the CLI, and the docs warn that every worker is its own agent, so a swarm uses quota much faster than a single conversation.

  • Your current conversation becomes the coordinator. It names the swarm, adds a worker per piece (the docs use @parser, @api-tests and @docs as examples) and gives each a public brief and a clean context.
  • A waiting worker uses no tokens until a post mentions it. A member that runs out of quota pauses instead of retrying.
  • In the CLI, /swarm board opens the live board, with Alt+S as the shortcut.
  • Swarm works in the current workspace by default, with per-worker working copies for overlapping edits.
  • The docs pair the verifier with a different model from the workers, and point at /boost for hard-rather-than-broad problems and /teamwork for work that runs hours or days.

The test: webhook retries in a Laravel app

The subject is a fresh Laravel 13.44 app on PHP 8.3 with four small pieces: a WebhookClient that makes one attempt with a five second timeout, a DeliveryResult, a queued SendWebhook job and docs/webhooks.md. The brief lives in the docs page as eight requirements. This is Schmid’s own example task moved from Node to Laravel.

  1. WebhookClient takes an optional sleeper in its constructor, new WebhookClient(sleeper: fn (int $seconds) => ...). The default calls sleep() and all waiting goes through it.
  2. deliver() makes at most three attempts. It retries on a 5xx, a 429 or a connection exception, and never on any other 4xx.
  3. With no Retry-After header it waits one second before attempt two and two seconds before attempt three.
  4. A Retry-After header of whole seconds on a 429 or 5xx replaces that wait. Any wait is capped at 30 seconds.
  5. Every attempt sends an X-Webhook-Id UUID, identical across the attempts of one call and different between calls.
  6. DeliveryResult reports the real attempt count and the last status, null if the last attempt threw.
  7. SendWebhook::handle() throws App\Webhooks\WebhookDeliveryFailed, a RuntimeException, when delivery fails after all attempts.
  8. The docs page gets a Retries section that mentions X-Webhook-Id and Retry-After.

Both arms got the same project and the same model. These are the exact prompts. The single agent got the first, the swarm got the second:

Code
Add webhook retries across app/ and docs/webhooks.md following the requirements in docs/webhooks.md, run php artisan test to verify.
Code
Add webhook retries across app/ and docs/webhooks.md following the requirements in docs/webhooks.md, run php artisan test to verify, and pin @verifier to a separate model.

The harness maps onto Schmid’s four parts. The coordinator is one Neon call that returns JSON: up to three workers, each owning disjoint files. Each worker is a Neon agent with its own context and four tools (read_file, write_file, edit_file, bash) plus the three board tools. The board is an append-only log, and a parked agent costs nothing until a post mentions it. The verifier runs on Gemini 4 Carbon, because the prompt pins it to a separate model. Workers share one checkout and own separate files, which is the default Google’s docs describe. The agents could run the real php artisan test suite as often as they liked.

The part that makes it a swarm is small. This is the board’s post and park, trimmed to those two methods:

Code
class Board:
    def post(self, sender, text):
        with self.cv:
            self.msgs.append((round(time.time() - T0, 1), sender, text))
            for n, st in self.state.items():
                if st == "parked" and f"@{n}" in text and n != sender: self.state[n] = "running"
            self.cv.notify_all()
    def park(self, name):
        with self.cv:
            idx = len(self.msgs); self.state[name] = "parked"; self.cv.notify_all()
            while self.state[name] == "parked" and not self.closed: self.cv.wait(2)
            if self.closed: return None
            return [m for m in self.msgs[idx:] if f"@{name}" in m[2]]

Every system and user prompt the agents saw, verbatim:

Code
COMMON (every agent)
You work in a Laravel 13 project (PHP 8.3) at the current directory. Run tests with `php artisan test`. Never touch vendor/.

SINGLE AGENT (system, after COMMON)
You are a coding agent with file and shell tools. Finish the task completely, then reply with a short summary.

COORDINATOR (system; Neon, one call, no tools)
You are the swarm coordinator. Split the goal into slices that will not collide: 3 workers maximum, each owning disjoint files. Reply with JSON only: {"workers":[{"name":"lowercase one word","owns":["paths"],"brief":"what to build and what done looks like"}]}. Do not include a verifier; one is added for you. Put the relevant requirement numbers from docs/webhooks.md in each brief.

COORDINATOR (user)
Goal: <the swarm prompt>

Project files:
<git ls-files for app, tests, docs, routes>

docs/webhooks.md:
<the file>

WORKER (system, after COMMON; Neon)
You are @<name>, one worker in a swarm. You own only: <paths>; do not edit other files. You have board tools: board_read, board_post, board_park. Read the board first, post interface decisions peers need, check the board mid-task, and when done post '@verifier ready: <what changed>' then board_park(). If a peer asks for a change to your files, make it, re-post ready, and park again.

WORKER (user)
Your brief from the coordinator:
<brief>

Goal: <the swarm prompt>

VERIFIER (system, after COMMON; Carbon)
You are @verifier, the independent checker in a swarm, on a different model from the workers. You do not edit files. Park on the board until a worker posts ready. Then read the code and docs against requirements 1-8 in docs/webhooks.md, run php artisan test, and post specific fix requests to the owning worker with @name. When every requirement holds and tests pass, post 'VERIFIED' and park.

VERIFIER (user)
Park until a worker posts ready, then verify.

To grade the work I wrote 12 acceptance tests and kept them out of the agents’ reach. They cover the retry count, the 1 and 2 second backoff, the Retry-After override and cap, the UUID header, connection exceptions, the job’s exception and the docs section. Two of them, so you can see the idiom Laravel’s HTTP fake gives you for this:

Code
public function test_02_default_backoff_is_1_then_2(): void
{
    Http::fake(['*' => Http::sequence()->push([], 500)->push([], 500)->push([], 500)]);
    $r = $this->client()->deliver('https://x.test/h', []);
    $this->assertFalse($r->delivered);
    $this->assertSame(3, $r->attempts);
    $this->assertSame([1, 2], $this->sleeps);
}

public function test_05_retry_after_replaces_backoff(): void
{
    Http::fake(['*' => Http::sequence()->push([], 429, ['Retry-After' => '7'])->push([], 503, ['Retry-After' => '3'])->push([], 200)]);
    $r = $this->client()->deliver('https://x.test/h', []);
    $this->assertTrue($r->delivered);
    $this->assertSame([7, 3], $this->sleeps);
}

What happened

Here is the swarm run in a real terminal, full length. The coordinator splits the job into @client, @job and @docs in under 20 seconds, the three workers read the same files and start writing, and the verifier wakes once the first worker posts ready.

The swarm run, recorded live in a terminal. Workers are green, yellow and white; the verifier is red.
Terminal log of the swarm run with the docs worker's ready post and park highlighted
The docs worker finished first, posted to the board and went to sleep. Screenshot from the run, annotated.

The single agent, same job, same terminal:

The single-agent run, recorded live in a terminal.

Every clean run produced working code. All six passed all 12 acceptance tests, and each run’s own tests passed too.

RunTimeInput tokensOutput and thinking tokensModel callsAgents’ own testsAcceptance tests
Single A258 s437k22k292212 of 12
Single B210 s235k17k202312 of 12
Single C (recorded)197 s173k19k132012 of 12
Swarm A503 s671k36k612212 of 12
Swarm B319 s358k30k432512 of 12
Swarm C (recorded)257 s454k28k532312 of 12
Three runs each on one job is a smoke test, not a benchmark. Neon throughout; the swarm’s verifier ran on Carbon.
Bar chart of seconds and input tokens for three single-agent and three swarm runs
Every run passed every check; the swarm runs took longer and read more tokens. Illustration: Sulat

The single agent averaged 222 seconds and 282k input tokens. The swarm averaged 360 seconds and 494k, about 1.6 times the time and 1.75 times the tokens. One swarm run, C, finished in 257 seconds, a second faster than the single agent’s slowest run. None beat the single agent’s fastest.

The recorded swarm run shows why. The coordinator split the job at 19 seconds. The docs worker finished at 81 seconds and the job worker at 131, and both went to sleep. The client worker, which owned the retry logic and the bulk of the tests, posted ready at 207 seconds, and the verifier posted VERIFIED at 256. The swarm’s time was its longest slice plus the verifier, and that longest slice, about 200 seconds, is roughly what the single agent needed for the whole job. The client worker alone read 169k input tokens, about the same as the entire single run. The other three agents were extra spend on top.

Swarm A is slower for a reason of my own making. I’d deleted Laravel’s example tests, which left an empty tests/Unit folder that git doesn’t track, so a bare php artisan test on the fresh tree exited with “Test directory not found”. Several workers hit it, and the verifier spent about four minutes on it before asking the docs worker to add a unit test so the folder existed. That isn’t in the eight requirements, so it’s a real catch by the verifier, and a fixture bug on my side. I fixed the project before the other runs.

Four other attempts don’t count. Three started from a working tree that still held an earlier run’s solution because my reset script missed it, and one swarm run showed no activity for its last five minutes and ran past eleven, so I stopped it.

How it sits against the research

Ord’s analysis finds a four-agent swarm needs about twice the total tokens of a single agent to reach the same result. Across BrowseComp, SEC-Bench Pro and Terminal-Bench he puts the scaling exponent on the speed-up between 0.48 and 0.68, well short of a one-for-one return. My 1.75 times on tokens sits close to his cost figure. His speed-up is a theoretical one that needs the slices to run in parallel for half as long, and mine didn’t, because one slice held the whole critical path.

The research Schmid points to is about something else. The s³ paper trains agents to decide for themselves when to work alone and when to share findings. Its abstract says swarms evaluated at twice the training size solved over 25 times more coordination problems than the strongest baseline, and that in exploration tasks communicating agents cut repeated work by nearly half and beat best-of-N by up to 9.4 percentage points. Hugging Face’s blog trains four Qwen3-0.6B agents that share one policy: success rose from 6.6% to 82.3% and generated tokens per team fell 37.4%, on about five hours of two H200s, roughly US$50 by its own estimate. Hugging Face’s task is four agents sorting numbers each can only see one of, so it tests whether small models can learn to talk, and it says a later post will compare at a matched budget on a task one agent could solve alone. That comparison is the one my test makes, and it’s the one Schmid’s post leaves out.

For other swarm products and views, see Replit’s Missions, which sends a swarm after a goal inside a spending cap, and Schmid’s earlier five habits for Gemini 4 Neon.

When to reach for one

Checklist of swarm good fits (big, separable, needs verifier) and poor fits (one file, coupled)
Swarms suit broad work that splits cleanly; a one-file job doesn’t. Illustration: Sulat

A four-file job with one long slice doesn’t need a swarm. It cost more and finished later than one agent doing the lot, and that matches the line in Schmid’s own post. The job where a swarm pays is the one he lists: several modules that don’t depend on each other, each big enough to take a worker minutes, with a check the verifier can execute. In a Laravel app that could be a package upgrade across many modules, with one worker per directory and php artisan test as the gate. I haven’t run that case.

Three things carried over from the test. Give the verifier something it can run, because the one real defect it found came from running the suite. Make ownership explicit by directory or file, because the workers never overwrote each other’s files once each knew what it owned. And budget for the tokens first, because every worker rereads the same files, so the cost lands before the speed does.

The harness, the 12 acceptance tests and the run logs aren’t published; every prompt and every figure above is what I used and measured.