Overview
Daytona’s Computer Use functionality enables:- Mouse control - Move, click, drag, and scroll
- Keyboard control - Type text and press keys
- Screenshots - Capture full screen or regions
- Display management - Query display information and windows
- Screen recording - Record and download desktop sessions
Getting Started
Start Computer Use
Initialize the desktop environment:Check Status
Stop Computer Use
Mouse Operations
Get Mouse Position
Move Mouse
number
required
X coordinate to move to
number
required
Y coordinate to move to
Click Mouse
number
required
X coordinate to click at
number
required
Y coordinate to click at
string
Mouse button: ‘left’ (default), ‘right’, or ‘middle’
boolean
Whether to perform a double-click. Default is false.
Drag Mouse
number
required
Starting X coordinate
number
required
Starting Y coordinate
number
required
Ending X coordinate
number
required
Ending Y coordinate
string
Mouse button to use for dragging. Default is ‘left’.
Scroll Mouse
number
required
X coordinate to scroll at
number
required
Y coordinate to scroll at
'up' | 'down'
required
Scroll direction
number
Amount to scroll. Default is 1.
Keyboard Operations
Type Text
string
required
Text to type
number
Delay between characters in milliseconds. Default is 0.
Press Keys
string
required
Key to press (e.g., ‘Return’, ‘Escape’, ‘Tab’, ‘a’, ‘A’)
string[]
Modifier keys: ‘ctrl’, ‘alt’, ‘meta’, ‘shift’. Default is empty array.
Press Hotkeys
string
required
Hotkey combination (e.g., ‘ctrl+c’, ‘alt+tab’, ‘cmd+shift+t’)
Screenshots
Full Screen Screenshot
boolean
Whether to show cursor in screenshot. Default is false.
Region Screenshot
Capture a specific screen region:ScreenshotRegion
required
Region to capture
Compressed Screenshots
Take compressed screenshots for smaller file sizes:ScreenshotOptions
Compression and display options
Display Information
Get Display Info
List Open Windows
Screen Recording
Start Recording
string
Optional custom label for the recording
Stop Recording
List Recordings
Get Recording Details
Download Recording
string
required
ID of the recording to download
string
required
Local path to save the recording file
Delete Recording
Process Management
Get Process Status
Restart Process
Get Process Logs
Complete Example
Best Practices
Wait for desktop initialization
Wait for desktop initialization
After starting computer use, wait a few seconds for the desktop to fully initialize:
Add delays between actions
Add delays between actions
Add small delays between UI interactions to allow applications to respond:
Use compressed screenshots
Use compressed screenshots
For screenshots that will be transmitted or stored, use compression:
Clean up recordings
Clean up recordings
Delete recordings when no longer needed to save storage:
Related Resources
Process Execution
Execute commands in the desktop environment
PTY Sessions
Interactive terminal sessions