One night I was rolling out store descriptions for a wallpaper app into a dozen languages, and I had handed a single agent everything: first-pass translation, terminology cleanup, and length fitting. The result looked tidy. But in one language a key term had switched halfway through, and I had no trail showing where it happened.
What I'd like to say up front is that multi-agent work isn't hard because of the number of agents. It's hard because of what passes between steps, and where you decide to stop. This article walks through how I've come to think about that, assuming an environment like Antigravity where several agents can run side by side. Product behavior (what resumes automatically, how much you can see) changes between versions, so I'll stick to design ideas that hold up regardless.
One agent versus several
A single agent or chat that moves from requirements to implementation, tests, and docs is comfortable because it all stays in one place. The cost is that earlier agreements fade as the context grows, and contradictions show up late.
Splitting the work keeps each agent's context short. The trade is a new failure point: the hand-off. You gain one thing and take on the other, so it helps to look at both.
Implementation team
├─ Design: reads requirements, writes a design memo
├─ Build: writes code against the memo
├─ Tests: derives tests from the spec
├─ Review: reads the diff, returns findings
└─ Docs: writes usage notes from the settled spec
You don't need five roles on day one. I started with two, build and review, and added a role only where I felt a gap.
Two ways to cut a task
By phase. Design, build, verify, hand over. Each output feeds the next, so dependencies read naturally.
By feature. User accounts, catalog, cart, payments, notifications, each given to a different agent and joined at API boundaries. This parallelizes well, but if the boundary agreements are vague, everything breaks at integration time.
When I can't decide, I ask whether I can write the boundary agreement down in plain sentences first. If I can't, it's too early to cut by feature.
Mapping dependencies
Relationships between tasks fall into three kinds: serial (B can't start until A is done), parallel (A and B are independent), and partial (B needs only part of A's output). The third is the easy one to miss. Treat it as serial and you wait for nothing; treat it as parallel and you start with missing input. When I draw the arrows, I write one phrase on each: what exactly is being passed.
Hand-offs that don't break: a message contract and progress tracking
A dependency diagram says nothing about the shape of the data agents actually exchange. When that shape drifts, a workflow stalls without making noise. That was exactly my problem in the translation rollout: the "first-pass result" looked slightly different every time, and I couldn't tell where information had gone missing.
So I pinned every message to one contract: sender, recipient, type, payload, metadata, and a tracking ID.
// Minimal inter-agent message contract
const message = {
from: "researcher",
to: "writer",
type: "request", // request / response / error
requestId: "req_12345", // carried across every step for tracing
payload: {
topic: "terminology consistency for store listings",
keyPoints: ["apply the glossary", "length limits", "form of address"],
constraints: { minSources: 3 }
},
metadata: { priority: "high", createdAt: new Date().toISOString() }
};With requestId carried through every step, you can see which request sits at which stage, and when something fails you replay only that step.
A loop that resumes only the stuck steps
Keep a small loop on your side that runs each step once its dependencies have succeeded and records the state.
async function runWorkflow(steps, agents, requestId) {
const results = {};
const progress = {}; // ledger keyed by step
for (const step of steps) {
const blocked = step.depends.find((d) => progress[d] !== "done");
if (blocked) {
progress[step.id] = "skipped"; // upstream not finished
continue;
}
try {
progress[step.id] = "running";
results[step.id] = await agents[step.agent].execute({
requestId,
input: step.depends.map((d) => results[d])
});
progress[step.id] = "done";
} catch (err) {
progress[step.id] = "failed"; // record it instead of halting everything
console.error(`[${requestId}] ${step.id} failed: ${err.message}`);
}
}
return { results, progress };
}With the ledger you stop restarting from zero. Pull out the steps marked failed or skipped, rerun only those, and reuse what already succeeded, which also saves tokens.
What helped most was writing progress straight into the logs. Reading it back later showed me which steps tend to fail, and that became the material for rethinking how I split roles in the first place.
Two worked examples
A REST API. A design agent drafts the OpenAPI spec. A build agent writes handlers against it. A test agent derives happy-path and failure cases from the same spec. A review agent checks auth, input validation, and query handling. A docs agent writes usage notes once the spec settles. Build and tests can run together only if the spec is stable; if it's still moving, both redo their work.
A front end. A design agent fixes the screen structure and component list. A build agent writes components and layout. A wiring agent connects the API and error states. A verification agent checks speed and accessibility. I keep verification separate from build so it doesn't inherit the builder's assumptions.
Reviewing from several angles
One reviewer tends to lean in one direction. Splitting review by quality, performance, security, and conventions reduces blind spots. But four streams of findings cost the reader time, so I read the high-severity ones first and batch the minor ones for later. The final call on merging stays with me, not with an agent.
How much to run in parallel
More agents doesn't always mean faster. I look at three things: how many tasks are truly independent, the token budget, and how much output I can realistically read. The third was missing from my early estimates. I once ran four at a time, ended up with more output than I could review, and my own work stalled. I keep it to two or three now.
Failure handling
If an upstream step fails, its dependents don't run; the loop above already encodes that. Each output is checked when the next agent receives it, and only the faulty part is sent back. Set a cap on retries, because without one you can burn the whole budget trading the same finding back and forth.
Drawing the line for a small start
- Don't create a role whose responsibility you can't state in one sentence.
- Fix the hand-off format before the first round trip.
- Start with two or three agents and add only where there's a gap.
- Keep progress and failure reasons in logs, and read them weekly.
- Watch run time, token use, and success rate, and adjust the role split.
A few shapes are worth avoiding: roles so fine-grained that coordination outweighs the work, circular dependencies where agents wait on each other, tasks assigned outside an agent's strengths, and setups that need so many manual fixes that the automation stops paying off.
Closing
I've come to feel that a multi-agent setup is worth less for how many pieces it has than for what passes between them and where you still decide. Let the agents share the work, but keep the hand-off format and the final call in your own hands. I'd rather keep that line even as the number of steps grows.
If you'd like a place to start, split one task you're doing today into two roles, fix a single message shape, and run one round trip.