After This Video, You'll Actually Understand Agent Orchestration

Burke Holland www.youtube.com

Краткое содержание

В этом видео рассматривается оркестрация агентов, новая тенденция в разработке, когда один агент управляет работой других. Объясняется, как это работает, и стоит ли использовать это сегодня. Ключевые моменты:

  • Оркестрация агентов позволяет одному агенту вызывать другие, создавая подобие команды разработчиков.
  • В Copilot CLI и Visual Studio Code можно создавать и настраивать агентов и субагентов.
  • Субагенты имеют изолированные контекстные окна, что позволяет эффективно использовать ресурсы.
  • Представлен пример ультралегкой структуры оркестрации с агентами-планировщиком, кодировщиком и дизайнером.

Введение

Введение в оркестрацию агентов, новую тенденцию для разработчиков. Подчеркивается, что сейчас все находится на стадии разработки, и не стоит пытаться сразу понять и использовать все новые возможности. Важно выбирать инструменты, которые подходят именно вам и повышают вашу продуктивность.

Что такое оркестрация?

Объяснение оркестрации агентов на примере обычной работы разработчика. В обычной ситуации разработчик отправляет команды разным агентам (локальному, фоновому, облачному) и сам выступает в роли оркестратора. В оркестрации агентов один агент вызывает другие, что стало возможным благодаря новым инструментам Copilot CLI и Visual Studio Code.

Оркестрация с пользовательскими агентами

Обсуждаются возможности, которые открываются благодаря оркестрации агентов. Можно создать виртуальную команду разработчиков с тимлидом, архитекторами, кодировщиками, дизайнерами и менеджерами проектов. Основная идея заключается в том, что агенты оркестрируют работу других агентов.

Агент-оркестратор

Рассматривается структура оркестрации с агентом-оркестратором, планировщиком, дизайнером и кодировщиком. Агент-оркестратор отвечает только за координацию работы между разными агентами, не выполняя никакой работы самостоятельно. Он конфигурирует инструменты, такие как вызов субагентов и память. В prompt агента-оркестратора указывается, что он должен разбивать сложные запросы на задачи и делегировать их специализированным субагентам, координируя их работу и сообщая результаты. Важно, чтобы оркестратор не указывал субагентам, как выполнять работу, предоставляя им свободу принятия решений.

Агент-планировщик

Агент-планировщик отвечает за создание планов, не занимаясь написанием кода. Для этого агента используется модель GPT52. Prompt агента-планировщика должен быть кратким и четким, чтобы он выполнял свою задачу.

Агент-кодировщик

Агент-кодировщик использует GPT52 Codeex, специализируясь на написании кода. У него есть доступ к различным инструментам, включая MCP-сервер context 7 для чтения документации. В prompt агента-кодировщика подчеркивается, что он должен ставить под сомнение указания оркестратора и принимать собственные решения. Также указываются принципы чистого и простого кода.

Дизайнер

Агент-дизайнер отвечает за UI, UX и стилизацию. Для дизайна используется Gemini 3 Pro, так как эта модель дает лучшие результаты в этой области. Prompt агента-дизайнера должен предоставлять ему полную творческую свободу, не ограничивая его жесткими рамками.

Оркестрация в действии

Демонстрация работы структуры оркестрации на примере создания веб-интерфейса для мобильного приложения. Для агента-оркестратора используется Claude Sonnet 45, так как эта модель обладает высокой "агентивностью". Claude Sonnet 45 хорош в координации, а GPT52 Codeex - в написании кода. Агенту-оркестратору дается задание создать веб-интерфейс, похожий на мобильное приложение, с использованием Firebase.

Улучшение оркестрации

Обсуждаются возможные улучшения структуры оркестрации. Например, можно улучшить передачу плана от планировщика к кодировщику, сохраняя план в документе и передавая его. Также можно разделить работу между несколькими агентами-кодировщиками, работающими параллельно. Предлагается попробовать ультралегкую структуру оркестрации, доступную по ссылке в описании видео. Подчеркивается, что представленный пример - это лишь один из способов использования оркестрации агентов, и важно выбирать модели и структуру, которые лучше всего подходят для ваших задач.

Summarize any YouTube video in seconds

Get summaries like this one for any video, in your language, with the free Summ app.

Download on the Apple Store
Get it on Google Play

Расшифровка

