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)