langchain.js
    Preparing search index...

    Interface Computer20250124Options<TState, TContext>

    Options for the computer use tool.

    Supported models: Claude Sonnet 4.5, Haiku 4.5, Opus 4.1, Sonnet 4, Opus 4, and Sonnet 3.7 versions.

    interface Computer20250124Options<TState = any, TContext = any> {
        displayHeightPx: number;
        displayNumber?: number;
        displayWidthPx: number;
        execute?: (
            args: Computer20250124Action,
            runtime: ToolRuntime<TState, TContext>,
        ) => any;
    }

    Type Parameters

    • TState = any
    • TContext = any
    Index

    Properties

    displayHeightPx: number

    The height of the display in pixels.

    displayNumber?: number

    Optional display number for X11 environments.

    displayWidthPx: number

    The width of the display in pixels.

    execute?: (
        args: Computer20250124Action,
        runtime: ToolRuntime<TState, TContext>,
    ) => any

    Optional execute function that handles computer action execution. This function receives the action input and should return the result (typically a base64-encoded screenshot or action confirmation).