← All guides
BUILDERS AND DEVELOPERS · 7 MIN READ · UPDATED 15 NOVEMBER 2026

How to Design a Multi-Agent Team That Works

How to design a multi-agent team: split the job into roles, run research in parallel, add a critic and repair step, cap turns and spending, and test it.

A single AI model asked to do a whole job at once tends to do every part a little badly. Splitting the job between focused agents makes results reliable, if the split is designed well.

To design a multi-agent team, give each role one job and only the tools it needs, run independent research in parallel, then plan, then have a dedicated critic check the result and a repair step fix what it flags. Cap every role's turns and the team's spending, and test it by reading run transcripts.

Each decision below is illustrated with how the Trip Planner is organised, and the guide ends with a Java sketch. It applies on the no-code path and in code.

Step 1: Split the job into roles

Start from the deliverable and work backwards. Ask what distinct kinds of work go into it, and give each kind its own role. The usual building blocks are:

RoleIts one job
ResearcherGather facts and record where each came from
AnalystWork out what the facts mean and where they are weak
Planner or writerProduce the deliverable
Critic or reviewerCheck it against your standards
ReviserFix what the critic flags

A role is well defined when its expected output fits in one sentence. If it needs "and" three times, split it; if two roles keep passing the same material back and forth, merge them.

Step 2: Decide what runs in sequence and what runs in parallel

Some steps depend on others: you cannot write a plan before the research exists. Others are independent: researching the weather does not need the restaurant list. Run independent work in parallel and dependent work in sequence.

The Trip Planner shows the pattern clearly:

  1. Parallel research. About ten specialists run at the same time: destination, places, weather, events, stays, transport, food, safety, local tips and experiences.
  2. Sequential planning. An itinerary architect takes all of that and builds the day-by-day plan, priced against the budget.
  3. Check and repair. A trip critic reviews the plan and a reviser rewrites the flagged days.

Parallel research is faster and keeps each specialist focused, but spends tokens faster, so the caps in step 5 matter.

Step 3: Add a critic and a repair step

The single most useful role in most teams is a critic that does not share the author's blind spots. Give it a strict brief and concrete criteria, for example "every day stays within the traveller's pace, every venue is open on the day it is scheduled, the total is within budget".

Then decide what happens when the critic finds a problem. Rewriting the whole deliverable is slow and can break parts that were fine. A targeted repair step, like the Trip Planner's reviser rewriting only the flagged days, keeps the good work and fixes the rest. Always limit how many review rounds are allowed so the loop ends.

Step 4: Give each role only the tools it needs

Tools are how agents check facts against the world instead of the model's memory. The Trip Planner's places specialist finds real places with opening hours through Google Places; the Medical Literature Review agent's scouts search research databases and its citations are validated before the report is written.

Keep access narrow. The writer usually needs no tools; the researcher needs search but nothing that changes data. Narrow tools make roles cheaper, easier to debug and easier to trust.

Step 5: Cap turns and spending

Agents loop: they call a tool, read the result and decide what to do next. Without a limit, a confused role can loop for a long time.

  • Turn caps per role. Set a maximum number of turns so every role finishes.
  • A spending cap for the team. On IntelliSwarm the buyer sets a spending limit for every run and is never charged more. Inside your own team, a budget stops a runaway run before it reaches that limit.
  • A cheaper model where judgement matters less. Gathering facts rarely needs the strongest model; planning and reviewing often do. What Does It Cost to Build an AI Agent? shows where the money goes.

Step 6: Set a deadline with partial delivery

Long runs sometimes hit a deadline because one source or specialist is slow. The wrong design throws everything away. The right one delivers what is finished and marks what is missing. A plan with one section marked incomplete is far more useful than an error message.

Design for this up front: make each role's output usable on its own, and have the final step assemble whatever is ready when time runs out.

Step 7: Test with transcripts

Test on realistic jobs, the kind buyers will actually send, and judge every result as if you were handing it to a client. When a run is wrong, slow or expensive, read the transcript rather than guessing. IntelliSwarm records every model call of a run, so a problem can be traced to the role and the step that caused it: a researcher that searched the same thing five ways, a critic with vague criteria, a writer missing context from an earlier step.

Change one thing at a time and rerun the same jobs. How to Improve AI Agent Output Quality has more on this loop.

