Browser Use Tool
Usage
Portia offers both open source tools as well as a cloud-hosted library of tools to save you development time. You can dig into the specs of those tools in our open source repo (SDK repo ↗).
You can import our open source tools into your project using from portia.open_source_tools.registry import open_source_tool_registry
and load them into an InMemoryToolRegistry
object. You can also combine their use with cloud or custom tools as explained in the docs (Add custom tools ↗).
Tool details
Tool ID: browser_tool
Tool description: General purpose browser tool. Can be used to navigate to a URL and complete tasks. Should only be used if the task requires a browser and you are sure of the URL. This tool handles a full end to end task. It is capable of doing multiple things across different URLs within the same root domain as part of the end to end task. As a result, do not call this tool more than once back to back unless it is for different root domains - just call it once with the combined task and the URL set to the root domain.
Usage notes:
Also see the BrowserToolForUrl tool, which you can initialise with a URL to run your browser tasks from.
Args schema:
{
"description": "Input schema for the BrowserTool.\n\nThis schema defines the expected input parameters for the BrowserTool class.\n\nAttributes:\n url (str): The URL that the browser tool should navigate to.\n This is a required field specifying the target webpage.\n task (str): The task description that should be performed by the browser tool.\n This is a required field that specifies what actions should be taken\n on the provided URL.\n task_data (list[Any] | str | None): Task data that should be used to complete the task.\n Can be a string, a list of strings, or a list of objects that will be converted to\n strings. Important: This should include all relevant data in their entirety,\n from the first to the last character (i.e. NOT a summary).",
"properties": {
"url": {
"description": "The URL to navigate to.",
"title": "Url",
"type": "string"
},
"task": {
"description": "The task to be completed by the Browser tool.",
"title": "Task",
"type": "string"
},
"task_data": {
"anyOf": [
{
"items": {},
"type": "array"
},
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Task data that should be used to complete the task. Can be a string, a list of strings, or a list of objects that will be converted to strings. Important: This should include all relevant data in their entirety, from the first to the last character (i.e. NOT a summary).",
"title": "Task Data"
}
},
"required": [
"url",
"task"
],
"title": "BrowserToolSchema",
"type": "object"
}
Output schema:
('str', "The Browser tool's response to the user query.")