Agent Substrate is an open-source runtime that lets AI agents sleep on your own Kubernetes cluster. It writes an idle agent’s entire sandbox to object storage, then brings it back on whichever worker has room once another request comes in. A first hands-on run with a small LangGraph agent resumed a suspended session in 0.93 seconds, including the call to Claude.
Why agents need to sleep
Agents are idle far more than they’re busy: a burst of work lasting seconds, then a wait for the next message, timer or event. Sharing one container among many sessions, with state in a database, keeps that cheap. The bill climbs when every user or task needs a dedicated sandbox, say for executing code or holding files across runs, since nearly all of those machines sit unused.
Azure Container Apps Sandboxes use the same idea as a managed service: microVMs that suspend when idle and resume with their disk. Agent Substrate is maintained by Google and Solo.io, is at version 1.0, and runs on a cluster you control. Its docs put resume time under 500 ms.

gVisor or microVM
Ordinary containers use the node’s Linux kernel, so a flaw there can let code break out, which is a real concern when the code came from a language model. Each WorkerPool chooses between two barriers:
- gVisor, Google’s open-source project, puts a small kernel between the agent and the host. It runs on any ordinary Linux node.
- A microVM, built on Kata Containers and Cloud Hypervisor, gives each agent a small virtual machine and a kernel of its own. That isolates better, though nodes must expose hardware virtualization (/dev/kvm) and some cloud VM sizes don’t.

Five concepts to learn
An actor is a single live instance of an agent, for example one conversation, and it is the unit that gets suspended and resumed. An ActorTemplate defines it: the image, the resources, the volumes and the depth of each snapshot. Registering a template launches the container a single time and stores a golden snapshot that new actors start from.
An atespace is the boundary templates and actors live in. A WorkerPool is a group of worker pods started in advance, and actors fill them until CPU and memory are used up. A snapshot is the saved state: volumes only, volumes plus file system, or those plus process memory.
Of the five, just the WorkerPool is a native Kubernetes resource. The rest are rows in Substrate’s PostgreSQL database, which is why plain kubectl get won’t list them and the kubectl ate plugin is required.

Does the agent remember after a nap?
Any container that serves HTTP can be an actor, so nothing LangGraph-specific is required. The test agent was a one-node LangGraph graph behind FastAPI, with its history held only in process memory. The template set memory-level snapshots so that history would survive.
The test told the agent a name, suspended the actor and asked for the name again. The actor had no worker pod while suspended. The router woke it, the snapshot was restored, and the agent answered correctly. The round trip took 0.93 seconds on a laptop running kind.
The snapshots went to RustFS, an S3-compatible store the quickstart installs inside the cluster. The bundled plugin also works with Google Cloud Storage and anything speaking the S3 API. Azure Blob Storage isn’t covered, though a community plugin exists.
Keeping the API key away from the agent
A key inside the agent can be coaxed out by prompt injection, and memory snapshots would copy it into object storage as well. Substrate sidesteps both problems. The agent sends the string “placeholder” as its key, and the egress gateway swaps in the real one on the way out. To read the header, the gateway terminates TLS with a certificate it signs, so the template mounts the gateway’s CA and the Anthropic client trusts it.
The setup takes three pieces: an egress policy limiting the actor to api.anthropic.com, an ordinary Kubernetes Secret holding the key, and a credential provider policy. That provider denies everything by default, so the atespace must be explicitly allowed to read the secrets namespace.
Should you use it yet
The tester doesn’t run Agent Substrate in production and calls it early for most customers, many of whom would pick a managed Azure service anyway. For teams that must keep agents on their own hardware, the next step is trying the microVM option on nodes with KVM and watching how snapshot size affects resume time.
Source: baeke.info