GeezerVison is showing adk.dev — ComputerUseToolset | ADK for TypeScript: API Reference - v2.5.0
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()})],
});
Constructors
constructor
-
Returns ComputerUseToolset
Properties
Readonly[BASE_TOOLSET_SIGNATURE_SYMBOL]
"[BASE_TOOLSET_SIGNATURE_SYMBOL]": true
Readonly[COMPUTER_USE_TOOLSET_SIGNATURE_SYMBOL]
"[COMPUTER_USE_TOOLSET_SIGNATURE_SYMBOL]": true
A unique symbol to identify ADK computer use toolset class.
Optional Readonlyprefix
prefix?: string
Methods
close
-
Closes the computer and drops the cached tools. The next call to
getTools initializes the computer again.
Returns Promise<void>
getTools
-
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.
ProtectedisToolSelected
-
Returns whether the tool should be exposed to LLM.
Returns boolean
Whether the tool should be exposed to LLM.
processLlmRequest
-
Registers the computer use tools in the request and adds the computer use
configuration, unless the request already has one.
Returns Promise<void>
Constructors
Properties
Methods