Skip to main content
Use desktop automation when a workload needs GUI state. Use PTY when a tool expects an interactive terminal.

Desktop Automation

Method groupUse
screenshot, screenshot_region, screenshot_compressedCapture display pixels.
click, double_click, move, drag, scrollSend mouse input.
type, write, key, press, hotkeySend keyboard input.
display_info, capabilities, screen_size, cursor_positionInspect desktop state.
list_windows, get_current_window_id, get_window_titleInspect windows.
get_clipboard_text, set_clipboard_textManage clipboard text.
launch_executable, launch_desktop_entry, openStart GUI programs or open targets.

Viewer And Recordings

SurfaceUse
sandbox.desktop_stream().start()Start a managed browser viewer.
get_viewer_url()Return a viewer URL with an auth key.
start_recording, stop_recording, list_recordingsCapture screen recordings.
download_recording, delete_recordingRetrieve or remove recordings.

PTY

MethodUse
sandbox.pty.create_session(...)Start an interactive terminal.
sandbox.pty.connect(session_id=...)Reconnect to an existing terminal.
session.send_input(data)Write terminal input.
session.resize(cols, rows)Resize terminal dimensions.
session.wait(on_data=...)Stream terminal output until exit.
sandbox.pty.list_sessions()List terminal sessions.
sandbox.pty.kill_session(session_id)Stop a terminal session.