Google Cloud Unveils Agent Runtime for Containerized AI Workflows

Agent Building on Google Cloud With Google Cloud — Ai4

Ai4

Containerizing AI agents allows developers to transition seamlessly between Cloud Run and Agent Runtime, cutting repetitive research tasks from minutes to seconds without altering frontend contracts.

AI-assisted summary of Agent Building on Google Cloud With Google Cloud — original source. Check the original for full context.

Source published:

Detailed notes

## Background Published on YouTube by Ai4 on August 15, 2026, this presentation features Terrence Ryan, a Developer Relations Engineer at Google Cloud. The session outlines strategies for scaling AI agents from prototype to global production, focusing on how organizations can transition from conversational chatbots to real-time action-taking agents on Google Cloud.

## TL;DR Terrence Ryan demonstrates how to build and operationalize AI agents on Google Cloud using a concrete boat cataloging and data normalization project. He contrasts rapid visual prototyping in Agent Studio with programmatic implementation using Google's multi-language Agent Development Kit (ADK) in Go. The talk details hosting considerations across Cloud Run, Agent Runtime, and Google Kubernetes Engine (GKE), highlighting containerization as the key to dependency management and runtime portability. Finally, a live demonstration illustrates how an agent-driven architecture reduces multi-step web research from minutes to two seconds while mitigating hallucinations with human-in-the-loop citation checks.

## Atmosphere & style Pragmatic, approachable, and developer-centric, the talk feels like a peer-to-peer technical workshop rooted in personal hobbyist problem-solving. Terrence Ryan's transparent disclosures and lighthearted sailing anecdotes establish an authentic, conversational rhythm that demystifies enterprise tooling. The presentation moves smoothly from visual canvas design to live terminal code and production telemetry dashboards, creating a grounded, reassuring guide for production cloud engineers.

## Key takeaways - [00:04](https://www.youtube.com/watch?v=fIGc63DOYfA&t=4s) Building production-ready agents on Google Cloud centers on pairing the Agent Development Kit (ADK) with managed compute targets like Cloud Run and Agent Runtime. - [01:15](https://www.youtube.com/watch?v=fIGc63DOYfA&t=75s) Repetitive, multi-step tasks requiring external search, semantic disambiguation, and unit normalization are primary candidates for automation via AI agents. - [03:02](https://www.youtube.com/watch?v=fIGc63DOYfA&t=182s) System prompts for operational agents should explicitly eliminate conversational filler and enforce strict structured JSON output to integrate cleanly with downstream applications. - [04:13](https://www.youtube.com/watch?v=fIGc63DOYfA&t=253s) Google's Agent Studio visual canvas bridges low-code prototyping and software engineering by offering built-in search tools, preview testing, and native ADK code export. - [07:06](https://www.youtube.com/watch?v=fIGc63DOYfA&t=426s) Separating system prompts into external Markdown files rather than inlining them in application code simplifies maintenance and speeds up prompt engineering cycles. - [07:06](https://www.youtube.com/watch?v=fIGc63DOYfA&t=426s) Lightweight models like Gemini 1.5 Flash are optimal for straightforward data retrieval, parsing, and conversion tasks where minimizing latency is critical. - [07:06](https://www.youtube.com/watch?v=fIGc63DOYfA&t=426s) The Agent Development Kit (ADK) natively supports five language ecosystems—Go, Python, TypeScript, Java, and Kotlin—alongside compatibility with frameworks like LangChain and LlamaIndex. - [10:20](https://www.youtube.com/watch?v=fIGc63DOYfA&t=620s) Agent Runtime delivers turnkey operational telemetry over standard serverless containers, tracking token metrics, error rates, and per-model invocations directly in the console. - [12:26](https://www.youtube.com/watch?v=fIGc63DOYfA&t=746s) Containerizing AI agents provides deterministic dependency management for external binaries and custom tools while ensuring runtime portability across Cloud Run, Agent Runtime, and GKE. - [14:14](https://www.youtube.com/watch?v=fIGc63DOYfA&t=854s) Agent Runtime is built on Cloud Run's HTTP transport model, meaning services requiring non-HTTP protocols or integration with existing service meshes belong on Google Kubernetes Engine (GKE). - [14:14](https://www.youtube.com/watch?v=fIGc63DOYfA&t=854s) Python serves as the frontier language for Google's ADK, receiving new features and deepest Agent Runtime telemetry before other language bindings. - [16:45](https://www.youtube.com/watch?v=fIGc63DOYfA&t=1005s) Adhering to consistent REST API contracts allows agent compute workloads to seamlessly migrate from Cloud Run to Agent Runtime with zero modifications to client-facing applications. - [16:45](https://www.youtube.com/watch?v=fIGc63DOYfA&t=1005s) Pairing fast agent research with structured source citations enables rapid human-in-the-loop verification before persisting extracted data into production databases.

## Detailed walkthrough ### [00:04](https://www.youtube.com/watch?v=fIGc63DOYfA&t=4s) Introduction and Session Framing

Terrence Ryan introduces himself as a Developer Relations Engineer for Google Cloud AI. He transparently discloses his background and potential biases, noting that he worked specifically on the DevRel team for Google's Agent Development Kit (ADK), focusing heavily on ADK Go and ADK TypeScript. He clarifies the exact scope of his presentation: this session focuses concretely on building agents using Google Cloud tools, architecture, and technology—specifically identifying which parts of Google Cloud pair best with agent development workflows.

He differentiates this session from a companion talk scheduled for 12:10 PM later that day. While the subsequent talk covers broad agent architectural patterns and general methodologies, this presentation is intentionally geared toward practical Google Cloud implementations.

```mermaid flowchart TD accTitle: Agent Workflow Lifecycle on Google Cloud subgraph Problem["1. Manual Problem"] A["Catalog Boat Rentals"] --> B["Multi-step Search & Scrape"] B --> C["Normalize Units to Inches"] end subgraph Development["2. Agent Prototyping"] D{"Choice of Harness"} D -->|"Low / No Code"| E["Agent Studio Canvas"] D -->|"Coded Implementation"| F["ADK Framework<br/>(Go, TS, Python, etc.)"] end subgraph Deployment["3. Production Runtime"] G{"Hosting Target"} G --> H["Cloud Run<br/>(Standard Serverless)"] G --> I["Agent Runtime<br/>(Rich Telemetry & Analytics)"] end Problem --> Development Development --> Deployment ```

---

