substrate README

README проекта с github.com/agent-substrate/substrate. Одним файлом markdown: README.md.

Agent Substrate logo: a green octopus with agent puppets

Agent Substrate

Zero-trust sandboxing for millions of agents on Kubernetes.

License Release CI govulncheck GitHub stars

Quickstart · Security · Architecture · Contributing

Agents are idle most of the time. Agent Substrate suspends idle agents and resumes them on request onto a small pool of warm worker pods.

What is Agent Substrate?

Agent Substrate is a security-hardened, zero-trust runtime for sandboxed agents, engineered to safely run millions of agents and tools with 10x higher density than standard containers. Purpose-built for the era of autonomous agents, Substrate delivers fast resume operations in less than 500ms, with more than 500 activations per second. Agents get isolated compute, identity, networking, and storage. Sensitive credentials are kept out of reach from untrusted code. It supports multiple sandbox technologies, including microVMs and gVisor, while enabling a consistent lifecycle and management of all sandboxes.

At its core, Agent Substrate maps a larger set of “actors” (stateful workloads such as agents) onto a smaller pool of ready “workers”. Because agents spend most of their lives waiting on models, tools, or humans, Substrate snapshots idle actors out of memory and restores them when a request arrives.

Substrate is a low-opinion runtime, not an agent SDK. The workloads it runs do not have to be AI agents, though autonomous, untrusted, mostly-idle agents are the target for its isolation and scheduling model. It runs on standard Kubernetes: Pods, autoscaling, NetworkPolicies. It adds agent-specific scheduling, snapshotting, identity, and network mediation. This allows agentic, inference, training, and reinforcement learning workloads to share one infrastructure plane.

Security Model

Substrate treats every actor as untrusted and mutually hostile, so tenants can share physical nodes without sharing a security boundary. Every control operates within the cold-start and resume budget. See the Security Guide for the full list of security principles and threat model.

Performance & Multiplexing

Agent Substrate 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:

  1. Actor Teleport: Suspend and resume actors onto any available worker in the pool, when needed.
  2. Full-State Persistence: Working memory (RAM) and filesystem state are captured in snapshots and restored intact across hibernation cycles, without losing in-flight sessions or tool state.
  3. 10x–30x Oversubscription: Multiplex a large registry of stateful actors onto a small pool of warm worker pods, paying for compute only while an agent is actively thinking or executing a tool.

To reproduce this demo in your own cluster, see the Counter Demo. For more walkthroughs, visit the agent-substrate YouTube channel.

Star History

Star history chart for agent-substrate/substrate

Framework Agnostic & Compatibility

Agent Substrate is framework and agent harness agnostic. Because it runs standard OCI container images inside gVisor or microVM sandboxes and enforces security outside the workload, it hosts agents built on any stack without SDK changes:

Ecosystem & Examples

Status and compatibility

Agent Substrate has reached 1.0. We are committed to compatibility and stability of the public API, CLI, and configuration formats. We will continue to add new features, but we will not break existing APIs or configuration formats without a major version bump. See "Compatibility and schema evolution" in CONTRIBUTING.md for more details.

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.

We also have channels in the CNCF slack; request an invite here if you don't have access.

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:

  1. Make sure you have Go, kubectl, and docker installed and configured on your dev machine. We will automatically manage other dependencies via Go, including kind. A Linux host that will run more than about a thousand sandboxes also needs a larger kernel neighbor table (net.ipv4.neigh.default.gc_thresh1/2/3 = 4096/16384/32768); hack/create-kind-cluster.sh warns when the host is at the default of 1024.

  2. Run the following steps:

# create cluster and local registry
hack/create-kind-cluster.sh

# make ate-setup target the kind cluster; set this in every shell that runs
# ate-setup, including for the demo walkthroughs
export ATE_INSTALL_KIND=true

# install Substrate
go run ./cmd/ate-setup deploy ate-system --credential-provider='{"name":"k8s.io"}' \
  --ingress-allowed-spiffe-ids=spiffe://cluster.local/ns/ate-system/sa/atenet-client

# install counter demo
go run ./cmd/ate-setup deploy demo counter

# install kubectl-ate
go install ./cmd/kubectl-ate

# create a counter actor in the demo's atespace (--template names the
# actor template, resolved in the actor's atespace)
kubectl ate create actor my-counter-1 -a ate-demo-counter --template counter

# serve a local proxy on port 8000 that sends requests to the actor through the
# network router
kubectl ate proxy actor my-counter-1 -a ate-demo-counter

