← все видео

Build Multi Agent Teams within Claude Code!

Yashica Jain · 2026-02-24 · 19м 35с · 47 366 просмотров · YouTube ↗

Топики: ai-loop-engineering

🎧 Аудио

📝 Summary

model=deepseek-v4-flash · prompt=summary-v7 · 6 332→2 267 tokens · 2026-07-20 11:55:19

🎯 Главная суть

Claude Code позволяет создавать целую команду AI-агентов (Agent Teams), которые параллельно работают над одним проектом: один ведущий (team lead) координирует несколько отдельных инстансов Claude Code (teammates), общающихся через общий список задач и почтовый ящик. Функция пока в бета-режиме, включается вручную через settings.json, но уже позволяет развёртывать сложные многоагентные пайплайны на обычном английском языке.

Структура Agent Teams

На верхнем уровне — team lead (основной сеанс Claude Code), который создаёт команду, назначает задачи и синтезирует результаты. Под ним несколько teammates — независимые инстансы Claude Code, работающие параллельно над своими кусками. У них общий shared task list, где задачи перечислены, агенты забирают их по одной и отмечают как выполненные. Для коммуникации между агентами служит mailbox. Такая архитектура позволяет каждому агенту иметь собственный контекст и не наступать на территорию других.

Когда применять Agent Teams

Согласно документации, Agent Teams эффективны, когда параллельное исследование добавляет ценность. Конкретные сценарии:

Автор сводит все к двум базовым случаям: получение разных перспектив и параллельное выполнение разных задач.

Настройка и активация

Для использования Agent Teams нужно сначала установить Claude Code (команда npm install -g @anthropic-ai/claude-code). После запуска (claude) рекомендуется сменить модель с дефолтной Sonnet 4.5 на Opus 4.6 (команда /model). Agent Teams по умолчанию отключены, так как экспериментальны. Для активации требуется выполнить три команды в терминале:

  1. Создать директорию, необходимую для настроек.
  2. Добавить в settings.json соответствующую конфигурацию.
  3. Проверить успешность добавления.

После этого любой новый сеанс Claude Code может создавать Agent Teams — для этого в промпте нужно явно указать "create an agent team". Остальное описывается на простом английском.

Пример: анализ безопасности OpenClaw (параллельные перспективы)

Автор демонстрирует создание четырёх агентов для анализа OpenClaw (популярный AI-агент, вызвавший споры о безопасности):

Team lead ждёт завершения всех агентов, затем синтезирует их выводы в финальный вердикт с рекомендациями. Результат сохраняется в файл. В отчёте приведены конкретные числа: 512 уязвимостей, 8 критических, 135 тысяч открытых инстансов, 341 «зловредный навык», проблемы с plain-text хранением учётных данных и принципиальная нерешаемость prompt injection. Агент-адвокат дьявола указал на три смены названия, катастрофические сбои в продакшене, невозможность соблюдения HIPAA/SOC2/GDPR и утечку 1,5 млн API-токенов через Molodbot. Team lead резюмирует: OpenClaw инновационен, но безопасность вызывает тревогу; даёт рекомендации для тех, кто всё же решит его использовать.

Автор подчёркивает: агенты работают независимо — их мнения не влияют друг на друга, итог формирует только team lead.

Пример: генерация LinkedIn-поста (последовательный пайплайн)

Второй пример — написание LinkedIn-поста про Agent Teams. Создаётся команда из пяти последовательных агентов (каждый ждёт завершения предыдущего):

  1. Исследование темы (данные, примеры, технические возможности, паттерны внедрения).
  2. Написание черновика.
  3. Переписывание в голосе автора (с заданными характеристиками).
  4. Критика — выявление слабых аргументов, клише, логических дыр.
  5. Оптимизация для виральности (несколько вариантов хуков, форматирование LinkedIn).

Team lead синтезирует финальный пост с альтернативными заголовками. Автор показывает результат — текст, начинающийся с «16 AI agents just built a production C compiler in two weeks. A senior team would take six months…», с тоном, характерным для LinkedIn-публикаций.

Создание переиспользуемого скилла (skill)

Чтобы каждый раз не писать длинный промпт, автор создаёт в Claude Code скилл LinkedIn post, который автоматически запускает описанный шестиагентный пайплайн, принимая только тему. Внутри скилла можно дополнительно указать информацию об авторе, типичном контенте и целевой аудитории — всё это будет учитываться при каждой генерации. Скилл становится доступен глобально по имени через /. После этого для создания поста достаточно ввести /LinkedIn post и тему.

