Vercel Sandbox Desktop

Start a cloud desktop, watch an agent drive Chrome, or open Blender. See the exact commands, SDK example, and what a viewer link lets a teammate do.

Published

Vercel Sandbox Desktop

A browser agent says it clicked Continue, but the checkout page hasn't moved. With a Vercel Sandbox desktop, you can watch the next click in a browser tab and see whether it lands on the button, hits a dialog, or changes the page. A teammate can open the same running desktop while the failure is still on screen.

screen-relay is the open-source tool from Vercel Labs that makes this possible. It gives the sandbox a Linux desktop, sends live video to your browser, and carries mouse and keyboard input back. Think of your browser tab as a monitor and keyboard plugged into the cloud machine. Close the tab to give up the controls. Stop the sandbox when you're finished using the machine.

Start a desktop and open the viewer

You'll need Node.js and npm for the Sandbox command-line tool. Install it with npm install -g sandbox and sign in with sandbox login. Vercel's example requires CLI version 4.12.0 or newer. In your terminal, run these two commands from the desktop streaming guide.

Bash
sandbox create --name desktop --timeout 30m -p 8080 \
  --image vercel-labs/screen-relay/sandbox-desktop:latest
sandbox exec desktop -- screen-relay up -d --public $(sandbox domain desktop 8080)

The first command creates a sandbox named desktop from an image with the desktop software already installed. It publishes port 8080 and sets a 30-minute timeout. The second starts screen-relay and prints the viewer link. Open the full link, including its #token=… ending, in a current version of Chrome, Edge, or Safari.

Anyone with that link can view and control the desktop. Share it privately with a teammate who should have both permissions. Keep the link and token out of recordings, repositories, and messages a model can read. A desktop has one token and no separate user identities. If the link gets exposed, stop the desktop and start it again to replace the token.

Three connected model rooms show sandbox create, screen-relay up, and the resulting viewer link.
The first command creates the machine. The second starts its desktop stream and prints the link you open.

Open Chrome or Blender on the remote screen

Install the application in the sandbox, then launch it with screen-relay run so its window appears on the streamed display. First run sandbox exec --sudo desktop -- apt-get update once. The image ships without the package lists its installer needs.

For Blender, run sandbox exec --sudo desktop -- apt-get install -y blender, followed by sandbox exec desktop -- screen-relay run -- blender. When the splash screen appears, you're looking at Blender running on the sandbox's CPUs. That's a practical way for a graphics developer to check whether an add-on opens its panel. A render-speed comparison with a GPU workstation would answer a different question.

For Chrome, use the download and install commands in the guide's Browser example. Then run sandbox exec desktop -- screen-relay run -- google-chrome --no-first-run https://vercel.com. You'll see the Vercel homepage in a Chrome window inside your viewer tab. The outer browser runs on your laptop. The inner browser is the one the agent will drive.

Watch the agent take its turn

Open the viewer's control menu and choose Release control. You can keep watching. Only one viewer or agent can send input at a time, and an agent trying to click while you hold control gets busy. Choose Take control when you need the keyboard back.

Here is a small exercise using the repository's commands. Have the agent run screen-relay run -- xfce4-terminal inside the sandbox. Follow each action on the live screen.

  1. Look. Run screen-relay screenshot screen.png to capture the current desktop. Check where the terminal window is.
  2. Click. The repository's example, screen-relay click 0.5 0.5, clicks halfway across and halfway down the screen. Use it when that point is inside the terminal. The coordinates are fractions of the display.
  3. Type. Run screen-relay type "echo hello" and watch the text appear. The separate command screen-relay key Enter submits it.
  4. Verify. Run screen-relay screenshot screen.png again and check for the reply. A successful input command tells you the input was delivered. The new frame tells you what the application did with it.
A pointer, a depressed key, and a captured tile illustrate the click, type, and screenshot commands.
A screenshot after the action lets the agent check whether the intended window received its input.

Start the same desktop from your application

