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

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.
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.

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.
- Look. Run
screen-relay screenshot screen.pngto capture the current desktop. Check where the terminal window is. - 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. - Type. Run
screen-relay type "echo hello"and watch the text appear. The separate commandscreen-relay key Entersubmits it. - Verify. Run
screen-relay screenshot screen.pngagain 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.

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.
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?
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
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