Автор тестирует скилл на теме Agent Teams, добавляя контекст о предстоящем видео. Результат — готовый пост с цифрами (16 AI agents, $20k, 2000 сессий) и заключением о том, что работа с агентами напоминает управление джуниорами. При этом часть данных берётся из интернета, что может быть нежелательно — автор отмечает, что скилл можно отредактировать, чтобы убрать нерелевантные факты.

Ограничения и стоимость

Agent Teams потребляют больше токенов, чем один сеанс Claude Code (очевидно, из-за нескольких параллельных инстансов). Функция находится в бета-режиме, возможны недоработки, но автор оценивает её как «80–90% от ожиданий». При этом технология будет быстро улучшаться. Для одноразовых параллельных задач скилл создавать не обязательно — достаточно прямого промпта; скилл нужен только для многократного повторения одного и того же пайплайна.

📜 Transcript

en · 3 737 слов · 47 сегментов · clean

Показать текст транскрипта
What if instead of one AI coding assistant, you could coordinate an entire team of AI coding assistants that work parallelly on the same project and handle separate tasks together? That is exactly what Cloud Code made accessible for everyone and it is called Agent Teams. Using just plain English, you can get an entire team of AI agents working for you parallelly. And in this video, I'm going to show you exactly how you can orchestrate your own AI squad. So if you're ready, let's get started. For the people who are watching me, the first time my name is yashika jain i am an ai automation expert and my job is to use ai to convert manual tasks into automated processes so that businesses save a ton of time money as well as headache if you're interested in working with me and my team don't forget to check out the description if you want to keep seeing similar content don't forget to subscribe to the channel now let's get started so let's quickly understand how agent teams work within cloud code So at the very top of the hierarchy, we have the team lead, which is the main cloud code session, whose job is to create the team, create its teammates and then coordinate tasks. Then obviously we have the teammates that work under the team lead and all of these are separate cloud code instances working parallelly on their assigned tasks. Then we have a shared task list where all the tasks that have to be done are clearly mentioned and the teammates claim them one by one and mark them as complete once done. And then we have the mailbox which is basically the communication system between the agents. Now when exactly should you use agent teams? So let's have a look at what Claude Cole's documentation says. So it says that agent teams are most effective for tasks where parallel exploration adds value. So when you need different angles or perspectives, that is where Claude Codes agent teams can really help you. And that is exactly what the first point is talking about, which is if you want to investigate different aspects of a problem, you can use agent teams. Apart from that, if you want each teammate to have their own separate piece without stepping on one another, then again, this is a great use case to use. The other great one could be debugging. So if you want teammates to test different theories in parallel and converge on the answer faster, then you can use this. And the last point, which is also my personal favorite, is the cross-layer coordination. So if you want, you can assign different fields to different agents. Agent 1 works on the front end, Agent 2 works on the back end, Agent 3 is working on the tests. So that is what is cross-layer coordination. So for me, it comes down to two use cases. So if you want to get opinions from different perspectives, you can use agent teams. And secondly, if you want to parallel play on different tasks, then you use agent teams. Alright, so that's about it. Now, how do we exactly use it? So the process remains the same regardless of if you're using Cloud Code within a terminal or if you're accessing it through an IDE, all you have to do is follow along. Alright, so I'm within VS Code and let's go ahead and open a folder. Now, let me go ahead and start a new terminal. Even if you're using your own terminal or command line prompt, you can follow the same steps that I'm doing here. By the way, if there's someone who wants to learn the basics and the fundamentals of Cloud Code, then I'll link another video above here, which is basically a beginner's guide to Cloud Code. Alright, so if you already have Claude code installed, great. If not, just search for Claude code, go to the first link and copy this command right here. Come back here, paste it in the terminal, hit enter. Alright, and within a few minutes, it will install Claude code directly. As easy as that. And then you just have to type Claude. Now it's doing a quick security check, so just select yes and hit enter. Alright, so we have Claude up and running. If it is asking you to log in, just simply do that and then you will land right here. I am doing it through API usage at the moment. Now the first thing that we have to do before we go ahead and set up agent teams is to change the model. So just add a forward slash type in model, hit enter. and there you will see that the default model which is sonnet 4.5 is selected but we would essentially like to select office 4.6 now for the effort you have three options low medium high since we're just uh you know exploring at the moment i think low is going to be fine but if you're working on actual tasks then don't forget to change it to medium so we've selected low here and now let's hit enter all right now we're all set to go if you want to do a quick test you can say hi and see if it responds. Great. Now if you come back to the documentation, you will see that agent teams are experimental and are disabled by default. Meaning, if you just installed Cloud Code, that doesn't mean it enables agent teams for you. So in order to enable them, you will have to add this to your settings.json or environment. And they're also stating that agent teams have limitations right now. So you can think of it this way, that agent teams is in beta mode right now. So now let's go ahead and add this so that we can start using agent teams. Coming back to the terminal, just open a new one here. So we're going to run three commands to enable agent teams. The first is this one, which is going to create this particular directory. Now, every command that I copy paste, any prompt that I use would be available for you to copy paste. You'll find that in the resources linked in the description. It's going to be free to access. So that is the first command and let's hit enter. All good there. And then this is the second command which is going to basically add that to settings.json. So just paste it, hit enter, all good. And now let's quickly verify it. So that's the third command and there we go. So if you're seeing this, then that means that it has been added successfully. So now our Claude code instance is ready to create agent teams. In a new terminal, we're again going to type Claude and just make sure the model is Opus 4.6. So now let's go ahead and give it a prompt to create an agent team. Now remember every time you're telling it to create an agent team, you must mention create an agent team. Otherwise it's just going to do it itself and it's not going to create those parallel plot code instances. Now it's not necessary that you start the sentence with this, but somewhere in your prompt you must explicitly mention these words. Apart from this, you don't need to worry. In just plain English, you can tell it what you're trying to achieve and which different teammates or agents you would like to create. So let me give you an example so that you better understand it. So here's my simple prompt. I have started by telling it that I'm considering using OpenClaw for my project. So I'm not sure if you've heard about OpenClaw, but it is this AI agent that has got a lot of hype in these previous days and it has divided the internet into almost two different groups. There's one group that is using it for everything and there's this other group which is concerned about security. Well, I am somewhere in the middle of that, but just to give you an example, I have asked her to create an agent team to analyze security from different angles. One of the agents is going to evaluate the security risks and attack vectors. For example, prompt injection, etc. The other agent is going to research the best practices and mitigation strategies. The third agent is going to play devil's advocate on whether it should be used at all. And then there's going to be a fourth one that is going to identify appropriate versus inappropriate use cases. Then I've told it that have the team lead synthesize all the findings into a final verdict with clear recommendation. Always delegate and wait for the teammates to complete their task before proceeding. so let's hit enter and let's see how this main cloud code session creates different cloud code sessions which are teammates which are going to do their own findings their own research and then let's see how it comes up with the final report why this topic is very interesting is because everyone has different perspectives about it so it's a great example all right so now let me hit enter and cloud code is doing its work So it's saying that I'll set up the agent team now. Let me launch all four analysts in parallel. All right. So now it's asking me if it can use the web search tool, which is needed to search the web and it is an inbuilt tool. So I'm just going to say yes. And I'm also going to ask it to not ask it like each time. So as you can see, we have four different task agents here. The first is the security risks and attack vectors. Second is best practices and mitigations. third is devil's advocate analysis and the fourth is appropriate use case analysis it is also mentioning the tools that it is using and also the tokens now obviously if you use agent teams it is going to cost you more tokens as compared to a single session that is like common sense but the end result that you're going to get is going to vary and you can press ctrl o to expand so let me do that there we go so here you can see everything in detail For example, this is the prompt for the Devils Advocate analysis. So here we can see that all four analysts are working in parallel. Let me wait for their reports to come in. Now this is basically the main team leader which is reporting everything to us. And here you can also go to these one by one. So for example, let's go to this one. So you can have a look at the progress, you can have a look at the prompt, you can go back. All right, so it seems my API balance became too low. So let me go ahead and add funds. Alright, so I just now added the balance, so let me just tell it to continue. So now you know how to handle this situation. Alright, and within the blink of an eye, it has been completed. Now, it could be a little difficult to read it from here, so let me just ask it to save this analysis to a file. Now, it is asking for my final permission, so let me just allow it quickly. Alright, and as you can see, the file has been created right here. So let me just do this. Let's close this. And now let's read it. so open claw security analysis team lead final synthesis so it is started by introducing what is open claw now here's the analysis from the first teammate which is security risks and attack vectors now mind you all of these teammates are working independently meaning analyst 2 would not change its opinion based on what analyst 1 said It is the final team leader which synthesizes all of their opinions. Alright, so here's what analyst one is saying. Let's read the main main things. So 512 total vulnerabilities, 8 classified as critical, 135,000 instances exposed, credentials stored in plain text, 341 malicious skills, prompt injection is fundamentally unsolvable. Now here's analyst two. So it's giving you the best practices and mitigations. so you can read through it is also giving security focused alternatives for example any 10 and similar ones so now here's analyst 3 which is devil's advocate which is my personal favorite it's kind of roasting open claw so i ship code i don't read three name changes production failures are catastrophic and silent regulatory compliance is impossible like hipaa sock2 gdpr Moldbot breach exposed 1.5 million API tokens. Then there's analyst for which is appropriate versus inappropriate use cases. So it's appropriate for personal productivity automation, individual developer hobby workflows, AI agent experimentation and learning in sandboxed environments, small team pilots. It's inappropriate for production enterprise systems, multi-tenant SaaS platforms. You know, basically what I told in my video at the very end, just in case you're interested, I'll link it somewhere above here. So now here's the team lead verdict. So So it's saying that OpenClaw is genuinely innovative product that demonstrates the future of autonomous AI agents. However, its security posture as of February 2026 is alarming. Then it's telling you if you decide to proceed anyway, follow these. Then here's the bottom line and it's also giving the sources from where it has found all of this information. So was it a good report or not? Now, if you give the same job to, let's say, ChatGPD or Claude, or if you just give it to like one Claude code instance, you will see the difference. You can compare it for yourself. So that was one of the examples where we tried to, you know, get parallel perspectives from different analysts and then different teammates and then consolidate them into a final report, which we have already got. And now let's put it to work and let's get something useful out of it that we can use inside our work. So let's close this coming back to the terminal. Let's start a new one. Let's type Claude. All right, Opus 4.6. So this time I'm telling it create an agent team to write a LinkedIn post about Claude code agent teams. So we're going to be using it to write a LinkedIn post. But what is different? So teammate one researches about the topic, the data, the examples, technical capabilities, adoption patterns, etc. Teammate two writes the first draft. okay teammate 3 rewrites it in my voice then i've told it how my voice is for linkedin then teammate 4 critiques everything like um points out loopholes flags weak arguments and cliches and teammate 5 optimizes for virality multiple hook options linkedin formatting you know and then the lead synthesizes everything into the final post with alternative hooks each teammate waits for the previous one to fetch so this time i have just chosen the topic as cloud code agent teams so let's go ahead and see what it creates all right so we have the final output so this is the post it came up with till here and then it is also given three alternative hooks So let's go through this. 16 AI agents just built a production C compiler in two weeks. A senior team would take six months. I spent 20k in compute. A human team would cost 300k. Obviously it just came up with these numbers because I just told it to write a LinkedIn post on plot code agent themes. I didn't give it much context. But the tone looks good. It sounds human-like and it is very much like a LinkedIn post for sure. So now this is where skills are going to come into play. Firstly, I won't be writing a LinkedIn post just once. I have to write it every few days and I wouldn't write this prompt each and every time. Instead, I would just like to give it the topic and it should follow this exact process to give me the final LinkedIn post. Apart from that, I would like to also give it context about who I am, what I do and, you know, my previous LinkedIn posts, etc. that it can reference to every time it is creating a new LinkedIn post for me. So that is why I'm going to ask it to create a skill called LinkedIn post that uses these agents in the exact same manner and the only variable is the topic. So basically I give it the topic and then it does the entire same process again. Now I have kept it short but then you can also mention pointers about yourself, about the types of LinkedIn posts you create. You can also mention about your target audience and it will make sure to add all of it in the skill. And that is going to be reference to every time a new LinkedIn post is generated. So it is giving the final draft of the skill. You can have a look at the skill, you can read through and let's go ahead and allow it. all right so the scale is now available globally across all your projects and it runs with the exact same six agent sequential pipeline and how you use it is that you mention the name of the scale and then you mention the topic for your linkedin post so let me just open a new terminal let's type claude here all right and here As soon as I enter the forward slash, I'm able to see my skill. So write a LinkedIn post using a six-agent team pipeline, teammate one researches, teammate two drafts, etc. So let's just type LinkedIn post. And now I just have to type the topic here. This time, let me give it much more context. All right, so I've basically given it more context about cloud code and agent teams and like what are its functionalities. And then at the end, I've mentioned that I have a video coming on this the coming week. What are your thoughts about it? Now let's go ahead and hit enter. So we've got the result. Let's have a look. Final post. 16 AI agents compiled a bootable Linux 6.9 kernel from scratch. 100,000 lines of C code, $20,000 across 2,000 sessions. This is the first multi-agent system that I have seen that works like an actual dev team and I have tested a dozen. Each agent gets its own context window and communicates directly with teammates. One agent leads and the rest execute specialized tasks independently. Where it shines, where it falls apart. A developer using it told me the biggest surprise wasn't the technical capability, it was how much it feels like managing actual junior engineers. we're moving from write this function prompts to here's the problem figure out who does what all right not bad but a lot of this came from the internet um which i would otherwise not include in my linkedin post so i don't know if that's a good thing or a bad one but i like the way it is uh closing it but yes it is completely linkedin ready so if you ever want to make any changes to it you can simply tell plot code to make change to that particular skill for example let's say um you don't want it to include these lines or make false promises that you have actually not done in real life. So you can make cloud code, make a node of it in the scale. So I'm not sure if you've noticed, but we have created a complete workflow. In any turn, it would look like a huge workflow with multiple nodes and AI agents. But here, you're not seeing it, but on the back end, a lot of work is being done. And we were able to achieve it using plain English. And the best part, things are just going to get better from here. This is in beta mode right now, just imagine where this technology is going to go by the end of this year. Similarly, you can use Cloud Code's agent teams to work on your existing code bases, to work parallelly on different tasks. There's no need to create a skill each time until and unless you decide to use that pipeline, those agents, in the same manner again and again. So that was a breakdown by me on H&Teams. I really got excited the first time I heard about it and it kind of made up to 80 to 90 percent of my expectations. It's still lagging a little bit but as I said it's just going to get better from here. Alright so that was my breakdown on H&Teams. I hope the concept of H&Teams is crystal clear to you and you're going to go ahead and start using it. Use it where it makes most sense and get the most out of it. So yeah, that was pretty much it for this video. I really hope you got value out of it. If that was the case, don't forget to like the video and do subscribe to the channel. If you're interested in transforming your business with AI and automation, don't forget to check out our website. The link is in the description. You can go through the website and if you're interested, you can book a discovery call with us. If you're interested in getting on a one-on-one call with me, you can check out the link to my consultation calendar in the description. If you want to continue seeing more content like this in the future, don't forget to subscribe to the channel and make sure you turn on the bell notification. If you want to connect with me personally, you can send me a connection request on LinkedIn. So yeah, that is pretty much it for this video. I will meet you in the next one. Till then, bye!

