langchain.js
    Preparing search index...

    Interface ComputerUseOptions

    Options for the Computer Use tool.

    interface ComputerUseOptions {
        displayHeight: number;
        displayWidth: number;
        environment: ComputerUseEnvironment;
        execute: (
            action:
                | Click
                | DoubleClick
                | Drag
                | Keypress
                | Move
                | Screenshot
                | Scroll
                | Type
                | Wait,
            runtime: ToolRuntime<any, any>,
        ) => any;
    }
    Index

    Properties

    displayHeight: number

    The height of the computer display in pixels.

    displayWidth: number

    The width of the computer display in pixels.

    The type of computer environment to control.

    • browser: Browser automation (recommended for most use cases)
    • mac: macOS environment
    • windows: Windows environment
    • linux: Linux environment
    • ubuntu: Ubuntu environment
    execute: (
        action:
            | Click
            | DoubleClick
            | Drag
            | Keypress
            | Move
            | Screenshot
            | Scroll
            | Type
            | Wait,
        runtime: ToolRuntime<any, any>,
    ) => any

    Execute function that handles computer action execution. This function receives the action input and should return a base64-encoded screenshot of the result.