Four layers that make coding agents safer to run in production

Give agents context on demand, enforce checks they cannot edit, review outcomes independently and test the whole workflow.

LoLogan연사 · GoogleReRemik연사 · Google
채널
Google Cloud Tech
게시일
2026년 11월 23일
영상
27:31
읽기
6분
원문
영어
YouTube에서 열기
스크롤하면 영상이 오른쪽 아래로 작아져 계속 재생됩니다. 자막은 읽기 언어를 따릅니다.
읽기 언어2개 언어로 읽을 수 있음
이 글은 아직 한국어 번역이 없어 영어 원문으로 표시합니다.
요약

30초 요약

A passing build does not prove an AI coding agent did the right thing: it may have changed or skipped the tests. Google engineers propose four layers around the model: load repository knowledge when needed, enforce deterministic checks, review changes independently and evaluate the whole agent system. Their refund example shows why the final answer alone is insufficient: tests must also verify the tool, inputs, order of actions and information carried across turns or agent handoffs.

  1. 1Load a map, memory and specialized instructions on demandThe learning layer stores plans on disk and pulls in skills only when relevant, preserving context for the task.
  2. 2Skills disclose details in three stagesAn agent sees short descriptions first, reads the matching SKILL.md when activated and loads supporting resources only for the relevant step.
  3. 3A passing test is suspect if the agent can weaken itThe speakers propose checking for changed assertions, skipped tests and altered configuration, and limiting the agent's ability to modify the gates themselves.
  4. 4Return precise failures but cap retriesSend rule IDs and error locations back to the agent, then escalate with the log if it cannot fix the issue within the limit.
  5. 5Review large changes from several anglesFile summaries, interactive visualizations and interface recordings can complement automatic code review; human inspection remains necessary.
  6. 6Test tool choice, arguments and orderingA mocked refund workflow checks the agent's decision without moving real money.
  7. 7Multi-turn tests must follow corrected state through handoffsWhen a customer changes order 101 to 202, the correct order must survive both subsequent turns and delegation to another agent.

핵심 정리

  1. Keep repository instructions concise and load specialized skill files only when needed.
  2. Protect tests and gate configuration from the agent; return errors and stop after a bounded number of retries.
  3. Use independent review and inspect running interfaces even after automated tests pass.
  4. Evaluate actions and state across tool calls, multi-turn conversations and agent handoffs—not just the final answer.
전문

챕터별로 다듬은 전문 읽기

원본 자막만 보기
01

The four layers around a model

A raw model-and-tools loop needs context, checks and review to operate reliably. A fourth layer evaluates the system as its configuration changes.

A coding agent can produce a convincing demo quickly, yet still hallucinate, delete tests or submit broken code. The speakers argue that production reliability requires engineering the software around the model, not just improving its prompt.

Logan describes a harness as the software between a model and an application. It gives the model tools such as a terminal and file access, then runs it in a loop; the raw loop needs additional structure before it can be trusted.

The first layer, learn, manages context. A short repository map tells the agent where to look, while plans and task lists stored on disk record completed work, failures and next steps across runs.

Specialized skills package workflows and scripts that are loaded when needed instead of filling every context window. The next layer, guard, uses deterministic checks to ensure code compiles and respects rules; a successful build alone is not enough.

Review separates code generation from critique. A separate reviewer can examine the change and inspect screenshots or video of a running interface before a human signs off. The fourth layer, score, evaluates the harness itself when its instructions, tools or model change.

02

Load skills progressively instead of stuffing the prompt

Skills package specialized instructions and resources. Their metadata, main instructions and supporting files are loaded at different times.

Remik explains that loading all documentation and rules into one prompt consumes context and can degrade performance. Skills instead package instructions in portable folders that compatible agents can use when a relevant task arises.

A skill contains a SKILL.md file with short metadata describing when it applies and instructions for performing the work. It can also contain scripts and reference documents. Remik compares the package to loading a specific capability when it is needed.

Progressive disclosure has three stages: discover each skill from a short name and description; activate the full instructions when relevant; and load supporting files or scripts only for the specific step that needs them.

One skill is sufficient for a narrow workflow such as formatting pull requests. Plugins become useful when a domain combines several skills, live tools and routing rules; a manifest packages them into one installable unit.

Remik describes the Google Cloud Developer plugin as a bundle of cloud skills, documentation access and guardrails, and says compatible agents beyond Antigravity can use the catalog. The example illustrates how the learning layer supplies domain instructions without loading every document at once.

03

Guard code with checks the agent cannot rewrite

Deterministic gates catch weakened tests and security problems. Failures should feed bounded retries and later improvements to skills.

A model instructed to be careful may still take a shortcut when stuck. The guard layer therefore uses checks outside the model's control, rather than relying only on advice in a prompt.

Aaron asks whether an agent's passing tests were already present, whether it changed old tests to obtain a green result, and whether those checks would pass on a fresh machine. Trust requires independently running checks rather than accepting the agent's report.

A deterministic check applies fixed rules without an AI model deciding the outcome. Examples include compilers, type checkers, fixed-input tests, linters, secret scanners and security checks. These are fast enough to run repeatedly and produce actionable error details.

Guardrails also protect quality outside security: an agent might rewrite too much, ignore existing helpers or break working behavior. The speakers recommend writing a new test first and confirming it fails before implementing the new behavior.

