agent-substrate / substrate
agent-substrate / substrate
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. Agent Substrate 注意:这不是 Google 官方支持的产品。本项目不符合 Google 开源软件漏洞奖励计划的资格。
What is Agent Substrate? 什么是 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. Agent Substrate 为大规模智能体(Agent)部署提供了一个高性能、高密度的运行时环境。Agent Substrate 控制平面为智能体沙箱提供全生命周期管理,实现亚秒级的智能体恢复/挂起操作,并允许在同一计算基础设施上对智能体进行高强度的多路复用。它支持包括 microVM 和 gVisor 在内的多种沙箱技术,从而为所有沙箱类型提供一致的生命周期操作。
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. 其核心逻辑是将大量的“参与者”(Actor,即智能体等应用程序)映射到较小规模的就绪“工作节点”(Worker)上。它利用了智能体类应用大部分时间处于空闲状态这一特性,从而实现了高强度的多路复用。它提供了管理参与者生命周期(如创建/销毁、挂起/恢复)、实时将参与者分配给工作节点以及将传入流量路由至它们的功能。
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 被设计为一个“低见解”(low-opinion,即不强制特定架构)系统。它所管理的负载不一定非要是字面意义上的 AI 智能体,但智能体是其设计目标应用的最佳范例。它不是用于构建智能体的 SDK,而是一个用于大规模运行智能体的系统。
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. Agent Substrate 利用 Kubernetes 进行基础设施配置和工作节点生命周期管理(Kubernetes Pod)。它构建在 Kubernetes 的 Pod 和 Pod 自动扩缩容等功能之上,同时通过提供智能体特定的调度和控制来实现更低的延迟。使用 Kubernetes 作为底层系统,能够为端到端智能体部署所需的所有工作负载类型提供一致的基础设施管理,并允许针对跨越智能体、推理和训练周期的强化学习(RL)场景进行整体基础设施优化。
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: 观看 Agent Substrate 集群如何在仅 8 个物理 Pod 上多路复用约 250 个有状态参与者。此演示突出了 Substrate 的核心开发者体验和“智能体基础设施”能力:
- Instant Actor Teleport: High-performance suspend and resume of actors onto any available worker in the pool with sub-second activation. 即时参与者迁移(Instant Actor Teleport): 在池中任何可用工作节点上高性能地挂起和恢复参与者,实现亚秒级激活。
- State Persistence: Persistent working memory (volatile RAM) and filesystem state preserved perfectly across hibernation cycles via full-state snapshots. 状态持久化: 通过全状态快照,在休眠周期内完美保留持久化工作内存(易失性 RAM)和文件系统状态。
- Agent Swarm Multiplexing: Demonstrates 30x+ oversubscription by “juggling” a large registry of stateful actors onto a small pool of shared physical pods. 智能体集群多路复用: 通过将大量的有状态参与者注册表“轮转”到一小部分共享物理 Pod 上,演示了 30 倍以上的超额订阅能力。
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. 若要在您自己的集群中复现此演示,请参考 Counter Demo 中的详细指南。更多视频和指南,请访问我们的 YouTube 频道: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 Substrate 被设计为与框架和智能体工具链无关。因为它在内核级别(通过 gVisor)管理标准的 OCI 容器,所以它可以托管基于任何技术栈构建的智能体。
- Agent Development Kit (ADK): Native support for ADK-compatible actor identity and persistent working memory. 智能体开发工具包 (ADK): 原生支持 ADK 兼容的参与者身份和持久化工作内存。
- LangChain: Ideal execution environment for long-running, stateful LangChain agents and sandboxed tool-calling. LangChain: 为长期运行、有状态的 LangChain 智能体和沙箱化工具调用提供理想的执行环境。
- Claude Code & CodeX: Support for high-density, stateful coding environments that preserve terminal and filesystem state across sessions. Claude Code & CodeX: 支持高密度、有状态的编码环境,可在会话间保留终端和文件系统状态。
- Model Context Protocol (MCP): Deploy secure, sandboxed MCP servers as Substrate Actors to provide durable tools for any LLM. 模型上下文协议 (MCP): 将安全的沙箱化 MCP 服务器部署为 Substrate 参与者,为任何大语言模型(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). Agent Executor: 一个分布式智能体运行时,演示了如何在 Agent Substrate 上构建安全、超可扩展的智能体工具链(请参阅公告博客和集成指南)。
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. Agent Substrate 目前处于早期开发阶段。它尚未准备好用于生产环境,且 API 几乎肯定会发生变化。我们在此阶段不对向后兼容性做任何保证,项目中的所有内容都可能发生更改。
Supported Kubernetes Releases 支持的 Kubernetes 版本
Currently we aim to support the latest stable release of Kubernetes, and the previous minor release. 目前,我们的目标是支持 Kubernetes 的最新稳定版本以及上一个次要版本。
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. 如需获取公告、进行技术讨论和社区支持,请加入 ate-dev Google Group。我们每周四上午 10:00 至 11:00(太平洋标准时间)举行社区例会。
- 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
We also have channels in the CNCF slack; request an invite here if you don’t have access. 我们还在 CNCF Slack 中设有频道;如果您没有访问权限,请在此处申请邀请。
- #substrate-users to discuss using substrate. #substrate-users 用于讨论使用 substrate。
- #substrate-dev to discuss developing substrate. #substrate-dev 用于讨论开发 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. 请参阅 CONTRIBUTING.md 获取项目贡献指南。我们欢迎各种形式的贡献,但该项目还非常年轻。我们目前的重点是构建核心系统和演示,因此在短期内可能无法审查或合并与这些目标不一致的贡献。
Quickstart (Development) 快速入门(开发)
To quickly set up the complete environment: 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. 要快速设置完整环境:请确保您的开发机器上已安装并配置了 Go、kubectl 和 docker。我们将通过 Go 自动管理其他依赖项,包括 kind。
Run the following steps: 执行以下步骤:
# create cluster and local registry (IPv4; IP_FAMILY=dual|ipv6 overrides)
# 创建集群和本地注册表 (IPv4; IP_FAMILY=dual|ipv6 可覆盖)
hack/create-kind-cluster.sh
# install ate, valkey, rustfs
# 安装 ate, valkey, rustfs
hack/install-ate-kind.sh --deploy-ate-system
# install counter demo
# 安装计数器演示
hack/install-ate-kind.sh --deploy-demo-counter
# install kubectl-ate
# 安装 kubectl-ate
go install ./cmd/kubectl-ate
# create an atespace (required before creating actors), then a counter actor in it
# 创建 atespace(创建参与者前必须),然后在其中创建一个计数器参与者
kubectl ate create atespace demo
kubectl ate create actor my-counter-1 -a demo --template=ate-demo-counter/counter
# port-forward the network router to bind to local port `8000`
# 将网络路由器端口转发到本地端口 `8000`
kubectl port-forward -n ate-system svc/atenet-router 8000:80
In a separate terminal, send an HTTP request to increment the counter: 在另一个终端中,发送 HTTP 请求以增加计数器:
curl -X POST -H "Host: my-counter-1.demo.actors.resources.substrate.ate.dev" -i http://local