Kagent and Agent Substrate: Running AI Agent Sandboxes on Kubernetes Kagent v1.0 and Agent Substrate combine to run AI agent sandboxes on Kubernetes, using gVisor for software-level isolation and microVMs for hardware-level isolation, according to the kagent.dev documentation. Agent Substrate runs all agents in Workers, which are Pods, facilitated via Actors managed by the ateapi control plane, while kagent serves as the runtime for declarative and bring-your-own agents covering frameworks such as LangGraph and ADK. The default Helm installation of kagent creates one WorkerPool with two Workers (Pods). Isolation. Security. Scale. Without these three things, Agents cannot be properly implemented in a controlled environment, they will not have policy enforcement to ensure they do what they’re supposed to do, and there’s zero way of ensuring that the Agent will be readily available when needed. Kagent as the runtime for declarative and BYO covering frameworks like langgraph/ADK Agents combined with Agent Substrate for the underlying sandbox environment ensures that you can implement all three production-level needs when running agentic workloads. In this blog post, you’ll learn the key concepts to agent sandboxing, how Substrate is used, and implementing it with kagent. To follow along with this blog post in a hands-on fashion, you will need: If you do not have a k8s cluster, you can follow along from a theoretical perspective for the learnings until you have a cluster readily available. If you spin up Docker or whatever containerization engine you prefer, create a container, and run a workload in it, technically speaking the workload is “sandboxed”. However, that level of sandboxing might as well not even exist. Ingress and egress is wide open, the workload can send packets to whatever it likes, and there’s zero policy enforcement. Of course there are ways to tighten this up network policies, segmentation, routing rules, etc. , but that doesn’t change the fact that sandboxing as a whole is “flat” by nature. Sandboxing an Agent in a secure and effective fashion means: To ensure that the above can be properly implemented, you need the ability to isolate Agents at both the hardware and software level along with policy enforcement at the AI Gateway for when Agent traffic is reaching its destination. Container isolation and software-level isolation to that point stops at your kernel. Everything is running in said kernel in the user space , which can be sufficient for some, but how that isolation is implemented matters. How the client routes to the Agent and what is in the middle facilitating that routing is what counts when it comes to isolation. That’s where Agent Substrate comes into play. With Agent Substrate, all Agents are running in Workers, which are Pods. The Agents are facilitated via Actors, which are managed by the ateapi Agent Substrates Control Plane . Where the isolation comes into play is with software and hardware-level isolation. gVisor is used for software-level isolation and microVM is used for hardware-level isolation. With software-level isolation, the isolated workload runs inside of the user space using a dedicated user-space app kernel called Sentry that intercepts and handles system calls. With microVM hardware isolation the kernel itself where the workload runs is at the CPU chip level. With that chip level isolation, all workloads run on the physical chip, not in the user space. In the previous sections, you learned about the architecture, design, and system choices for why sandboxing an Agent is important. In the upcoming sections, you’ll learn how to do it in a hands-on fashion with kagent and Agent Substrate. The interaction points you’ll see here are: kagent is the runtime, Agent Substrate is the platform sitting underneath to help implement and facilitate sandboxing. Without kagent, the only real entry point to interact with Agent Substrate is via a programmatic call with something like a curl to interact with the Actor. Kagent allows you to interact with Agents running in Actors via Substrate in a way that the industry is comfortable with a UI and in a declarative fashion . There are a few steps to installing kagent v1.0 and Agent Substrate, including: To get a play-by-play, step-by-step instruction set, you can take a look at the guide found here https://kagent.dev/docs/kagent/1.x/setup/installation/ . Once you’re up and running, you’ll see that with the Helm installation of kagent by default, one WorkerPool gets created with two Workers Pods . The WorkerPool gets created with the substrateWorkerPool.create=true setting on the Helm Chart. With kagent + Agent Substrate installed, you can now create an Agent Actor and an Agent Template. The AgentTemplate is like a “golden image” although, “image” feels a bit too heavy of wording that contains the configurations for your Agent and can be reused across Agents that you deploy. The Harness is the Actor Agent itself. This can be something like a Harness Codex, Claude Code, etc. or a BYO Agent using a framework like langgraph. Run the below to declaratively create the Harness and AgentTemplate using the kagent CRDs. kubectl apply -f - <