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 sandbox | Agent Substrate actor | |
|---|---|---|
| Where the agent runs | On your laptop or server | In a Kubernetes cluster (your own, or your company's) |
| Your machine | Linux, or a Mac with Apple silicon | Any: Windows, macOS or Linux. Only the launcher runs locally |
| Your project | Mounted live (Linux) or copied (Mac) | Copied up or cloned from git. Changes come back with pull or a push |
| Close the laptop | The sandbox stops with the machine | The agent keeps working, then suspends when idle. Resume from any machine |
| How many agents | What one machine can run | What the cluster can run |
| Model traffic | Goes to the provider directly. The sandbox holds a placeholder key | Always goes through the DefenseClaw guardrail proxy. The key stays in the cluster |
| Network | DefenseClaw egress proxy, with asks | Denied by default. DefenseClaw writes each agent's allow list and checks each request, with asks |
| Unattended runs | Not designed for it | --task and --batch, from a terminal or CI |
| Your local tools | Host ports and your MCP servers come along | Only what's in the image or reachable over the network |
| Who sets it up | You, once per machine | You 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 claudeYou get Claude Code in your terminal, with a short DefenseClaw banner first. What happens around it:
List view for small screens. Use the expand button to open the drawing.
- 1.Start the agentdefenseclaw substrate run claude
- Project copied up
- 2.Project copied upsecret files held back
- The agent works in the cluster
- 3.The agent works in the clustertool calls, model and sites checked
- Stay or leave?
- 4.Stay or leave?Ctrl-] detaches
- detachAgent suspends when idle
- 5.Agent suspends when idlestate saved, machine freed
- Come back from any machine
- 6.Come back from any machinesubstrate connect, pull
Where to start
- Open source. You run Agent Substrate yourself, on a
kindcluster, GKE or EKS, and add DefenseClaw with a Helm chart anddefenseclaw 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.
Sandboxes in the TUI and macOS app
Watch and manage OpenShell sandboxes from the DefenseClaw terminal UI's Sandboxes panel or the macOS app's Sandboxes view, menu bar and notifications, and run sandbox setup from either.
Open source on your own cluster
One developer runs Agent Substrate on their own cluster, adds DefenseClaw with a Helm chart, and runs Claude Code or Codex in a protected actor.