OSWorld Execute Tool (Level 4)
Input
pythonorvalue: Python code string (required) - typically pyautogui commandsreturn_observation: bool (default: false) - include observation in responsevalueparameter can be used as alternative topython
Output
- Note ID (bound to
outvariable) 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 timestamp
Configuration
OSWORLD_URLenvironment variable (defaults tohttp://localhost:3002)- Or pass
osworld_urlin character config'sosworld_configsection
Common Workflow
{"type":"osworld-observe","out":"$obs"}
{"type":"osworld-execute","python":"pyautogui.click(100,200)","out":"$result"}
{"type":"osworld-observe","out":"$obs2"}
Notes
- Python code is executed directly in the OSWorld environment
- Common commands:
pyautogui.click(x, y),pyautogui.typewrite(text),pyautogui.press(key) - No retries or corrections - Jill owns error handling
- Execution is synchronous and blocking