Run coding agents on persistent cloud VMs
Give each coding agent its own persistent Linux VM that keeps the repo, the tools, and the running session. The VM pauses with its memory intact when the agent goes idle, so you aren't paying for a machine nobody is using.
# Install the Beam CLI, connect your coding agents, and create a VM
curl -fsSL https://www.beam.cloud/install | sh -s -- --vm
# Or set one up yourself
beam vm new agent-box
beam vm sync agent-box ./my-repo
beam vm ssh agent-box
# On the VM: Claude Code and Codex CLIs come preinstalled
cd /workspace && claudeA dev box built for coding agents
A real Linux machine with its own kernel, so agents can install packages, run services, and use Docker without touching your laptop.
How to give a coding agent a VM
Install and connect
Run the Beam installer. It signs you in, installs the Beam skill, and registers the MCP server with the coding agents it finds.
Give the agent a VM
Add --vm to create one during setup, or create it with beam vm new or the SDK, then sync the repo into /workspace.
Let it work, then pause or fork
The agent runs commands, services, and tests on the VM. Set an idle timeout so it pauses when the agent stops, or fork it to try another approach.
from beam import VM
# A persistent workspace that pauses after 5 idle minutes
vm = VM(
"agent-box",
cpu=4,
memory=8192, # MiB
desktop=True,
ttl=300,
idle_action="pause",
auto_resume=True,
).create()
run = vm.process.exec("git", "clone", "https://github.com/OWNER/REPO", "/workspace/repo")
run.wait(timeout=120)
vm.pause() # RAM, processes, and the disk are savedFrequently asked questions
Which coding agents can use Beam VMs?
The installer registers Beam's MCP server with each supported agent it finds on your machine, and every VM comes with the Claude Code and Codex CLIs. Any agent that can run shell commands over SSH can also work on a VM.
Does the VM keep running when I close my laptop?
Yes. Closing your terminal or client doesn't stop a VM. It runs until you stop, pause, or remove it, or until an idle timeout pauses or stops it.
How do I keep costs down while the agent is idle?
Set an idle timeout with the pause action and auto-resume. After the idle period the VM pauses with its RAM and processes saved and releases compute, then wakes when you access it.
Is it safe to give an agent root on the VM?
Each VM is a microVM with its own kernel, separate from your laptop and other workloads. You can restrict outbound traffic and bind secrets to specific hosts, so the agent only reaches what it needs.
Can I watch or take over what the agent is doing?
Yes. SSH into the VM, open the browser terminal, or open the desktop. The terminal and desktop are protected by default.
Related use cases
Run computer use agents on persistent Linux desktops
Linux desktops your agents can screenshot, click, and type in.
AgentsRun GitHub Actions 2x faster and 5x cheaper
Self-hosted runners on persistent Linux VMs with Docker.
SandboxesGive your AI agents a safe place to run code
Isolated sandboxes for agent-generated code, booting in seconds.
Give Your Agent Superpowers
Start shipping today and bring your vision to life