TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/browser-use/browser-use/llms.txt
Use this file to discover all available pages before exploring further.
Tools class is a registry that manages all actions (tools) available to the agent. It includes built-in browser actions and supports custom tool registration.
Constructor
Parameters
List of default action names to exclude from the registry. Examples:
['search', 'wait', 'screenshot']Pydantic model class for structured output. Used for the
done action.Show file information in task completion messages.
Methods
action() Decorator
Register a custom action (tool) that the agent can call.Description of what the tool does. The LLM uses this to decide when to call it.
Pydantic model defining the tool’s parameters. Auto-generated from function signature if not provided.
List of domains where tool can run. Format:
['*.example.com']. Defaults to all domains.If
True, this action terminates the current action sequence.exclude_action()
Exclude a specific action from the registry.Name of the action to exclude.
set_coordinate_clicking()
Enable or disable coordinate-based clicking.Whether to enable coordinate clicking.
get_output_model()
Get the output model schema if configured.Output model class, or
None if not configured.use_structured_output_action()
Register a structured output action with a specific schema.Pydantic model class for structured output.
Properties
registry
The underlying action registry that stores all registered tools.
Built-in Actions
Navigation & Browser Control
- search - Search queries (DuckDuckGo, Google, Bing)
- navigate - Navigate to URLs
- go_back - Go back in browser history
- wait - Wait for specified seconds
Page Interaction
- click - Click elements by their index
- input - Input text into form fields
- upload_file - Upload files to file inputs
- scroll - Scroll the page up/down
- find_text - Scroll to specific text on page
- send_keys - Send special keys (Enter, Escape, etc.)
JavaScript Execution
- evaluate - Execute custom JavaScript code on the page
Tab Management
- switch - Switch between browser tabs
- close - Close browser tabs
Content Extraction
- extract - Extract data from webpages using LLM
- search_page - Search page text for patterns (zero LLM cost)
- find_elements - Query DOM elements by CSS selector (zero LLM cost)
Visual Analysis
- screenshot - Request a screenshot for visual confirmation
Form Controls
- dropdown_options - Get dropdown option values
- select_dropdown - Select dropdown options
File Operations
- write_file - Write content to files
- read_file - Read file contents
- replace_file - Replace text in files
Task Completion
- done - Complete the task (always available)
Custom Tool Parameters
Tools can access special parameters by name:The current browser session for deterministic Actor actions.
List of file paths available to the agent.
Agent’s file system instance.
LLM for page content extraction.
Whether sensitive data is configured.
Dictionary of sensitive data.
Schema for structured extraction.
Example Usage
Basic Custom Tool
Tool with Browser Access
Tool with Parameters
Tool with File Access
Domain-Restricted Tool
ActionResult Response
Tools should returnActionResult for structured responses: