opensourceprojects.dev

A broadsheet for software that doesn't ask for your email

Sandboxing millions of agents on Kubernetes by snapshotting idle ones
GitHub RepoViews0

Project Description

View on GitHub

Running a Million Agents Without a Million Idle Pods

If you've ever tried to keep a fleet of agent sandboxes warm, you know the math doesn't work. Agents spend most of their lives waiting—on a model response, a tool call, a human in the loop—yet a standard container keeps burning memory the whole time it sits there doing nothing. Agent Substrate, an open-source project from the folks at agent-substrate, takes a different approach: snapshot the idle ones and bring them back when a request actually arrives.

What It Does

Agent Substrate is a security-hardened, zero-trust runtime for sandboxed agents built to run on standard Kubernetes. The core idea is a mapping problem. You have a large set of "actors"—stateful workloads like agents—and a smaller pool of ready "workers." Because agents are mostly idle, Substrate snapshots idle actors out of memory and restores them when a request comes in, claiming fast resume in under 500ms and more than 500 activations per second. The density pitch is 10x that of standard containers.

It's explicitly a low-opinion runtime, not an agent SDK. The workloads don't even have to be AI agents, though autonomous, untrusted, mostly-idle agents are clearly the target. It runs on the Kubernetes primitives you already know—Pods, autoscaling, NetworkPolicies—and layers on agent-specific scheduling, snapshotting, identity, and network mediation. It also supports multiple sandbox technologies, including microVMs and gVisor, behind a consistent lifecycle.

Why It's Cool

  • The idle-agent insight is the whole product. Most infrastructure assumes workloads are busy. Substrate assumes the opposite, and every design decision flows from there. Snapshotting idle actors out of memory and restoring them on demand is what makes the density numbers plausible rather than aspirational.

  • Security is treated as a first-class constraint, not a bolt-on. Every actor runs inside a dedicated gVisor (runsc) or Cloud Hypervisor microVM sandbox with segregated compute, network, and storage. Plain Linux containers aren't supported at all. The stated model is that every actor is untrusted and mutually hostile, so tenants can share physical nodes without sharing a security boundary.

  • Identity is per-agent and cryptographic by default. Every active actor gets a short-lived SPIFFE X.509 certificate automatically, and the egress gateway can mint per-actor JWTs on demand when a policy calls for one. Both carry the actor identity and the atespace (Substrate's namespace grouping) and are designed to federate with external identity systems.

  • Credentials stay out of the sandbox entirely. This is the detail that matters most for anyone running untrusted code. You don't hand an agent a token and hope it behaves—the identity machinery lives outside the boundary.

  • It doesn't ask you to abandon Kubernetes. You get agent-specific scheduling and mediation on top of the Pods, autoscaling, and NetworkPolicies you already run. That means agentic, inference, training, and reinforcement learning workloads can share one infrastructure plane instead of each getting its own bespoke stack.

The honest caveat: the README is explicit that every control has to operate within the cold-start and resume budget. That's a real engineering constraint, and it's the kind of thing that either holds up under load or doesn't.

How to Try It

The project points to a Quickstart for development, so start there rather than guessing at a deployment path.

  1. Head to the repository: github.com/agent-substrate/substrate
  2. Follow the Quickstart (development) section to get a local environment running.
  3. Read the Architecture doc to understand how actors map onto workers and how snapshotting fits into the lifecycle.
  4. If you're evaluating this for anything with a security boundary, go through the Security Guide—it lays out the principles and threat model.
  5. If you want to contribute, CONTRIBUTING.md has the details.

It's Apache 2.0 licensed and has CI and govulncheck badges running on the main branch, which is a reasonable signal that the maintainers take the security claims seriously enough to automate checking them.

Final Thoughts

Agent Substrate is aimed at a specific audience: platform teams running untrusted, mostly-idle agent workloads at scale on Kubernetes, who care about isolation boundaries and credential handling as much as raw density. If you're running a handful of agents, this is probably more machinery than you need. If you're staring down thousands—or the README's millions—the actor-to-worker snapshot model is a genuinely different answer to the problem, and the security posture is unusually concrete for a project at this stage. Worth a look if that's your world.


Follow @githubprojects for more developer tools and open source projects.

Back to Projects
Project ID: substrateLast updated: November 19, 2026 at 07:09 AM