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
3:553.7x the video's typical replay level
this transportation agent next. So this gives us predictable, reliable execution. And you can take a look at a screen for this code example of how to write it in sequential agent. All right, let's try it out in ADK web UI.
Said at 3:49
Most replayed moment #2
6:063.0x the video's typical replay level
to synthesize all the results in a single trip plan. And here's the agent code on how to put together them. [DING] All right, let's test in ADK web UI.
Said at 6:01
Most replayed moment #3
4:561.9x the video's typical replay level
It is more predictable than a single agent, but it can be very inflexible. This rigid predefined structure can't adapt to dynamic situations. Now let's go to the third part of this video,
Said at 4:50
The graph counts replays. It does not show where viewers stopped watching.
Words
1,269
Runtime
8:21
Speaking pace
152wpm
Reading time
5min
152 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, everyone. Welcome to this agentic pattern series. So if you're building with AI, you probably wonder how to really design the agentic system. Sometimes you need a single agent, and other times you need a whole team of them working together. And today, we are diving into AI agent design patterns, and each pattern we're going to provide you with practical examples of code. And we're also going to walk through
76 words, the words spoken in the first 30 seconds at 152 words per minute.
Free, no signup. See how the first 30 seconds hold attention, with rewrites.
Sentence shape
| Measure | This transcript |
|---|---|
| Sentences | 86 |
| Average words per sentence | 14.8 |
| Longest sentence | 42 words |
| Questions asked | 3 |
| Sentences containing a number | 0 |
Most used terms
Filler phrases
3 in total: like 3.
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, everyone. Welcome to this agentic pattern series. So if you're building with AI, you probably wonder how to really design the agentic system. Sometimes you need a single agent, and other times you need a whole team of them working together. And today, we are diving into AI agent design patterns, and each pattern we're going to provide you with practical examples of code. And we're also going to walk through a live demo.
And by the end of this agentic pattern series, you will learn how to build agentic solution from single agent pattern to different multi-agent pattern. And for today's episode, we will focus on practical examples of single agent, sequential agent, and parallel agent. For next episode, we're going to cover orchestrator pattern, review and critique pattern with loop agent, and agent as tool. All right, let's dive in. So let's begin with the most fundamental pattern, the single agent.
Imagine you want to plan a trip. So with a single agent, you want to give an instruction on how to use a tool. And we can have a set of tool, like how to check the weather, check the traffic, and schedule. But for our example today, we will simplify things with only Google Search tool. So you will write a comprehensive prompt telling the agent how to plan the trip using the search tool, so the agent then relies on the model's reasoning capability to figure out the sequence of steps.
As you can see from the screen, the code for this is very straightforward with ADK Agent Development Kit. And let's test if it's ADK web UI by typing ADK app. So if I type, plan a trip to San Francisco, we can see in the tracing that agent is using the search tool to gather all the necessary information in just one go. We can see how it is using the tool from the tracing tab over here. However, this works for single task, but as you have more tools or the tasks are getting more complex, for example, if I have a request finding a sushi in San Francisco that's open late and finding the fastest way getting there.
So if I build this with single agent, we need to define the logic in system instruction with this massive prompt and the behavior can become very unreliable. Since AI is non-deterministic, you cannot always guarantee that it will follow your multi-step logic perfectly every time. So the single agent lack of control is its main weakness. With single agent pattern, the benefit is it is very simple to implement, and it's great for straightforward, multi-step tasks.
However, it is less reliable for complex workflow and is harder to control, and can fail as tasks becoming more complex. Now let's get to our second part of this video, which is the sequential agent. So with the task we covered earlier, how do we add in more control? This brings us to our first multi-agent pattern, the sequential agent. And this pattern is for highly structured, repeatable task, because the order of the operation is fixed.
So the output of one subagent becomes the direct input for the next subagent. It's like an assembly line. And for our trip, we can break down to two specialized agents. So we have this first food finding agent and the second, a transportation agent. This sequential agent ensures that we always run this food finding agent first, and then this transportation agent next. So this gives us predictable, reliable execution.
And you can take a look at a screen for this code example of how to write it in sequential agent. All right, let's try it out in ADK web UI. And you can look at the tracing tab. You can see that it's executed the food agent first and then the transportation agent next. Perfect. So how do they communicate with each other? So they share information through this shared session state, which act like a shared scratchpad. You can check the session state value at this tab.
And once the first agent writes its finding, and then the second agent reads it from it by using this curly braces in its system prompt. So this is a form of short-term memory for your agent system. And the advantages of sequential agent, is that it has high degree of control and reliability. It is more predictable than a single agent, but it can be very inflexible. This rigid predefined structure can't adapt to dynamic situations.
Now let's go to the third part of this video, the parallel agent. So, what if some tasks don't need to be happen in order? Let's say, if I want to plan a full trip, need to find a good museum, find a good concert, and a good restaurant. If I'm doing them in sequential order, it will be slow. This is where the parallel agent pattern really shines. It allows multiple specialized agents to run independently at the same time.
We can have three agents museum finder, concert finder, restaurant finder, all searching concurrently. As you can see, this will be a lot faster compared to doing them in sequential order. Of course, after they all find something, we need to bring these results together. So a common approach, is combine this with a sequential agent. So first, we will run the search in parallel. And then second, we will run a final aggregator agent to synthesize all the results in a single trip plan.
And here's the agent code on how to put together them. [DING] All right, let's test in ADK web UI. After we type the question from this tracing tab, we can see three searching agents kick off all at the same time. So once they're done, the results are returned to the session state, as you can see from this tab. And then the final summarizing agent reads that state and generate our plan. And this logic is defined in the system prompt over here.
As you can see, this is a great way to reduce latency for tasks that can be broken down into independent subtasks. So the benefit of this design is very obvious that a significantly reduced latency by running tasks at the same time. However, it can have higher initial costs, because it is running multiple agents all at once. And in a lot of use cases, it requires gather or synthesize step to combine the result, which can add complexity to our design.
All right, let's recap what we covered so far. So we covered the single agent. It is simple to implement. It can be very flexible, but it lacks certain control over this whole system. We also cover the sequential agent. It adds a certain level of control and make the system more reliable, but it is not very flexible. And lastly, we covered the parallel agent. It is fast, efficient, and great for independent tasks, but it can add cost and complexity to your system.
With those pattern, you can already build some powerful workflow. And in our next video, we're going to level up with more advanced patterns for handling even more complex and dynamic problems. We will explore cases with different practical examples. And the pattern we're going to cover next episode, including the loop and critique pattern for self-correction, so coordinated pattern for dynamic routing, and also the powerful concept of using agent as a tool.
All right, I will see you in next video. 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.