askui.tools.AgentOs
click
buttonLiteral[“left”, “middle”, “right”], optional - The mouse button to click. Defaults to"left".countint, optional - Number of times to click. Defaults to1.
connect
disconnect
keyboard_pressed
keyPcKey | ModifierKey - The key to press.modifier_keyslist[ModifierKey] | None, optional - List of modifier keys to press along with the main key. Defaults toNone.
keyboard_release
keyPcKey | ModifierKey - The key to release.modifier_keyslist[ModifierKey] | None, optional - List of modifier keys to release along with the main key. Defaults toNone.
keyboard_tap
keyPcKey | ModifierKey - The key to tap.modifier_keyslist[ModifierKey] | None, optional - List of modifier keys to press along with the main key. Defaults toNone.countint, optional - The number of times to tap the key. Defaults to1.
mouse_move
xint - The horizontal coordinate (in pixels) to move to.yint - The vertical coordinate (in pixels) to move to.
mouse_down
buttonLiteral[“left”, “middle”, “right”], optional - The mouse button to press. Defaults to"left".
mouse_scroll
xint - The horizontal scroll amount. Positive values scroll right, negative values scroll left.yint - The vertical scroll amount. Positive values scroll down, negative values scroll up.
mouse_up
buttonLiteral[“left”, “middle”, “right”], optional - The mouse button to release. Defaults to"left".
poll_event
run_command
commandstr - The command to execute.timeout_msint, optional - The timeout for command execution in milliseconds. Defaults to30000(30 seconds).
screenshot
reportbool, optional - Whether to include the screenshot in reporting. Defaults toTrue.
Image.Image- A PIL Image object containing the screenshot.
set_display
displayint, optional - The display ID to set as active.
start_listening
stop_listening
type
textstr - The text to be typed.typing_speedint, optional - The speed of typing in characters per minute. Defaults to50.
askui.tools.askui.AskUiControllerClient
AgentOs that communicates with the AskUI Remote Device Controller via gRPC.
Arguments:
reporterReporter - Reporter used for reporting with the"AgentOs".displayint, optional - Display number to use. Defaults to1.controller_serverAskUiControllerServer | None, optional - Custom controller server. Defaults toControllerServer.
__enter__
Self- The instance of AskUiControllerClient.
__exit__
exc_type- The exception type if an exception was raised.exc_value- The exception value if an exception was raised.traceback- The traceback if an exception was raised.
click
buttonLiteral[“left”, “middle”, “right”], optional - The mouse button to click. Defaults to"left".countint, optional - Number of times to click. Defaults to1.
connect
disconnect
keyboard_pressed
keyPcKey | ModifierKey - The key to press.modifier_keyslist[ModifierKey] | None, optional - List of modifier keys to press along with the main key. Defaults toNone.
keyboard_release
keyPcKey | ModifierKey - The key to release.modifier_keyslist[ModifierKey] | None, optional - List of modifier keys to release along with the main key. Defaults toNone.
keyboard_tap
keyPcKey | ModifierKey - The key to tap.modifier_keyslist[ModifierKey] | None, optional - List of modifier keys to press along with the main key. Defaults toNone.countint, optional - The number of times to tap the key. Defaults to1.
mouse_move
xint - The horizontal coordinate (in pixels) to move to.yint - The vertical coordinate (in pixels) to move to.
mouse_down
buttonLiteral[“left”, “middle”, “right”], optional - The mouse button to press. Defaults to"left".
mouse_scroll
xint - The horizontal scroll amount. Positive values scroll right, negative values scroll left.yint - The vertical scroll amount. Positive values scroll down, negative values scroll up.
mouse_up
buttonLiteral[“left”, “middle”, “right”], optional - The mouse button to release. Defaults to"left".
screenshot
reportbool, optional - Whether to include the screenshot in reporting. Defaults toTrue.
Image.Image- A PIL Image object containing the screenshot.
set_display
displayint, optional - The display ID to set as active.
type
textstr - The text to be typed.typing_speedint, optional - The speed of typing in characters per second. Defaults to50.
askui.tools.askui.exceptions.AskUiControllerError
messagestr - The error message.
askui.tools.askui.exceptions.AskUiControllerOperationFailedError
operationstr - The operation that failed.errorException - The original error that caused the failure.
askui.tools.askui.exceptions.AskUiControllerOperationTimeoutError
messagestr - The error message.timeout_secondsfloat | None - Optional timeout duration in seconds.
askui.tools.askui.AskUiControllerServer
ControllerServer for managing the AskUI Remote Device Controller process.
Handles process discovery, startup, and shutdown for the native controller binary.
start
clean_upbool, optional - Whether to clean up existing processes (only on Windows) before starting. Defaults toFalse.
stop
forcebool, optional - Whether to forcefully terminate the process. Defaults toFalse.
askui.tools.exceptions.ToolError
messagestr - The error message.resultToolResult - The ToolResult that caused the error.
askui.tools.exceptions.ToolResult
outputstr | None, optional - The output of the tool.errorstr | None, optional - The error message of the tool.base64_imagestr | None, optional - The base64 image of the tool.systemstr | None, optional - The system message of the tool.