Implementation:CrewAIInc CrewAI MultiOn Tool
| Knowledge Sources | |
|---|---|
| Domains | Tools, Browser_Automation, API_Integration |
| Last Updated | 2026-02-11 00:00 GMT |
Overview
MultiOnTool wraps the MultiOn API to enable CrewAI agents to control web browsers using natural language instructions.
Description
The MultiOnTool extends BaseTool with MultiOn client integration, providing browser automation capabilities through natural language commands. It handles optional installation of the multion package via interactive confirmation using click. The tool initializes a MultiOn client with an API key sourced from the constructor or the MULTION_API_KEY environment variable. It maintains a session_id across interactions for browsing continuity. The _run() method accepts natural language commands via the cmd parameter, executes browser automation via multion.browse() with configurable parameters including session_id, local mode flag, and max_steps (defaulting to 3). The session ID is persisted from each response for subsequent calls. Results are returned as formatted messages with execution status. A status of CONTINUE indicates multi-step operations requiring reissue of the same instruction.
Usage
Use this tool when a CrewAI agent needs to interact with web pages through natural language, enabling automated browsing, data extraction, and web interaction tasks without traditional web scraping or Selenium complexity.
Code Reference
Source Location
- Repository: CrewAI
- File: lib/crewai-tools/src/crewai_tools/tools/multion_tool/multion_tool.py
- Lines: 1-81
Signature
class MultiOnTool(BaseTool):
name: str = "Multion Browse Tool"
description: str = "Multion gives the ability for LLMs to control web browsers..."
multion: Any | None = None
session_id: str | None = None
local: bool = False
max_steps: int = 3
package_dependencies: list[str] = Field(default_factory=lambda: ["multion"])
env_vars: list[EnvVar] = Field(default_factory=lambda: [
EnvVar(name="MULTION_API_KEY", description="API key for Multion", required=True),
])
def __init__(self, api_key: str | None = None, **kwargs): ...
def _run(self, cmd: str, *args: Any, **kwargs: Any) -> str: ...
Import
from crewai_tools import MultiOnTool
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| api_key | str or None | No | MultiOn API key; falls back to MULTION_API_KEY environment variable |
| cmd | str | Yes | Natural language instruction for web browsing |
| local | bool | No | Whether to run the browser locally; defaults to False |
| max_steps | int | No | Maximum number of browsing steps; defaults to 3 |
Outputs
| Name | Type | Description |
|---|---|---|
| _run() returns | str | Browsing result message with appended status (e.g., "STATUS: DONE" or "STATUS: CONTINUE") |
Usage Examples
Basic Usage
from crewai_tools import MultiOnTool
tool = MultiOnTool(api_key="your-multion-api-key")
result = tool._run(cmd="Go to example.com and find the pricing page")
With Environment Variable
import os
from crewai_tools import MultiOnTool
os.environ["MULTION_API_KEY"] = "your-key"
tool = MultiOnTool()
result = tool._run(cmd="Search for Python tutorials on Google")