MMOOZZGG.com

How to build an AI agent

Multi agent AI systems: how a team of agents works and when it pays off

5 min read8 sources

Multi agent AI systems are teams of AI agents with roles: one takes a request, a second prices it, a third drafts the contract. Anthropic measured that such a team uses about 15 times more tokens than a normal chat, so build one only where a single agent hits a limit.

On this page · 4 sections

A team and a head of AI are needed

Roles and handoffs

Each agent in a team has its own instruction, its own tools and its own area of responsibility. An intake agent reads the request, a pricing agent takes prices from the price list, and a contract agent builds the document from a template. The manager sees the result, not the agents’ messages to each other.

An agent’s role is written into its instruction in plain words: what it does, what it does not do and to whom it passes the result. The narrower the role, the less often the agent goes beyond it and the easier it is to find who made a mistake.

Tasks pass between agents in two ways. The first is called a handoff: an agent gives the task to a colleague. The OpenAI Agents SDK documentation gives this example: in support, separate agents answer about order status, returns and common questions.

The second way is like a department with a boss. CrewAI, an open framework for teams of agents under the MIT license, has a hierarchical process: a manager agent plans the work, gives out tasks by skill and checks the result. A framework here means a ready program skeleton into which you write your own roles.

For simple chains, a sequential process is enough. Tasks go in order, and the result of one becomes the input of the next: request, then pricing, then contract.

A ready team of agents that see the same customers and the same data is what we build as an AI department. It is a product for the company, not an experiment on one process.

What teams are built with

A programmer builds a team of agents. No-code builders handle one agent well, but roles, handoffs and shared memory are described in Python or JavaScript libraries.

CrewAI came out in December 2023 and is distributed under the MIT license. In it, a team is described like a staff list: role, goal, task and order of work. Step-by-step build on CrewAI is covered in a separate guide.

LangChain and LangGraph are open libraries for agents and chains in Python and JavaScript, also under MIT. In LangGraph you build your own workflow, where predefined steps are combined with the agent’s decisions. This makes it easy to add checks between agents.

The OpenAI Agents SDK came out on 11 March 2025: agents, handoffs between them, guardrails and tracing. Guardrails check what an agent receives and what it returns, and tracing records each of its steps.

All three tools are free as code. You pay for the models, the server and the work of the people who build the team and keep it running.

When one agent is enough

In December 2024, Anthropic advised starting with a simple solution and making it more complex only when needed. Sometimes this means not building an agent at all and writing the process steps into ordinary automation.

The LangChain documentation says the same about teams. Not every complex task needs a team: one agent with the right tools and instruction often gives a similar result.

A team is justified in three cases. One agent has too many tools and gets confused about which to choose. The tasks need different knowledge and large volumes of documents. Parts of the work can run in parallel.

The price of a team shows in the costs. A token is a piece of text that you pay for when a model reads or writes it. Anthropic measured that an agent uses about 4 times more tokens than a chat, and a team of agents about 15 times more.

In return, a team can do what one agent cannot. Anthropic’s research system, where a lead agent hands out search to subagents, scored 90.2% higher than a single agent on an internal test in June 2025.

Tasks where agents keep waiting for each other fit poorly: Anthropic says directly that tasks with many dependencies between agents do not suit teams well yet. Our review of complexity levels will help you see where your task stands.

Managing a team of agents

A team of agents needs a manager, just like a team of people. In the CrewAI hierarchical process, this is the manager agent, and the process will not start without it: you set a model or a separate agent for this role.

A person stands above the manager agent. This person sets the team’s metric, accepts the result and decides which agent gets a new task or loses an old one.

The team’s metric is set the same way as for one agent: the share of requests taken to a contract without a person, the time from request to invoice, the number of pricing errors. It is written down before the build and compared with how the process worked without agents.

A team’s mistakes do not show at once. In early versions of Anthropic’s system, the lead agent launched 50 subagents for a simple question. So each step is written to a log: tracing in the OpenAI Agents SDK exists for exactly this.

Each agent gets its own permissions. The pricing agent reads the price list but does not change it. The contract agent prepares the document but does not send it to the customer without a lawyer’s check.

In a company, people and rules are responsible for a team of agents: who sets tasks, who accepts the work, who switches an agent off when it fails. Without such an owner, a team of agents soon becomes a set of scripts that nobody manages.

Sources and fact-checking

Checked by the editors on 16 October 2026.

  1. Anthropic, 19 December 2024 (anthropic.com)
  2. Wikipedia, December 2023 (en.wikipedia.org)
  3. GitHub, repositories langchain-ai/langchain and langchain-ai/langgraph, 2026 (github.com)
  4. OpenAI, 11 March 2025 (openai.com)
  5. Anthropic Engineering, 13 June 2025 (anthropic.com)
  6. CrewAI Docs, Processes, 2026 (docs.crewai.com)
  7. OpenAI Agents SDK Docs, Handoffs, 2026 (openai.github.io)
  8. LangChain Docs, Multi-agent, 2026 (docs.langchain.com)

Found a mistake? Tell us

Publications

Contact us