Skip to content
Gopi Krishna Tummala
Esc

Back
Intermediate Agentic AI 11 min read

How to Design a Team of Agents for a Task

By Gopi Krishna Tummala

Most multi-agent designs fail in the same way: someone draws an org chart of agents before working out what each one is supposed to hand to the next. This is the method in the other order.


You have a task big enough that one agent in one conversation won’t do it well. Maybe it’s researching, planning and building an app. Maybe it’s migrating a service, producing a technical report, or auditing a codebase against a standard. The question is the same: how do you turn one task into a team?

The common answer is to invent roles. A researcher, a strategist, an architect, a reviewer, a QA engineer — it feels like progress, and it’s usually the wrong move, because an org chart of agents mostly produces several documents saying the same thing in different formats, at several times the cost.

A team is worth building when the work has distinct deliverables that hand off to each other, and worth splitting only where separation buys something specific. This post is a method for working that out, in six steps. I’ll run one example through all of them: an app where you pick a technical topic, explain it out loud for three minutes, and then get questioned on your explanation by a model that looks for the gaps. Research, plan, build, release. The steps are the point; substitute your own task as you go.

One honest note before the method. I haven’t shipped that app, and this is a design, not a build log. The steps come from how these pieces behave on engineering work, and the places I say it will break are where I’d expect it to break, not where I watched it. Treat any “agents built my startup” write-up without costs and failure counts the same way.

Step 1: Map the deliverables, not the roles

Start by writing the phases of the task and, for each one, the artifact it produces and what the next phase needs from it. No agents yet.

For the example:

Discovery   -> who has the problem, what exists, what a session costs
Definition  -> requirements, the screens, the API contract
Build       -> the app, the service, the tutor prompt and rubrics
Evaluation  -> does the app work, and is the tutor any good
Release     -> metadata, privacy declarations, build

The handoffs are where the design is. Build needs the API contract from Definition; evaluation needs the rubrics, which are decided in Build but belong to Evaluation’s judgment. If you can’t name the artifact a phase produces, that phase isn’t a phase yet, and no agent will fix that.

This step kills a lot of imagined roles. “Product strategist” sounds essential until you ask what file it produces that someone else reads.

Step 2: Apply four tests before splitting anything

Now decide which phases get their own agent. A separate agent is justified when at least one of these holds. If none holds, keep the work in the main loop.

Does it need a different context? An agent reviewing a diff wants the diff and the conventions, not the forty messages of reasoning that produced it. Different context, real split.

Should its judgment be independent? The agent that produced an analysis will defend it; the agent that wrote the code will find it correct. Whenever you want an opinion that isn’t downstream of someone’s own work, separate it. This is the strongest reason on the list.

Can it run in parallel without writing? Read-only investigations fan out beautifully: four competitors, three services, five failing tests. Nothing conflicts because nothing is written.

Does it need different permissions? A role that must not write to source files is best expressed as an agent whose tools don’t include writing, rather than as an instruction asking it nicely.

Against that, the costs: every agent multiplies model calls, and anything that coordinates agents has to pass context down and reconcile what comes back. Two agents writing to the same files cost more in conflicts than they save in time.

For the example, four separations pass and the rest don’t:

SplitWhich test it passes
Parallel research (competitors, pricing, reviews, cost)Parallel, read-only
A critic that attacks the planIndependent judgment
Mobile and service implementationDifferent context, parallel — only once the contract exists
Evaluation of the tutor’s qualityIndependent judgment, different context

“UX researcher,” “business analyst” and “product strategist” all fail every test: same context, same sources, no independence, nothing to parallelize. They collapse into one research fan-out.

Step 3: Give every agent a contract

An agent definition that says “you are a senior architect” is a costume. What makes a role work is the same thing that makes a ticket work:

  • Inputs: the files it reads. Named paths, not “the codebase.”
  • Deliverable: one artifact, at a path, in a stated shape.
  • Acceptance criteria: how anyone can tell it’s done, ideally a command.
  • Tools and scope: what it may call, and what it may write to.
  • Stop condition: when to come back rather than keep going.

The critic from Step 2, written this way:

---
name: plan-critic
description: Attack the product plan's assumptions. Read-only.
tools: Read, Grep, WebSearch
---

Read product/market-research.md, product/business-model.md and
evaluations/cost-model.md.

Your job is to make the strongest case that this plan fails. For each
claim, say what evidence would be needed, whether it is present, and
what the plan assumes without support. Rank findings by how much
damage the assumption does if wrong.

Output to product/critique.md. Do not edit any other file.
Do not propose fixes; that is someone else's job.

Two things matter there. The tools line is what actually makes it read-only — the instruction alone wouldn’t, as Part 5 covers. And “do not propose fixes” keeps the deliverable sharp; a critic that also designs solutions starts defending its own.

Step 4: Put the state in files, not the conversation