[!IMPORTANT] {"name":"k8s.io"} deploys the bundled credential provider with an empty, default-deny namespace policy. Before an actor can have a credential injected, grant its atespace the namespaces whose Secrets it may read; see Enable it.

  1. In a separate terminal, send an HTTP request to increment the counter:
curl -X POST -i http://localhost:8000/

Custom Setup and Deployment

You can deploy or cleanup specific Agent Substrate components using the installation script. See go run ./cmd/ate-setup for all options.

# Re-deploy only ate-apiserver of the ATE system
go run ./cmd/ate-setup deploy apiserver

# Delete everything (core system and all demos)
go run ./cmd/ate-setup delete all

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

GKE Quickstart

To deploy on Google Kubernetes Engine, follow the official GKE Installation Guide. It lists the prerequisites and gives the one-line installer command. The installer's source and detailed options are in substrate-gke.

Demos

We provide several sample applications demonstrating Agent Substrate's capabilities:

  1. Counter Demo: A stateful Go HTTP server demonstrating state preservation across suspends/resumes, and on-demand actor resumption and routing via the Substrate router.
  2. Sandbox Demo (Antigravity): A secure, sandboxed execution environment (running Alpine Linux) that allows arbitrary shell execution while preserving filesystem state across sessions.
  3. Claude Code Multiplex: Demonstrates oversubscribing physical hardware by multiplexing multiple Claude Code agents onto a limited pool of workers.
  4. Multi-Template: Two ActorTemplates running different binaries share one WorkerPool, even though the templates live in different atespaces.
  5. Request Parking: An oversubscribed pool where the router holds inbound requests until a worker frees up, instead of returning 503.

Documentation & Guides

Tour

Commands

substrate (agent-substrate/substrate)

Ищем в базе…

Что это такое?Runtime с безопасностью по умолчанию, который размещает ИИ-агентов в изолированных песочницах — микровиртуальных машинах или контейнерах gVisor — и запускает миллионы таких песочниц на общей инфраструктуре, обеспечивая гораздо более высокую плотность размещения, чем стандартные container runtime.
Это фреймворк или SDK для создания агентов?Нет и нет — это инфраструктурный слой для запуска агентов в масштабе, а не инструмент для их создания. Он построен поверх Kubernetes: переиспользует Pods и автомасштабирование и добавляет поверх них планирование и маршрутизацию трафика, специализированные под агентов.
Как его запустить?Установите Go, kubectl и Docker — kind настраивается автоматически — и следуйте dev quickstart для локального кластера. Для GKE инструменты tools/setup-gcp создают кластер, GCS и IAM, а hack/install-ate.sh разворачивает систему.
Какие агентские стеки он реально может запускать?Практически любые: он управляет стандартными OCI-контейнерами, поэтому на нём работают агенты, собранные с Google ADK, LangChain, Claude Code, CodeX и Antigravity, а также MCP-серверы, развёрнутые как изолированные акторы с сохраняемым состоянием.
Можно ли уже сейчас использовать это в продакшене?Нет — проект находится на ранней стадии разработки, официально не готов к продакшену, и API почти наверняка будут меняться без гарантий обратной совместимости. Поддерживаются только последняя стабильная версия Kubernetes и предыдущая.
Как он умещает столько песочниц на ограниченном железе?Приложения, похожие на агентов, большую часть времени простаивают, поэтому Substrate отображает множество 'акторов' на меньший пул готовых 'воркеров' — приостановка и возобновление занимают меньше 500 мс при 500+ активациях в секунду. В демо около 250 акторов с состоянием работают всего на 8 физических подах — это более чем 30-кратное превышение подписки.
Теряет ли приостановленный агент свою память или файлы?Нет — при приостановке делается полный снимок состояния, который сохраняет и рабочую память, и файловую систему, поэтому актор возобновляет работу ровно с того места, где остановился, — даже если его 'телепортировали' на другой воркер в пуле.
Он имеет смысл только для ИИ-агентов?Нет — он намеренно не навязывает конкретный сценарий использования: рабочие нагрузки не обязаны быть именно ИИ-агентами. Подходит любое приложение с большим временем простоя, которому нужны быстрое пробуждение и надёжная изоляция; агенты — просто флагманский и лучше всего документированный пример.
Какие есть похожие проекты?ax, CubeSandbox, OpenSandbox, thanos, skills, encore, agents-cli, dapr
Автор
agent-substrate
Размер
54.6 MB
Звёзды
7.6K
Возраст
6 мес
Коммиты · 90 дней