Skip to content

Teams of specialist agents

When a single agent has to do everything, its instructions grow and it starts to make mistakes. It is better to share the work: a coordinator that talks to the user and several specialists, each one with short instructions and the tool it needs.

In this video, the customer care of an electronics store solves in a single message an enquiry about three topics (orders, returns and product), in two ways: first with the specialists as tools of a coordinator, then as real workers of a Supervisor Agent.

There are two ways to join the agents:

Specialists as toolsSpecialists as workers
How they connectThe specialist’s output → Tools of a coordinator AgentThe specialist’s Agent output → Worker Agents of a Supervisor Agent
What each specialist receivesOnly the text the coordinator writes for itThe whole state: the conversation as it is and what the others did
What it gives backA textIts work stays in the shared state
When to use itOne-off tasks the coordinator hands outSeveral agents working on the same case

Specialists as tools

  1. Each specialist is a regular Agent, with its instructions (System Prompt) and its tools. In the video, each one has a Python Code that looks up the store’s data; in your company, that is where the connection to your own system would go.
  2. In the specialist’s Tool tab, write a clear name and description: that is what the coordinator reads to know when to ask it for help.
  3. Connect the specialist’s output to the coordinator’s Tools. For the coordinator, each specialist is one more tool.
  4. The coordinator’s instructions say who to turn to for each topic, never to make anything up, and how to answer the user (in the video, in a single message).
  5. Each agent can use its own model: for example, a more capable one for the coordinator and a faster, cheaper one shared by the specialists.

In the Playground, on the left, you see each specialist’s steps: who the coordinator asked and what it got back.

Specialists as workers of a Supervisor Agent

This is a real multi-agent system: the supervisor and its workers form one system that shares its state.

  1. Add a Supervisor Agent with its instructions: which agent covers each topic, and that it should hand the work to each one until every part is covered, without solving any part itself.
  2. Connect each specialist’s Agent output to the supervisor’s Worker Agents. The agent’s name (Agent Name) and description are what the supervisor reads to share out the work.
  3. In Output Mode, last_message makes each worker leave only its conclusion in the state; full_history leaves everything it did, with more text to read for the ones after it.
  4. In each worker’s instructions, ask it to handle only its part and to use what its teammates already found. Since it sees the whole conversation, without that it may try to answer everything.
  5. Give each agent the model its task needs: in the video, DeepSeek Pro for the supervisor, which decides, and DeepSeek Flash, faster and cheaper, for the specialists.

In the video, the product agent checks the charger of the laptop the orders agent found, without anyone passing it on: it reads it from the shared state.

Tips

  • One specialist, one topic. If its instructions start covering two topics, split it in two.
  • Ask the coordinator not to answer anything that does not come from a specialist or a tool.
  • To cover a new topic, add another specialist and connect it to the coordinator or the supervisor; the others stay as they are.
  • Try the same enquiry several times in the Playground before you rely on it: with fast models, a worker or the supervisor may skip a step.