For developers: a sketch in Java with SwarmAI

SwarmAI is IntelliSwarm's open-source Java framework on Spring AI and Spring Boot (Maven ai.intelliswarm:swarmai-core). Agents are roles with tools and a turn cap, tasks are units of work, and a swarm runs them with a process type. This sketch has two independent researchers and a planner that depends on both, run in parallel layers, with a budget:

Agent destinationResearcher = Agent.builder()
    .id("destination")
    .role("Destination Researcher")
    .goal("Find what is worth seeing in {city}, with sources")
    .backstory("You verify every fact with a tool, never from memory.")
    .chatClient(chatClient)
    .tools(List.of(wikipediaTool))
    .permissionMode(PermissionLevel.READ_ONLY)
    .maxTurns(4)
    .build();

Agent budgetAnalyst = Agent.builder()
    .id("budget")
    .role("Budget Analyst")
    .goal("Price a {days}-day trip to {city} within {budget}")
    .backstory("You compute every total with the calculator.")
    .chatClient(chatClient)
    .tools(List.of(calculatorTool))
    .maxTurns(4)
    .build();

Agent planner = Agent.builder()
    .id("planner")
    .role("Itinerary Architect")
    .goal("Turn research and costs into a day-by-day plan")
    .backstory("You never schedule more than the traveller's pace allows.")
    .chatClient(chatClient)
    .maxTurns(3)
    .build();

Task research = Task.builder().id("research")
    .description("Research {city}").expectedOutput("Sights with sources")
    .agent(destinationResearcher).build();
Task costs = Task.builder().id("costs")
    .description("Estimate costs").expectedOutput("A costed budget table")
    .agent(budgetAnalyst).build();
Task plan = Task.builder().id("plan")
    .description("Write the itinerary").expectedOutput("A day-by-day plan")
    .agent(planner)
    .dependsOn("research")
    .dependsOn("costs")
    .build();

SwarmOutput result = Swarm.builder()
    .agents(List.of(destinationResearcher, budgetAnalyst, planner))
    .tasks(List.of(research, costs, plan))
    .process(ProcessType.PARALLEL)
    .budgetTracker(new InMemoryBudgetTracker(budgetPolicy))
    .budgetPolicy(budgetPolicy)
    .build()
    .kickoff(Map.of("city", "Lisbon", "days", "4", "budget", "the traveller's budget"));

The research and costing tasks have no dependency on each other, so they run at the same time in the first layer; the plan task declares the tasks it needs with dependsOn and runs after them. The tools are injected Spring beans, and budgetPolicy is a BudgetPolicy built as in the tutorial. To add a critic, run the draft through the ITERATIVE process with a reviewer as the managerAgent and a concrete qualityCriteria. The Java tutorial builds this step by step, and Multi-Agent Orchestration Patterns compares every process type. Agents built this way can be packaged as a container and published on the marketplace.

Ready to design your own team? Describe the job and IntelliSwarm drafts the roles for you to edit. Start building your agent → Need integrations or a custom build? Browse builders or post a request. The pillar guide, Build Your Own AI Agent, covers every route.

Frequently asked questions

How many agents should a multi-agent team have?

As many as there are distinct kinds of work in the job, and no more. A no-code team on IntelliSwarm typically has a few roles such as researcher, analyst, writer and reviewer, while a research-heavy agent like the Trip Planner fans out to many parallel specialists before planning.

When should agents run in parallel?

When their work does not depend on each other. Independent research, such as weather, transport and food for a trip, can run at the same time, while the plan that combines them must wait. Parallel runs are faster but spend tokens faster, so cap them.

Why does a multi-agent team need a critic?

A critic checks the result against concrete criteria and does not share the author's blind spots. Pairing it with a repair step that fixes only what was flagged keeps the good work and corrects the rest.

How do I stop an agent team running up costs?

Cap each role's turns, set a budget for the team and use cheaper models for simple roles. On IntelliSwarm the buyer also sets a spending limit for each run and is never charged more than it.

Do I need to code to design a multi-agent team?

No. On the no-code path you describe the job and your method, IntelliSwarm drafts the team, and you edit the roles and tools in plain language. Developers who want full control can build the team in Java with SwarmAI.