sdk/src/desktop.ts
Export Index
| Export | Kind | Source | Notes |
|---|---|---|---|
Bounds | type | packages/schemas/src/results/desktop.ts | Re-exported from non-SDK source |
BrowserLaunchResult | type | packages/schemas/src/results/desktop.ts | Re-exported from non-SDK source |
CuaAction | type | packages/schemas/src/results/cua.ts | Re-exported from non-SDK source |
CuaAgentConfig | type | packages/schemas/src/rpc/cua.ts | Re-exported from non-SDK source |
CuaPredictClickResult | type | packages/schemas/src/results/cua.ts | Re-exported from non-SDK source |
CuaRunOptions | type | packages/schemas/src/rpc/cua.ts | Re-exported from non-SDK source |
CuaRunResult | type | packages/schemas/src/results/cua.ts | Re-exported from non-SDK source |
desktop | variable | sdk/src/drivers/desktop/index.ts | - |
DesktopClipboard | class | sdk/src/drivers/desktop/session.ts | Clipboard operations for desktop automation. |
DesktopConnectOptions | interface | sdk/src/drivers/desktop/index.ts | - |
DesktopCua | class | sdk/src/drivers/desktop/session.ts | CUA (Computer Use Agent) - AI-powered desktop automation. Similar to Stagehand for browser automation, CUA provides: - run(): Execute multi-step tasks with AI guidance - predictClick(): Find elements using vision |
DesktopKeyboard | class | sdk/src/drivers/desktop/session.ts | Keyboard control for desktop automation. Provides typing, key presses, and hotkey combinations. |
DesktopMouse | class | sdk/src/drivers/desktop/session.ts | Mouse control for desktop automation. Provides move, click, drag, and scroll operations. |
DesktopScreen | class | sdk/src/drivers/desktop/session.ts | Screen control for desktop automation. Provides capture and display information. |
DesktopSession | class | sdk/src/drivers/desktop/session.ts | - |
DesktopWindow | class | sdk/src/drivers/desktop/session.ts | Window management for desktop automation. Provides listing, focusing, and resizing windows. |
Point | type | packages/schemas/src/results/desktop.ts | Re-exported from non-SDK source |
Size | type | packages/schemas/src/results/desktop.ts | Re-exported from non-SDK source |
WindowInfo | type | packages/schemas/src/results/desktop.ts | Re-exported from non-SDK source |
Classes
DesktopClipboard
Source:sdk/src/drivers/desktop/session.ts
Constructor
Methods
read
Read text from the clipboard.write
Write text to the clipboard.DesktopCua
Source:sdk/src/drivers/desktop/session.ts
- run(): Execute multi-step tasks with AI guidance
- predictClick(): Find elements using vision
Constructor
Methods
close
Close the CUA agent and clean up resources.init
Initialize the CUA agent. Must be called before using run() or predictClick().predictClick
Predict where to click to accomplish a task. Uses vision model to find elements on screen. Returns coordinates that can be used with mouse.move() and mouse.click().run
Run a computer-use task with AI guidance. Like Stagehand’s act() but for desktop automation. The AI will analyze the screen and execute steps to complete the task.DesktopKeyboard
Source:sdk/src/drivers/desktop/session.ts
Constructor
Methods
down
Hold down a key.hotkey
Press a hotkey combination.press
Press a single key.type
Type a string of text.up
Release a held key.DesktopMouse
Source:sdk/src/drivers/desktop/session.ts
Constructor
Methods
click
Click at the current mouse position.doubleClick
Double-click at the current mouse position.drag
Drag from one position to another.move
Move the mouse to the specified coordinates.position
Get the current mouse position.scroll
Scroll at the current mouse position. Positive values scroll down/right, negative scroll up/left.DesktopScreen
Source:sdk/src/drivers/desktop/session.ts
Constructor
Methods
capture
Capture the screen or a region.size
Get the primary screen size.DesktopSession
Source:sdk/src/drivers/desktop/session.ts
Constructor
Properties
| Name | Type | Notes |
|---|---|---|
baseUrl | string | readonly |
clipboard | DesktopClipboard | getter • Clipboard read/write |
cua | DesktopCua | getter • CUA (Computer Use Agent) - AI-powered desktop automation. Similar to Stagehand for browser automation. |
hostId | string | readonly |
id | string | readonly |
keyboard | DesktopKeyboard | getter • Keyboard control (type, press, hotkey) |
mouse | DesktopMouse | getter • Mouse control (move, click, drag, scroll) |
screen | DesktopScreen | getter • Screen capture and display info |
window | DesktopWindow | getter • Window management (list, focus, resize) |
Methods
close
Close the desktop session and clean up resources.closeBrowser
Close a launched browser.isBrowserRunning
Check if a browser is running.launchBrowser
Launch a browser that can be controlled via Playwright-style API. The browser runs on the desktop agent’s machine.rpc
Send an RPC call to the desktop agent.DesktopWindow
Source:sdk/src/drivers/desktop/session.ts
Constructor
Methods
active
Get the currently active (focused) window.bounds
Get window bounds.close
Close a window.focus
Focus a window by handle.list
List all visible windows.maximize
Maximize a window.minimize
Minimize a window.restore
Restore a minimized/maximized window.setBounds
Set window bounds.Variables
desktop
Source:sdk/src/drivers/desktop/index.ts
Interfaces
DesktopConnectOptions
Source:sdk/src/drivers/desktop/index.ts
External Re-exports
| Export | Kind | Source | Notes |
|---|---|---|---|
Bounds | type | packages/schemas/src/results/desktop.ts | Re-exported from non-SDK source |
BrowserLaunchResult | type | packages/schemas/src/results/desktop.ts | Re-exported from non-SDK source |
CuaAction | type | packages/schemas/src/results/cua.ts | Re-exported from non-SDK source |
CuaAgentConfig | type | packages/schemas/src/rpc/cua.ts | Re-exported from non-SDK source |
CuaPredictClickResult | type | packages/schemas/src/results/cua.ts | Re-exported from non-SDK source |
CuaRunOptions | type | packages/schemas/src/rpc/cua.ts | Re-exported from non-SDK source |
CuaRunResult | type | packages/schemas/src/results/cua.ts | Re-exported from non-SDK source |
Point | type | packages/schemas/src/results/desktop.ts | Re-exported from non-SDK source |
Size | type | packages/schemas/src/results/desktop.ts | Re-exported from non-SDK source |
WindowInfo | type | packages/schemas/src/results/desktop.ts | Re-exported from non-SDK source |

