DEV Community

Cover image for Why Google Thinks AI Agents Should Not Each Get a Kubernetes Pod
Mango Developer
Mango Developer

Posted on Originally published at mangodeveloper.com

Why Google Thinks AI Agents Should Not Each Get a Kubernetes Pod

Most AI agents spend most of their lives waiting. Google's own estimate, in its open source blog, is that an interactive agent session sits idle for 90 to 95 percent of the time, waiting on a model to stream tokens or a human to review a pull request. If each of those agents holds a Kubernetes Pod, you are paying for a lot of compute that does nothing.

That is the pitch behind Agent Substrate, and this week Google handed it, along with gVisor and a reinforcement learning project called OpenRL, to the Cloud Native Computing Foundation. I think the problem is real and the design is sensible. I also think the headline numbers deserve a skeptical read, because they all come from the people selling the thing.

We haven't tested any of this ourselves. This piece is based on Google's open source and cloud blog posts, plus Google's GKE documentation.

The two bad choices Google says you have today

The Google Open Source Blog frames the existing options as a trap. You can keep a dedicated Pod running all day, so the agent answers quickly because it is already warm, but you pay for idle compute around the clock. At ten thousand active users, Google says, the cluster cost becomes unsustainable.

Or you scale to zero with serverless containers. You stop paying while the agent waits, but resuming means cloning repositories, reinstalling packages and rebuilding memory, and Google says wake-up latency climbs past 20 seconds. That breaks any interactive experience.

There is a second problem on the training side. Reinforcement learning loops and benchmark suites run untrusted agent code across thousands of tasks at once. If each sandbox needs a full Pod, Google says the control plane struggles: scheduling and destroying thousands of short-lived Pods a minute puts pressure on etcd and kube-apiserver and can exhaust subnet IP addresses.

I buy both complaints. Anyone who has watched a cluster autoscaler churn through short jobs knows the Pod is a heavy unit for a task that lasts seconds.

What Agent Substrate does instead

Agent Substrate sits on top of Kubernetes and splits an agent into parts. According to Google's cloud blog, Actors hold each agent's memory, files and discrete identity. Workers are reusable execution sandboxes drawn from a warm Kubernetes pool. Gateways enforce inbound and outbound access control and inject secrets based on the Actor's identity, so sensitive keys stay out of the agent's own environment.

When an agent pauses for a model turn or a tool call, Substrate snapshots its memory and files to storage and returns the Worker to the pool. When the next request arrives, it restores the Actor onto any available Worker. Google's open source post walks through the sequence: a proxy called atenet-router holds the incoming request, the controller places the Actor in a warm slot, state restores from tiered storage, and the request is delivered.

Google's own analogy is a hotel room rather than a house. You do not keep the room when you leave town, and a new one is ready when you return. I like that image better than most infrastructure metaphors, because it also explains the catch. Anything that must stay running in the background while the agent is "away" no longer fits this model.

The claims, and who is making them

Google says the project reached 1.0 and is generally available as Agent Substrate on GKE. It also says that public development began in May 2026, that the project has more than 100 contributors, that Nous Research is building Hermes Enterprise on it, and that it already powers the CNCF project kagent.

On performance, the cloud blog claims restore in under 500 milliseconds, 10x the density of standard container runtimes and more than 500 suspend and resume activations per second. Those are the numbers that would change a budget. They are also Google's, published with the announcement, and I have not seen independent benchmarks. Ask for your own workload's numbers before you plan around them.

Side by side, the options look like this on the facts Google gives.

Approach While the agent waits Resume time Source of the claim
Dedicated Pod kept warm Pays for compute around the clock Already warm Google Open Source Blog
Serverless containers, scale to zero No compute while idle Past 20 seconds Google Open Source Blog
Agent Substrate State snapshotted to storage, Worker returned to the pool Under 500 ms Google Cloud Blog

The table is an argument, not a measurement. Two of the three rows describe what Google says goes wrong with the alternatives, which is exactly what you would expect from a vendor post. Still, the trade it shows is real: you swap always-on cost for a restore step.

gVisor is the safety half

Agents routinely run model-written shell commands and unreviewed packages. Standard Linux containers share the host kernel with every other workload on the node, and Google's posts call that a risky bet for untrusted code.

gVisor is Google's open source application kernel, written in Go. It intercepts system calls in user space, so untrusted code never talks directly to the host kernel. Google says it open sourced gVisor in 2018 and that it runs underneath GKE Sandbox and Cloud Run. The cloud blog lists Anthropic and OpenAI as users for containing code execution, Modal and Snowflake for execution sandboxes, and Ant Group and Tencent in production at scale. Those are Google's statements about other companies, so treat them as such.