A green result can be misleading if an agent edits assertions, skips tests or disables a linter. Aaron recommends hooks that detect unauthorized test or configuration changes and drops in test count or coverage, plus repeated runs to catch flaky tests.

Apply the same fixed checks to security: scan commits for secrets, run static analysis, pin dependencies and scan for vulnerabilities. Dependency controls also reduce exposure to malicious packages published under names an agent might invent.

When a gate fails, return the actual error, including its location or rule, to the agent. Limit retries—for example, to three—then hand the logs to a person if the agent cannot resolve the issue. Keep the gate configuration outside the agent's write scope.

Failure logs can reveal recurring mistakes such as outdated libraries, missing tenant filters or weak mocks. Add a repeatable fix to a repository skill, but keep the gate active; for a new recurring issue, create the deterministic check first.

04

Review large pull requests from multiple angles

Smaller changes are preferable, but interactive summaries, visualizations and running-interface checks help inspect larger ones. A human still needs to review the result.

Even a completely green test suite is not a substitute for review. YK asks how a person can review a very large AI-generated pull request and starts by questioning whether the change should be split or reduced.

Small pull requests remain preferable, but they are not always practical. YK compares a large change to a watermelon: rather than consume it in one piece, examine it through several different slices.

Automated one-shot review can flag specific issues on every pull request. YK recommends adding interactive review: ask for a one-sentence description of each changed file, then ask follow-up questions to build an architectural understanding.

He demonstrates a repo-walkthrough skill that turns a repository, diff or pull request into an interactive visualizer and video. Reviewing the layers and a graph of the changes gives another view of how the parts fit together.

For user interfaces, he describes recording a site at different screen sizes and asking a multimodal model to inspect the video and screenshots. The system can report or sometimes fix visual problems, but he says a person should still click through the interface.

A pull request can also be turned into an audio review. The right checks depend on the project: browser end-to-end tests for UI-heavy applications, terminal-level tests for a CLI, and tests across different data types and volumes for data-heavy software.

05

Evaluate tools, state and handoffs

Agent evaluation tests actions as well as answers. The speakers walk through tool use, nondeterminism, multi-turn state and multi-agent workflows.

The last layer scores the agent system itself. Changing an AGENTS.md file or swapping models may improve one task while quietly breaking other workflows, so the team needs evaluations that detect regressions across the system.

Annie explains that a final answer is only part of an agent evaluation. An agent can say it refunded a payment without actually doing it, so the evaluation must check rules, tool calls, state changes and the response.

The first evaluation pattern tests tool use: did the agent select the right tool, provide the correct inputs and call tools in the right order? Mock tools and sample data make it possible to check a refund decision without moving real money.

The second pattern accounts for nondeterminism. Instead of requiring the same words every time, evaluate whether the outcome and response satisfy the policy, then examine the trajectory—the sequence of tool calls and decisions that produced it.

The third pattern tests multi-turn memory and state. In Annie's example, a customer first gives order 101 and later corrects it to 202; the agent must remember the customer and act on the updated order.

The fourth pattern evaluates workflows and multi-agent handoffs. Check whether data moves correctly between code and agent nodes, whether an agent delegates to the appropriate specialist, and whether it passes the updated information.

Once individual handoffs work, test the entire workflow from the customer's first message through the completed refund. That closes the loop across the four layers: learn, guard, review and score.

같은 채널의 다른 글

16:07EN
Google Cloud Tech· 2026년 11월 21일Connecting a Personal Trainer App to Firebase with GeminiDevin Chasanoff · GoogleDevin Chasanoff walks through sign-in, database security and a live workout test with Gemini guiding each setup step.Vibe Coding코딩 에이전트개발 워크플로와 테스트+2
27:24EN
Google Cloud Tech· 2026년 11월 20일A browser can run private AI search, but the device decides how muchAja Hammerly, Jason MayesJason Mayes explains local document search, model sizing and when a browser AI app should fall back to the cloud.Vector searchRAG와 지식Model routing & gateways+2
슬라이드 2장10:21EN
Google Cloud Tech· 2026년 11월 19일Why AI applications use two kinds of graph—and when to skip themAnnie Wang · Google CloudA refund demo separates control of the work from retrieval of connected facts, while showing the cost of both.Agent orchestrationAI agentsWorkflow automation+1
슬라이드 4장15:19EN
Google Cloud Tech· 2026년 11월 17일Give a Voice Agent Memory Without Sending Its Whole TranscriptLaxmi Harikumar, Miles Libbey · Google CloudA 40-word window and persistent facts cut classifier input in a Scribant demo while keeping user preferences across sessions.Agent memory에이전트 엔지니어링AI agents+2
슬라이드 6장31:46EN
Google Cloud Tech· 2026년 11월 17일Build an Inspector That Makes UI States Easy to TestDevin Chasanoff · Google CloudDevin Chasanoff isolates real components, adds state presets and turns the workflow into reusable agent skills.Agent skills코딩 에이전트AI interface design+1
슬라이드 2장16:12EN
Google Cloud Tech· 2026년 11월 16일Looker CLI Lets Agents Discover and Run Admin TasksChrissie Goodrich, Mike DeAngelo · Google CloudMike DeAngelo explains how command discovery and JSON templates let agents use Looker’s API without loading every tool description at once.개발 워크플로와 테스트에이전트MCP+2