YouTube Transcript Generator

0:00 Agent orchestration, otherwise known as what? Yes, the latest hot trend for vibe coders or agentic engineers is here. In this video, we're going to take a look at what it is, how it works, and whether or not you should use it today. And as always, please remember all we have right now are new features and ideas, and we're kind of figuring out how things work in real time. So, don't feel compelled to understand and use all of this stuff. In the end, use what's right for you. Whatever works, whatever makes you productive, that's the right thing. You ready? Let's go. Now, the best way to understand agent orchestration is just to look at it from what you're doing today. So, in your editor of choice, maybe you send a chat command.

0:47 What does this project do? And then you can send another chat command. And maybe this one is research design for iOS apps. And on this one, you're going to send it to a background agent. And so now you have two agents going at the same time, a local agent and a background agent. And maybe you even have a cloud agent. Now, in this scenario, you are the orchestrator. You are running all of these different agents. And maybe you're using Opus for some and Cloud for others and GPT5 for others. But in an agent orchestration scenario, you actually have one agent that calls others. And this is possible because of the recent tooling that has arrived for both the Copilot CLI and Visual Studio Code. So if we were to go

1:34 to the Copilot CLI here, so let's just fire that up. So the most naive way that we could orchestrate agents here is to just have them call each other. And we can do that just by saying it like this. Review the code in this project for accuracy and improvements and security flaws. When you're done with your findings, run them by both GPT52 codecs and Gemini 3 Pro. Iterate with these two models to see what their ideas are, what their findings are, and then come back with a complete plan on what we can do to improve this project. Now, I'm going to send this prompt. And in this case, believe it or not, this is

2:20 all we have to do in the Copilot CLI. It will actually pick up the different models we want to use. And it doesn't even matter that it got it wrong here. And it said GPT52 codeex with a K, whatever that is. Uh, it should actually figure this out on its own and then delegate to these different agents. Let's see if it does that. So, you see here it says, now I have the full codebase. Let me launch three parallel reviews. It's running GPT52 codecs in Gemini 3 Pro. And it's doing this all at the same time. So most people don't know this is possible, but yes, you can in Copilot have one model call other models. You don't have to use just one in a chat session. You can use all of them. And that's exactly what's happening here. All right. So I sped that up, but you can see what happened here. It called the generalpurpose GPT52

3:07 codeex agent here and the generalpurpose Gemini 3 Pro preview agent here. Now what these are is something called sub aents and these are available in both the CLI and in Visual Studio Code and they are super powerful because sub agents can be called by the main agent but sub agents can have whatever model you want them to have and then uh as you can see it went through it created a plan here for us and it's quite a long plan. We're not going to look at it because this is a real project that I'm working on that I want to show you. Now you can probably see that this opens up a lot of possibilities. Um, first and foremost, if you have an agent that can call other agents, then essentially you could just build your own dev team, right? Like you could have a team lead and architects and

3:54 coders and designers and planners and PMs. I mean, why not? You can have as many sub aents as you want. And so that is the general idea behind agent orchestration is that you have agents orchestrating other agents. So let's actually see how this works in practice in a real project. So here's a real project that I'm working on. It is a replacement for the Gemini app on iOS because there are features that the Gemini app doesn't have. I'm tired of waiting for them and it's 2026. So you can just build your own. And so we can make a picture of cats playing volleyball just like this. send it and this will interact with Gemini API. It's just a chat app, but it's done the way that I like specifically in this app. I can edit history, edit my prompts and

4:41 resend them. For whatever reason, you can't do that today in the Gemini app. So, I just made it so that you could. So, we can edit this dogs playing volleyball. Now, what we want to do here is create the web experience for this this app because sometimes you use AI on your phone and then you go back to the web and you use it there. And so we want to create the web experience. We're going to use agent orchestration to do that. Now, we talked about how Visual Studio Code has custom agents and those custom agents are here. And you can define these custom agents just by clicking configure custom agent. So what we're going to do is we're going to create an orchestration framework that has an orchestrator with a planner, a designer, and a coder. And we're going to use all three of the big models to do

