Skip to content

Pattern

How AI sub-agents split work and run tasks in parallel

Sub-agents are helper agents that a lead agent starts for one well-defined piece of a larger job, each with its own fresh context, instructions and tools. Several can run at once and report back short findings, which makes broad tasks faster, at the price of more model usage.

StudiedLast reviewed 4 min read

Explained from public sources. Mai has not built this yet.

On this page

In plain English

When a manager has a big piece of research to do, they do not read every file themselves. They give three people a clear brief each (“you check the contracts, you check the invoices, you check the emails”), let them work at the same time, and read the three short reports that come back. Sub-agents are the same idea for AI. A lead agent splits a job into pieces, starts a helper agent for each, and puts the results together. The helpers work in parallel and keep their working notes to themselves, so the lead only sees what matters.

How it works

A fresh context per helper. The main benefit of a sub-agent is not that it is cleverer; it is that it starts clean. It gets its own instructions and its own context window, does a lot of reading and tool calls, and returns a condensed result. Claude Code’s documentation describes exactly this: each sub-agent runs in its own context, can be limited to a chosen set of tools, and only its summary comes back to the main conversation. The lead agent’s context stays clear for the decision it has to make.

Two shapes of parallel work. Anthropic’s guide to building agents separates fixed parallel steps from dynamic delegation:

  • Sectioning and voting. The split is known in advance. Check a contract for payment terms, liability and termination clauses in three parallel calls; or ask the same question three times and compare answers.
  • Orchestrator and workers. The split depends on the input. The lead agent reads the task, decides what pieces it needs, starts a worker for each and combines what they return.

The brief is everything. Anthropic’s write-up of its multi-agent research system found that vague delegation caused sub-agents to misread the task or repeat each other’s work. Their advice is that each sub-agent needs a clear objective, an output format, guidance on which tools and sources to use, and boundaries on what is out of scope. In practice the brief looks like a short ticket, and the output format is a fixed structure the lead can merge.

Task. Then Lead agent. Then Worker A, Worker B, Worker C. Then Combine and check. Then Run log.

A lead agent briefs workers, they run in parallel, and the lead combines short reports

Effort should match the task. A simple lookup needs one agent and a few tool calls; a broad review across many records might justify several workers. Anthropic’s team built that scaling into their prompts after finding their system spawned too many sub-agents for simple questions.

Sub-agents are not the same as specialists. A specialist agent is a standing role with its own area and permissions. A sub-agent is temporary: created for one piece of work and gone when it reports back. A specialist may well start sub-agents of its own.

Where it goes wrong

  • Cost. Each worker makes its own model calls. Anthropic reports multi-agent runs using many times the tokens of a chat, and concludes the approach suits high-value, broad tasks. For routine work, one agent is usually better. See agent cost control.
  • Dependent work split badly. Parallelism helps when pieces are independent. Tasks where every step depends on the last, which Anthropic notes is true of most coding, gain little and risk workers contradicting each other.
  • Duplicated effort and gaps. Thin briefs lead two workers to cover the same ground and nobody to cover the rest.
  • Lost detail. The summary is the point, but a worker can drop the one fact that mattered. Asking for sources and confidence in the output format helps the lead check.
  • Permissions that spread. A worker should never have more access than the agent that started it. Tool lists for workers should be narrower, not wider.
  • Hard to debug. Many agents running at once produce interleaved activity. Without a trace that links every worker to its parent run, nobody can explain the result (see traces and audit logs).

How Mai AI uses it

In a Mai AI system, I reach for sub-agents when a job is broad, read-heavy and splits cleanly: reviewing a batch of documents, gathering facts from several systems before a decision, or checking a draft from more than one angle. I keep them out of routine requests, where a single specialist does the job for less.

I design each worker’s brief as structured data (objective, sources, output fields, limits) rather than free text, and give workers read-only tools by default. Writing and sending stay with the agent that owns the task, so anything that matters still goes through human approval gates. Every worker run is recorded under its parent, so the audit trail shows who looked at what.

For work that stretches over days rather than minutes, the lead hands over to a long-running job instead. If you want to know where parallel work would actually save time in your operation, that comes out of designing your custom AI operations system.

Questions and answers

What is a sub-agent in AI?

A sub-agent is an agent started by another agent to handle one part of a task. It works in its own context with its own instructions and tools, and returns a summary of its result to the agent that started it.

Can AI agents work in parallel?

Yes. A lead agent can start several sub-agents at once on independent parts of a task, such as checking different sources, then combine what they find. This only helps when the parts do not depend on each other.

What is the orchestrator-worker pattern?

An orchestrator agent breaks a task into subtasks it decides on at run time, hands each to a worker, and combines the results. It differs from fixed parallel steps because the split depends on the input.

Do multi-agent systems cost more?

Usually, yes. Each sub-agent makes its own model calls, so total usage rises. Anthropic reports that its multi-agent research system uses far more tokens than a single chat, which is worth it only for valuable, broad tasks.

Sources

  1. How we built our multi-agent research system (Anthropic engineering)anthropic.com
  2. Building effective agents (Anthropic engineering)anthropic.com
  3. Create custom subagents (Claude Code documentation)code.claude.com