Skip to main content
A computer use env exposes four tool surfaces on env.sdk. Every call is one HTTP round-trip to the VM, so the same calls work from your laptop, a CI box, or another VM.
All examples below use desktop = session.desktop_env and the sync Plato client. For async, prefix with await (except get_liveview_url(), which is always sync).

status()

Health and display geometry.
Use the resolution to size your agent’s tool schema (most computer-use models want display_width_px / display_height_px to match the VM’s actual resolution) and as bounds for coordinate-based actions.

computer(ComputerRequest)

Pixels, mouse, keyboard. ComputerRequest accepts action, coordinate, text, scroll_direction, scroll_amount, duration. Results come back as a ToolResult with base64_image (screenshots), output, and error.

Screenshot

Click and drag

Other click variants — right_click, middle_click, double_click, triple_click (selects a whole line of text) — take the same coordinate.

Keyboard

Scroll

Wait and cursor

Action values

bash(BashRequest)

Shell access inside the VM. output is stdout, error is stderr.

edit(EditRequest)

Structured file ops. Safer than bash for file content — no quoting hell, and undo_edit is built in.

Command values

view (with optional view_range=[start, end]), create (with file_text), str_replace (with old_str + new_str), insert (with insert_line + new_str), undo_edit.

Helpers on desktop.sdk

Beyond the four tool surfaces, desktop.sdk exposes helpers used elsewhere in these docs: “Async-aware” means: sync when you got the env from Plato, async when you got it from AsyncPlato. get_liveview_url() is always sync.

Driving Chrome from your host

If you’d rather drive the VM’s Chrome with Playwright on your laptop than send computer calls, attach over CDP:

Pitfalls

  • get_liveview_url() is sync — never await it.
  • There’s no dedicated file-transfer primitive. Use edit(create) or bash + base64 to move files in either direction (see Agent loop → Cookbook).
  • bash runs as the VM’s session user, not root. sudo is available.
  • BashRequest and EditRequest accept the same restart / undo_edit semantics whether you call them from sync or async — only the await differs.