Getting the transcript
Reading the captions from YouTube. A video nobody has opened here before takes 10 to 30 seconds; this page fills in on its own.
Getting the transcript
Reading the captions from YouTube. A video nobody has opened here before takes 10 to 30 seconds; this page fills in on its own.

Google Cloud Tech · @googlecloudtech
Where viewers went back to watch this video again, from YouTube's public Most replayed graph, lined up with what was said at that moment.
Most replayed moment #1
2:052.0x the video's typical replay level
and then put together the generator agent and critique agent with sequential agent. And now let's test with ADK Web UI, by typing adk web. We will type our requests here, and in the tracing tab,
Said at 2:01
Most replayed moment #2
6:431.9x the video's typical replay level
before picking up the next tool. You can take a look at how we rewrite this coordinator example in the agent as a tool pattern in the code on the screen. All right. There you have it. We have covered everything from the simple single agent
Said at 6:38
Most replayed moment #3
4:141.8x the video's typical replay level
We also have this trip cost agent. And you can see from the code on the screen that we put the agent as sub-agent for this coordinate agent, where we use LM agent to implement it. Now we can see it in action in ADK Web UI.
Said at 4:08
The graph counts replays. It does not show where viewers stopped watching.
Words
1,165
Runtime
8:00
Speaking pace
146wpm
Reading time
5min
146 words per minute, below the 160 25th percentile of 349 measured videos. That distribution comes from the 349-video hook study.
Opening (first 30 seconds)
[MUSIC PLAYING] ANNIE WANG: Hi. Welcome back to this agentic pattern series. In the last part, we covered some use cases with agentic pattern from single agent to multi-agent pattern with sequential workflow agents and parallel workflow agents. And in today's video, we will explore advanced patterns with a coding example and demo to showcase, review, and critique with loop agent, hierarchical task decomposition with LLM agent and agent as tool. So by
73 words, the words spoken in the first 30 seconds at 146 words per minute.
Free, no signup. See how the first 30 seconds hold attention, with rewrites.
Sentence shape
| Measure | This transcript |
|---|---|
| Sentences | 71 |
| Average words per sentence | 16.4 |
| Longest sentence | 47 words |
| Questions asked | 1 |
| Sentences containing a number | 2 |
Most used terms
Filler phrases
3 in total: like 2 · actually 1.
A literal whole-word count of the same phrase list the Prepublish browser extension uses, so a phrase inside another word is not counted and a phrase used in its ordinary sense still is. It is a count and not a judgement.
What this transcript is
Every word below is the caption track YouTube publishes for this video, pulled from the video itself and reproduced unchanged. It is not Prepublish's writing, not a summary, and not a re-transcription: it is the video's own published captions. English captions, published by the channel, in the video’s original language. Source: the video on YouTube. A channel that would rather this page did not exist can ask for its removal through the contact page, and it is removed.
[MUSIC PLAYING] ANNIE WANG: Hi. Welcome back to this agentic pattern series. In the last part, we covered some use cases with agentic pattern from single agent to multi-agent pattern with sequential workflow agents and parallel workflow agents. And in today's video, we will explore advanced patterns with a coding example and demo to showcase, review, and critique with loop agent, hierarchical task decomposition with LLM agent and agent as tool.
So by the end of today's video, you will learn how to design a multi-agent system that gives your agents ability to iterate, self-correct, and dynamically choose the right tool for the job. All right, so for the first part of today's example is the loop, review, and critique pattern. When we design an agent system to plan a trip, what if you need the agent's output to meet a certain non-negotiable requirement? For example, you need to plan a trip to an event, but the hotel and event venue must be within 30 minutes of travel time.
And in this case, we can use this loop pattern and often implement it as a review and critique workflow. And here is how it works. So first, we have a generator agent that creates an initial trip plan. And then we have a critique agent evaluates that plan against our condition, for example, if this travel time is less than 30 minutes. So if this condition isn't met, the loop sends it back to the generator with feedback for revision.
This loop will continue until the plan is approved, or we hit a maximum number of iterations to prevent infinite loops. And this is a form of iterative refinement. So here is code implementation to demonstrate this agentic pattern. As you can see, we implement the critique agent with loop agent, and then put together the generator agent and critique agent with sequential agent. And now let's test with ADK Web UI, by typing adk web.
We will type our requests here, and in the tracing tab, you can see this loop in action. The planner generates a trip and the critique charts the travel time and rejects it. And the planner tries again with a different plan until it meets the condition. And this is really powerful when we need a task to be actually meeting certain conditions. The advantages of this pattern is that it can ensure output meets specific quality standards and any constraints.
It is helpful when we prioritize certain criteria. However, by getting into this many iterations, it increases latency and cost for the whole system, and we need to be really careful designing this exit condition, which can add complexity to our system. So now we learned this review and critique pattern, the next is very common popular one which is coordinator router pattern. And so far our multi-agent workflow have been predefined with sequential agent, loop agent, or parallel agent.
You can think of this coordinator agent as a smart project manager. It analyzes users requests and then delegates to the correct specialized agent from a team of experts. And let's take a look at this example with hierarchical task decomposition. This is where a coordinator breaks a large task into smaller sub-tasks and delegates those to the other agents. Imagine we have a top-level coordinator agent, and the job is to plan a full experience.
And below it, we have specialized sub-agents. We have a food and transportation agent, which is a sequential agent that we built last video. And you can check this link to review last video. We also have this nearby places agent, which is a parallel agent that we also built in last video. We also have this trip cost agent. And you can see from the code on the screen that we put the agent as sub-agent for this coordinate agent, where we use LM agent to implement it.
Now we can see it in action in ADK Web UI. And if I ask the main coordinator, plan a trip to find sushi in San Francisco and find my way to getting there, this coordinator knows that this requires both food and travel, so it delegates the entire task to this food and transportation sub-agent. And that agent then executes its own sequence, first finding the food and then the transport. Now I can continue the conversation.
OK, I also want to find a museum and concert. The main coordinator understands this new request and then delegates it to this nearby places agent, and that agent then runs its own parallel workflow, searching for both at the same time, and then summarizing the result. The benefit of this design is that it is extremely flexible, and it can solve very complex problems by breaking them down. However, it has higher latency and costs because we use extra model calls for routing, and this multi-level structure can be a more complex design and troubleshooting.
And now let's get to the last part of today's video, which is agent as tool pattern. So let's talk about this subtle but very powerful alternative to the coordinator, the agent as a tool pattern. On the surface level, it looks very similar to coordinator. You have a primary agent and several specialized sub-agents. But the key difference is in control and state management. In a coordinator pattern, the main agent delegates the task.
The sub-agent takes full control and solves its piece of the puzzle. But in the agent as tool pattern, the primary agent treats the sub-agent like simple stateless tool. It calls a sub-agent to perform a function, gets a result back, and the main agent retains full control and manages the overall state. You can think of it like a coordinator is a manager who gives a project to an employee, and an agent as a tool is a craftsman who picks up a specific tool, and to do one part of the job before picking up the next tool.
You can take a look at how we rewrite this coordinator example in the agent as a tool pattern in the code on the screen. All right. There you have it. We have covered everything from the simple single agent to the dynamic coordinator pattern. And each design has its trade-off between control, flexibility, cost, and complexity. And here's a summary to compare those patterns. So in summary, you use a single agent for simple prototypes.
You use sequential and parallel agent when you need a reliable and structured workflow. And you can use loop when you want to meet certain criteria, and use a coordinator or agent as a tool when you need dynamic, flexible routing to solve complex problems. All right. I hope now you have a much better understanding of how to design and build your own agentic AI system with different design patterns. All right. Thank you so much for watching, and see you in future videos.
Bye. [MUSIC PLAYING]
The words are the caption track's own and nothing is reworded or re-transcribed. Paragraph breaks are placed between sentences so the text reads as prose.
Free tools for your own script. No signup, no login.
Paste your draft and see where viewers are likely to drop off, with a rewrite for each weak line.
Paste the first 30 seconds of your own draft for a hook score and rewrites.
Check your draft against YouTube's advertiser-friendly guidelines before you record it.
Read this channel's public videos and transcripts, and download a writing brief for it.