How Google engineers build AI agents in production (complete roadmap) — Transcript
Full transcript
- 0:00In this video, you're going to learn the
- 0:01complete architecture of modern AI agent
- 0:04engineering straight from five Google
- 0:07engineers building these systems in
- 0:09production.
- 0:10Right now, most developers are stuck in
- 0:12a trap.
- 0:13It takes 10 minutes to build an AI agent
- 0:16demo that looks magical,
- 0:18but it's much harder to figure out why
- 0:20it hallucinated something or why it
- 0:23deleted your unit test and submitted a
- 0:26massive broken pull request in
- 0:28production. Fixing that isn't just about
- 0:30writing better prompts. So let's explore
- 0:33the four layers of agent engineering
- 0:36with Logan, who'll explain the four
- 0:38layers to us.
- 0:41>> Everything changing in AI engineering
- 0:43right now comes down to one shift,
- 0:45replacing yourself as a copy-paste
- 0:48middleman and moving from prompt
- 0:50engineering to loop engineering. Loops
- 0:52live inside what we call the harness,
- 0:54the layer of software that sits between
- 0:55the raw models underneath, like Gemini
- 0:58or Gemma, and the finished application
- 1:00on top. It treats the model as a fixed
- 1:02black box and builds a system around it
- 1:04to make it reliable.
- 1:05When we look inside the harness, the
- 1:07engine at the center is simple. You take
- 1:09a model like Gemini, equip it with tools
- 1:11like a command line, file system access,
- 1:14or MCP servers, and wrap it in a while
- 1:16loop.
- 1:17That's the loop. On its own, a raw while
- 1:20loop is pretty brittle. To turn it into
- 1:22a system you can actually trust in
- 1:23production, you have to engineer the
- 1:25layers around it. Let's break down a
- 1:27production loop piece by piece across
- 1:29four layers, each one solving a specific
- 1:32mode of the engine. Layer one is about
- 1:34managing the context window before the
- 1:36agent acts.
- 1:37And we can think about this in three
- 1:39parts. First, concise contact maps.
- 1:42Instead of a massive manual that goes
- 1:44out of date, you give the loop a
- 1:46lightweight map like an agent file that
- 1:49tells the agent how the repository is
- 1:51structured and where to look next.
- 1:53Second, persistent memory.
- 1:55On its own, the model forgets everything
- 1:57between runs, but we don't let that
- 1:59For long tasks, the loop uses markdown
- 2:02plans and task lists on disk to record
- 2:05what is done, what failed, and what is
- 2:07next. Third, modular skills. Your agent
- 2:10doesn't need cloud run or IAM
- 2:12instructions on every run. Instead, you
- 2:15package specialized workflows and
- 2:16scripts into skills on disk that get
- 2:19pulled into the context window only when
- 2:21the loop actually needs them. That is
- 2:23how an agent learns new domain expertise
- 2:25on the fly without overloading the
- 2:27context window. Okay, so layer one gave
- 2:30our loop a map, a memory, and skills.
- 2:33The agent writes some code, runs the
- 2:35build tool, sees zero syntax errors, and
- 2:38stops the loop. Task complete, right?
- 2:41Not quite. Just because our code
- 2:42executed successfully doesn't mean it is
- 2:45doing what we want. That's why layer two
- 2:47wraps the loop in fast, deterministic
- 2:50guard rails. Now our code compiles,
- 2:52respects module boundaries, and passes
- 2:54every unit test in layer two.
- 2:57Are we ready to merge?
- 2:58Not quite. Code can pass 100% of your
- 3:01unit tests and still be wrong.
- 3:02Layer three adds semantic and multimodal
- 3:05review.
- 3:06Here, we decouple generation from
- 3:08critique.
- 3:09Instead of the coding agent grading its
- 3:11own homework, the harness spins up an
- 3:13independent reviewer agent,
- 3:15like Gemini, in a fresh, unbiased
- 3:17context window to review the diff
- 3:19against your engineering standards. And
- 3:21because Gemini is natively multimodal,
- 3:24the loop can spin up the app in a
- 3:25headless browser, capture screenshots or
- 3:28video of the UI, and inspect how the
- 3:30feature actually looks and behaves
- 3:32before a human engineer gives final sign
- 3:34off. With layers one, two, and three, we
- 3:36have a complete runtime engine for
- 3:37executing a single task.
- 3:39So what's layer four?
- 3:41Think about how an engine is built in
- 3:42the real world. Layers one through three
- 3:44are the components inside the car while
- 3:46it's driving down the road.
- 3:48Layer four is the diagnostic test bench
- 3:50in the garage.
- 3:51Let's say you tweak your agent's file,
- 3:53add a new MCP tool, or upgrade models.
- 3:56Layer four is about evaluating and
- 3:58scoring the harness itself.
- 4:00>> Logan just gave us the blueprint for the
- 4:02entire four layer engine. Learn, guard,
- 4:06review, and score.
- 4:08So, let's dive deep into layer number
- 4:10one, learn.
- 4:12How can we get our agentic system to
- 4:15learn from a large amount of documents,
- 4:17rules, or tools? If you add everything
- 4:20your agent needs to learn into the
- 4:22prompt, you end up killing your context
- 4:24window.
- 4:26That's exactly where agent skill comes
- 4:28in. Let's move over to Remic, who will
- 4:32teach us what agent skills are and how
- 4:35to use them.
- 4:37>> If you've ever tried to get an AI coding
- 4:39agent to follow your team's actual
- 4:41workflows, you've probably hit the same
- 4:44wall.
- 4:45Out of the box, coding agents rely on
- 4:48static training data, so they invent
- 4:50outdated SDK code, guess invalid CLI
- 4:53flags, or run risky terminal commands
- 4:55without asking.
- 4:57And if you try to fix that by stuffing
- 4:5950 pages of rules and docs into your
- 5:01system prompt, you blow up your context
- 5:04window and make the agent even worse at
- 5:06coding.
- 5:07To fix this, you don't need a bigger
- 5:09model or a longer prompt. You need agent
- 5:13skills. Open sourced in December 2025,
- 5:16the agent skill specification quickly
- 5:18became one of the biggest shifts in
- 5:20agent engineering. And today, it is
- 5:23supported across Cloud Code, Codex,
- 5:25Antigravity, and almost every major
- 5:28coding harness. At its core, a skill
- 5:31isn't some complex framework. It is just
- 5:33a portable folder.
- 5:35Inside, you put a skill MD file with two
- 5:38things, a tiny metadata at the top
- 5:41describing when to use it
- 5:43and a plain markdown instructions
- 5:45underneath explaining how to do the job,
- 5:48plus some optional folders for helper
- 5:50scripts or reference docs. Remember that
- 5:53scene in the Matrix where Trinity needs
- 5:55to fly a helicopter? She calls Tank and
- 5:58downloads the pilot program in seconds.
- 6:00That is what an agent skill fills. You
- 6:02package your workflow once, and a
- 6:04compatible can pick it up instantly.
- 6:07Now, the obvious question is, if I give
- 6:09my agent 100 skills, doesn't that still
- 6:12clog up the context window?
- 6:15No. And the reason why is progressive
- 6:17disclosure. Instead of dumping
- 6:19everything into memory at once, skills
- 6:22load in three stages.
- 6:25First stage, discovery. When your agent
- 6:27starts up, it only reads the short name
- 6:30and the description of each skill. That
- 6:33takes a minimum number of tokens and
- 6:35it's just enough for an agent to know
- 6:37what's available.
- 6:39Second stage, activation. Only when your
- 6:42prompt actually matches a skill
- 6:44description does the agent load the full
- 6:46skill MD file instructions into your the
- 6:49memory.
- 6:51And free the execution. Any extra files,
- 6:54reference files or scripts are only
- 6:56loaded when this specific step is
- 6:59needed. So one skill travels fine on its
- 7:01own. If you just want your agent to
- 7:03format PRs or run a database migration
- 7:06your way, a single skill is all you
- 7:08need. Wrapping one skill in a plugin is
- 7:11an overkill. Where agent plugins
- 7:13actually earn their keep is when a
- 7:15complex domain needs multiple skills,
- 7:17live MCP service and routing rules
- 7:20working all together.
- 7:22Using a plugin JSON manifest, you bundle
- 7:24all of these pieces into one installable
- 7:27unit. To wrap up, you don't have to
- 7:29choose between speed of AI coding agents
- 7:31and the safety of cloud best practices.
- 7:34With Google Cloud Developer plugin, you
- 7:36get one click install, live
- 7:38documentation from Developer Knowledge
- 7:40MCP server, strict IAM and billing guard
- 7:43rails and on demand access to over 150
- 7:46Google Cloud skills. And remember, it's
- 7:49not only limited to Antigravity. You can
- 7:52use the exact same plugin and skill
- 7:54catalog with Cloud Code, Codex or any
- 7:57other compatible agent. You can try it
- 7:59out today in under 30 seconds by opening
- 8:02customizations in Antigravity,
- 8:05scrolling down to Build with Google,
- 8:08looking for the Google Cloud developer
- 8:09plugin
- 8:11and clicking add.
- 8:12>> Now you know how to use agent skills
- 8:14when engineering your agentic system. So
- 8:18your agent can now learn.
- 8:20But there's something else. Let's say
- 8:22your AI agent gets stuck or is not able
- 8:26to carry out an action. It might
- 8:28actually cheat.
- 8:30Prompting the model to be careful won't
- 8:32actually save you here because a prompt
- 8:34is just advice
- 8:36to keep bad code or bad actions from
- 8:39getting in the way of your agentic
- 8:41system. You need layer number two, which
- 8:44is cold deterministic gates that the
- 8:47model cannot negotiate with or edit.
- 8:50Next up, we'll move on to Aaron, who's
- 8:52going to teach us how to lock down your
- 8:54agentic system.
- 8:57>> When your agent finishes writing code
- 8:59and says all the tests passed, how can
- 9:01you trust it?
- 9:02Ask yourself three things. Were those
- 9:04tests already there or did the agent
- 9:07just write them?
- 9:08Did it tweak any old tests just to get a
- 9:10green light?
- 9:11And if you ran those exact checks
- 9:13tomorrow on a totally fresh machine,
- 9:15would they still pass?
- 9:17If you don't know for sure, you're just
- 9:19taking the agent's word for it. Today,
- 9:21we're diving into deterministic checks,
- 9:23the hard rules that control what code
- 9:26your AI agent can actually keep. When I
- 9:28say deterministic check, I just mean
- 9:31running code that gives you the exact
- 9:33same result every time without any AI
- 9:35model chiming in or changing its mind.
- 9:38Compilers, type checkers, a test suite
- 9:40with fixed inputs, lint rules, secret
- 9:43scanners, source component analysis, and
- 9:45security tests based on defined rules.
- 9:48Why do these matter so much for agents?
- 9:50First, they're less expensive than using
- 9:51tokens and faster to run on every loop.
- 9:54Second, they give you clear feedback
- 9:56like the exact file, line number, and
- 9:58error message. Prompt instructions or
- 10:00skills are great guidelines, but models
- 10:03don't always follow them perfectly. A
- 10:04hard deterministic gate is still a
- 10:06safety net to keep AI randomness more
- 10:09under control.
- 10:10Most people focus on security guard
- 10:12rails first, but security is a part of
- 10:14quality and overall stability.
- 10:16When an agent tries to rewrite half your
- 10:18code base, ignores helper functions you
- 10:20already have, or breaks code that was
- 10:23working fine 5 minutes ago, you will
- 10:25feel the impact even if there are no
- 10:26security vulnerabilities.
- 10:28These are the gates that catch it. When
- 10:30writing new code, make sure new tests
- 10:32actually fail first, otherwise they're
- 10:34not really testing new functionality.
- 10:37Before writing implementation code, the
- 10:39harness runs the new test. If it passes
- 10:41right away, it's not testing anything
- 10:43new, so kick it back out. Moving in tiny
- 10:46red green refactor steps keeps commits
- 10:48small, so if something breaks, you know
- 10:51exactly what caused it. Agents can be
- 10:53sneaky when trying to get to green. They
- 10:55might change assertions, add skip tags,
- 10:57or disable linters. Don't just ask them
- 11:00nicely in the prompt, set up actual git
- 11:02hooks. Fail the run automatically if
- 11:05existing tests get edited, if test
- 11:07counts or coverage drop, or if config
- 11:10files get modified.
- 11:12Always rerun new tests a few times to
- 11:14catch flakiness. If a test only passes
- 11:1680% of the time, block it until it's
- 11:19solid.
- 11:20Having tests clean up their own database
- 11:22state and run against a real local
- 11:23database helps keep things reliable.
- 11:26Security gates use the exact same idea.
- 11:28Consistent inputs, predictable outputs,
- 11:31and clear error reports.
- 11:33Run secret scanning on every commit.
- 11:36Even if your prompt tells the agent
- 11:37never to hard code keys, a scanner
- 11:39guarantees that if one slips in, it
- 11:42can't get committed.
- 11:43Use static analysis tools to catch
- 11:45common mistakes, things like building
- 11:47SQL queries with string concatenation or
- 11:49unvalidated user input. It either
- 11:51matches a rule or it doesn't.
- 11:54Keep dependencies tight. Make sure new
- 11:56packages get pinned in lock files and
- 11:58scanned for known vulnerabilities.
- 12:00This also stops slop squatting where an
- 12:02agent hallucinates a package name that
- 12:04someone else actually published
- 12:06maliciously. When a gate fails, send the
- 12:08raw error log straight back to the
- 12:10agent, rule ID, file, line number,
- 12:12failing assertion. Set a retry limit
- 12:14like three attempts. If it still can't
- 12:16fix it, stop and hand it over to a human
- 12:19with the log attached. Infinite retry
- 12:21loops just waste time and tokens.
- 12:23Never let the agent modify gate
- 12:25configurations or hook scripts. Keep
- 12:27those files out of its right scope or
- 12:29fail the build automatically if it tries
- 12:30to touch them. Every gate failure leaves
- 12:32useful data behind. Over time, you'll
- 12:35spot patterns. Maybe the agent keeps
- 12:37using outdated libraries or forgets
- 12:39tenant filters or writes weak mocks.
- 12:42Use those failure logs to refine your
- 12:44agent skills and prompt context.
- 12:46When you figure out a recurring fix, add
- 12:49that pattern into your repository skill
- 12:51files so future agents get it right on
- 12:53the very first try.
- 12:55Even after updating a skill, keep the
- 12:56gate active. Skills help the agent
- 12:58produce better code, but gates are what
- 13:00keep bad code from getting merged. If a
- 13:03new issue keeps popping up unchecked,
- 13:05write the deterministic gate first, then
- 13:08update your skill files second.
- 13:10By the time code reaches human review,
- 13:12it should already have passed every
- 13:13objective check automatically. That
- 13:15leaves you free to focus on high-level
- 13:18questions. Is this good architecture? Is
- 13:20this change worth making?
- 13:22>> So Aaron just taught you how to guard
- 13:24your agentic system, but passing 100% of
- 13:27your unit test still doesn't mean that
- 13:30you can hit merge. So how do you
- 13:32actually check if, for example, a
- 13:34massive amount of AI generated code
- 13:37works as it should?
- 13:38That is where the review layer comes in.
- 13:41And next up, we have YK, and he's going
- 13:44to show us how he reviews massive AI
- 13:47generated code.
- 13:49>> After you have your agent in a loop
- 13:51generate a bunch of code, what are the
- 13:53best ways to review it, whether it's you
- 13:56who generated it or someone else?
- 13:58Essentially, how do you deal with a PR
- 14:00that's 200,000 lines long?
- 14:03The first thing you want to check is is
- 14:05it actually a valid PR?
- 14:08What I mean by that is does it need to
- 14:10be 200,000 lines long? Could it be 10
- 14:14PRs with 20,000 lines of code each, or
- 14:17could it be maybe 50,000 lines of code
- 14:20instead of 200,000 to achieve the same
- 14:23results? Before AI, it was the best
- 14:26practice to keep each PR small, and it
- 14:29is still the best practice. So
- 14:31definitely look at that aspect first, no
- 14:34matter who generated it, whether it's
- 14:36from a loop or someone else.
- 14:39But these days, the reality is it's
- 14:41sometimes difficult to keep your PRs
- 14:44small. Sometimes it's not feasible or
- 14:46realistic. So what should we do about
- 14:48that?
- 14:49So personally, I think a code review
- 14:51like eating a watermelon.
- 14:54It used to be the case that you could
- 14:55eat the whole watermelon because each
- 14:58PR, at least in theory, was small enough
- 15:00to read line by line.
- 15:03But with a large PR, the best you can do
- 15:06is slice it in a few different ways.
- 15:08So to show what this looks like in
- 15:11practice, we're going to take a look at
- 15:14this particular PR from this repo right
- 15:17here.
- 15:18First, you might already have a system
- 15:21for automatically reviewing your PR, and
- 15:24that's great if you already do. So here
- 15:27it looks like this where Gemini
- 15:29automatically reviews every single open
- 15:31PR and gives you comments on
- 15:34specific parts of the PR.
- 15:37And then as a reviewer or as the person
- 15:40who submitted this PR,
- 15:43you need to address them, resolve them,
- 15:45and so on. And that's a great first
- 15:47step. And I consider these systems
- 15:51to be essentially one-shot AI code
- 15:54review systems.
- 15:55And even though these one-shot AI code
- 15:57review systems are great,
- 16:00they're often not sufficient by
- 16:02themselves. So what I recommend to add
- 16:05on top of that is more of an interactive
- 16:08code review. So the way you can do that
- 16:10is you can specify the PR you want to
- 16:12review and say
- 16:14I'm in the process of reviewing this PR.
- 16:17Can you give me a summary of each file?
- 16:19Just a quick one-sentence summary so I
- 16:21can understand it better.
- 16:23So that way you can get a quick summary
- 16:25for each file.
- 16:27And then the next few steps I recommend
- 16:30are what I consider to be multimodal
- 16:33code review. Uh you can use a few
- 16:35different things for it. You can
- 16:36actually use for one
- 16:39this code itself that's already merged
- 16:42here in this PR that we were just
- 16:43reviewing as practice.
- 16:46It's called repo walkthrough. It's a
- 16:49skill for turning any code
- 16:52diff PR or repo into an interactive
- 16:56visualizer and a video so you can review
- 16:59it from a different angle. Here I
- 17:02already have the skill
- 17:04installed
- 17:06so I can just say
- 17:12can you turn this PR, just this entire
- 17:14PR into a walkthrough
- 17:18visualizer, website, and video so I can
- 17:21check it that way.
- 17:24So that's the prompt you can use once
- 17:26you install it.
- 17:27The way it looks is
- 17:30once you get the result is like this.
- 17:33You have different layers of this PR and
- 17:35then you can look at this layer by
- 17:37layer. So what's the top layer? You have
- 17:40readme, skill.md and then a few
- 17:43different sort of top layer files.
- 17:45And then it goes into this SVG graph and
- 17:48diff visualizer.
- 17:51And
- 17:53it goes
- 17:54through uh this data ADK file as well.
- 17:59So you can start to get an understanding
- 18:02of the architecture that way, a visual
- 18:05understanding of that as well.
- 18:07Alternatively, you can just ask
- 18:08questions about the architecture too.
- 18:11The second concept I wanted to introduce
- 18:14is the fact that you can automate a lot
- 18:16of visual QA testing as well.
- 18:20So I created a system for example that
- 18:23uses Gemini 4 Hydrogen
- 18:25to first automatically record the screen
- 18:29for your website in different screen
- 18:31sizes
- 18:32and then have Gemini 4 Hydrogen critics
- 18:35watch the videos as well as the
- 18:36screenshots
- 18:38to make sure there's no issue and if
- 18:40there are issues, they report back to
- 18:43the main thread and the main thread is
- 18:45able to either just report it or fix it
- 18:48automatically. For example, these you
- 18:51know overlapping elements, it's able to
- 18:53fix them automatically. So that way you
- 18:56still need to do QA testing yourself.
- 18:58You still need to click around and make
- 19:00sure everything is good, but it's able
- 19:02to catch a lot of these bugs
- 19:04automatically too.
- 19:05And finally, if you're more of an audio
- 19:08person, if you're more of a podcast
- 19:10person, then there's an option to turn
- 19:12your PR or PR description, whatever you
- 19:15need to review into an audio format too.
- 19:18So a skill that I have per privately
- 19:20here is I can take this PR
- 19:24and say
- 19:26can you take this PR, just the whole PR
- 19:29and then uh give me a few paragraphs
- 19:32summary and give me an audio review site
- 19:35for that.
- 19:37And then after all of that, one thing to
- 19:40keep in mind is that the best way to
- 19:43review and test your code depends on the
- 19:46nature of the project and the nature of
- 19:48the PR itself as well.
- 19:50For example, if you're building UI
- 19:52intense applications, let's say websites
- 19:54or front end applications and stuff like
- 19:57that, then you might want to
- 20:00write end-to-end tests through browser
- 20:02tests, things of that nature to make
- 20:04sure there's no regression, hopefully
- 20:07not a lot of bugs there.
- 20:09If you're writing a CLI application, you
- 20:11might want to write end-to-end tests
- 20:13just for that using something like tmux.
- 20:16If you're writing a data intensive
- 20:18application or you know sending a PR to
- 20:20a data intensive application,
- 20:22then you might want to create tests that
- 20:25test different kinds of data to make
- 20:27sure it works with different types of
- 20:28data, different volumes of data as well.
- 20:32So that part highly depends on the
- 20:34particular application you're building,
- 20:36but quick note before we move on to the
- 20:39next segment,
- 20:40it's always important to check your code
- 20:43and make sure you have best security
- 20:45practices
- 20:47as we've covered in the last section of
- 20:50this video.
- 20:51>> With learn, guard, and review in place,
- 20:55you're almost complete with your agentic
- 20:56system.
- 20:58But there is one thing left waiting in
- 21:00production.
- 21:01For example, a teammate of yours might
- 21:03tweak a few lines in your agent.md file,
- 21:07or maybe they swap your agent to include
- 21:10a newer model. So your current task
- 21:13might get 20% faster, but 10 other
- 21:16workflows might actually silently break
- 21:18behind your back.
- 21:19And if you aren't scoring the system
- 21:21itself, you're not really engineering,
- 21:24you're just guessing.
- 21:25So let's close the loop with layer
- 21:27number four.
- 21:28Annie is going to teach us how to
- 21:30evaluate your agentic system.
- 21:34>> All right, let's get started.
- 21:36So Annie, when you say agent evaluation,
- 21:39what does that mean? Am I just grading
- 21:41the model's final answer?
- 21:42>> You know, grading the answer is just
- 21:44only one piece. LLM model can generate
- 21:46text. It can say, yes, I've refunded
- 21:49your payment, but it cannot actually do
- 21:52anything.
- 21:53But agent take actions with tools.
- 21:57So agent evaluation checks the whole
- 21:59system.
- 22:00We can check did it follow your rules,
- 22:02take the right steps, actually process
- 22:04the refund, and give a helpful reply.
- 22:07You need to consider the tool use and
- 22:10context management.
- 22:11>> Amazing. Okay, so we can actually take a
- 22:13look at agent evaluation in four
- 22:15different patterns as you said. So
- 22:17pattern one is when you talk about
- 22:20agents having actions with tools, right?
- 22:22So how do we actually evaluate how an
- 22:25agent uses its tools.
- 22:28>> So let's break agent evaluation into
- 22:30four practical patterns.
- 22:32And pattern one is evaluating tool use.
- 22:37It's very like a unit test for an
- 22:40agent's action.
- 22:42So when an agent uses tools to look at
- 22:44orders or issue refunds, we measure
- 22:47three things.
- 22:48First is did it choose the right tool?
- 22:51Second is did it pass the right inputs
- 22:54like exact order ID?
- 22:57And third is do we call them in the
- 22:59right order such as checking eligibility
- 23:02need to before issuing a refund?
- 23:05So in practice, we run those checks
- 23:07against mocked tools and sample data so
- 23:10we can test agent's decision
- 23:12consistently without ever moving real
- 23:14money.
- 23:15>> Oh, okay. That's amazing. And I think
- 23:17also the second thing that people will
- 23:19be talking about is actually agent
- 23:22evaluation when it comes to the fact
- 23:24that agents they are not deterministic,
- 23:26right? So that is the second pattern
- 23:28here. And how do you deal with, you
- 23:30know, the fact that if you run the same
- 23:32test twice, you can get two different
- 23:34replies?
- 23:35>> So pattern two is handling agent being
- 23:38non-deterministic by measuring both the
- 23:40outcome and also trajectory.
- 23:43You know, agents are non-deterministic.
- 23:45So if you run the same test twice, you
- 23:47might get two completely different
- 23:49reply.
- 23:50So it's very different from traditional
- 23:52unit test. You cannot rely on exact
- 23:54word-for-word string matches.
- 23:57Instead, we look at two things.
- 24:00First is the outcome and response match.
- 24:04So rather than exact matching, we
- 24:07measure similarity.
- 24:10We need to check how close the final
- 24:12response is to your expected answer and
- 24:14whether it followed the refund policy.
- 24:18And second is we need to check the
- 24:20trajectory.
- 24:21Trajectory means how the agent uses the
- 24:24tools step by step to get there.
- 24:27We can use trace to evaluate that
- 24:29trajectory and measuring that is the two
- 24:32cost match and exact sequence follow the
- 24:35required order or we can simply pass LM
- 24:38as a judge for efficiency.
- 24:40>> So we talked about pattern one and two
- 24:41when it comes to agent evaluation and
- 24:44then the third thing is actually scope.
- 24:46So how should I think about scoping my
- 24:48evals because it can get complicated
- 24:50really fast?
- 24:51>> Pattern three is expanding from
- 24:53singleton prompts all the way to
- 24:55multi-turn conversations.
- 24:58You know, in a singleton test the
- 25:00customer gives everything in just one
- 25:03message. Hi, I'm Annie. Please refund
- 25:05order 101
- 25:07and we grade the immediate reply.
- 25:10But real conversations are usually
- 25:11multi-turn, right? So turn one might
- 25:13just be Hi, I'm Annie. I want a refund.
- 25:16The agent asks for a order number.
- 25:18Annie gives order 101 in turn two.
- 25:21And then in turn three says Oh, wait. I
- 25:24should mean order two or two, not order
- 25:26101. So multi-turn evaluation tests
- 25:29memory and state across turns.
- 25:31Does the agent remember who Annie is and
- 25:34keep track of her refund request and
- 25:36refund the updated order 202 instead of
- 25:38101?
- 25:39>> Amazing. Thank you, Annie, for
- 25:41explaining the first three patterns of
- 25:42agent evaluation. The last pattern is
- 25:45actually multi-agent system evaluation,
- 25:47right? So what happens if you're working
- 25:50with a lot of different agents and how
- 25:53do you actually evaluate that system?
- 25:55>> So pattern four is evaluating workflows
- 25:58and multi-agent systems.
- 26:00We're moving from integration tests all
- 26:02the way to end-to-end tests. You know,
- 26:06larger systems usually look like
- 26:08workflows, multi-agent systems, or a mix
- 26:11of both.
- 26:13Workflow connects deterministic function
- 26:15nodes with agent nodes in a graph.
- 26:18Multi-agent system that agents
- 26:20dynamically delegate tasks to other
- 26:22specialist agents. Just like integration
- 26:24tests, you start by testing the handoff
- 26:26between nodes.
- 26:28In a workflow, test the handoff between
- 26:30functional and agent nodes, make sure
- 26:32data pass cleanly from code to the
- 26:35agents and back to downstream code. In a
- 26:38multi-agent system, we need to test
- 26:40agent-to-agent handoff on two levels.
- 26:42Level one is did it delegate to the
- 26:44right specialist agent? Level two is did
- 26:47it hand off the right information like
- 26:49Annie's updated order 202 not Annie's
- 26:52order 101?
- 26:54So once handoffs work, we need to zoom
- 26:56out all the way for an end-to-end
- 26:58evaluation, verifying that the entire
- 27:01system work together from the customer's
- 27:04first message all the way to the
- 27:06complete refund.
- 27:08>> You have now learned the four layers of
- 27:11agentic engineering. You can continue
- 27:13learning by clicking on the video here.
- 27:16Leave a comment on what you thought
- 27:18about this video and click the like
- 27:19button to show your support. Don't
- 27:21forget to check out all the links
- 27:23mentioned in the description box below.
About this transcript
This page contains the full transcript of How Google engineers build AI agents in production (complete roadmap) by Google Cloud Tech, generated from the public captions YouTube serves with the video. The transcript has 4,384 words across 713 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.