Run computer use agents on persistent Linux desktops
Give each computer use agent a Linux desktop it can screenshot, click, and type in. Pause it between runs to release compute, and it resumes with the same apps open.
Give your agent a full desktop
A real Ubuntu machine with root access and a persistent disk, isolated in its own microVM.
Pause without losing a tab
Pausing saves RAM and disk, then releases compute. Resume and every app is where the agent left it.
Explore docsSet up once, fork many
Install apps and configure the browser once, then fork the VM into independent desktops. Forks copy the disk, not RAM.
Explore docsRecord runs to MP4
Capture the screen at up to 60 fps, then download the video to review every click.
Explore docsDrive it from Python or JavaScript
Screenshot, click, drag, scroll, press keys, and paste text. Beam's MCP server exposes desktop tools too.
Explore docsWatch live or take over
Open the desktop in your browser to follow the agent or take the mouse mid-task. It's protected by default, with SSH and a browser terminal alongside.
Explore docsControl what the agent can reach
Block outbound traffic or allow up to 64 hosts or IP ranges. Secrets reach the VM as placeholders, filled in only for HTTPS headers sent to approved hosts.
Explore docsHow to run a computer use agent on a Linux desktop
Create a desktop VM
Set desktop=True in Python or desktop: true in JavaScript, or run beam vm new, which includes a desktop by default.
Run the screenshot loop
Send each screenshot to your model and turn its reply into a click, key press, or pasted text.
Record and pause
Save the run as an MP4, then pause the VM so the next run starts with the same apps open.
from beam import VM
def ask_model(png: bytes) -> dict: ... # call your model
vm = VM("agent-desktop", desktop=True).create()
rec = vm.desktop.record("/workspace/run.mp4")
for _ in range(50):
action = ask_model(vm.desktop.screenshot())
kind = action.pop("type")
if kind == "click":
vm.desktop.click(**action) # x, y, count
elif kind == "write":
vm.desktop.write(action["text"]) # pastes it
elif kind == "press":
vm.desktop.press(*action["keys"])
else:
break # "done" ends the run
vm.desktop.stop_recording(rec)
vm.pause() # open apps stay in RAMFrequently asked questions
What is a computer use sandbox?
An isolated machine with a real desktop that an AI agent operates through screenshots, clicks, and keystrokes. On Beam it's a Linux VM with its own kernel, kept apart from your laptop and other workloads.
Which AI models can drive the desktop?
Any model you can call from code. Your loop sends it each screenshot and maps its reply to a call like click, press, or write. The agent works from pixels only, with no accessibility tree, and there are no mouse-down, key-hold, or cursor-position calls.
Can the desktop stay logged in between runs?
Yes, if you pause it. The browser stays in RAM with its sessions intact until a site expires them. A stop or fork keeps the browser profile on disk but starts apps fresh, so session-only logins are lost.
How do I watch or take over the agent's desktop?
Run beam vm desktop with the VM's name to open it in your browser, then take the mouse whenever you need to. The viewer resizes the display to fit your window, so the agent should read coordinates from its latest screenshot.
Is it safe to give an agent a desktop?
Each desktop runs in a microVM with its own kernel, so the agent's root access stays inside the VM. You can block outbound traffic or allow up to 64 hosts or IP ranges, and secrets reach the VM only as placeholders, swapped for real values in HTTPS headers to approved hosts.
Can I run Windows or macOS desktops?
No, desktops are Linux only: Ubuntu 24.04 by default, or 22.04 in a custom image. The browser is Chrome on x86-64 and Firefox on ARM64.
Does the desktop have a GPU?
No. VMs are CPU-only, so the display and any video render on the CPU. Create the VM with more CPUs for a larger display or video-heavy apps.
How much does a computer use sandbox cost?
Beam VMs bill per second while running, with rates based on your CPU tier. See beam.cloud/pricing for current rates and examples. Storage is not billed yet. Planned: $0.0001 per GB-hour of data stored, with no free allowance. Paused and stopped desktops have no compute charge.
Related use cases
Run coding agents on persistent cloud VMs
Persistent VMs where Claude Code and Codex can build, test, and run.
SandboxesSandboxes for parallel RL rollouts
Forkable, restorable sandboxes for reinforcement learning rollouts.
SandboxesGive your AI agents a safe place to run code
Isolated sandboxes for agent-generated code, booting in seconds.
Give your agents their own machines
Sign up, install the CLI, and launch a sandbox, VM, or GPU from your terminal or your coding agent.