99.99% Uptimeby Solari Status ↗

How to Deploy a Claude Computer-Use Agent on a Cloud Desktop

·

4 min read

·

Summarize with AI
ON THIS PAGE

The demo ran on a laptop. The agent opened the vendor portal, filled in the invoice form and saved the PDF while the team watched the cursor drift across the screen. Then someone asked where it would run on Monday, with the laptop closed and the job due before anyone logs in.

Claude's computer use tool does not come with a computer: Claude asks for a screenshot, a click or a keystroke, and your code carries the action out on a machine you supply. A Solari Computer Desktop is that machine, a Linux virtual machine with a real screen, created by API and driven by the loop you wrote for the demo. This guide walks through creating the desktop, wiring Claude's actions to it, watching it work and keeping it contained.

What a Claude Computer-Use Deployment Needs

Before any code, it helps to name the parts, because Anthropic's design splits the work cleanly: Claude decides and your application acts. The computer use tool returns tool_use blocks such as screenshot, left_click and type, often several per turn, and expects a tool_result for each before it plans the next step.

That cycle is the agent loop, and it needs a display Claude can see, a mouse and keyboard your code can drive, and a lifecycle that survives the hours between runs. A cloud desktop provides all three off your own hardware.

Create the Cloud Desktop

The first step is the machine itself. A Solari desktop is ready in about a second, and it comes up from the @solarisdk/desktop package:

const desktops = new DesktopClient({ apiKey: process.env.SOLARI_API_KEY! })
const desktop = await desktops.create({
  template: "default",
  lifecycle: { onTimeout: "pause" },
})
await desktop.connect()
const { ready } = await desktop.health()
const desktops = new DesktopClient({ apiKey: process.env.SOLARI_API_KEY! })
const desktop = await desktops.create({
  template: "default",
  lifecycle: { onTimeout: "pause" },
})
await desktop.connect()
const { ready } = await desktop.health()
const desktops = new DesktopClient({ apiKey: process.env.SOLARI_API_KEY! })
const desktop = await desktops.create({
  template: "default",
  lifecycle: { onTimeout: "pause" },
})
await desktop.connect()
const { ready } = await desktop.health()

Wait for health() to report ready before the first screenshot, so Claude never plans against a blank screen. The default image ships with Google Chrome and the XFCE terminal, and the display runs at a single fixed size, which matters for the next step: every coordinate Claude sends has to land on that grid.

Wire Claude's Actions to the Desktop

With the desktop up, the loop needs a thin translation layer. Each Claude action maps to a method on the desktop object:

Claude actions mapped to Solari calls

Run the blocks in the order Claude returns them and stop at the first failure, returning an error for the failed action and a "not executed" result for every action after it, so Claude can replan. Send back the PNG from desktop.screenshot() for screenshot calls and a short "OK" for the rest.

If you shrink screenshots to save tokens, scale Claude's coordinates back up before calling mouse.click, or every click lands short of its target. With the loop running, the next job is keeping an eye on it.

Watch, Pause and Resume the Agent

A deployed agent still needs a window for a human. Every Solari desktop exposes a live view through streamUrl, a VNC stream you open in the console's View tab to watch Claude's cursor or take over the mouse.

Idle time is where cost and state meet. A Solari desktop pauses after 30 minutes without activity by default, and every action resets that clock. A paused desktop keeps its state and does not count against the plan's limit on running VMs; desktops.connect(id) resumes it, and a same-host resume takes about 1.3 seconds on staging, five trials.

The rule that trips people up is pause, not power off. A VM powered off from inside, with poweroff or shutdown, is deleted along with its disk, so a Claude task that tidies up by shutting down loses everything. The other risk is losing control of the agent.

Keep the Agent Contained

Control starts with where the agent runs. Anthropic's guidance for computer use is a dedicated virtual machine with minimal privileges, sensitive data kept out of reach and internet access limited to an allowlist of domains. The reason is prompt injection, where text on a page or inside an image overrides your instructions, a risk covered in the OWASP Top 10 for LLM applications.

A Solari desktop is its own machine, so a page that misleads Claude acts on a disposable VM rather than a laptop with saved passwords. Treat streamUrl as a password too: anyone holding it can watch and drive the VM as root until it is destroyed or expires. That leaves the bill.

What It Costs to Run

The lifecycle choices above are also what turn a running agent into a bill. Solari bills a desktop by its size while it runs, and a desktop's live screen adds $0.02 per hour. On the Professional plan, Solari bills $0.060 per desktop hour.

The Free plan runs a single sandbox or desktop at a time; Starter and Professional raise that limit for teams scheduling Claude jobs in parallel.

Choosing the Right Setup

Deploying a Claude computer-use agent comes down to three choices: where the screen lives, how the loop maps actions to it, and what happens when the agent goes quiet. Put the screen on a cloud desktop, map each Claude action to its SDK call, and let idle time pause the machine instead of shutting it down. For jobs that need code but no screen, Solari Sandboxes share the same lifecycle, and the introduction to Solari shows how the three surfaces fit together.

Get Started With Solari

Start by creating a desktop and pointing your existing agent loop at it; the change lives in the action handler, not in the prompt. Solari brings the desktop up in the second or so quoted above and bills by the hour at the rates above, and the Free plan's $3 of monthly credits cover the first runs. Create a free Solari account and run the loop on a cloud desktop today.

Share this article

Give every agent
a place to work

Browsers, sandboxes and desktops from one API. Start free and scale when you need to.

Planet horizon at sunrise
opsra logo

The Fastest AI Infrastructure

Unsubscribe anytime. See our Privacy Policy.

Copyright © 2026 Solari

Engineered by Pinetree

opsra logo

The Fastest AI Infrastructure

Unsubscribe anytime. See our Privacy Policy.

Copyright © 2026 Solari

Engineered by Pinetree

opsra logo

The Fastest AI Infrastructure

Unsubscribe anytime. See our Privacy Policy.

Copyright © 2026 Solari

Engineered by Pinetree