Use the Sandbox SDK, Vercel's library for starting sandboxes from code, when a job should create or reopen its own desktop. Here is Vercel's TypeScript example. It requires the SDK in your project and Node.js 22 or newer.

TypeScript
import { Sandbox } from '@vercel/sandbox';

const sandbox = await Sandbox.getOrCreate({
  name: 'desktop',
  image: 'vercel-labs/screen-relay/sandbox-desktop:latest',
  ports: [8080],
  timeout: 30 * 60 * 1000,
});

const result = await sandbox.runCommand({
  cmd: 'screen-relay',
  args: ['up', '-d', '--public', sandbox.domain(8080)],
});
if (result.exitCode !== 0) {
  throw new Error('screen-relay did not start. Run `screen-relay status` in the sandbox.');
}

// The viewer link, token included.
console.log((await result.stdout()).trim());

Run this sample in a private terminal. Its last line prints the access token along with the address, so shared build logs are a poor destination for its output. Run subsequent Sandbox CLI commands from the same project directory. When you're done, run sandbox exec desktop -- screen-relay down and then sandbox stop desktop. Stopping saves the sandbox's files in a snapshot, which counts toward storage.

Hobby includes five active CPU hours and 420 GB-hours of provisioned memory per month. In the default iad1 region, Pro charges $0.128 per active CPU-hour and $0.0212 per GB-hour of provisioned memory, with separate creation and storage charges. Sandbox pricing and quotas

Which work benefits from a live desktop?

Who benefits mostWhat to do with the desktopWhat the person gains
Developer debugging a browser agentRelease control during a checkout test and watch which window receives the click.Decide whether to fix the target coordinates, handle a dialog, or wait for the page to change.
QA engineer handing off an intermittent bugPause the test at the troublesome dialog and privately share the full viewer link with the engineer taking over.The engineer can inspect the failing state before either person has to reproduce it.
Blender add-on authorOpen the add-on in the sandbox's Blender window and ask a maintainer to try the missing panel.Both people inspect the same installation, removing workstation differences from that conversation.
Image-tool maintainerOpen GIMP through screen-relay and try a plug-in against a sample image.A tester can tell a misplaced dialog from a plug-in that failed to load.
Designer reviewing a browser flowWatch the agent fill a form, then take control to try the confusing step by hand.Compare the agent's difficulty with a person's experience on the same form.

The browser-agent case comes first because the next engineering decision depends on what the agent actually saw. For choosing the model behind that agent, see multimodal models for computer use. For larger graphics fixtures, plan separately for job disk space and Sandbox drives. If the handoff is about reviewing a build more broadly, there's also Vercel Board.

Two products a test team could buy

Start with a live inspection button for a failed browser job. A QA lead could buy it for the developer who receives the failure. The smallest version would run one staging checkout, keep the desktop available on failure, and let an authorized engineer open the viewer from the job page. That replaces the handoff from a failure message to a local reproduction with a handoff to the actual window. The hard part is catching the failure before cleanup and expiring access afterward. A paid market already exists for the surrounding job. BrowserStack lists Automate Desktop at $99 a month billed annually for one parallel test. Use that price as a reference for the overall testing budget. BrowserStack testing plans

A shared desktop for graphical bug reports could suit a team that supports a Linux application. Start with one supported app and one sample file. Let support prepare the failing state and invite the engineer to operate it. BrowserStack's single-user Live Desktop plan lists at $29 a month billed annually, a price reference for manual browser testing. Willingness to pay for a Blender or GIMP handoff is a separate question. Test that with a team whose tickets already stall at “can't reproduce.” The live inspection button is the stronger first build because the buyer already owns a test job with a clear failure point.

Troubleshoot the desktop

