Michalina Graczyk

Multi-agent without the magic: why would you need more than one AI agent?

6 min read
🇬🇧
aiagentsmulti-agentllmquality-assurance

This post is translated from Polish. Read the original

You know this slide. Six colorful icons with labels: Architect, Reviewer, Test Generator, Bug Analyst, Documentalist, Orchestrator. Arrows between them, and the speaker says: “our team of AI agents designs, writes and reviews tests on its own”.

The audience takes photos. Everything happens by itself, everyone nods that they understand. Until you are left alone with your own project.

It looks great. But what really happens under the hood? And do you even need it?

Before I answer, we need to establish what an agent itself is.

What is an agent?

A regular chat with a model works like this: you write, the model answers, the end. You start every next step.

An agent is a model that has been given tools and works in a loop. It can read a file on its own, run the tests, look through the logs, fix the code and run the tests again. It decides by itself which step to take next and when the task is done. You give it a goal, not a list of steps.

In QA practice, it is for example Claude Code that gets the task “this test is flaky, fix it”, and then runs the test ten times on its own, reads the trace, replaces hard-coded waits with assertions that wait for the page state themselves, and checks the result.

When does one agent stop being enough?

One agent with good instructions is enough for many tasks. Problems start in three situations.

1. The context bloats. Every file it reads, every log and every answer stays in the conversation. With a big task (for example a test audit across three repositories), the model starts to lose what was at the beginning. The more junk in the context, the weaker the answers.

2. The model evaluates its own work. An agent that wrote a Page Object has all its justifications in context: why it did it this way and not another. Asked to review the same code in the same conversation, it will defend it. It is the same situation as a dev reviewing their own PR.

3. Tasks could run in parallel, but they run one after another. Three independent modules to review do not need to wait for each other.

What is multi-agent?

Multi-agent is a setup in which several agents do a task, and each of them has its own context. Most often, the main agent (or you) splits the work, sends the pieces to helper agents, and at the end merges their results.

Each helper agent:

  • starts with a clean slate and sees only what it was given,
  • can have limited tools (for example a reviewer can only read files, with no right to edit),
  • can work in parallel with others,
  • returns a result, not its whole working conversation.

This solves all three problems from the previous section. The context of the main conversation stays clean. The reviewer does not know the author’s justifications, so it looks with fresh eyes. Independent pieces run at the same time.

A few patterns worth knowing

In the article “Building effective agents”, Anthropic describes several proven setups. These are the closest to daily QA work:

Pattern How it works Example in QA
Sectioning Independent pieces of the task done in parallel, then merged Reviewing tests in three modules at once
Voting The same task done several times independently; you trust what repeats The same PR goes to three independent reviews, you report only problems flagged by at least two
Orchestrator-workers The main agent decides by itself how many parts to split the task into and what to give each “Find out why the regression suite takes twice as long as a month ago”
Evaluator-optimizer One agent creates, a second evaluates against criteria, the first one fixes An agent writes a Page Object, a second gives feedback, the first fixes it while there are critical errors

At Anthropic, sectioning and voting are two variants of one pattern: parallelization. And “evaluator-optimizer” is the same idea you know from LLM-as-a-Judge, only with a loop of fixes.

Voting is especially interesting for testers, because it is simply non-determinism put to work: you trust what repeats. A single agent can make something up, and several independent ones are less likely to make up the same thing.

The catch is in the word “independent”. Three copies of the same model with the same prompt make similar mistakes.

Remember the big screen from Calpe? The model invented the most probable scenario, so three agents would probably point to the same beach.

That is why it is worth varying the prompts, and sometimes the models too.

The dark side: cost and complexity

More agents do not automatically mean a better result.

  • Tokens. Every agent reads its context from scratch. In the description of its research system, Anthropic says that multi-agent setups use more than ten times as many tokens as a regular chat.
  • No shared memory. Agents do not know what the others agreed on. If the Architect made a decision, the Reviewer will not learn about it until someone passes it on.
  • Harder debugging. When the result is bad, you have to find out which agent made the mistake, and at which stage.
  • Tightly coupled tasks split badly. If every part depends on every other part (for example a refactor of one class used everywhere), parallel work ends in conflicts.

The main advice from the Anthropic article is something we know well: start with the simplest solution that works, and add complexity only when the simpler one really stops being enough.

Checklist for this post

  • Does your agent start to lose what it established at the beginning of the task?
  • Does the same agent write and review its own code?
  • Do you have tasks that really can run in parallel, or do they only look like it?
  • If you use voting, do the agents differ in prompt or model, or are they three copies of the same thing?
  • Do you know how many tokens one run costs you, and is the result worth it?
  • Do you start with one agent before you add more?

If you have already made your first attempts with agent teams, let’s connect on LinkedIn. I would love to hear what worked for you, and what ended up as just a nice slide.

Take it easy, start with one agent. 🤖

Stay up to date with LLM and QA! 🚀

Practical notes on testing, QA processes and modern quality strategy. No fluff - for testers and leaders who want to get quality right. The newsletter is in Polish.

When you join, you agree to receive news from me. You can unsubscribe at any time.