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.
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.
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
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
| Group | Values |
|---|---|
| Screenshot | screenshot |
| Pointer | mouse_move, left_click, right_click, middle_click, double_click, triple_click, left_click_drag, left_mouse_down, left_mouse_up |
| Keyboard | type, key, hold_key |
| Scroll | scroll (with ScrollDirection + scroll_amount) |
| Utility | wait (with duration), cursor_position |
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:
| Method | Sync? | Purpose |
|---|---|---|
status() | async-aware | Health + display resolution |
get_liveview_url() | always sync | noVNC URL for browser-based debugging |
ensure_chrome_cdp(port=9224, timeout=60) | async-aware | Start/confirm Chrome CDP inside the VM |
get_cdp_ws_url(port=9224) | async-aware | Chrome DevTools WebSocket URL (for external Playwright) |
open_url(url) | async-aware | Open a URL in a new tab inside the VM’s Chrome |
list_tabs() | async-aware | Enumerate the VM’s open Chrome tabs |
login(session) | async-aware | Run login flows for the other sim envs inside the VM’s Chrome — see Login |
computer(ComputerRequest) | async-aware | Screenshot / mouse / keyboard |
bash(BashRequest) | async-aware | Shell command |
edit(EditRequest) | async-aware | View / create / str_replace / insert / undo |
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 sendcomputer calls, attach over CDP:
Pitfalls
get_liveview_url()is sync — neverawaitit.- There’s no dedicated file-transfer primitive. Use
edit(create)orbash+ base64 to move files in either direction (see Agent loop → Cookbook). bashruns as the VM’s session user, not root.sudois available.BashRequestandEditRequestaccept the samerestart/undo_editsemantics whether you call them from sync or async — only theawaitdiffers.