Execute Python code (typically pyautogui commands) in the OSWorld environment. Returns execution result with success status, return code, duration, stdout, and stderr.
python or value: Python code string (required) - typically pyautogui commandsreturn_observation: bool (default: false) - include observation in responsevalue parameter can be used as alternative to pythonout variable) containing:
text: formatted execution resultformat: "text"metadata: execution data including:
success: boolean - whether execution succeededreturncode: integer - return code (0 = success)duration_ms: integer - execution duration in millisecondsstep_counter: integer - step counter after executionstdout: string - standard outputstderr: string - standard errorpython_code: string - the executed codeobservation: dict (if return_observation=true) - observation after executiontimestamp: float (if return_observation=true) - observation timestampOSWORLD_URL environment variable (defaults to http://localhost:3002)osworld_url in character config's osworld_config section{"type":"osworld-observe","out":"$obs"}
{"type":"osworld-execute","python":"pyautogui.click(100,200)","out":"$result"}
{"type":"osworld-observe","out":"$obs2"}
pyautogui.click(x, y), pyautogui.typewrite(text), pyautogui.press(key)