一、软件介绍
文末提供程序和源码下载
web-ui开源程序是建立在浏览器使用的基础上,旨在使 AI 代理可以访问网站。WebUI:基于 Gradio 构建,支持大部分 browser-use 功能。此 UI 设计为用户友好型,并支持与浏览器代理轻松交互。扩展LLM支持:我们集成了对各种大型语言模型 ()LLMs 的支持,包括:Google、OpenAI、Azure OpenAI、Anthropic、DeepSeek、Ollama 等。我们计划在未来增加对更多模型的支持。自定义浏览器支持:您可以将自己的浏览器与我们的工具一起使用,无需重新登录网站或处理其他身份验证挑战。此功能还支持高清屏幕录制。持久浏览器会话:您可以选择在 AI 任务之间保持浏览器窗口打开,从而允许您查看 AI 交互的完整历史记录和状态。
二、Installation Guide 安装指南
Step 1: Clone the Repository
步骤 1:克隆存储库(文末提供网盘下载)
git clone https://github.com/browser-use/web-ui.git
cd web-ui
Step 2: Set Up Python Environment
第 2 步:设置 Python 环境
We recommend using uv for managing the Python environment.
我们建议使用 uv 来管理 Python 环境。
Using uv (recommended): 使用 uv(推荐):
uv venv --python 3.11
Activate the virtual environment:
激活虚拟环境:
Windows (Command Prompt):
Windows(命令提示符):
.venv\Scripts\activate
Windows (PowerShell): Windows (PowerShell):
.\.venv\Scripts\Activate.ps1
macOS/Linux: macOS/Linux的:
source .venv/bin/activate
Step 3: Install Dependencies
第 3 步:安装依赖项
Install Python packages:
安装 Python 包:
uv pip install -r requirements.txt
Install Browsers in Patchright.
在 Patchright 中安装浏览器。
patchright install --with-deps
Or you can install specific browsers by running:
或者,您可以通过运行以下命令来安装特定的浏览器:
patchright install chromium --with-deps
Step 4: Configure Environment
步骤 4:配置环境
Create a copy of the example environment file:
创建示例环境文件的副本:
Windows (Command Prompt):
Windows(命令提示符):
copy .env.example .env
macOS/Linux/Windows (PowerShell):
macOS/Linux/Windows (PowerShell):
cp .env.example .env
Open .env in your preferred text editor and add your API keys and other settings
在首选文本编辑器中打开 .env ,然后添加 API 密钥和其他设置
Step 5: Enjoy the web-ui
第 5 步:享受 web-ui
Run the WebUI: 运行 WebUI:
python webui.py --ip 127.0.0.1 --port 7788
Access the WebUI: Open your web browser and navigate to http://127.0.0.1:7788.
访问 WebUI:打开 Web 浏览器并导航到 http://127.0.0.1:7788 。
Using Your Own Browser(Optional):
使用您自己的浏览器(可选):
Set BROWSER_PATH to the executable path of your browser and BROWSER_USER_DATA to the user data directory of your browser. Leave BROWSER_USER_DATA empty if you want to use local user data.
设置为 BROWSER_PATH 浏览器的可执行路径和 BROWSER_USER_DATA 浏览器的用户数据目录。如果要使用本地用户数据,请留 BROWSER_USER_DATA 空。
Windows 窗户
BROWSER_PATH="C:\Program Files\Google\Chrome\Application\chrome.exe"
BROWSER_USER_DATA="C:\Users\YourUsername\AppData\Local\Google\Chrome\User Data"
Note: Replace YourUsername with your actual Windows username for Windows systems.
注意:请替换为 YourUsername Windows 系统的实际 Windows 用户名。
Mac 苹果电脑
BROWSER_PATH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
BROWSER_USER_DATA="/Users/YourUsername/Library/Application Support/Google/Chrome"
Close all Chrome windows
关闭所有 Chrome 窗口
Open the WebUI in a non-Chrome browser, such as Firefox or Edge. This is important because the persistent browser context will use the Chrome data when running the agent.
在非 Chrome 浏览器(如 Firefox 或 Edge)中打开 WebUI。这一点很重要,因为持久性浏览器上下文将在运行代理时使用 Chrome 数据。
Check the "Use Own Browser" option within the Browser Settings.
选中浏览器设置中的“使用自己的浏览器”选项。
三、软件下载
夸克网盘分享
本文信息来源于GitHub作者地址:https://github.com/browser-use/web-ui