Substrate supports two isolation boundaries without changing how you manage the agent lifecycle: gVisor, or Cloud Hypervisor microVMs for workloads that need hardware virtualization. Google adds that Substrate runs standard OCI containers, so existing agent code does not need rewriting for the runtime.

Diagram comparing a Kubernetes cluster running ordinary containers and the same cluster with sandboxed containers using gVisor

Expand

Diagram comparing a Kubernetes cluster running ordinary containers and the same cluster with sandboxed containers using gVisor

Why the CNCF move matters more than it looks

The part I find most interesting is not the 1.0. It is a line in the cloud blog about Linux kernel patches. Sandbox providers, including Google, carry host kernel patches that bring gVisor's I/O performance close to native Linux. Upstream Linux maintainers declined to merge them while gVisor belonged to a single vendor.

Neutral governance is meant to change that. Google says Ant Group, Modal and Tines have committed to join gVisor's maintainers, with OpenAI, Tencent and NVIDIA continuing to contribute. The posts say Agent Substrate, gVisor and OpenRL were accepted into the CNCF Sandbox last month, each is working through onboarding, and gVisor is on a path toward Incubation.

Keep the maturity label in mind. Sandbox is the CNCF's entry level, which means acceptance is not an endorsement of production readiness. It does mean that the projects now have vendor-neutral homes, and that is what makes a competitor or a bank willing to depend on them.

Map of a multi-agent setup in which every service is marked as sandboxed with gVisor, from the gVisor project blog

Expand

Map of a multi-agent setup in which every service is marked as sandboxed with gVisor, from the gVisor project blog

What this means if you run GKE

Google's GKE documentation draws a line that the announcement posts skip. For most agent workloads it tells you to use Agent Substrate on GKE, because it can run more agents on the same nodes. It points you to Agent Sandbox on GKE, an open source project under Kubernetes SIG Apps, when each agent needs a dedicated Pod, GPUs or TPUs, a full Kubernetes PodSpec, or a GKE Autopilot cluster.

The same docs give a security warning worth repeating. If you do not specify a GKE Sandbox runtime, gVisor or microVMs, your Pods run without kernel isolation, so do not use them for untrusted code. Autopilot clusters enable gVisor automatically. In Standard clusters you create a node pool with gVisor enabled. The recommended security policy allows only gVisor, so it rejects Sandbox resources that use microVMs.

If you want to try it on a small scale, my plan would be this:

  1. Pick one agent workload that is mostly idle, such as a coding assistant or an SRE troubleshooter, and record how long it sits waiting per session.
  2. Run it on a cluster with gVisor enabled, and confirm in your own tooling that the Pods really carry the sandbox runtime.
  3. Time a cold resume yourself. Google's 500 millisecond figure is the one to check, because interactive agents live or die on it.
  4. Compare the cost with a warm Pod per agent over a normal working day, not over a benchmark minute.

Outside Google Cloud, Google says the open source code runs on any conformant Kubernetes cluster. Expect to do more of the wiring yourself in that case, since the managed pieces are what the GKE offering adds.

Where I would stay cautious

The honest weak spot is state. A snapshot-and-restore model works best when an agent's state is memory and files. If your agents hold open network connections, long-running background processes or GPU state, the "hotel room" model needs more thought, and Google's own docs send those cases to Agent Sandbox with a dedicated Pod.

The other weak spot is the number of moving parts. Actors, Workers, Gateways, a router, tiered storage and a choice of two isolation runtimes is a lot of surface for a team that just wants to run a coding agent. For a small fleet, a Pod per agent with gVisor turned on is simpler, and the idle waste may not matter yet.

Frequently Asked Questions

Is this the same as the Kubernetes Agent Sandbox project?

No. Agent Sandbox is an open source project under Kubernetes SIG Apps and runs each agent in a dedicated Pod. Agent Substrate is a separate project that decouples agent state from compute.

Does it only run on Google Cloud?

Google says it is generally available as Agent Substrate on GKE and that the open source code can be deployed on any Kubernetes cluster.

What is OpenRL?

Google describes it as a way to orchestrate self-hosted reinforcement learning post-training loops in plain Python on Kubernetes, running across many parallel sandboxed rollouts.


Originally published on Mango Developer.

Top comments (0)