Wink Pings

Agents Are Most Expensive When They're Idle: This Open-Source Project Lets Them Sleep

Agent Substrate snapshots and suspends idle Agents, wakes them within 500 ms, claims 10x density on the same hardware, and keeps credentials out of the sandbox. It sounds like a K8s moment, but real-world adoption will still hinge on long-lived connections, streaming responses, and recovery semantics.

Shubham Saboo posted a tweet on X with an image of a project called Agent Substrate. He called it the Kubernetes moment for AI Agents. The project is open source on GitHub under Apache-2.0 and has reached 1.0. Don't get carried away by the million agents just yet—look at where it actually saves.

Agent Substrate 推文配图

Agent bills have an awkward truth: most of the time they are waiting for models, tools, or people. CPU and memory are occupied, but no work is being done. Agent Substrate's approach is to snapshot these idle actors and restore them when a request arrives. The official numbers are sub-500 ms restore time, 500 activations per second, and 10x density improvement on the same hardware. In the demo, about 250 stateful actors are multiplexed onto 8 physical pods, with oversubscription ratios of 10x to 30x.

Agent Substrate README 演示图

Putting Actors into WorkerPool

The core mapping is simple: a large group of actors maps to a small pool of hot workers. An actor is a stateful workload; a worker is a pod that actually does the work. When an actor is idle, it is suspended; its memory and filesystem state are written into a snapshot, and the next request restores it on any available worker. The project docs say both working memory and filesystem state are preserved, so in-progress sessions and tool state are not lost during suspension.

This sounds like putting Agents to sleep. Someone in the comments did the math, saying an Agent already waits more than 30 seconds per round for the model, so 500 ms recovery is almost imperceptible. That's fair. Recovery speed isn't the only selling point; not consuming compute while idle is the real one.

The Security Boundary Sits Outside the Sandbox

Agent Substrate treats every actor as untrusted. Each actor runs in gVisor or a Cloud Hypervisor microVM; ordinary Linux containers are not supported. Each active actor gets a short-lived SPIFFE X.509 certificate by default, and the egress gateway can issue per-actor JWTs according to policy. Credentials are not placed inside the sandbox; API keys and cloud tokens are injected by the egress gateway into approved outbound requests. Networking is deny-by-default: inbound traffic only goes through the ingress router, and outbound traffic is restricted by the egress gateway. Policies are replaceable at the edge and can integrate with your own authorization, DLP, prompt-injection scanning, or cloud IAM.

Someone in the comments mentioned that the layer they most want to copy is putting credentials in the egress gateway. That judgment is more substantive than the 500 ms. When an Agent is breached by prompt injection, there is nothing to steal inside the sandbox, so the blast radius is much smaller.

The Question Mark Between 500ms and a Million

The official demo video is on YouTube, and the README also includes a thumbnail.

Agent Substrate Demo 视频缩略图

The questions in the comments are more valuable than the retweets. Marco asks whether server or DB processes are restored along with the wake-up; the docs seem to persist only the filesystem. Chirag asks what happens if an actor is suspended mid-stream during a model response—does the router keep the connection or retry? Primary asks whether the 500 ms was measured on a loaded cluster or an idle one. Kartik is concerned that when a long tool call spans a sleep window, the remote connection won't wait for a snapshotted Agent.

These aren't nitpicks. In real Agent workloads, long-lived connections, streaming output, and external tool calls are common. Snapshotting RAM and the filesystem can handle state restoration, but it cannot resolve the semantics of all external sessions. These paths need to be stress-tested before deployment.

A Nix Patch Also Connects Terminals

Eric Juta built an experimental patch set ate-nix, layered as a Nix flake on a pinned version of Agent Substrate, not a fork. It supports starting actors from a Nix store path, bypassing container image registries—no image building or pulling. Samuel Huber's PTY patch has been rebased in, enabling real terminals in remote environments, with full-screen programs, resize, and Ctrl-C. It also supports installing Substrate into an existing cluster and provides an example with the Oh My Pi coding Agent. The README is clear: experimental, not security-reviewed, and not affiliated with Agent Substrate.

What's Worth Looking At

Agent Substrate already supports ADK, LangChain, Claude Code, Codex, Antigravity, and MCP. It is framework-agnostic and runs standard OCI images. Installation can use local kind or GKE. The project is at 1.0 and promises compatibility for the public API, CLI, and configuration format.

My take: it solves real problems. Idle Agents should not be billed at full load, and credentials should not sit next to untrusted code. 'A million agents' and 'Kubernetes moment' are marketing language. The metrics that really matter are recovery latency under load, long-connection preservation, retry semantics after interrupted streaming responses, and how external process state is reconciled after snapshot recovery. Once Agents learn to sleep, platform engineers may not get fewer night shifts.

发布时间: 2026-11-18 02:38