GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • ADK for TypeScript: API Reference

This view

  • Original page
  • New address

GeezerVison is showing adk.dev — ComputerUseToolset | ADK for TypeScript: API Reference - v2.5.0

  • ComputerUseToolset

Class ComputerUseToolset

A toolset that exposes the actions of a BaseComputer to an agent.

The toolset initializes the computer on first use and wraps each action in a ComputerUseTool. Actions on one computer run one at a time, and the computer's prepare() runs before each of them. When the agent builds a request, the toolset registers its tools and adds the computer use configuration that tells the model which predefined actions it may call.

const agent = new LlmAgent({
name: 'browser_agent',
model: 'gemini-flash-latest',
tools: [new ComputerUseToolset({computer: new MyBrowserComputer()})],
});

Hierarchy (View Summary)

  • BaseToolset
    • ComputerUseToolset
  • Defined in core/src/tools/computer_use/computer_use_toolset.ts:353

Constructors

constructor

  • new ComputerUseToolset(options: ComputerUseToolsetOptions): ComputerUseToolset

    Parameters

    • options: ComputerUseToolsetOptions

      The computer and its configuration.

    Returns ComputerUseToolset

    Overrides BaseToolset.constructor

    • Defined in core/src/tools/computer_use/computer_use_toolset.ts:367

Properties

Readonly[BASE_TOOLSET_SIGNATURE_SYMBOL]

"[BASE_TOOLSET_SIGNATURE_SYMBOL]": true

Inherited from BaseToolset.[BASE_TOOLSET_SIGNATURE_SYMBOL]

  • Defined in core/src/tools/base_toolset.ts:42

Readonly[COMPUTER_USE_TOOLSET_SIGNATURE_SYMBOL]

"[COMPUTER_USE_TOOLSET_SIGNATURE_SYMBOL]": true

A unique symbol to identify ADK computer use toolset class.

  • Defined in core/src/tools/computer_use/computer_use_toolset.ts:355

Optional Readonlyprefix

prefix?: string

Inherited from BaseToolset.prefix

  • Defined in core/src/tools/base_toolset.ts:46

ReadonlytoolFilter

toolFilter:
    | string[]
    | ((tool: BaseTool, readonlyContext?: ReadonlyContext) => boolean) = []

Inherited from BaseToolset.toolFilter

  • Defined in core/src/tools/base_toolset.ts:45

Methods

close

  • close(): Promise<void>

    Closes the computer and drops the cached tools. The next call to getTools initializes the computer again.

    Returns Promise<void>

    Overrides BaseToolset.close

    • Defined in core/src/tools/computer_use/computer_use_toolset.ts:394

getTools

  • getTools(): Promise<ComputerUseTool[]>

    Returns a tool for every action the computer supports, except the excluded ones. The computer is initialized on the first call, and the tools are cached until close.

    Returns Promise<ComputerUseTool[]>

    Overrides BaseToolset.getTools

    • Defined in core/src/tools/computer_use/computer_use_toolset.ts:380

ProtectedisToolSelected

  • isToolSelected(tool: BaseTool, context?: ReadonlyContext): boolean

    Returns whether the tool should be exposed to LLM.

    Parameters

    • tool: BaseTool

      The tool to check.

    • Optionalcontext: ReadonlyContext

      Context used to filter tools available to the agent.

    Returns boolean

    Whether the tool should be exposed to LLM.

    Inherited from BaseToolset.isToolSelected

    • Defined in core/src/tools/base_toolset.ts:77

processLlmRequest

  • processLlmRequest(_toolContext: Context, llmRequest: LlmRequest): Promise<void>

    Registers the computer use tools in the request and adds the computer use configuration, unless the request already has one.

    Parameters

    • _toolContext: Context

      The context of the tool.

    • llmRequest: LlmRequest

      The outgoing request.

    Returns Promise<void>

    Overrides BaseToolset.processLlmRequest

    • Defined in core/src/tools/computer_use/computer_use_toolset.ts:410
Constructors
constructor
Properties
[BASE_TOOLSET_SIGNATURE_SYMBOL][COMPUTER_USE_TOOLSET_SIGNATURE_SYMBOL]prefixtoolFilter
Methods
closegetToolsisToolSelectedprocessLlmRequest
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.