Agent Substrate

Agents in the cloud with Agent Substrate

How DefenseClaw protects coding agents that run as Agent Substrate actors on Kubernetes, interactive or unattended, and how that differs from OpenShell sandboxes on your own machine.

Agent Substrate is an open-source runtime, a CNCF sandbox project, for running agents on Kubernetes. Each agent is an actor: a container in its own gVisor sandbox or microVM. When an actor is idle, Substrate saves its memory and files and frees the machine. It brings the actor back in under a second on any machine in the cluster.

DefenseClaw protects an agent in an actor the way it protects one in an OpenShell sandbox: every tool call, every model request and every site the agent reaches is checked. The difference is where the agent runs.

DefenseClaw 1.0.10 supports Agent Substrate 1.0.x (supported range >=1.0.0 <1.1.0) on Kubernetes 1.34 or later.

OpenShell or Agent Substrate

OpenShell sandboxAgent Substrate actor
Where the agent runsOn your laptop or serverIn a Kubernetes cluster (your own, or your company's)
Your machineLinux, or a Mac with Apple siliconAny: Windows, macOS or Linux. Only the launcher runs locally
Your projectMounted live (Linux) or copied (Mac)Copied up or cloned from git. Changes come back with pull or a push
Close the laptopThe sandbox stops with the machineThe agent keeps working, then suspends when idle. Resume from any machine
How many agentsWhat one machine can runWhat the cluster can run
Model trafficGoes to the provider directly. The sandbox holds a placeholder keyAlways goes through the DefenseClaw guardrail proxy. The key stays in the cluster
NetworkDefenseClaw egress proxy, with asksDenied by default. DefenseClaw writes each agent's allow list and checks each request, with asks
Unattended runsNot designed for it--task and --batch, from a terminal or CI
Your local toolsHost ports and your MCP servers come alongOnly what's in the image or reachable over the network
Who sets it upYou, once per machineYou for your own cluster (open source), or a platform team (enterprise)

Pick OpenShell when the agent needs your machine: a live folder, a local database, local MCP servers, or no cloud at all. Pick Agent Substrate when you want agents that keep running without your laptop, many agents at once, batch runs from CI, or a sandbox on a machine that OpenShell can't run on, such as Windows or an Intel Mac.

You can use both. The same policy packs, profiles and guardrails apply to each.

What a session looks like

cd ~/code/myapp
defenseclaw substrate run claude

You get Claude Code in your terminal, with a short DefenseClaw banner first. What happens around it:

detach
Start the agentdefenseclaw substrate run claude
Project copied upsecret files held back
The agent works in the clustertool calls, model and sites checked
Stay or leave?Ctrl-] detaches
Agent suspends when idlestate saved, machine freed
Come back from any machinesubstrate connect, pull

List view for small screens. Use the expand button to open the drawing.

  1. 1.Start the agentdefenseclaw substrate run claude
    • Project copied up
  2. 2.Project copied upsecret files held back
    • The agent works in the cluster
  3. 3.The agent works in the clustertool calls, model and sites checked
    • Stay or leave?
  4. 4.Stay or leave?Ctrl-] detaches
    • detachAgent suspends when idle
  5. 5.Agent suspends when idlestate saved, machine freed
    • Come back from any machine
  6. 6.Come back from any machinesubstrate connect, pull
One Agent Substrate session. The agent runs in the cluster; your terminal is a window onto it. Leaving doesn't stop the agent.

Where to start

  • Open source. You run Agent Substrate yourself, on a kind cluster, GKE or EKS, and add DefenseClaw with a Helm chart and defenseclaw substrate setup.
  • Managed enterprise. A platform team runs the cluster for everyone. Developers sign in with the company identity provider. Their group decides their policy, and they can't loosen it. Running the agent on a laptop can be refused with a pointer to the cloud sandbox.
  • Unattended runs. Give an agent a task and walk away, or run a batch from CI.
  • Agents and features says which agents run in an actor and how each feature compares with the host and OpenShell.
  • How it works has the architecture, and the threat model says what is and isn't defended.
  • Reference lists every command, key and exit code, and Troubleshooting has fixes, including a section for agents.

Does every agent work

Ten command-line agents are built to run in an actor: Claude Code, Codex, OpenCode, GitHub Copilot CLI, Hermes, Kiro CLI, Antigravity CLI, Cursor Agent CLI, Amp and Devin CLI. Not all of them are proven on a model yet; Agents and features says which are. Desktop and IDE apps can't run in an actor, because an actor is a Linux container with no screen.

Some features differ: no live folder, no host ports, no local MCP servers. Some are new: suspend and resume, any laptop OS, always-on model guardrails, unattended batches.