5:27 this. Sonnet, GPT52, GPT52 Codeex, and Gemini 3 Pro. So let's jump in and take a look at this first orchestrator custom agent. The orchestrator's entire job is just to orchestrate work between different agents. It doesn't actually do any work itself other than that. It's like a PM or a logistics coordinator. So you can see here the first thing that we do in our custom agent is configure the tools and it only has two. It has the ability to call sub aents with the agent tool and it has a memory and memory is new in copilot. You can use that today. And you can see here if we just scroll down the prompt is fairly simple. You're a project orchestrator. You break down complex requests into tasks and delegate

6:13 them to specialist sub aents. You coordinate work, but you never implement anything yourself. And then this is important for Visual Studio Code. We need to tell the orchestrator exactly what the name of the different sub aents it can use are. They are planner, coder, and designer. And we'll take a look at these. And then we have a workflow. It's fairly simple. understand, plan, break it down into steps, delegate it to the sub aents, coordinate between the agents depending on the work that was done, and then report the results back. Now, we have some rules down here lower that tell this orchestrator agent, don't tell sub agents how to do work because these agents really, really,

6:58 really want to do the work. And so, what I noticed is that the main orchestrator agent really wants to tell the sub agents exactly what to do. wants to give them the line to change exactly what to change. These models think they know everything and so you have to really go out of your way to make sure that they don't do that. So that's essentially what the rest of this prompt does. But you can see it's not terribly long. That's the orchestrator. So let's look at the planner. The planner custom agent, as you can see right here, let's jump into that. Has all of the tools. It can do pretty much anything. You create plans. You do not write code. And you can see and this is key here this model line 52. So this is how the agent knows which model to use. So when the orchestrator calls this sub aent, the sub aent is just going to use GPT52. So

7:45 we're using 52 for planning. You can see these prompts are not very long. Prompts don't need to be long and complicated to get the job done. They just need to do the job. So now let's take a look at our coder. The coder agent uses GPT52 codecs. That's what that model's good at is writing code. It's really good at writing code. That's all this agent does. And you can see here it's got a lot of tools and it has an MCP server called context 7. And context 7 is very simple. It has one tool just allows the agent to go and read the docs. And so here in the prompt, this is pretty simple except for this block right here. And this block is meant to counter the fact that the orchestrator is probably going to try to tell this agent what to do. And we're basically telling it, don't do that. Question everything

8:31 you're told. Make your own decisions. And then here are just some mandatory coding principles that I use for the coding agent. You don't have to have these, but I like to include these. And these are very generic terms like prefer flat explicit code over abstractions or deep hierarchies. Right? We're just trying to keep the code clean and simple. And so you're more than welcome to use these, but you don't have to. Now, let's take a look at the designer. The designer handles all of the UI, UX, and styling because, [clears throat] as it turns out, not all of these models are the same when it comes to design. And in fact, Theo has a great video on this that you should check out where he looks at which model is best for design. Spoiler alert, he doesn't think that it's Gemini 3 Pro. I tend to disagree. I

9:17 tend to get better results with Gemini 3, so that's what we're going to use. The designer prompt, probably the most simple of all. The model we're specifying, Gemini 3 Pro. I get way better results with design. With Gemini 3 Pro, I don't use Gemini for hardly anything else. But for design, it's unbeatable. And then here, look, I'm doing it again. You are the designer. Don't let the orchestrator tell you how to do your job because the orchestrator is going to try to do that. Instead, your goal is to create the best possible user experience and interface designs, focusing on usability, accessibility, and aesthetics. Conceptually speaking, the design agent needs to have full creative autonomy here. So, we don't want to give it a lot of guardrails. We really want to let it do what it does, which is design. So, that is essentially

10:03 the whole orchestration framework. It's ultra light. It's very small, but I want to show it to you in action. And what we're going to do is we're going to use this orchestration framework to build a web experience for the mobile app that we have. Now before we actually use this orchestrator agent, it's important to point out that what model should you use for the orchestrator? I use Claude Sonnet 45. And the reason that I do this is that Claude Sonnet 45 is very agentic, right? It's almost like a Labrador, right? It's like like it's just super eager, always trying to do things. And so we want to harness that. We want that energy. We want the agency that Sonnet 45 has, but we don't want it writing any code. It's not good at writing code. I would not recommend that you have Sonnet 45 write code. GPT52

