AbstractReadonly[A unique symbol to identify ADK base computer class.
OptionalclickClicks at a specific x, y coordinate with the given mouse button.
When defined, the click action calls this instead of clickAt
and passes the model's button.
Optionalbutton: stringAbstractclickClicks at a specific x, y coordinate on the webpage.
The x-coordinate to click at.
The y-coordinate to click at.
The current state after clicking.
Cleans up the resources of the computer.
AbstractcurrentReturns the current state of the current webpage.
The current environment state.
OptionaldoubleDouble-clicks at a specific x, y coordinate.
Optionalbutton: stringAbstractdragDrags an element from an x, y coordinate and drops it at a destination coordinate.
The x-coordinate to start dragging from.
The y-coordinate to start dragging from.
The x-coordinate to drop at.
The y-coordinate to drop at.
The current state after drag and drop.
AbstractenvironmentReturns the environment of the computer.
AbstractgoNavigates back to the previous webpage in the browser history.
The current state after navigating back.
AbstractgoNavigates forward to the next webpage in the browser history.
The current state after navigating forward.
OptionalhotkeyPresses a combination of keyboard keys simultaneously.
When defined, the hotkey action calls this instead of
keyCombination.
AbstracthoverHovers at a specific x, y coordinate on the webpage.
May be used to explore sub-menus that appear on hover.
The x-coordinate to hover at.
The y-coordinate to hover at.
The current state after hovering.
Initializes the computer.
AbstractkeyPresses keyboard keys and combinations, such as "control+c" or "enter".
The keys to press in combination.
The current state after the key press.
OptionalkeyOptionalkeyOptionalmiddleClicks the middle mouse button at a specific x, y coordinate.
Optionalbutton: stringOptionalmousePresses a mouse button down at a specific x, y coordinate.
Optionalbutton: stringOptionalmouseReleases a mouse button at a specific x, y coordinate.
Optionalbutton: stringOptionalmoveMoves the cursor to a specific x, y coordinate.
When defined, the move action calls this instead of hoverAt.
AbstractnavigateNavigates directly to a specified URL.
The URL to navigate to.
The current state after navigation.
AbstractopenCalled before each tool invocation to prepare resources.
Override this to set up session-level resources (a sandbox, tokens, and so
on), using the state of toolContext for persistence across invocations.
The tool context with session state access.
OptionalpressPresses a single keyboard key.
When defined, the press_key action calls this instead of
keyCombination.
OptionalrightClicks the right mouse button at a specific x, y coordinate.
Optionalbutton: stringAbstractscreenReturns the screen size of the environment.
A tuple of (width, height) in pixels.
OptionalscrollScrolls at a specific x, y coordinate by a number of pixels.
When defined, the scroll action calls this instead of scrollAt.
magnitudeInPixels is undefined when the model does not say.
OptionalmagnitudeInPixels: numberAbstractscrollScrolls up, down, right, or left at an x, y coordinate by magnitude.
The x-coordinate to scroll at.
The y-coordinate to scroll at.
The direction to scroll.
The amount to scroll.
The current state after scrolling.
AbstractscrollScrolls the entire webpage up, down, left or right.
The direction to scroll.
The current state after scrolling.
AbstractsearchDirectly jumps to a search engine home page.
Used when you need to start with a search, for example because the current website doesn't have the information needed or a new task is being started.
The current state after navigating to search.
OptionaltakeTakes a screenshot of the current state.
When defined, the take_screenshot action calls this instead of
currentState.
OptionaltripleTriple-clicks at a specific x, y coordinate.
Optionalbutton: stringOptionaltypeTypes text into the currently focused element.
When defined, the type action calls this instead of typeText.
pressEnter is undefined when the model does not say.
OptionalpressEnter: booleanTypes text into the currently focused element.
By default, this calls keyCombination once per character in text
(and once for "Enter" when pressEnter is true). Because
keyCombination is designed for key names and typically captures a new
screenshot on every call, this fallback costs one round trip and screenshot
per character, and relies on the backend accepting single characters in
keyCombination. Subclasses should override this method to use native
bulk text input.
The text to type.
Whether to press ENTER after typing.
The current state after typing.
AbstracttypeTypes text at a specific x, y coordinate.
The x-coordinate to type at.
The y-coordinate to type at.
The text to type.
OptionalpressEnter: boolean
Whether to press ENTER after typing. The toolset passes
true when the model does not say.
OptionalclearBeforeTyping: boolean
Whether to clear existing content before typing.
The toolset passes true when the model does not say.
The current state after typing.
AbstractwaitWaits for n seconds to allow unfinished webpage processes to complete.
The number of seconds to wait.
The current state after waiting.
Defines an interface for computer environments.
This abstract base class defines the standard interface for controlling computer environments, including web browsers and other interactive systems. Coordinates passed to the action methods are absolute pixel values, scaled to the width and height returned by screenSize.
The optional methods (
doubleClick,tripleClick,middleClick,rightClick,mouseDown,mouseUp,keyDownandkeyUp) are exposed to the model only when a subclass implements them.The Gemini 3.x actions
click,move,type,scroll,take_screenshot,press_keyandhotkeyare always exposed. Each one calls the subclass method of the same name (click,move,type,scroll,takeScreenshot,pressKey,hotkey) when it is defined, and otherwise calls the matching predefined method.