langchain.js
    Preparing search index...

    Interface Computer20251124Options<TState, TContext>

    Options for the computer use tool (Claude Opus 4.5 only version).

    interface Computer20251124Options<TState = any, TContext = any> {
        displayHeightPx: number;
        displayNumber?: number;
        displayWidthPx: number;
        enableZoom?: boolean;
        execute?: (
            args: Computer20251124Action,
            runtime: ToolRuntime<TState, TContext>,
        ) => any;
    }

    Type Parameters

    • TState = any

      The type of the state schema (when used with ReactAgent)

    • TContext = any

      The type of the context schema (when used with ReactAgent)

    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.

    enableZoom?: boolean

    Enable zoom action for detailed screen region inspection. When enabled, Claude can zoom into specific screen regions.

    false
    
    execute?: (
        args: Computer20251124Action,
        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).