This is the step that decides whether the thing survives past a day. A long task cannot live in a conversation: context gets compacted, sessions end, and by week three nobody can say why the schema looks like that.

Every decision a later phase depends on becomes a file when it’s made:

product/       research, requirements, business model
architecture/  system design, schema, api-contracts.md
evaluations/   rubrics, test cases, cost model
decisions/     one file per decision, with the reasoning and the date

Two of those earn special mention. api-contracts.md is what makes parallel implementation possible at all; without it the two agents invent incompatible interfaces and you pay for both. And decisions/ is the one everyone skips, because the question later is never “what did we choose” but “why, and does the reason still hold.”

This is the argument from Part 4 — a repository an agent can operate in — applied past code to everything the task decides.

flowchart TB
  MAIN["Main loop<br/>plans, delegates, integrates"]
  REPO["The repository<br/>contracts, decisions, rubrics"]
  R["Research agents<br/>parallel, read-only"]
  C["Critic<br/>read-only"]
  I["Implementers<br/>write, scoped by contract"]
  E["Evaluator<br/>judges the result"]
  MAIN --> R --> REPO
  MAIN --> C --> REPO
  REPO --> I --> REPO
  REPO --> E --> REPO
  REPO -. "the next session starts here,<br/>not from the chat log" .-> MAIN

Agents hand artifacts to each other through the repository. Nothing important lives only in a conversation, so any session can be resumed or restarted.

Step 5: Put gates where “no” is a real answer

Between phases, decide who approves and what a rejection means. A gate that can only be approved is a status update.

For the example: is this worth building, is the architecture and its cost acceptable, is the quality good enough for real users, did real users come back, and finally the submission. The two that matter most are the ones people skip.

A cost gate before implementation. Have an agent compute the unit cost of one session — speech in, model turns, speech out, infrastructure — and multiply by plausible monthly usage for a subscriber. It’s an hour of work with a number at the end, and it occasionally shows that the business model can’t work, which is cheapest to learn before any code exists. The general form: for any task with recurring runtime cost, price one unit of work before building the thing that does it at scale.

A validation gate that agents cannot pass for you. Agents will produce a forty-page market report overnight; it is not evidence. Evidence is ten to fifteen real engineers finishing a real session, and whether they come back a week later. The general form: name the cheapest experiment that could show the whole idea is wrong, and make sure a human runs it.

Step 6: Name what can’t be delegated

Some limits are capability and some are accountability, and conflating them causes trouble in both directions.

For a task that ships a product: whether it should exist, what it costs, the developer accounts and legal agreements, the store submission, anything touching users’ money, and responsibility for the result. An agent could plausibly fill in a store listing form. It shouldn’t, because the privacy declarations are claims you are making, and a wrong one is your problem. Let the agent prepare — draft the metadata, assemble the screenshots, run the checklist — and keep the act of submitting.

There’s one more boundary specific to building a product that itself contains an agent, and it’s easy to get wrong: the agents that build the thing and the agent inside the thing are different systems. The build-time agents read your whole repository and run commands. The tutor your users talk to needs conversation state, speech, and scoped access to one user’s data — and none of the build system’s powers. They share artifacts, the rubrics and test cases, through the repository. They never share permissions.

Where it will go wrong

Worth planning for, because these are predictable:

Research that agrees with you. Ask whether your idea is good and agents tend to find support. The fix is the Step 2 critic with an explicit mandate to kill it, not a more careful prompt.

Drift between parallel writers. Two implementers diverge the moment the contract is vague. Write it first; treat changing it as its own reviewed decision.

A confident, wrong evaluator. An agent judging quality will sometimes mark a good answer bad. You need a small set of known-good and known-bad cases written by hand — the part your own expertise makes you qualified for.

Coordination costing more than the work. If five agents and a hundred calls do what one agent and a good test suite would, the design is wrong. Track cost per completed task, rework rounds and how often you had to intervene; those numbers tell you whether the team is earning its keep.

What I’d remember

  • Map deliverables and handoffs before inventing roles. If you can’t name the file a role produces, it isn’t a role.
  • Split only when a test passes: different context, independent judgment, parallel read-only work, or different permissions. Otherwise keep it in one loop.
  • A role is a contract, not a costume. Inputs, one deliverable, acceptance criteria, tools, stop condition — and the tools, not the prose, are what make it read-only.
  • State lives in files. Contracts enable parallel work; a decisions log answers the question you’ll actually have later.
  • Gates need a possible “no.” Price one unit of work before you build at scale, and keep one validation step that only people can pass.
  • Separate what can’t be delegated from what merely could be. Accountability doesn’t transfer, and an agent inside your product is not the same system as the agents that built it.

Where to go next

Questions to sit with

  1. Take a task you’d like to hand to agents. What are its phases, and what file does each one produce?
  2. Which of your intended roles survives the four tests, and which collapse into one?
  3. What is the cheapest experiment that would show the whole plan is wrong, and who has to run it?