Overview
The unified computer action API allows for granular control over all aspects of the Bytebot virtual desktop environment through a single endpoint. It replaces multiple specific endpoints with a unified interface that handles various computer actions like mouse movements, clicks, key presses, and more.Endpoint
Request Format
All requests to the unified endpoint follow this format:action parameter determines which operation to perform, and the remaining parameters depend on the specific action.
Available Actions
move_mouse
Move the mouse cursor to a specific position. Parameters:
Example:
trace_mouse
Move the mouse along a path of coordinates. Parameters:
Example:
click_mouse
Perform a mouse click at the current or specified position. Parameters:
Example:
press_mouse
Press or release a mouse button at the current or specified position. Parameters:
Example:
drag_mouse
Click and drag the mouse from one point to another. Parameters:
Example:
scroll
Scroll up, down, left, or right. Parameters:
Example:
type_keys
Type a sequence of keyboard keys. Parameters:
Example:
press_keys
Press or release keyboard keys. Parameters:
Example:
type_text
Type a text string with optional delay. Parameters:
Example:
paste_text
Paste text to the current cursor position. This is especially useful for special characters that aren’t on the standard keyboard. Parameters:
Example:
wait
Wait for a specified duration. Parameters:
Example:
screenshot
Capture a screenshot of the desktop. Parameters: None required Example:cursor_position
Get the current position of the mouse cursor. Parameters: None required Example:application
Switch between different applications or navigate to the desktop/directory. Parameters:
Available Applications:
firefox- Mozilla Firefox web browser1password- Password managerthunderbird- Email clientvscode- Visual Studio Code editorterminal- Terminal/console applicationdesktop- Switch to desktopdirectory- File manager/directory browser
write_file
Write a file to the desktop environment filesystem. Parameters:
Example:
read_file
Read a file from the desktop environment filesystem. Parameters:
Example: