Tools
Pre-built Scrapybara tools and how to define custom tools
Scrapybara tools
BashTool, ComputerTool, EditTool
BashTool
, ComputerTool
, and EditTool
follow the same interface as the instance bash
, computer
, and edit
methods. They each take in an instance
parameter to interact with the instance.
ComputerTool
allows the agent to allows the agent to control mouse and keyboard. Supported for Ubuntu, Browser, and Windows instances.BashTool
allows the agent to run bash commands. Supported only for Ubuntu instances.EditTool
allows the agent to view, create, and edit files. Supported only for Ubuntu instances.
Python
TypeScript
Define custom tools
You can define custom tools. A tool needs a name
, description
, parameters
(Pydantic model for Python, Zod object for TS), and an execute function (__call__
for Python, execute
for TS).
Python
TypeScript
BrowserTool
BrowserTool
allows the agent to interact with a browser using Playwright.
Custom tools like BrowserTool may degrade model performance, as the models have not been trained on custom tools. For browser automation, we recommend sticking to ComputerTool.
The BrowserTool requires the browser to be started first.