10:50 Codeex is just way better at that. So we want the agency of Sonnet and we want the coding chops of Codeex. And that's what we're going to do here. To get that, we're going to have Sonnet be the orchestrator. Now, what we're going to do here is we're going to create the web experience for the mobile app and we're going to send it in and try to oneshot it. Probably won't be able to do that because it's quite complex, but let's see what our little orchestration framework can do. We want to create a web experience for this mobile app. We want it to look exactly like the mobile app or rather borrow the same design aesthetics from the mobile app. Uh, it should use Firebase. the mobile app is already using Firebase, feel free to use the Firebase CLI to get the resources

11:37 that you need or to stand up any resources that you need. Now, I'm going to send this prompt and let this thing go. This is going to take some time and then we'll come back when it's done, examine the chat history, and then take a look at what it's actually produced and see if orchestration works. All right, it finished and that did take some time, but let's scroll back up through the chat here and I just want to show you a few things because this is pretty fascinating. So, from our prompt here, you can see the first thing that it's doing is it's calling the planner agent just like it's supposed to. And that's going to use GPT52. And if we look at the planner agent, you can see the prompt that actually gets sent. The

12:23 user wants to create a web experience for their iOS Gemini chat app. here are the requirements. It's basically taking what I asked and boosting that prompt and then it asks for a plan and it gets the plan back. Now, after the planning agent is finished, it reviews the plan, reads it, and then delegates it to the designer to create a web design system. And again, we can dig in here and see the prompt. It's telling the designer a little bit of information about the application and then telling it to create, if we scroll down here, create a design system for this web application. And it puts it here in a markdown document right there. There it is. There's a design system complete with CSS styles and everything. That's Gemini

13:10 3 Pro doing its job. Now after the designer it starts to coordinate with the coder and then it calls the coder and then in the coder it says build a complete web application for the better Gemini chat app and it passes in the plan here and then down here you can see it uses the web design system that was created by the designer. Now, if we scroll back up, we go through here, you can see that now that we're inside the coder agent, it's using the context 7 MCP tool to query documentation and it just keeps going and going and then uh eventually finishes. So, let's go ahead and collapse this, compiles a list, and

13:56 then tells you what it has actually created here. Now, here's the most fascinating thing about all of this. Do you see the context window indicator down here? Look at this. Do you see how much context window we have not used? It created 2,77 lines of code and we've only used 10.8K of the context window. How is that possible? That's the magic of sub aents. They have an isolated context window. They only use what's theirs and then once the sub agent is done because it has its own context window, that's gone. It doesn't pollute the main context window. It just gets the result of what the sub agent does. Now, let's see if this actually worked and see if we have

14:41 a working web app. All right, here's the app. Let's go ahead. Can we sign in with Google? We can. Brilliant. Let's go ahead and click that. Okay, let's start a new conversation. All right, so already we have some issues. Again, we can probably open up our dev tools here and copy those errors out here and then take them back in and work with our orchestration framework to actually make this functional. But let's talk about this for a second and some improvements that we could probably make here. So, one of the things that I noticed is that when it created the plan, it didn't really pass much of the plan to the uh coder. It sort of just passed a highle overview of the plan. So, we might want to update the planner

15:26 to say save your plan in a document and always pass that document to the coder. Another thing that I noticed is that it ran one coder agent to do all of the work. Would have been better if it had sliced up the work into discrete chunks and then given that to five coder agents running at the same time because sub agents can run in parallel. You can do that. So, we have some tweaks to make to our orchestrator prompt here. If you would like to try this ultralight orchestration framework today, you can do that. It's here in the link below the video. And then you just need to install each one of these. Just click on the button that will open Visual Studio Code and install the agent for you. And these agents are exactly the same ones that we saw in this video. But remember, what I've created here isn't the end all be

16:12 all. It's just an example of how you can use a single agent to orchestrate multiple sub agents. But how you put it together is however it works best for you. Choose the models that work for you that make you the most productive. There's also other agent orchestration frameworks out there. Some really, really complex ones. You may have heard of them. Gas Town, GSD, and some others. You probably want to take a look at those as well. And that is basically agent orchestration. You can use this today at a very simple level. You don't have to have a hundred agents all out there doing various things all at the same time, checking each other's code, reviewing each other's pull requests. That'd be nice. But where we are today is that if you could get one agent to

16:58 delegate work out to a bunch of sub aents who are very good at different things, that's a great start when it comes to agent orchestration. Good luck and as always, happy coding.

Share

Краткое содержание видео YouTube