When to use one AI agent or a team of agents
One AI agent or a team of agents? An AI agent takes a purpose and works toward an output. This lesson shows when a linear workflow is enough, and when an open-ended task needs a coordinator agent with subagents. It then reads Anthropic's advice to stay with a single agent unless you need a separate context, because a team of agents costs more tokens.
What you will learn: - Tell an AI agent apart from a linear workflow - Add a coordinator agent when the task is open-ended - Decide when a second agent is worth it - Delegate to subagents only when the token cost pays off
#aiagents #multiagent #subagents
Chapters
- Define what an AI agent is
- Spot a linear workflow
- Add a coordinator agent
- Read Anthropic's advice on subagents
- Delegate only when it pays
Transcript
Define what an AI agent is
An agent, like oftentimes you might know what is an agent. If you provide a purpose, this is the purpose, and this is what you need to do. It can be a browser agent, and you say, Okay, you browse this and you come with this as the output, then it can be able to do. But when you are cascading multiple things into a single agent, if it is a very linear workflow, for example, a linear workflow in the sense do this. you go to this site, you click on this, and you fill the form, and then you click submit and download this PDF.
Spot a linear workflow
This is a very linear linear flow, it's more like booking a demo form. You go to a website, you click and you follow certain instructions and you do it here the decision making is very linear where you you just open that page you fill the form and you submit it and you whatever the output is you wait for it and you download that PDF in such cases the output quality will be very high but when you are building an agent which is more not deterministic with a linear flow it it is not a linear workflow but there are multiple paths which can be can be done with open-ended questions then automatically these linear single agent won't work very well then you need to have like probably you you will be doing research you might be coordinating with multiple agents and so on a simple example is like writing agent if you are writing if you just give a single agent to write it every time it will start to write with whatever skill you provided it will write that but it can easily be detected as okay this look very AI ish and you might not get the necessary output for SU or GO so what you do you will do like okay first research and then find what are all the keywords that I need to top with my agent and then you will find okay these are the keywords I need to be focusing on and these are the keywords which I can do you know like long long phrases associated with those keywords instead of dumping all those keywords, what kind of strategy I can make and I can write, and then you decide with multi-agent and write different drafts and then combine all those drafts from multi-agent once it is finished.
Add a coordinator agent
Like a like a coordinator and manager, you can say a manager agent is managing and coordinating how many agents need to be spawned and how you can write it and then how you can review it and all those things with subagent you can deliver. So you need to decide when to use an AI agent and when to use a multi-agent.
Read Anthropic's advice on subagents
Anthropic released one of the article that with frontier models, as much as possible, don't design or they they didn't say don't design, but oftentimes don't go for sub agent unless and until it is necessary, unless and until you need a separate context, you can always go for a single agent, and those agents are much easier because it can share context and it will be able to perform well. That's true, and also it it is true as well as not true. the devil is in the detail, like when you are sharing context between one agent to another agent, it is better to create single agent if you are going for frontier model. But if you are going for more cheaper model where you know reasoning capacity or their context size is not one million or so, then you need to have clear system engineering in place, like when to compact, where what to store outside and what to read, who need to read at what point, and all those things. So then it's it depends heavily on the system. so when you are invoking Opus 5.5 or Fable, then probably you can throw whatever you want and it will be able to handle it doesn't need to be a systemic memory or graph database or anything like that. But when you are going for very cost-effective model for certain operations, then you need to pick and choose based on when to look for it. But usually this you keep in mind the cost and the number of tokens will definitely be higher for multi-agent because the coordination cost and you know contact loss, context laws and sharing your context between each other will cleanly go above.
Delegate only when it pays
So use it with care. When to delegate, when to have sub agents, when not to have sub agents is one of the major trial and error at this point that you need to decide based on what model you are and what problem you are solving. Is it open-ended question, or it is a close-ended question where you can determine it deterministically do your workflow, then decide what agent to go for.
This lesson is cut from the free Lightning session Build a Multi-Agent System with MCP. The Live Labs build the same system with you, free, on Thursdays: see the Live Labs.
