#### What pr does Makes resume measurements require the actor's memory to actually work: adds `ReadRAM` — a glutton request that walks the working set (reads one byte per 4KiB page across the requested size) before responding, plus a `--mem-read` knob so the benchmark cycle performs that walk right after every resume. Today's cycle proves an actor is *reachable* after resume, not that its memory is *usable*: the ping answers without touching the working set. A real application must read its memory to serve requests. This matters for where restore optimization is headed — a lazy/on-demand restore would look great on a benchmark that never reads memory (resume returns fast, ping returns fast) while real first-requests would stall faulting pages back in. With the walk in the cycle, "resume + first response" includes the cost of making memory usable, however the restore path schedules that work: eager restore pays it during resume, lazy restore would pay it during the walk — either way the total is in the tracked numbers. Also upgrades churn with `WRITE_MODE_OVERWRITE_ROTATE`: overwrite at a per-key cursor that advances past each write and wraps, so repeated churn walks the whole array over time instead of re-dirtying the same prefix every cycle. #### How it works - `ReadRAM(key, size)` walks the first `size` bytes (suffixed string, e.g. `"1Gi"`; empty walks the whole array) of a `WriteRAM` allocation, one byte per 4KiB page — the cheapest touch that forces every page resident. The response returns bytes walked plus an XOR checksum of the sampled bytes so the reads are observable and can't be elided. - Cycle order: resume → fill (once) → **walk** → churn → ping → suspend. The walk runs *before* churn deliberately: it must read the memory as restored, not pages churn just rewrote; churn then re-dirties after, so the next snapshot still carries fresh pages. - The walk reports as its own `GluttonReadRAM` stats row — it never pollutes ping or resume latencies. Today (eager restore) it reads warm memory in milliseconds; a jump in this row is the signal that restore work got deferred onto the request path. - Config travels the established channel: `--mem-read` in the suite's locust `flags:` → `/boomer-config` → the Go worker, passed verbatim to the wire; glutton is the only parser. Empty = disabled; the tracked large-memory suites set it to the full target (walk everything — strongest signal, simplest story). Existing suites unchanged. #### Testing - `go test -race` across `cmd/benchmarking/glutton` and `internal/benchmarking/boomer/...`: PASS. New tests cover the walk's byte count and checksum, missing-key/bad-size errors, cycle call order (fill → read → churn with the right sizes and modes), rotate-mode cursor wrap, disabled-by-default, and walk-before-fill as a no-op. - Cluster verification (microvm, 1Gi target, full walk):
Agent Substrate
NOTE: This is not an officially supported Google product. This project is not eligible for the Google Open Source Software Vulnerability Rewards Program.
What is Agent Substrate?
Agent Substrate delivers a performant, high density runtime environment for large scale agent deployments. The agent substrate control plane provides full lifecycle management for agent sandboxes, delivering sub-second agent resume/suspend operations, and allows heavy multiplexing of agents onto the same computer infrastructure. It supports multiple sandbox technologies including microVMs and gVisor, enabling consistent lifecycle operations for all sandbox types.
At its core, Agent Substrate maps a larger set of “actors” (applications such as agents) onto a smaller set of ready “workers”, relying on the fact that agent-like applications tend to be idle most of the time to achieve heavy multiplexing. It provides functionality to manage an actor’s lifecycle (e.g. create/destroy, suspend/resume), to assign actors to workers in real time, and to route incoming traffic to them.
Agent Substrate is intended to be a low-opinion system. The workloads it manages don't have to be literal AI agents, but those are the best example of the kind of applications it is designed for. It is not an SDK for building agents, but rather a system for running them at scale.
Agent Substrate leverages Kubernetes for the infrastructure provisioning and worker lifecycle management (Kubernetes Pods). It builds on top of Kubernetes features like Pods and Pod autoscaling, while Agent Substrate provides agent-specific scheduling and control to achieve lower latency. Using Kubernetes as the underlying system enables consistent infrastructure management across all workloads types that are required for end to end agentic deployments and allows holistic infrastructure optimizations for RL scenarios that span agentic, inference and training cycles.
Demo
Watch the Agent Substrate cluster multiplex ~250 stateful actors across just 8 physical pods.
This demo highlights the core developer experience and "Agentic Infrastructure" capabilities of Substrate:
- Instant Actor Teleport: High-performance suspend and resume of actors onto any available worker in the pool with sub-second activation.
- State Persistence: Persistent working memory (volatile RAM) and filesystem state preserved perfectly across hibernation cycles via full-state snapshots.
- Agent Swarm Multiplexing: Demonstrates 30x+ oversubscription by "juggling" a large registry of stateful actors onto a small pool of shared physical pods.
To reproduce this demo in your own cluster, please refer to the detailed walkthrough in the Counter Demo.
For more videos and walkthroughs, visit our YouTube channel: agent-substrate.
Framework Agnostic & Compatibility
Agent Substrate is designed to be framework and agent harness agnostic. Because it manages standard OCI containers at the kernel level (via gVisor), it can host agents built on any stack.
- Agent Development Kit (ADK): Native support for ADK-compatible actor identity and persistent working memory.
- LangChain: Ideal execution environment for long-running, stateful LangChain agents and sandboxed tool-calling.
- Claude Code & CodeX: Support for high-density, stateful coding environments that preserve terminal and filesystem state across sessions.
- Model Context Protocol (MCP): Deploy secure, sandboxed MCP servers as Substrate Actors to provide durable tools for any LLM.
Ecosystem & Examples
- Agent Executor: A distributed agent runtime that demonstrates building a secure, hyper-scalable agent harness on Agent Substrate (see the announcement blog and integration guide).
Status and compatibility
Agent Substrate is currently in early development. It is not ready for production use, and the APIs are almost guaranteed to change. We are not making any guarantees about backward compatibility at this stage, and everything in this project may be changed.
Supported Kubernetes Releases
Currently we aim to support the latest stable release of Kubernetes, and the previous minor release.
Community
For announcements, technical discussions, and community support, please join the ate-dev Google Group.
We host a weekly community meeting every Thursday from 10:00am - 11:00am PST.
- Video call link: https://meet.google.com/uhq-cxvn-dhy
- Or dial: (US) +1 253-289-6971 PIN: 787 664 574 59#
- More phone numbers: https://tel.meet/uhq-cxvn-dhy?pin=9044088223662
- Meeting notes for the weekly sync meeting
- Recordings and transcripts of all community meetings
We also have channels in the CNCF slack; request an invite here if you don't have access.
- #substrate-users to discuss using substrate.
- #substrate-dev to discuss developing substrate.
Developing
Please see CONTRIBUTING.md for guidelines on contributing to the project. We welcome contributions of all kinds, but the project is VERY young. Our immediate focus is on building out the core system and demos, so we may not be able to review or merge contributions that don't align with those goals in the near term.
Quickstart (Development)
To quickly set up the complete environment:
-
Make sure you have Go,
kubectl, anddockerinstalled and configured on your dev machine. We will automatically manage other dependencies via Go, includingkind. -
Run the following steps:
# create cluster and local registry (IPv4; IP_FAMILY=dual|ipv6 overrides)
hack/create-kind-cluster.sh
# install ate, PostgreSQL, rustfs
hack/install-ate-kind.sh --deploy-ate-system
# install counter demo
hack/install-ate-kind.sh --deploy-demo-counter
# install kubectl-ate
go install ./cmd/kubectl-ate
# create a counter actor in the demo's atespace (--template-ref names the
# actor template, resolved in the actor's atespace)
kubectl ate create actor my-counter-1 -a ate-demo-counter --template-ref counter
# port-forward the network router to bind to local port `8000`
kubectl port-forward -n ate-system svc/atenet-router 8000:80
- In a separate terminal, send an HTTP request to increment the counter:
curl -X POST -H "Host: my-counter-1.ate-demo-counter.actors.resources.substrate.ate.dev" -i http://localhost:8000/
Worker capacity is versioned: the dataplane (the atelet DaemonSet and the
worker pods) schedules only on nodes that carry the
ate.dev/substrate-version label, and the install stamps it on every node
that exists when it runs. A node added later hosts no workers until you label
it with the installed version
(kubectl label node <node> ate.dev/substrate-version=<build version>).
kubectl get ds -n ate-system -l app=atelet -L ate.dev/substrate-version
prints the installed version, off the atelet DaemonSet the install created.
GKE Quickstart (Development)
-
Create and configure your environment file:
cp hack/ate-dev-env.sh.example .ate-dev-env.sh # Edit .ate-dev-env.sh to match your project and preferences, then source it: source .ate-dev-env.sh -
Enable application-default credentials for gcloud:
gcloud auth application-default login --project=${PROJECT_ID} -
Provision the required GCP resources (GKE cluster, GCS, and IAM bindings):
go run ./tools/setup-gcp bootstrapOn a fresh project this step also creates the atelet Workload Identity IAM grants that snapshots depend on — see what
create iamactually grants to audit them or apply them manually. If you bring your own cluster instead, note the required Kubernetes beta APIs can only be enabled at cluster creation — see the Create Cluster warning. -
Deploy the Agent Substrate system to your cluster:
./hack/install-ate.sh --deploy-ate-systemNodes that GKE adds later (autoscaling, auto-repair, node upgrades) are born with the node pool's labels, so the pool needs
ate.dev/substrate-versiontoo; see Node version labels. -
You can then deploy the sample applications. See demos/counter/README.md or demos/sandbox/README.md for detailed walkthroughs.
./hack/install-ate.sh --deploy-demo-counter
Custom Setup and Deployment
You can run individual setup steps to create GCP resources as needed. See go run ./tools/setup-gcp --help for available options. For example:
go run ./tools/setup-gcp create cluster
go run ./tools/setup-gcp create bucket
Similarly, you can deploy or cleanup specific Agent Substrate components using the installation script. See ./hack/install-ate.sh --help for all options.
# Re-deploy only ate-apiserver of the ATE system
./hack/install-ate.sh --deploy-ate-apiserver
# Delete everything (core system and all demos)
./hack/install-ate.sh --delete-all
Tearing down resources (GCP)
If you need to delete the resources created by the setup script, you can use the provided script hack/teardown.sh. This script will delete resources in the reverse order of creation and handles partial failures gracefully.
./hack/teardown.sh --all
Or run individual teardown steps as needed (see ./hack/teardown.sh for available options).
Tearing down local kind resources
If you need to delete the local kind cluster and its registry (if it was created by hack/create-kind-cluster.sh):
./hack/delete-kind-cluster.sh
Demos
We provide several sample applications demonstrating Agent Substrate's capabilities:
- Counter Demo: A stateful Go HTTP server demonstrating state preservation across suspends/resumes, and dynamic CRD routing.
- Sandbox Demo (Antigravity): A secure, sandboxed execution environment (running Alpine Linux) that allows arbitrary shell execution while preserving filesystem state across sessions.
- Claude Code Multiplex: Demonstrates oversubscribing physical hardware by multiplexing multiple Claude Code agents onto a limited pool of workers.
- Multi-Template: Two
ActorTemplates running different binaries share oneWorkerPool, across three namespaces. - Request Parking: An oversubscribed pool where the router holds inbound requests until a worker frees up, instead of returning
503. - Autoscaled WorkerPool: Scales a
WorkerPoolon its assigned-worker count with an HPA fed by prometheus-adapter.
Documentation & Guides
- Architecture: How the control plane, node supervisor, and networking stack fit together.
- API Configuration Guide: Detailed reference for configuring WorkerPools, ActorTemplates, Secrets, and Volumes.
- Full CLI Documentation: Installation and usage for
kubectl-ate. - Glossary: Core terms (Actor, Atespace, ActorTemplate, WorkerPool, Worker, ate-api-server, atenet, atelet, ateom) and how they relate.
- Integration Repositories: Where integrations live, how their repositories are named, and how fixes flow back to core.
- Observability Guide: Guide to actor logging, metrics, and distributed tracing.
- Authentication Guide: Configure trusted JWT providers and human credentials.
- Request Parking: How the router parks requests through transient worker-pool saturation.
- Threat Model: Trust boundaries, assumptions, and known risks.
- Roadmap: Current limitations and what is planned next.
- Benchmarking Guide: Locust-based load tests, monitoring stack, and the orchestrated benchmark harness.
Tour
Commands
cmd/ateapi: The core control plane API server exposing gRPC endpoints to manage actor and worker lifecycles.cmd/atelet: A node-level DaemonSet that supervises physical worker pods, coordinates snapshotting, and manages state transfers.cmd/atecontroller: A Kubernetes controller that reconciles WorkerPool and ActorTemplate custom resources.cmd/atenet: A combined networking controller providing DNS, Envoy routing, and proxy sidecars.cmd/ateom-gvisor: An interior-pod helper running inside sandboxed worker pods to executerunsccheckpoint and restore commands.cmd/ateom-microvm: The micro-VM peer ofateom-gvisor, running actors as cloud-hypervisor VMs.cmd/podcertcontroller: A "polyfill" that provides Pod Certificate signers that will eventually ship in upstream Kubernetes (with different names).cmd/kubectl-ate: A CLI tool for managing Agent Substrate resources. See its README.cmd/benchmarking: Synthetic workloads used by the load tests, includingglutton, which consumes RAM, disk, and file descriptors on demand.tools/setup-gcp: A provisioning utility to set up the necessary GCP infrastructure resources (GKE, GCS, IAM).demos/: Sample applications demonstrating Agent Substrate capabilities.