What you seeWhat to check or do
Viewer won't connectConfirm port 8080 is published, --public matches the sandbox URL, and the address includes the token.
WebCodecs unavailable in this browserOpen the viewer in current Chrome, Edge, or Safari. It needs H.264 WebCodecs support to decode the video.
Input returns busyAnother controller holds input. Choose Release control in the controlling viewer or close that tab, then retry.
Unable to locate package during installationRun sandbox exec --sudo desktop -- apt-get update to fetch package lists, then retry the installation.
App window never appearsLaunch the app through screen-relay run to use the desktop's display.
Desktop stopped or failedRun screen-relay status and screen-relay logs inside the sandbox.
Session already running, or SDK says screen-relay did not startCheck status. If the desktop is already up, use the existing link or stop and restart the desktop for a new one.
sandbox domain says Not a valid subcommand nameUpdate the CLI with npm install -g sandbox. Versions before 4.12.0 lack this subcommand.
sandbox domain finds no running sessionResume the stopped sandbox with sandbox exec desktop -- true, then retry.
sandbox create says the name existsA stopped sandbox retains its name. Resume it and start screen-relay again, or remove it if you no longer need its saved state.

Two limits matter even when the stream is working perfectly. Video has no audio, so a silent playback test tells you nothing about sound in the application. The clipboard carries text only, so prepare image fixtures inside the sandbox before asking a reviewer to try them.

How to automate a web browser?

For a visible test, open Chrome on the sandbox desktop, release viewer control, and give the agent a specific task on a staging site. Have it inspect the screen after each action that should change the page.

Which tool is used for web application testing?

For the manual part of a Linux browser test, screen-relay lets a tester operate the sandbox's browser. For an automated test, your test code or agent still needs a rule for success, such as a confirmation page appearing after a form submission.

Which AI is best for browser automation?

For this setup, choose a computer-use model that can interpret your application's screens and an agent that can issue terminal commands. Compare candidates on the same staging task, especially whether they recognize that a click failed before trying it again.

If you're choosing where that test should run, compare the best code sandboxes for AI agents.

Published
Category
Build
Related Articles
Claude Code REVIEW.md

Claude Code REVIEW.md

Where Claude Code reads REVIEW.md, what to put in it, and how to check your rules with a sample change. Includes a full web team example.Dec 3, 2026Build
Claude Code Auto Compact

Claude Code Auto Compact

Check why Claude Code compacted near 400K, what survived the summary, and when to use /autocompact 1M for a long codebase review.Dec 3, 2026Build
Ponytail Claude Code Plugin: How It Works and When to Turn It Off

Ponytail Claude Code Plugin: How It Works and When to Turn It Off

See how Ponytail chooses a smaller patch, install it in Claude Code or Codex, and compare the project’s code savings with JetBrains’ independent test.Dec 3, 2026Build
Building a Voice Agent With the Gemini Live API

Building a Voice Agent With the Gemini Live API

Choose a thinking level, open an audio session, and keep callers talking during a lookup. Includes Gemini 4 Live pricing, phone integrations and limits.Dec 3, 2026Build
Vercel MCP

Vercel MCP

Connect Claude Code or Codex to Vercel, diagnose a failed build, call a second model, and set up team access with Claude Enterprise-managed auth.Dec 3, 2026Build
LobeChat Is Now LobeHub: What It Does, What It Costs, and How to Start

LobeChat Is Now LobeHub: What It Does, What It Costs, and How to Start

Connect multiple models in LobeHub, add a provider key, and start a local Docker install. Check the license before distributing a modified app.Dec 3, 2026Build
AWS Kiro: What It Is, What It Costs, and How to Start

AWS Kiro: What It Is, What It Costs, and How to Start

How AWS Kiro turns a feature request into a spec, which models and plans you can use, and how to start in the IDE or terminal.Dec 3, 2026Build
What Is OpenRouter? How It Works and How to Start

What Is OpenRouter? How It Works and How to Start

Get an OpenRouter API key, make your first request, and see how provider fallback and data settings change which models your app can use.Dec 3, 2026Build
Newsletter

One letter, every Sunday.Working systems, not hot takes.

Weekly. No spam. Unsubscribe anytime.