[01:15](https://www.youtube.com/watch?v=fIGc63DOYfA&t=75s) The Motivating Problem: Automating Boat Rental Data Ingestion

To anchor the technical concepts in a concrete scenario, Terrence shares a personal project stemming from his hobby as an amateur sailor. He builds custom applications to manage sailing activities, including an app that catalogs every boat he rents. Keeping this detailed catalog allows him to prove his experience across various boat types and specifications when asking owners, "Hey, can you let me borrow your boat because I've been on all these other boats?"

However, the manual process of filling out the underlying dense data form is tedious and inefficient: - A single entry requires searching Google for a specific boat brand and model. - He must navigate across manufacturer specification sheets and obscure web forums to find dimensional statistics. - Data sources often mix metric and imperial measurements. - Measurements must be manually converted and normalized into integer inches before entering them into the system. - The manual lookup and conversion workflow takes 2 to 3 minutes per boat.

Because the task consists of repetitive external lookups, entity extraction, data disambiguation, and unit conversion, it serves as a textbook candidate for automation via an AI agent.

---

[03:02](https://www.youtube.com/watch?v=fIGc63DOYfA&t=182s) Defining the Agent Prompt and Architecture

Before writing code or configuring tooling, the workflow needs a clear operational definition. The agent must successfully execute four core steps: 1. Extract the core boat specifications (make, model, year, height, displacement, and hull configuration such as monohull vs. catamaran). 2. Handle domain-specific name disambiguation (for example, resolving whether a boat's vertical dimension is labeled as "height", "mast height", or "air draft"). 3. Normalize all dimensional values into integer inches. 4. Output raw, structured JSON so the existing boat tracking application can ingest it directly without post-processing.

```mermaid flowchart LR accTitle: Boat Data Extraction Pipeline A["Boat Query"] --> B["Agent Core<br/>(Tool Use: Search & Crawl)"] B --> C["Disambiguate Terms<br/>(Mast Height vs Air Draft)"] C --> D["Unit Normalization<br/>(Metric/Imperial -> Inches)"] D --> E["Pure JSON Output"] ```

The resulting prompt emphasizes strict output formatting constraints. Terrence underscores the importance of steering agents away from conversational filler. The prompt explicitly instructs the model: "Just give me the JSON. Don't... I don't want the 'This is a great query for a boat.' Like, 'No, don't give me any of that. Just give me the JSON and write it back like this.'"

---

[04:13](https://www.youtube.com/watch?v=fIGc63DOYfA&t=253s) Prototyping in Agent Studio (Low-Code/No-Code)

When building an agent, developers generally choose between low-code visual environments and fully coded frameworks. Terrence demonstrates Google's **Agent Studio**, a no-code to low-code visual canvas for assembling agents, creating sub-agents, configuring system prompts, and wiring tools together.

```mermaid flowchart TD accTitle: Agent Studio Visual Workflow subgraph AgentStudio["Agent Studio Canvas"] P["System Prompt & Schema"] T["Built-in Tools<br/>(Google Search, Web Crawler)"] M["Model Selection"] P & T & M --> AgentNode["Configured Agent"] end AgentNode --> Preview["Interactive Test Preview"] AgentNode --> ExportCode["Export to Native ADK Code"] ```

Key capabilities highlighted in Agent Studio include: - **Built-in Tooling:** Out-of-the-box integration with ADK tools like Google Search and web crawling to retrieve dynamic web context. - **Interactive Previews:** A built-in chat preview interface to test interactions and inspect execution latency. - **Code Export:** A "get code" button that exports the visual canvas configuration into native ADK code, allowing developers to validate ideas visually before transitioning into custom software engineering workflows.

---

[07:06](https://www.youtube.com/watch?v=fIGc63DOYfA&t=426s) Coded Implementation with the Agent Development Kit (ADK) in Go

Transitioning to code, Terrence demonstrates how to implement the exact same boat catalog agent using the Go flavor of Google's Agent Development Kit (ADK). While he personally prefers Go, he notes that ADK officially supports five language ecosystems: Go, Python, TypeScript, Java, and Kotlin. Developers can also use other frameworks like LangChain, LangGraph, or LlamaIndex with Google Cloud hosting targets, though ADK provides tighter native integrations.

Terrence walks through an application written in roughly 180 lines of Go code: - **Prompt Separation:** He loads the system prompt directly from an external Markdown file rather than inlining strings in code, making prompt maintenance and rapid iteration much easier. - **Lightweight Core Logic:** The core workflow involves creating the model client, initializing the agent, configuring an agent runner, spawning a session, and listening for streamed responses. - **Model Selection & Latency:** In the live terminal demo, the agent delivers fast responses with accurate field parsing. Terrence attributes this speed to using the **Gemini 1.5 Flash** model (referenced in the demo as "Gemini 3.5 flashlight" / Flash-tier models), following guidance from Google DeepMind (GDM) engineers to choose Flash models for straightforward, repetitive data collation and conversion tasks.

---

[10:20](https://www.youtube.com/watch?v=fIGc63DOYfA&t=620s) Deployment Targets: Cloud Run vs. Agent Runtime

Once developed, Google Cloud offers two primary managed hosting environments for deploying and running agents at scale:

| Platform | Deployment Method | Key Characteristics & Telemetry | |:--- |:--- |:--- | | **Cloud Run** | Built-in ADK CLI tools / standard serverless deployment | Standard containerized serverless hosting; quick port and endpoint configuration; option for agent-to-agent (A2A) communication interfaces. | | **Agent Runtime** | One-click / unified publish developer experience | Purpose-built runtime providing deep agent observability, including input/output token metrics, request counts, error rates, and per-model invocation tracking. |

Terrence displays the telemetry dashboard for the boat agent running on Agent Runtime. The dashboard visualizes traffic patterns, token utilization (input vs. output), system error rates, and model-level call breakdowns. Furthermore, Agent Studio directly links development with production, allowing engineers to track draft versus deployed configurations and push updates straight to the runtime.

[12:26](https://www.youtube.com/watch?v=fIGc63DOYfA&t=746s) Exposing Endpoints and the Case for Containerized Agents

Deploying an agent from Agent Studio automatically provides an accessible endpoint that developers can immediately hit using `curl` or standard API integration methods. The resulting telemetry flows directly into the console, making the development-to-testing loop remarkably frictionless. However, while managed platforms make pushing an agent straight to production as simple as "write my agent, push it to prod, and forget about it," a more robust long-term engineering practice is to package agents into standard container images.

Containerization grants developers strict control over the execution environment. Real-world agents frequently rely on custom tools that require external binary executables, specific operating system libraries, or granular security permissions that managed script environments cannot easily support. Furthermore, packaging agents as containers does not lock developers out of managed telemetry: containerized agents using the Agent Development Kit (ADK) can run on Agent Runtime without losing automated observability, while retaining the freedom to deploy across Cloud Run or Google Kubernetes Engine (GKE).

- **API Accessibility**: Agents deployed via Agent Studio can be invoked directly through standard REST endpoints using tools like `curl`. - **Tooling Flexibility**: Containers simplify packaging external tools, dependencies, and executables required for agentic workflows. - **Portability**: A single containerized agent can be deployed to Cloud Run, Agent Runtime, or GKE depending on architectural requirements.

---

[14:14](https://www.youtube.com/watch?v=fIGc63DOYfA&t=854s) Choosing the Right Deployment Target: GKE, Cloud Run, or Agent Runtime

Selecting the optimal production host depends on networking needs, existing infrastructure investments, and language ecosystems. Under the hood, Agent Runtime is essentially a packaged, optimized variant of Cloud Run, which means it inherits Cloud Run's native HTTP transport model. Consequently, teams that require non-HTTP communication protocols or organizations that run their primary service mesh on Kubernetes should deploy their agent containers directly to Google Kubernetes Engine (GKE).

```mermaid flowchart TD accTitle: Agent Deployment Decision Tree Start["Evaluate Agent Requirements"] --> Proto{"Using non-HTTP<br/>or heavy GKE?"}

Proto -- Yes --> GKE["Deploy to GKE"] Proto -- No --> Framework{"Using Python ADK?"}

Framework -- "Yes (Telemetry focus)" --> AgentRuntime["Deploy to Agent Runtime /<br/>Gemini Enterprise Agent Platform"] Framework -- "No (Go, TS, Java,<br/>or other frameworks)" --> CloudRun["Deploy to Cloud Run"] ```

For workloads serving HTTP, the choice between Cloud Run and Agent Runtime largely hinges on the development framework and programming language. Python serves as Google's "frontier version" for the Agent Development Kit, receiving new capabilities and telemetry integrations first before they roll out to other language bindings like Go, TypeScript, Java, or Kotlin. When building with third-party agent frameworks or non-Python ADK runtimes, deploying to standard Cloud Run provides maximum operational flexibility. Conversely, developers utilizing Python and the Gemini Enterprise Agent Platform gain turnkey access to deep back-end telemetry and tracing when hosting on Agent Runtime.

- **Google Kubernetes Engine (GKE)**: Best for non-HTTP transport protocols and teams with existing Kubernetes-centric infrastructure. - **Cloud Run**: Best for general containerized workloads, third-party agent frameworks (e.g., LangChain, LlamaIndex), and ADK runtimes in Go, TypeScript, Java, or Kotlin. - **Agent Runtime / Gemini Enterprise Agent Platform**: Best for Python-based ADK agents requiring automated, deep telemetry out of the box.

---

[16:45](https://www.youtube.com/watch?v=fIGc63DOYfA&t=1005s) Real-World Architecture, Boat Demo, and Final Recommendations

In a concrete implementation example, an existing application was extended with an AI research agent by initially deploying the agent as an isolated service on Cloud Run alongside the core application. During development, the agent service was migrated directly to Agent Runtime. Because the API contracts remained consistent, the transition occurred with zero modifications required on the front-end application, immediately unlocking richer execution telemetry on the back end.

```mermaid flowchart LR accTitle: Boat Application Architecture Migration subgraph FrontendApp["User Layer"] UI["Core Web App"] end

subgraph ComputeLayer["Backend Compute"] direction TB CR["Previous: Cloud Run Agent"] AR["Current: Agent Runtime"] end

UI -->|"Seamless API Call"| AR ```

Demonstrating the live application, the user enters the name of a boat to trigger the agent's automated research pipeline. In roughly two seconds, the agent collates specifications, dimensions, and verified source citations. This automated flow replaces a manual research process that previously took five minutes per vessel. By reviewing the linked source records, the user can verify that the data is not hallucinated before clicking confirm to persist the structured record into the production database. The talk concludes with three foundational best practices for developers: rapidly prototype ideas, containerize agents for portability and dependency control, and select the runtime—Cloud Run, Agent Runtime, or GKE—that aligns with your architecture.

- **Zero-Disruption Migration**: Moving backend agent logic from Cloud Run to Agent Runtime required no front-end code adjustments. - **Speed Improvement**: Automated agent-driven research reduced data collection time from ~5 minutes to ~2 seconds per record. - **Hallucination Safeguards**: Structured citations enable instant human-in-the-loop verification before writing data to primary datastores.

## Notable quotes > Learn the 'how' of scaling: building AI agents that can handle millions of interactions while maintaining peak performance.

> moving from AI that just answers questions to agents that take real-time action.

> [01:15](https://www.youtube.com/watch?v=fIGc63DOYfA&t=75s) Hey, can you let me borrow your boat because I've been on all these other boats? — Terrence Ryan

> [03:02](https://www.youtube.com/watch?v=fIGc63DOYfA&t=182s) Just give me the JSON. Don't... I don't want the 'This is a great query for a boat.' Like, 'No, don't give me any of that. Just give me the JSON and write it back like this.' — Terrence Ryan

> [03:02](https://www.youtube.com/watch?v=fIGc63DOYfA&t=182s) This is a great query for a boat. — Terrence Ryan

> [04:13](https://www.youtube.com/watch?v=fIGc63DOYfA&t=253s) get code — Terrence Ryan

> [07:06](https://www.youtube.com/watch?v=fIGc63DOYfA&t=426s) Gemini 3.5 flashlight — Terrence Ryan

> [12:26](https://www.youtube.com/watch?v=fIGc63DOYfA&t=746s) write my agent, push it to prod, and forget about it — Terrence Ryan

> [14:14](https://www.youtube.com/watch?v=fIGc63DOYfA&t=854s) frontier version — Terrence Ryan

## Mentioned Terrence Ryan, Ai4, Google Cloud, Google Cloud AI, Agent Development Kit (ADK), ADK Go, ADK TypeScript, Agent Studio, Google Search, Gemini 1.5 Flash, Google DeepMind, Cloud Run, Agent Runtime, Google Kubernetes Engine (GKE), Gemini Enterprise Agent Platform, LangChain, LangGraph, LlamaIndex, Python, Go, TypeScript, Java, Kotlin

## Video description Terrence Ryan - Developer Relations Engineer, Google Cloud

Learn the "how" of scaling: building AI agents that can handle millions of interactions while maintaining peak performance. We will explore how organizations are accelerating the journey from prototype to global production—moving from AI that just answers questions to agents that take real-time action. We’ll share strategies for managing the entire agent lifecycle and ensuring your data and systems grow seamlessly alongside your business.

[Source](https://www.youtube.com/watch?v=fIGc63DOYfA)

中文简报

Google Cloud 推出面向容器化 AI 工作流的 Agent Runtime 将 AI Agent 容器化使开发者能够在 Cloud Run 与 Agent Runtime 之间无缝切换,在不改变前端契约的前提下,将重复的研究任务从几分钟缩短至数秒。 Terrence Ryan 借助一个具体的船只编目与数据规范化项目,演示了如何在 Google Cloud 上构建并投产 AI Agent。他将 Agent Studio 中的快速可视化原型设计,与使用 Google 多语言 Agent Development Kit (ADK) 的 Go 语言编程实现进行了对比。本次演讲详细探讨了在 Cloud Run、Agent Runtime 和 Google Kubernetes Engine (GKE) 之间的托管考量,并强调容器化是解决依赖管理与实现运行时可移植性的关键。最后,现场演示展示了 Agent 驱动的架构如何将多步骤的网络调研从数分钟缩短至两秒,同时通过人在回路(human-in-the-loop)的引用核查来减轻幻觉问题。 Google Cloud 推出 Agent Development Kit (ADK) 与可视化画布 Agent Studio,支持通过内置搜索工具与提示词快速构建 Agent,并可一键导出为 Go、Python、TypeScript 等原生语言代码。 (4:13) 针对多步骤信息检索与单位换算场景,通过在系统提示词中强制输出纯 JSON 结构并选用 Gemini 1.5 Flash 模型,可将单次数据整理耗时从数分钟压缩至约 2 秒。 (7:06) 在部署托管方面,Agent Runtime 提供开箱即用的监控面板,能实时追踪 Token 消耗、请求错误率与各模型调用分布,显著简化 Agent 生产运维难度。 (10:20) 运行环境选型取决于技术栈与协议:Python ADK 推荐使用 Agent Runtime 获取完整遥测;Go、Java 或 LangChain 等第三方框架适合 Cloud Run;非 HTTP 协议则建议部署至 GKE。 (14:14)

Reading summary

Terrence Ryan, a Developer Relations Engineer for Google Cloud AI, outlines practical strategies for building and deploying AI agents across Google Cloud, demonstrating how developers can transition from visual prototyping to programmatic development and containerized production hosting. Structuring Unstructured Data Workflows (1:15) Repetitive data ingestion that involves external search, unit conversion, and term disambiguation represents a prime use case for AI agents. Ryan illustrates this with a personal sailing application that catalogs rented boats, a process that manually required two to three minutes per vessel to look up manufacturer specs, reconcile differing vertical measurements such as air draft versus mast height, and normalize mixed units into integer inches. To automate such pipelines reliably, agents require explicit prompting that suppresses conversational filler and strictly enforces structured JSON output. For these repetitive data collation and conversion tasks, Ryan notes that Google DeepMind engineers recommend using lightweight, lower-latency models like Gemini 1.5 Flash to ensure fast parsing times. Visual Prototyping Versus Programmatic ADK Implementation (4:13) Developers can assemble agents through low-code visual environments or fully coded software frameworks. Google's Agent Studio provides a visual canvas equipped with built-in tools such as Google Search and web crawling, interactive preview testing, and an export feature that generates native code from the visual canvas. For coded implementations, the Google Agent Development Kit (ADK) officially supports five programming languages: Go, Python, TypeScript, Java, and Kotlin. Demonstrating a Go implementation written in approximately 180 lines, Ryan emphasizes loading system prompts from external Markdown files rather than inlining strings, which simplifies prompt maintenance while keeping runner configuration and streaming logic compact. Containerization, Infrastructure, and Observability Trade-Offs (10:20) While platforms like Agent Studio allow direct deployment via generated endpoints, packaging agents as container images offers superior control over custom tool dependencies, system libraries, and security configurations. A containerized agent retains portability across Google Kubernetes Engine (GKE), standard Cloud Run, and Agent Runtime without sacrificing managed telemetry. Infrastructure selection depends on protocol needs and programming language. Because Agent Runtime is an optimized variation of Cloud Run relying on standard HTTP transport, organizations with non-HTTP protocols or existing cluster infrastructure should deploy directly to GKE. Furthermore, Python serves as Google's frontier language for ADK features. Consequently, Python agents hosted on Agent Runtime gain turnkey telemetry tracking token consumption, request counts, and model invocations, whereas non-Python runtimes or third-party frameworks like LangChain align naturally with standard Cloud Run. Integration, Performance Gains, and Hallucination Safeguards (16:45) In production implementations, agent services can be upgraded or migrated without breaking application interfaces. Ryan highlights a boat research service originally running on Cloud Run that was migrated to Agent Runtime with zero front-end code modifications, immediately surfacing rich back-end execution telemetry. In live testing, the automated research flow collated boat specifications and verified citations in roughly two seconds, down from a five-minute manual workflow. To mitigate hallucination risks before writing to persistent databases, the application presents these structured citations to users for rapid human-in-the-loop verification. Ryan concludes that effective agent development relies on three practices: rapidly prototyping concepts via low-code or code harnesses, packaging agents in standard containers to ensure dependency control and portability, and choosing between Cloud Run, Agent Runtime, or GKE based on language integrations and networking requirements.

精炼阅读摘要

Google Cloud 人工智能开发者关系工程师 Terrence Ryan 指出,构建与部署企业级 AI 智能体需要权衡开发模式、模型特性与基础设施适配;通过结合 Google 的 Agent Studio 与多语言智能体开发工具包(ADK),并利用容器化技术在 Cloud Run、Agent Runtime 或 GKE 间做出差异化选型,能够有效将高频重复的数据检索与清洗流程从数分钟压缩至两秒。 业务数据消歧与自动化规整需求 (1:15) 以业余航海租赁记录管理为例,手动收集船只技术规格需要人工在搜索引擎、制造商说明书和论坛中来回检索,处理公制与英制混杂的数据并将其统一换算为整数英寸,单条记录耗时达两至三分钟(实际操作中甚至可达五分钟)。此类涉及多步外部检索、实体抽取、单位转换与语义消歧的高重复性工作,构成了智能体自动化改造的标准应用场景。 在架构设计与系统提示词(Prompt)定义层面,智能体必须严格执行四个核心步骤:提取品牌、型号与排水量等关键参数;对特定领域术语进行消歧(例如识别并对齐“高度”、“桅杆高度”或“净空高度”);强制将所有尺寸规整为整数英寸;并严格输出无多余寒暄用语的纯结构化 JSON。系统提示词明确要求排除诸如“这是一条很好的查询”等对话填充词,确保输出数据能够直接接入下游数据库。 原型验证与多语言 ADK 代码工程 (4:13) 在智能体构建初期,Google 提供了低代码与全代码两条演进路径。可视化画布工具 Agent Studio 支持开发者通过拖拽方式组装子智能体、配置提示词并挂载内置的 Google 搜索与网页抓取工具,借助内置聊天界面直接预览交互并评估延迟。该平台提供代码导出功能,允许团队在可视化验证后一键转换至原生底层代码。 在代码工程实现阶段,Google 的智能体开发工具包(ADK)原生支持 Go、Python、TypeScript、Java 及 Kotlin 五种语言生态,同时也兼容 LangChain、LangGraph 或 LlamaIndex 等第三方框架。在约 180 行 Go 代码的参考实现中,系统提示词被独立抽离至外部 Markdown 文件中以方便维护迭代。根据 Google DeepMind 工程师的建议,执行重复性事实收集与数据换算时,选用 Gemini 1.5 Flash 级别模型能兼顾解析精准度并提供低延迟的终端响应体验。 容器化封装与差异化托管平台选型 (10:20) 虽然通过 Agent Studio 可以直接一键生成供 curl 调用的 REST 端点,但在生产环境中将智能体打包为标准容器镜像更为稳健。容器化赋予开发者严格控制运行环境的能力,便于打包需要外部二进制可执行文件、特定操作系统类库或细粒度安全权限的定制化工具,同时保留跨平台迁移的灵活性。 针对云端托管,生产环境选型取决于通信协议与技术栈:底层基于 Cloud Run 构建的专用 Agent Runtime 提供端到端的深度遥测能力,可直观追踪输入/输出 Token 消耗、错误率与模型调用量,作为“先行版本”优先支持 Python ADK 生态;对于使用 Go、TypeScript、Java 等非 Python ADK 或第三方框架(如 LangChain)的 HTTP 工作负载,标准 Cloud Run 能提供更高的通用性和灵活性;而当系统需要非 HTTP 通信协议,或必须深度集成企业内部现有的 Kubernetes 服务网格时,Google Kubernetes Engine (GKE) 则是最佳部署载体。 无缝架构迁移与防幻觉验证机制 (16:45) 在实际业务落地案例中,智能体最初作为独立容器服务部署在 Cloud Run 上与核心 Web 应用协同运行。随着平台演进,后端智能体被整体平移至 Agent Runtime;由于 API 契约保持完全一致,这一迁移过程无需对前端应用进行任何代码改动,即刻为后端获得了精细化的运行监控与遥测能力。 在实际运行测试中,用户输入船只名称后,智能体自动化研究管线在约两秒内即可完成全网规格抓取并返回结构化数据。为避免大模型幻觉带来的业务风险,系统在返回规整数据的同时挂载了可验证的引用来源链接,允许用户在将记录最终确认并持久化写入生产数据库之前进行快速人工复核,实现了兼顾自动化效率与数据确定性的闭环。 Terrence Ryan 总结指出,企业开发智能体应当坚持快速原型验证、采用容器化确保工具依赖与环境可移植性,并依据网络协议与编程语言生态合理选配 Cloud Run、Agent Runtime 或 GKE;不过,由于目前深度遥测功能主要优先支持 Python 生态,非 Python 开发者在选择专用 Agent Runtime 时仍需权衡功能支持的时间差与平台演进节奏。

Detailed notes — zh

## Background 本视频由 Ai4 频道于 2026 年 8 月 15 日发布在 YouTube 平台,主讲人为 Google Cloud 开发者关系工程师 Terrence Ryan。视频内容聚焦于在 Google Cloud 上构建并扩展 AI 智能体(AI Agents),探讨如何加速智能体从原型开发迈向全球生产落地,并有效管理智能体全生命周期与数据架构。 ## TL;DR 演讲者结合自身整理帆船数据的实际痛点,演示了如何通过可视化 Agent Studio 与基于 Go 语言的 ADK 开发高效的自动化数据提取与规整智能体。借助高性价比的 Gemini 1.5 Flash 模型,智能体将原本繁琐耗时的人工录入缩减至两秒内完成。随后,演讲重点剖析了生产落地的基础设施选型,强调通过容器化打包确保环境控制力与可移植性。最后,针对 GKE、Cloud Run 与原生支持遥测的 Agent Runtime,给出了涵盖网络协议、语言生态与可观测性诉求的清晰决策路径。 ## Atmosphere & style 整场分享务实亲切且极具极客气息,讲师开场便坦率公开自己的技术背景与潜在立场,并借由帆船爱好的生动案例让技术讲解充满人情味与说服力。内容节奏紧凑干练,通过代码演示与监控大盘展示,将抽象的架构设计具象化为直观的工程实践。整体氛围沉稳专业、注重实操,给开发者带来清晰明了且兼具落地深度的技术指导感。 ## Key takeaways - [00:04](https://www.youtube.com/watch?v=fIGc63DOYfA&t=4s) 演讲聚焦于在 Google Cloud 上构建与工程化落地 AI Agent,重点探讨相关工具链与技术栈的适配实践。 - [01:15](https://www.youtube.com/watch?v=fIGc63DOYfA&t=75s) 多轮信息检索、多源跨平台比对与度量衡单位换算的重复性表单填报,是智能体自动化的典型落地场景。 - [03:02](https://www.youtube.com/watch?v=fIGc63DOYfA&t=182s) 构建智能体前需清晰定义业务边界,通过强约束的 Prompt 与负向指令消除术语歧义并强制输出纯 JSON 格式。 - [04:19](https://www.youtube.com/watch?v=fIGc63DOYfA&t=259s) Agent Studio 低代码画布适合前期快速验证工作流与 Prompt,并支持一键将逻辑导出为 ADK 源码继续深度开发。 - [07:06](https://www.youtube.com/watch?v=fIGc63DOYfA&t=426s) Google ADK 支持 Go、Python、TypeScript、Java 和 Kotlin,将 Prompt 独立存为 Markdown 文件有助于版本维护与调试。 - [07:06](https://www.youtube.com/watch?v=fIGc63DOYfA&t=426s) 对于信息提取、数据清洗与规范化汇总等常规任务,Gemini 1.5 Flash 具备极高的响应速度与性价比优势。 - [10:20](https://www.youtube.com/watch?v=fIGc63DOYfA&t=620s) Agent Runtime 相比通用 Serverless 平台 Cloud Run,提供了针对 Token 消耗、请求调用及模型细分的原生深度遥测监控。 - [12:26](https://www.youtube.com/watch?v=fIGc63DOYfA&t=746s) 生产环境中将 AI Agent 容器化封装能够统一底层系统依赖与外部工具管理,并赋予跨运行时灵活迁移的能力。 - [14:14](https://www.youtube.com/watch?v=fIGc63DOYfA&t=854s) 运行时选型需结合基础设施:非 HTTP 协议或已有集群选 GKE,Python ADK 且需深度遥测选 Agent Runtime,多语言或第三方框架选 Cloud Run。 - [14:14](https://www.youtube.com/watch?v=fIGc63DOYfA&t=854s) ADK 的新特性研发以 Python 为前沿版本率先验证,随后再逐步同步至其他多语言 SDK 中。 - [16:45](https://www.youtube.com/watch?v=fIGc63DOYfA&t=1005s) 将后台 Agent 架构从 Cloud Run 平滑迁移至 Agent Runtime 时前端业务无感,并能直接获得丰富的全链路监控遥测。 - [16:45](https://www.youtube.com/watch?v=fIGc63DOYfA&t=1005s) Agent 落地核心工程方法论:快速原型验证、严格容器化封装,并根据协议与遥测需求在 GKE、Cloud Run 和 Agent Runtime 间合理选型。 ## Detailed walkthrough ### [00:04](https://www.youtube.com/watch?v=fIGc63DOYfA&t=4s) 讲师背景与演讲主旨 Terrence Ryan 作为 Google Cloud AI 的开发者关系工程师(Developer Relations Engineer)开启了本次分享。他首先坦诚地公开了自己的技术背景与潜在立场:他此前主要负责 Google ADK(Agent Development Kit,智能体开发工具包)的开发者生态工作,尤其专注于 ADK Go 和 ADK TypeScript 版本。他幽默地表示:“我们每个人都有偏见,虽然我极力去克服它们,但我更想开诚布公地披露出来,这样大家就知道我的出发点以及某些观点可能带有的倾向性。” 本次演讲的主题聚焦于“在 Google Cloud 上构建智能体(Agent Building on Google Cloud)”,核心在于深度剖析 Google Cloud 旗下的工具与技术栈如何与智能体开发需求完美契合。他特别厘清了本场演讲与当天中午 12:10 另一场演讲的区别:另一场演讲更偏向通用的智能体设计模式与编写方法论,而本场内容则高度聚焦于 Google Cloud 的工程落地实践。 --- ### [01:15](https://www.youtube.com/watch?v=fIGc63DOYfA&t=75s) 实际应用场景:帆船数据录入与智能体化 为了具象化智能体解决实际问题的过程,Terrence 分享了一个来自自己业余爱好的真实痛点。他是一名业余帆船手,平时会写一些小工具来辅助航海活动。其中一个应用专门用来记录和整理他租过的所有帆船数据。之所以维护这个系统,是为了在向其他人借船或租船时,能够出具一份详尽的历史驾船资历证明。然而,这个系统的前端是一个数据极其密集的大表单,手动填报的过程非常繁琐痛苦。 在过去的手动流程中,他需要先获取船只品牌和型号,然后在 Google 上进行多次搜索以查找规格参数。由于各种数据分散在厂商官网或极深的技术论坛中,且度量衡标准极不统一——有些采用公制(Metric),有些采用美制/英制(Imperial),他必须手动将这些尺寸换算并归一化为以英寸(integer inches)为单位的整数。查填一条船只的数据往往需要耗费 2 到 3 分钟,流程既枯燥又耗时。这种包含多轮信息检索、多源比对、单位转换并填报系统的标准化流程,正是将其改造为 Agent(智能体)自主执行的绝佳场景。 ```mermaid flowchart LR accTitle: 帆船数据检索与整理的智能体化流程 subgraph Input ["输入与搜索"] A["船只型号输入"] --> B["Google 搜索与网页抓取"] end subgraph Process ["智能体处理"] B --> C["术语消歧<br/>(高度 / 桅杆高 / 净空高度)"] C --> D["单位归一化<br/>(换算为整数英寸)"] end subgraph Output ["结构化输出"] D --> E["JSON 数据格式化"] E --> F["回填原有应用系统"] end ``` --- ### [03:02](https://www.youtube.com/watch?v=fIGc63DOYfA&t=182s) 明确智能体需求与 Prompt 构建 在正式编码之前,首要任务是清晰定义智能体的处理流水线与业务逻辑边界。针对帆船数据提取,核心需求包括: 1. **抓取船只基础统计数据**(制造商、型号、年份、排水量、单体船或双体船等); 2. **术语同义词消歧与映射**:航海领域存在许多行话术语不一致的情况,例如船只的垂直高度有时被称为“高度(height)”,有时叫“桅杆高度(mast height)”,甚至有时被称为“净空高度(air draft)”,智能体必须准确识别并完成映射; 3. **度量衡转换**:自动将所有长度单位统一换算为整数英寸; 4. **格式化输出**:直接输出标准的 JSON 结构,以便现有系统无缝解析消费。 在编写 Prompt 时,Terrence 强调了明确指令与负向约束的重要性。提示词中需要清晰告知模型核心字段,同时加上严格的格式限制与防幻觉指令,例如明确要求:“直接给我 JSON,不要添加诸如‘这是一个很棒的船只查询’等任何多余寒暄,只返回符合格式规范的纯 JSON 数据。” --- ### [04:19](https://www.youtube.com/watch?v=fIGc63DOYfA&t=259s) 两种构建路径:低代码 Agent Studio 与纯代码开发 针对智能体的具体构建,Terrence 介绍了两条路径:基于可视化低代码/无代码的 **Agent Studio**,以及基于编程语言的纯代码实现。他认为低代码工具非常适合用于前期快速验证 Prompt 和工作流,而纯代码开发在当前各种代码生成脚手架成熟的环境下也极为高效。 在 Agent Studio 的界面演示中,开发者可以在可视化的画布(Canvas)上创建智能体、挂载子智能体并将它们连接起来。配置过程非常直观:输入 Agent 名称与描述、填入设计好的 Prompt,并为其挂载工具。ADK 底层内置了多种实用工具,如 Google Search 与 Web Crawling(网页抓取),使智能体能够自主检索互联网信息。在 Studio 中配置好模型后,开发者可以直接在 Preview 面板中与智能体实时交互进行验证。 - **快速导出代码**:Agent Studio 提供了一键“获取代码(Get Code)”功能,能够将可视化构建的逻辑直接导出为底层对应的 ADK 源码,方便开发者在原型跑通后无缝过渡到深度代码定制与扩展。 --- ### [07:06](https://www.youtube.com/watch?v=fIGc63DOYfA&t=426s) 基于 ADK 的代码开发:以 Go 语言与 Gemini Flash 为例 随后,Terrence 演示了纯代码方式的实现方案。作为 ADK 团队成员,他展示了一个仅有 160~180 行左右的 Go 语言 Agent 实现(其中大部分代码仅是结果输出的格式化逻辑)。他介绍道,Google ADK 目前已经支持 5 种主流编程语言:**Go、Python、TypeScript、Java 和 Kotlin**。同时他指出,后续介绍的生产化部署与托管策略同样兼容 LangChain、LangGraph 或 LlamaIndex 等第三方框架,只是 Google ADK 享有与平台更深度的原生自动化集成。 在代码架构设计上,他分享了一个实用技巧:**将 Agent 的 Prompt 存放在独立的 Markdown 文件中引入**,而不是硬编码在程序里,这样更便于快速阅读、调试与版本迭代。在初始化 Agent、载入 Prompt、配置 Runner 与 Session 后即可启动运行。在现场运行演示中,代码几乎瞬时返回了完备且精准的 JSON 船只数据。 Terrence 揭示了这种极速响应背后的选型经验:该智能体调用了 **Gemini 1.5 Flash(在演讲口语中提及为 Flash/Flashlight 系列)**。他提到这是 Google DeepMind 团队成员给他的建议:对于日常这种信息提取、清洗转换、规范化汇总的常规生产任务,Flash 系列模型速度极快且极具性价比,是构建高效工作流智能体的绝佳选择。 --- ### [10:20](https://www.youtube.com/watch?v=fIGc63DOYfA&t=620s) 部署与运行环境:Cloud Run 与 Agent Runtime 的监控遥测 完成 Agent 的构建与验证后,接下来的核心问题是运行与托管平台的选择。Google Cloud 提供了两套托管运行环境: 1. **Cloud Run**:基于无服务器架构(Serverless)的通用容器运行环境,开发者可以通过 ADK 内置工具一键发布服务,仅需配置监听端口以及是否开启 A2A(Agent-to-Agent)通信支持; 2. **Agent Runtime**:专为 AI 智能体设计的运行环境,拥有与 Cloud Run 同样丝滑的一键发布体验,但在可观测性与遥测数据(Telemetry)方面提供了更深度的原生支持。 在 Agent Runtime 的监控大盘演示中,Terrence 展示了对该帆船 Agent 压测后的运行指标: - **Token 消耗监控**:清晰区分输入 Token(Input Tokens)与输出 Token(Output Tokens)的走势; - **调用量与质量指标**:实时追踪请求总量(Request Count)与错误率(Error Rate); - **模型级细分洞察**:深入监控系统内部不同模型的调用频次与占比,全面洞悉智能体的实际运行状态; - **生命周期管理**:在开发控制台中清晰管理 Draft(草稿)与 Deployed(已发布)状态,支持直接在平台上完成版本迭代与持续部署。 ### [12:26](https://www.youtube.com/watch?v=fIGc63DOYfA&t=746s) 容器化构建 AI Agent 的核心价值与运行时考量 在构建 AI Agent 时,通过 Agent Studio 能够非常便捷地将正在开发的原型直接发布为可调用的端点,并实时获取遥测数据(telemetry)。开发人员随后可以通过标准的 `curl` 命令或任何常规 API 接入方式轻松发起调用。然而,谈及长期的生产落地时,更稳妥的做法是对所有的 Agent 进行容器化打包。尽管像 Agent Runtime 或托管环境提供了开箱即用、一键推向生产的便利,但将 Agent 封装在容器(Container)中能够赋予开发者远超以往的控制力。 这种灵活性在 Agent 需要调用外部工具(Tools)时体现得尤为明显。如果工具依赖额外的二进制可执行文件或特定的系统环境权限,容器化可以让依赖项的管理变得极为顺畅。更为关键的是,容器化之后部署路径变得非常广阔:它既可以直接部署到 Cloud Run,也可以在保留遥测能力的前提下投递到 Agent Runtime 中,或者接入企业既有的 Kubernetes Engine(GKE)集群。 - **高控制力与可扩展性**:容器镜像允许打包复杂的底层系统依赖与辅助工具,不受托管沙箱环境的限制。 - **可移植的执行环境**:写好的容器能够在 Cloud Run、Agent Runtime 与 GKE 之间灵活迁移,避免技术栈被特定平台锁死。 ```mermaid flowchart TD accTitle: AI Agent 运行时选择决策图 Start["容器化 Agent 打包"] --> Decision1{"是否已有 GKE 投入<br/>或需要非 HTTP 协议?"} Decision1 -- "是" --> GKE["Google Kubernetes Engine (GKE)<br/>支持灵活网络协议与现有集群"] Decision1 -- "否" --> Decision2{"使用 ADK (Python)<br/>且追求深度遥测?"} Decision2 -- "是" --> AgentRT["Agent Runtime / 企业级平台<br/>原生开箱即用遥测与深度集成"] Decision2 -- "否" --> CloudRun["Cloud Run<br/>适合多语言/第三方框架与极简运维"] ``` --- ### [14:14](https://www.youtube.com/watch?v=fIGc63DOYfA&t=854s) 基础设施技术选型:GKE、Cloud Run 与 Agent Runtime 面对 GKE、Cloud Run 和 Agent Runtime,团队需要根据网络协议、语言生态和遥测需求进行选型。如果现有业务已经深度投入了 Kubernetes 体系,或者 Agent 的服务调用必须使用 HTTP 以外的传输协议,那么 GKE 是更为理想的选择。因为 Google Cloud 旗下的各种托管运行时——包括底层的 Agent Runtime——本质上都是经过定制打包的 Cloud Run,自然也继承了仅支持 HTTP 流量的约束。因此,非 HTTP 协议诉求或深度 GKE 基础设施重度用户应当首选 GKE。 ``` ┌─────────────────────────┐ │ 容器化 AI Agent │ └────────────┬────────────┘ │ ┌───────────────────────┼───────────────────────┐ ▼ ▼ ▼ ┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐ │ GKE │ │ Cloud Run │ │ Agent Runtime │ │ (Kubernetes) │ │ │ │ │ ├──────────────────┤ ├──────────────────┤ ├──────────────────┤ │• 需非 HTTP 协议 │ │• 非 Python ADK │ │• 核心采用 Python │ │• 现有集群重度投入│ │• 第三方开源框架 │ │• 强依赖全面遥测 │ │• 需深层基础设施权│ │• 团队上手门槛极低│ │• 底层由 Cloud Run│ │ 限与定制网络 │ │• 极简容器化托管 │ │ 托管封装而成 │ └──────────────────┘ └──────────────────┘ └──────────────────┘ ``` 当选用 Agent Development Kit(ADK)时,语言生态则成为核心考量因素。目前 Python 仍是探索新特性的前沿版本(Frontier Version),所有创新功能都会优先在 Python 中验证成熟,随后才逐步下放到 Go、TypeScript、Java 或 Kotlin 等语言 SDK。如果开发者使用的是非 Python 语言的 ADK,或者采用了 LangChain、LlamaIndex 等第三方框架,Cloud Run 会是更省心的托管平台,因为第三方框架本身无法完整捕获平台内部的原生遥测指标。但如果技术栈锁定在 Python ADK,并且极度渴望获取详尽的链路追踪与遥测监控,那么直接接入 Agent Runtime 或 Gemini Enterprise Agent Platform 无疑是最佳路径。 - **协议与基础设施维度**:需要非 HTTP 网络协议或现有工作负载重度依赖 GKE 时,果断选择 GKE。 - **语言支持与演进节奏**:ADK 的 Python 运行时处于引领地位,新特性先发优势明显;Go、TypeScript、Java 等 SDK 虽紧随其后持续发版,但更新节奏略滞后于 Python。 - **第三方框架兼容**:运行非官方 ADK 框架时,平台无法提供完整的原生遥测支持,此时选用轻量弹性的 Cloud Run 性价比最高。 --- ### [16:45](https://www.youtube.com/watch?v=fIGc63DOYfA&t=1005s) 生产架构演进与自动化搜船应用实测 以讲师早前展示的“游艇搜寻比价应用”(Boat Application)为例,其架构演进生动展示了现代无服务器运行时的无缝迁移能力。在最初的架构设计中,前端与核心业务系统部署在一处,后台单独拉起一个独立的 Cloud Run 实例专门托管 Agent,负责与核心系统通过 API 隔离通信。然而在准备演讲期间,讲师直接将后台 Agent 迁移到了托管的 Agent Runtime 上。前端业务层在迁移过程中完全无感,系统却瞬间获得了更加丰富细致的后台调用链遥测指标。 现场实测环节展示了 Agent 如何重塑原本繁琐的工作流。讲师在界面中新建游艇条目并点击“Research”(调研),底层 Agent 迅速启动多源检索并汇总数据。由于查询的是讲师梦寐以求的“Dream Boat”,他早已将各项性能参数烂熟于心,一目了然便能确认 Agent 生成的数据完全准确、毫无幻觉(Hallucination)。在常规处理未知数据时,界面还允许追溯记录来源以防模型虚构事实。讲师点击“Confirm”确认后,数据便顺畅写回既有业务数据库。原本人工手动搜集、核对并录入这些游艇参数需要耗费整整 5 分钟,而如今整个自动化流程“甚至不到 10 秒钟,大概只用了 2 秒钟就跑完了”。 整个演讲在总结三点工程建议中落下帷幕:首先利用工具进行快速原型验证(Rapidly prototype),其次将所有的 Agent 严格进行容器化封装(Contain your agents),最后根据协议、遥测与运维习惯,在 Cloud Run、Agent Runtime 与 GKE 之间做出最符合自身业务场景的运行时抉择。 - **无感架构平滑迁移**:将 Agent 从独立的 Cloud Run 切换到 Agent Runtime 时,无需对前端调用逻辑做任何破坏性修改,即可即时解锁端到端遥测追踪。 - **效率数量级跃升**:自动化工具与模型结合将原本单次耗时 5 分钟的跨平台信息检索与核验,压缩至 2 秒内完成。 - **核心工程方法论**:“快速原型开发,容器化包装 Agent,并在 Cloud Run、Agent Runtime 或 Kubernetes Engine 之间选择最适合的技术路径。” ## Notable quotes > [00:04](https://www.youtube.com/watch?v=fIGc63DOYfA&t=4s) 我们每个人都有偏见,虽然我极力去克服它们,但我更想开诚布公地披露出来,这样大家就知道我的出发点以及某些观点可能带有的倾向性。 — Terrence Ryan > [03:02](https://www.youtube.com/watch?v=fIGc63DOYfA&t=182s) 直接给我 JSON,不要添加诸如‘这是一个很棒的船只查询’等任何多余寒暄,只返回符合格式规范的纯 JSON 数据。 — Terrence Ryan > [07:06](https://www.youtube.com/watch?v=fIGc63DOYfA&t=426s) 将 Agent 的 Prompt 存放在独立的 Markdown 文件中引入,而不是硬编码在程序里,这样更便于快速阅读、调试与版本迭代。 — Terrence Ryan > [07:06](https://www.youtube.com/watch?v=fIGc63DOYfA&t=426s) 对于日常这种信息提取、清洗转换、规范化汇总的常规生产任务,Flash 系列模型速度极快且极具性价比,是构建高效工作流智能体的绝佳选择。 — Terrence Ryan > [12:26](https://www.youtube.com/watch?v=fIGc63DOYfA&t=746s) 尽管像 Agent Runtime 或托管环境提供了开箱即用、一键推向生产的便利,但将 Agent 封装在容器中能够赋予开发者远超以往的控制力。 — Terrence Ryan > [14:14](https://www.youtube.com/watch?v=fIGc63DOYfA&t=854s) 如果现有业务已经深度投入了 Kubernetes 体系,或者 Agent 的服务调用必须使用 HTTP 以外的传输协议,那么 GKE 是更为理想的选择。 — Terrence Ryan > [14:14](https://www.youtube.com/watch?v=fIGc63DOYfA&t=854s) 目前 Python 仍是探索新特性的前沿版本,所有创新功能都会优先在 Python 中验证成熟,随后才逐步下放到 Go、TypeScript、Java 或 Kotlin 等语言 SDK。 — Terrence Ryan > [14:14](https://www.youtube.com/watch?v=fIGc63DOYfA&t=854s) 如果开发者使用的是非 Python 语言的 ADK,或者采用了 LangChain、LlamaIndex 等第三方框架,Cloud Run 会是更省心的托管平台。 — Terrence Ryan > [16:45](https://www.youtube.com/watch?v=fIGc63DOYfA&t=1005s) 原本人工手动搜集、核对并录入这些游艇参数需要耗费整整 5 分钟,而如今整个自动化流程甚至不到 10 秒钟,大概只用了 2 秒钟就跑完了。 — Terrence Ryan > [16:45](https://www.youtube.com/watch?v=fIGc63DOYfA&t=1005s) 快速原型开发,容器化包装 Agent,并在 Cloud Run、Agent Runtime 或 Kubernetes Engine 之间选择最适合的技术路径。 — Terrence Ryan ## Mentioned Terrence Ryan, Google Cloud, Google DeepMind, Google ADK (Agent Development Kit), Agent Studio, Agent Runtime, Cloud Run, Google Kubernetes Engine (GKE), Gemini 1.5 Flash, Gemini Enterprise Agent Platform, LangChain, LangGraph, LlamaIndex, Go, Python, TypeScript, Java, Kotlin ## Video description Terrence Ryan - Developer Relations Engineer, Google Cloud Learn the "how" of scaling: building AI agents that can handle millions of interactions while maintaining peak performance. We will explore how organizations are accelerating the journey from prototype to global production—moving from AI that just answers questions to agents that take real-time action. We’ll share strategies for managing the entire agent lifecycle and ensuring your data and systems grow seamlessly alongside your business. [Source](https://www.youtube.com/watch?v=fIGc63DOYfA)

Source quotes

[0:04] Terrence Ryan: 我们每个人都有偏见,虽然我极力去克服它们,但我更想开诚布公地披露出来,这样大家就知道我的出发点以及某些观点可能带有的倾向性。 [3:02] Terrence Ryan: 直接给我 JSON,不要添加诸如‘这是一个很棒的船只查询’等任何多余寒暄,只返回符合格式规范的纯 JSON 数据。 [7:06] Terrence Ryan: 将 Agent 的 Prompt 存放在独立的 Markdown 文件中引入,而不是硬编码在程序里,这样更便于快速阅读、调试与版本迭代。 [7:06] Terrence Ryan: 对于日常这种信息提取、清洗转换、规范化汇总的常规生产任务,Flash 系列模型速度极快且极具性价比,是构建高效工作流智能体的绝佳选择。 [12:26] Terrence Ryan: 尽管像 Agent Runtime 或托管环境提供了开箱即用、一键推向生产的便利,但将 Agent 封装在容器中能够赋予开发者远超以往的控制力。 [14:14] Terrence Ryan: 如果现有业务已经深度投入了 Kubernetes 体系,或者 Agent 的服务调用必须使用 HTTP 以外的传输协议,那么 GKE 是更为理想的选择。 [14:14] Terrence Ryan: 目前 Python 仍是探索新特性的前沿版本,所有创新功能都会优先在 Python 中验证成熟,随后才逐步下放到 Go、TypeScript、Java 或 Kotlin 等语言 SDK。 [14:14] Terrence Ryan: 如果开发者使用的是非 Python 语言的 ADK,或者采用了 LangChain、LlamaIndex 等第三方框架,Cloud Run 会是更省心的托管平台。 [16:45] Terrence Ryan: 原本人工手动搜集、核对并录入这些游艇参数需要耗费整整 5 分钟,而如今整个自动化流程甚至不到 10 秒钟,大概只用了 2 秒钟就跑完了。 [16:45] Terrence Ryan: 快速原型开发,容器化包装 Agent,并在 Cloud Run、Agent Runtime 或 Kubernetes Engine 之间选择最适合的技术路径。

Source quotes

Learn the 'how' of scaling: building AI agents that can handle millions of interactions while maintaining peak performance. moving from AI that just answers questions to agents that take real-time action. [1:15] Terrence Ryan: Hey, can you let me borrow your boat because I've been on all these other boats? [3:02] Terrence Ryan: Just give me the JSON. Don't... I don't want the 'This is a great query for a boat.' Like, 'No, don't give me any of that. Just give me the JSON and write it back like this.' [3:02] Terrence Ryan: This is a great query for a boat. [4:13] Terrence Ryan: get code [7:06] Terrence Ryan: Gemini 3.5 flashlight [12:26] Terrence Ryan: write my agent, push it to prod, and forget about it [14:14] Terrence Ryan: frontier version

Original transcript

[0:04] So, um this is me. I don't want to belabor my  uh background, but uh I am a developer relations [0:09] engineer for Google Cloud AI. My relevant  experience, and it definitely colors a lot of what [0:15] I'm going to say, was working on the DevRel team  for ADK, specifically ADK Go and ADK TypeScript. [0:21] So, you know, we all have biases and and  uh I try to combat them, but I also try to [0:28] make sure I disclose them so that, you know,  uh you know, you you know where I'm coming [0:33] from and where my opinions may be colored. So, uh  this session is agent building on Google Cloud. [0:40] Um it's specifically using Google Cloud  tools and technology. It's um not uh it's [0:47] it's specifically here's the parts of Google Cloud  that will work well with what you want to do. Um [0:53] there's a talk later today at 12:10, which is  a more general talk on like agent patterns and [0:58] how to write them uh better methodologies. So,  I just want to kind of clear that up that uh [1:04] the descriptions were very similar. And uh so,  I want to kind of make that delineation. This [1:09] one is going to be very Google Cloud, the  other one is going to be hopefully less so. [1:15] Okay. So, I want to go through a new agent, and  whenever I do new work, I try to have a problem [1:20] to solve. So, I'm going to talk to you about a  problem I solved and how I did it with agents [1:23] and kind of walk through the the workflow all the  way to Google Cloud. So, uh I'm an amateur sailor. [1:30] I write apps that help me sail. This is one of  those that I used to catalog all of the boats I [1:33] rent. And the reason why I do that is so that I  can come up with a list of boats with different [1:38] characteristics that I've rented and say to  somebody else, "Hey, can you let me borrow [1:43] your boat because I've been on all these other  boats?" And you see, it's just a big dense form. [1:49] And the process for filling this in is kind  of a pain. Right? So, I have a boat brand, [1:55] and then I go and I perform a search on Google  for it, um and I get, you know, [snorts] um [2:02] of the uh of the stats for it. Um so, then I have  to do another Google search. I write that down, [2:09] right? And then I do another Google search,  um and then I get another set of those stats. [2:15] And then I have I'll but you'll notice that some  are in metrics, some are in uh empirical, so [2:21] or US or whatever we call that these days.  And [snorts] uh so, I want to normalize it [2:26] to integer inches, and then I put that in. That  takes me, depending on the boat, because those [2:31] Google searches are going to like sometimes are  going to manufacturer sites, sometimes are going [2:36] to deep forums. They're just It's a lot of work,  right? So, um that takes me about 2 to 3 minutes. [2:43] So, this is a perfect process to kind of turn into  an agentic process where I just go and send out an [2:49] agent, and it does this work for me, does the  work, and then brings it back to the app. So, [2:55] that is what I'm going to talk about taking  that process and turning it into an agent. [3:02] So, where to start? Well, first you kind of  need to define what it is you're actually doing. [3:06] You need to have a clear idea of these  are the steps I want to take in order to [3:11] capture this. I want to get the boat statistics.  I want to handle name mapping. Sometimes in this [3:16] space there's ambiguity about what is, you  know, the height of the boat is the, you know, [3:19] the big tall mast thing. Sometimes it's called  height, sometimes that's called mast height, [3:23] sometimes that's called air draft for some  reason, so we need to disambiguate that. [3:27] Um we want to convert the units, and then we  want it delivered because it's delivering to [3:32] that existing app. We want to deliver it back in  JSON, so the existing app can take it and use it. [3:38] So, that generates a prompt like this. And you  notice there's a lot going on in that prompt, [3:42] so I'm just going to kind of focus on the bold and  highlighted parts. So, you know, we want to make [3:48] the model, the year, the height, the displacement,  monohull or catamaran, and then very important, [3:55] and this is the kind of things you want to be  adding to your agent if you're not already, [3:58] like, "Hey, this is important. Please do  this. Don't hallucinate, ignore this." Um [4:03] and this is saying like, "Just give me the JSON.  Don't I I don't want the This is a great query. [4:09] That's a great query for a boat." Like, "No,  don't give me any of that. Just give me the JSON [4:13] and write it back like this." So, okay. So, now I  want to develop it. There's kind of two paths to [4:19] go. One is um a low code low to no code code uh a  no code to low code solution called Agent Studio, [4:32] and the second is writing a coded agent. Now, I'm  going to show both of these, and I'm going to be [4:38] honest that I think there's a place for the the  low code version of this, and I think it's uh it's [4:43] pretty effective. But, with agent harnesses or  sorry, with coding harnesses being what they are, [4:49] writing a a quick, dirty code version of this  is also pretty easy these days, and that's the [4:55] way I start. Um but uh back when I was learning  all of this, um I did a I did like a just let [5:04] me drop a prompt in and see how it works kind of  solution, and that's what Agent Studio gives you. [5:10] So, I'm a I'm going to quick quick demo.  Oh, that is a very directional mic. [5:16] Uh I'm going to switch to a demo version of this,  and hopefully be able to talk through it. So, [5:25] this is Agent Studio, and you see that I have  this canvas in which I can create agents, create [5:31] sub agents, and wire them all together. And it's  pretty straightforward, right? I give it a name, [5:36] I give it a description. I give it that prompt,  and you'll see most of those prompts are there. I [5:41] don't think the important is there, but everything  else is there. And then um I assign some tools. [5:50] ADK comes built in. The ADK, which is what's  running this under the covers, comes with some [5:53] tools, Google search, uh web crawling, so that  it can go and get extra information that needs. [6:00] And um then I uh can set with the model. See,  the models right now are a little bit uh limited. [6:10] I can go through and then really  cool thing here is I can preview [6:14] and I can just interact with it. I'm sensitive  to how much time I have, so I pre-baked it. [6:20] And you'll see that I got results. Um the results  took about a minute to come back in this version. [6:26] Um partly is the model choice. Um and  partially is other things under the covers, [6:33] but uh I'll show you a faster version  of it and I'll show that live. [6:38] Um now, what I want to point out here is one of  the great things about this tool is that after I [6:43] write my after I write my prompt, then I I kind of  see it's working properly, I can just go get code [6:49] and it will show me under the covers the ADK  code that it is writing in order to do this, [6:55] so I can take this, expand on it after I've  confirmed that it works. So, that is that. [7:06] And now, all right. But, I worked on  ADK project, I'm very proud of it, and [7:13] I think it has a lot to offer. And so, the next  thing I would say is approach this from coding, [7:21] you know, a lightweight shim to just see if this  works. Um obviously, I have a bias towards ADK. [7:29] However, I'll point out that if you're  using LangChain or LangGraph or LlamaIndex, [7:33] what I'm going to talk about how how to move this  in production, you can use that with them as well. [7:38] Um some of the automatic integrations,  obviously, in our platform aren't there [7:41] because we don't have any say over how those are  written, but um they are there with Google ADK. [7:48] So, I want to show a quick demo of this working. [7:57] Okay. So, here we have some Go code. I'm going to  pump up the the font on this. Uh how are people [8:06] in the back? Can you guys see that? Okay.  I'm seeing head Okay, I'm going forward. So, [8:12] um this is uh it's like 163 lines of 183  lines of code, but you'll notice that like [8:20] a lot of it is just the formatting of the response  and like the heart of the the process is right [8:26] here. By the way, this is Go in case you've never  seen Go before. Um it's what I'm partial to, but [8:32] there are four flavors of ADK, five actually now.  Uh Go, Python, uh TypeScript, Java, and Kotlin. [8:43] So, I create a new model. I init the agent. The  agent is pulling the prompt from a file. I always [8:49] do this pattern where I have the prompt  in a markdown file that I just pull in. [8:54] That way I can leave that markdown and kind  of look at it faster instead of inlining it. [8:59] Then I have an, you know, an agent runner.  I create a session and then I just listen [9:03] for the results. So, I'm going to go ahead and do  this. I'm going to run this. And I'm going to go [9:10] this and we'll see that were the results back.  I am not super happy with that. I'm going to run [9:18] this one time just to see. Yep. All right, so it  is still running that fast. Um and you'll see I [9:25] got results and I am this is one of my dream boats  that I'm aware of these numbers in the right. [9:30] Um it the other one wasn't bringing back  the mast height or the the height, whatever. [9:36] Um and so I wasn't happy with that, but see down  at the bottom, it pulled those. And you see how [9:40] fast that response came back and that is due to  up here. So, I'm using Gemini 3.5 flashlight. [9:50] This is advice I got from some GDM folks, Google  DeepMind folks, that um it's really really fast [9:58] model. If you want results back, the flashlight  models tend to be really good ones to pick for [10:03] workaday effort. Especially for something  as straightforward as this. Just take this, [10:08] convert it, you know, collate it, convert it.  So, that's 80K running. So, let's get back to it. [10:20] So, where to run? So, uh there are two managed  platforms and runtimes that we uh we we offer. [10:29] The first one being Cloud Run, which you may be  familiar from serverless days that you can take [10:34] any of these things and run to it. 80K has tools  built into it that allow you to publish directly [10:40] to it. Um you just set some things like ports  and whether or not it should be A2A available [10:46] and then you can publish directly to it. There  is though another product called Agent Runtime [10:52] which has the same developer experience where  you just say publish to this. But when it [10:59] uh is in action, you can um you can get much more  data and telemetry out of it when it gets onto [11:06] the Agent Runtime. And I believe I have a demo  of this. Yep. So, real quick I want to show you [11:14] the stats for um So, this is that same  boat agent um and I sent a whole bunch [11:22] of traffic at it this week. Um it it's pretty  efficient so it doesn't generate too much work. [11:28] But you'll see that I can go through and see the  token input versus output. I can see requests for [11:34] it. I can see the error rate. I can go in deeper.  I can see which models I'm using in my system [11:40] and see which which model I'm calling by which  count. Um and so I can uh really get a lot [11:48] of telemetry and really a lot of uh insight  into what my my agent and my apps are doing. [11:56] And I'll point out and I'll show this before,  but one of the pieces here is uh t- t- Nope. [12:10] Okay. One of the things I can do though is I  can update and deploy from here directly. So, [12:15] if you see in this app, I have um draft versus  deployed. I can deploy this code from Agent Studio [12:26] as I'm working on it to an endpoint that I  can then call. Um and in as a matter of fact, [12:33] uh this telemetry result is coming from  an agent I wrote with Agent Studio. [12:40] So, that's a really easy process.  It's available. And then, [12:44] you know, you can interact with it with curl  or any other commands that you you know, [12:50] any other way of like writing access to an  API, you can just you can just call it. So, [12:58] how am I doing for time here? Okay. [13:04] So, now my recommendation though, uh I really  like Cloud Run. I have I'm becoming a big fan of [13:13] Agent Runtime, but um those require just a ton of  direct rate. I write my agent, I push it to prod, [13:22] and that's it. I forget about it. I'm a bigger  fan of writing containers for all of your agents. [13:29] And there's a whole bunch of reasons for this, but  long and short of it, you have more control over [13:32] it. You can add additional pieces to it. If you're  writing tools in your agents, which I'll talk [13:37] about in my next talk, um if you're writing tools,  uh and you need extra executables or extra access, [13:45] putting it in a container makes that a lot  easier. And so, once it's in a container, [13:50] you can put it in Cloud Run. I recently  discovered, after writing this to slide, [13:55] that you can actually can take these containers  and put them in Agent Runtime. So, you don't lose [14:00] the the uh telemetry if you're using ADK. But,  you can take them, uh put them into Cloud Run, or [14:09] uh put them into Kubernetes Engine if that's  a technology that you're already invested in. [14:14] So, obviously out of these options, it would be  nice if I gave you some help as to figuring out [14:22] when to use which. And so, what I'd say is,  are you stuff in GKE and Kubernetes Engine? Or, [14:30] do you need to access your agents on ports other  than associate sorry, transports other than HTTP? [14:38] If you do, then Kubernetes Engine is  probably a better solution for you, [14:42] cuz all of our managed runtimes, under the  covers, Agent Runtime is actually a kind of [14:48] packaged version of Cloud Run. So, it has so the  same limitations of it's only spitting out HTTP. [14:54] So, if you need transport other than HTTP, or  you're already kind of heavily invested in GKE, [14:59] that's how you're serving up most  of your work, then I would say, [15:04] give GKE a a a try. If you're using ADK,  but you're using the Go, the TypeScript, [15:12] the Java, or the Kotlin runtimes, um or  if you're using any other agent framework, [15:19] you I would kind of recommend using Cloud Run. And  the reason for that is with every other framework, [15:27] obviously, we don't get the full set of telemetry  because we don't have uh we don't have access, [15:33] you know, we're not writing those frameworks. For  ADK other than Python, it's uh it's they all of [15:42] the runtimes other than Python lag behind Python  because Python is the one that we're kind of using [15:48] as our frontier version of it. So, new features  come to that first, we prove them out, and then [15:53] we bring them to the other the other runtimes. And  so, some of these things have been behind. Now, [15:59] as I was writing this, we released new versions  of at least Go, and that becomes less of an issue. [16:06] But, if you're going to do all this work and get  it there, Cloud Run is a little bit easier, like [16:11] and especially if you already have experience with  it, it's just a little bit easier to get into. [16:15] That being said, if you want all of that telemetry  that you got from uh agent runtime, and you're [16:21] using Python, um and I would highly recommend  using uh the Gemini Enterprise Agent Platform. [16:29] That being said, this answer is shifting. Like  I said, it shifted while I was writing the talk, [16:33] and that uh are using ADK becomes more of a  reason to just use the agent platform. So. Mhm. [16:45] So, um this is an example of uh I went back to  that app that I wrote that I showed you in the [16:52] beginning where um uh I had that voting app. This  is how I architected that. You'll see that I had a [17:00] core application already set up. I just spun up  another instance of Cloud Run, ran my agent uh [17:06] agent on that, and uh isolated that, and made  those calls from it. But, while I was writing this [17:12] talk, I actually made this change where I moved  this over to agent runtime. The front end didn't [17:18] notice at all. I was able to move it over and now  I get more telemetry on those calls in the back [17:23] end. And I feel like I should at least show this  working in the real app. So, I'm going to do that. [17:34] We're going to go boat. Add  a new boat. Give it a name. [17:47] It's And we will research. And again, that is  the experience that you get. Oh, these now it's [17:56] getting it right, which is good cuz it's my dream  boat. So, I don't need to go through and check the [18:00] the sources, but this is something that I work  into this type of pattern in an agent where if [18:06] I'm getting results that are collated from stuff  and I want to make sure it's not hallucinated, [18:10] I'll go and check the where did it get its records  from? But in this case, like I said, this is [18:16] it's kind of an aspirational uh dream of mine and  so I know these numbers and these numbers are all [18:21] correct. Um so, now that I have it, now the  agent part of this is done, I just say confirm [18:28] and it goes back into my existing app  with my existing workflow. And so, [18:33] this was something that used to take me, you  know, 5 minutes per um and now takes me you saw [18:40] the 10 seconds that it not even 10 seconds, it was  like 2 seconds that it ran. So, with that, I will [18:51] exit out and say, um so, my advice is rapidly  prototype, uh contain your agents, and then choose [18:58] the path that makes the most sense for you between  uh cloud run or uh agent run time or Kubernetes [19:05] engine. And that is my time. Thank you all every  everyone. If you have any questions, feel free [19:11] to contact me at either of these spots afterwards  and I'll be around at the conference. Thank you.