⚙️ Pipeline jobs

StageStatusAtt.UpdatedError
download done 1/3 2026-07-20 11:52:31
transcribe done 1/3 2026-07-20 11:54:54
summarize done 1/3 2026-07-20 11:55:19
embed done 1/3 2026-07-20 11:55:20

📄 Описание YouTube

Показать
Prompts/Commands: https://yashica.gumroad.com/l/agent-teams

In this tutorial, I break down how to set up and orchestrate AI agent teams in Claude Code to supercharge your productivity. 

What you'll learn:
- How Claude Code agent teams work (team lead + parallel AI teammates)
- Step-by-step setup in terminal or IDE
- Live demo
- When and why to use parallel AI agents for your projects

Perfect for developers, AI enthusiasts, and automation pros ready to level up their workflow.

🔔 Subscribe for more Claude Code, AI automation, and agentic AI content!

---

✅ Get Custom AI Projects Built:
Work with us: https://www.automatezai.com/  

📞 Need guidance - for example, technical help?
Book a 1:1 call: https://calendly.com/automatezai/paid-ai-consultation-or-coaching-1-hour  

---

😇 About me:
Hi, I’m Yashica — an AI automation proclaimed nerd building AI solutions for businesses, advising 1:1, and sharing practical builds on YouTube.

💁🏼‍♀️ Connect with me:  
LinkedIn → https://www.linkedin.com/in/yashicajain9/  
X → https://x.com/yashicajain_  

🎥 My mic, camera & gear: https://www.amazon.in/shop/yashicajain

---

If this video helps, let me know in the comments 👇  

#claudecode #agentteams  

⏱ Timestamps:  
0:00 Introduction to Agent Teams
0:50 Structure of Agent Teams
1:30 When to Use Agent Teams
2:35 Setting Up Agent Teams
4:44 Enabling Agent Teams
5:54 Crafting Prompts for Agent Teams
7:36 Real-World Example #1
12:23 Real-World Example #2
14:10 Developing a Reusable Skill
17:53 Conclusion and Future of Agent Teams