Agent Runtime vs. Cloud Run and GKE for Deploying Agents on Google Cloud

GCP Study Hub
November 16, 2026

Deploying an agent on Google Cloud requires choosing how much operational work to offload to Google versus how much runtime and infrastructure control to keep. Agent Runtime is the managed platform built for deploying agents, while Cloud Run, GKE, and Compute Engine managed instance groups each trade managed convenience for different kinds of flexibility. On the Professional Agentic Architect exam, deployment decisions usually come down to identifying which technical constraint pushes a workload off Agent Runtime and onto another compute platform.

Agent Runtime as the managed default

Google's architecture guidance recommends Agent Runtime for Python agents that need a fully managed experience with minimal operations. Agent Runtime includes managed Sessions for conversation history that persists across requests, Memory Bank for long-term memory, autoscaling, and built-in logging, monitoring, and tracing. Because those capabilities come with the platform, small engineering teams or groups without platform engineers can focus on the agent instead of running the platform underneath it.

We would lean toward Agent Runtime whenever a Python agent has no special infrastructure or protocol constraints, because moving to a lower-level compute option adds platform work without a matching technical need. Agent Runtime has two clear boundaries. It is built for Python agents, and it does not support hosting custom MCP servers. When an architecture needs another programming language, a custom MCP server, or infrastructure-level isolation, another compute platform is required.

Cloud Run for containerized agents and MCP servers

Google recommends Cloud Run for containerized applications that need serverless, event-driven scaling with language flexibility. An ADK agent written in TypeScript fits on Cloud Run, and Cloud Run can also host MCP clients and servers that use the streamable HTTP transport. When an architecture includes both a containerized agent and a custom MCP server, each component can run as its own Cloud Run service. Cloud Run scales the number of instances with traffic and scales down to zero when idle, which keeps overnight costs low.

Because Cloud Run services are stateless, session persistence requires external storage. Picking the wrong ADK session service or storage setup either loses conversation history or introduces database operations that the team wanted to avoid:

  • InMemorySessionService: Loses all conversation history on any restart, scale-down event, or new deployment. Configuring one minimum instance does not stop deployments or restarts from happening.
  • DatabaseSessionService: Persists data, but storing a SQLite file inside a Cloud Run container fails because the file disappears along with the instance. Connecting it to an external database avoids data loss, yet requires patching, scaling, and backing up that database.
  • VertexAiSessionService: Keeps sessions in Agent Platform Sessions, providing managed persistence that survives new revisions and scale-down events without a database to run. Because Agent Platform Sessions is identified by an Agent Runtime instance, the team creates an Agent Runtime instance even though the agent itself continues running on Cloud Run.

Firestore is another managed option for session and memory data behind Cloud Run, rather than building and operating storage on Memorystore and Cloud SQL. It is also worth distinguishing session storage from long-term memory. Agent Platform Sessions stores the event history of a session, whereas Memory Bank stores extracted long-term memories.

GKE for fine-grained control and self-hosted models

GKE suits complex stateful requirements, fine-grained infrastructure control, sandboxed code execution, and self-hosted models. GKE comes in two modes: GKE Standard, where the team manages the nodes, and GKE Autopilot, where Google manages the nodes. In either mode, GKE still requires people who can operate Kubernetes, so it adds unnecessary operational overhead for teams that do not need that level of control.

Strict security and data residency requirements are another area where GKE applies on the Professional Agentic Architect exam. Google's architecture guidance states that workloads with strict security and data residency requirements need a self-hosted model, because it runs within the organization's own network. Gemma is an open model that can be served with vLLM on a private GKE cluster, delivering the highest level of security and data isolation.

Managed models sit on the other side of that line. Gemini cannot be hosted on GKE or Cloud Run. As a managed model on Agent Platform, Gemini keeps operational overhead low and suits long, multi-step reasoning, but it runs on Google's managed infrastructure rather than inside the organization's own network. VPC Service Controls is a different kind of control: it protects access to Google Cloud APIs and does not change where a model runs. Self-hosting is worth its operational cost when a workload has a strict network-isolation requirement, and a managed model is the lower-overhead choice when it does not.

Compute Engine managed instance groups

A Compute Engine managed instance group leaves scaling, patching, container management, sessions, memory, and tracing entirely to the team. Self-hosting on Compute Engine gives a team full control of its environment, including the network, but it also brings all of that infrastructure work, which managed platforms handle automatically.

Choosing between the four platforms

  • Choose Agent Runtime for Python agents that need managed Sessions, Memory Bank, autoscaling, and built-in logging, monitoring, and tracing with minimal operations.
  • Choose Cloud Run for non-Python containerized agents, custom MCP servers over streamable HTTP, and variable traffic that benefits from scale-to-zero, backed by Agent Platform Sessions or Firestore.
  • Choose GKE for complex stateful systems, fine-grained infrastructure control, sandboxed code execution, or self-hosted open models such as Gemma with vLLM on a private cluster when the team can operate Kubernetes.
  • Use Compute Engine managed instance groups only when the team explicitly needs to manage scaling, patching, container management, sessions, memory, and tracing itself.

Our Professional Agentic Architect practice exams test agent deployment platform choices alongside session persistence and model hosting boundaries, with detailed explanations that drill these distinctions.

Get tips and updates from GCP Study Hub

arrow