- Notifications
You must be signed in to change notification settings - Fork1.6k
Run AI Agent in your browser.
License
browser-use/web-ui
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This project builds upon the foundation of thebrowser-use, which is designed to make websites accessible for AI agents.
We would like to officially thankWarmShao for his contribution to this project.
WebUI: is built on Gradio and supports most ofbrowser-use
functionalities. This UI is designed to be user-friendly and enables easy interaction with the browser agent.
Expanded LLM Support: We've integrated support for various Large Language Models (LLMs), including: Google, OpenAI, Azure OpenAI, Anthropic, DeepSeek, Ollama etc. And we plan to add support for even more models in the future.
Custom Browser Support: You can use your own browser with our tool, eliminating the need to re-login to sites or deal with other authentication challenges. This feature also supports high-definition screen recording.
Persistent Browser Sessions: You can choose to keep the browser window open between AI tasks, allowing you to see the complete history and state of AI interactions.
bu-webui-demo.mp4
- Python 3.11 or higher
- Git (for cloning the repository)
Read thequickstart guide or follow the steps below to get started.
git clone https://github.com/browser-use/web-ui.gitcd web-ui
We recommend usinguv for managing the Python environment.
Using uv (recommended):
uv venv --python 3.11
Activate the virtual environment:
- Windows (Command Prompt):
.venv\Scripts\activate
- Windows (PowerShell):
.\.venv\Scripts\Activate.ps1
- macOS/Linux:
source .venv/bin/activate
Install Python packages:
uv pip install -r requirements.txt
Install Browsers in Playwright:You can install specific browsers by running:
playwright install --with-deps chromium
To install all browsers:
playwright install
- Create a copy of the example environment file:
- Windows (Command Prompt):
copy .env.example .env
- macOS/Linux/Windows (PowerShell):
cp .env.example .env
- Open
.env
in your preferred text editor and add your API keys and other settings
- Docker and Docker Compose installed
- Docker Desktop (For Windows/macOS)
- Docker Engine andDocker Compose (For Linux)
- Clone the repository:
git clone https://github.com/browser-use/web-ui.gitcd web-ui
- Create and configure environment file:
- Windows (Command Prompt):
copy .env.example .env
- macOS/Linux/Windows (PowerShell):
cp .env.example .env
Edit.env
with your preferred text editor and add your API keys
- Run with Docker:
# Build and start the container with default settings (browser closes after AI tasks)docker compose up --build
# Or run with persistent browser (browser stays open between AI tasks)CHROME_PERSISTENT_SESSION=true docker compose up --build
- Access the Application:
- Web Interface: Open
http://localhost:7788
in your browser - VNC Viewer (for watching browser interactions): Open
http://localhost:6080/vnc.html
- Default VNC password: "youvncpassword"
- Can be changed by setting
VNC_PASSWORD
in your.env
file
- Run the WebUI:After completing the installation steps above, start the application:
python webui.py --ip 127.0.0.1 --port 7788
- WebUI options:
--ip
: The IP address to bind the WebUI to. Default is127.0.0.1
.--port
: The port to bind the WebUI to. Default is7788
.--theme
: The theme for the user interface. Default isOcean
.- Default: The standard theme with a balanced design.
- Soft: A gentle, muted color scheme for a relaxed viewing experience.
- Monochrome: A grayscale theme with minimal color for simplicity and focus.
- Glass: A sleek, semi-transparent design for a modern appearance.
- Origin: A classic, retro-inspired theme for a nostalgic feel.
- Citrus: A vibrant, citrus-inspired palette with bright and fresh colors.
- Ocean (default): A blue, ocean-inspired theme providing a calming effect.
--dark-mode
: Enables dark mode for the user interface.
- Access the WebUI: Open your web browser and navigate to
http://127.0.0.1:7788
. - Using Your Own Browser(Optional):
- Set
CHROME_PATH
to the executable path of your browser andCHROME_USER_DATA
to the user data directory of your browser. LeaveCHROME_USER_DATA
empty if you want to use local user data.- Windows
CHROME_PATH="C:\Program Files\Google\Chrome\Application\chrome.exe"CHROME_USER_DATA="C:\Users\YourUsername\AppData\Local\Google\Chrome\User Data"
Note: Replace
YourUsername
with your actual Windows username for Windows systems. - Mac
CHROME_PATH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"CHROME_USER_DATA="/Users/YourUsername/Library/Application Support/Google/Chrome"
- Windows
- Close all Chrome windows
- 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.
- Check the "Use Own Browser" option within the Browser Settings.
- Set
- Keep Browser Open(Optional):
- Set
CHROME_PERSISTENT_SESSION=true
in the.env
file.
- Set
Environment Variables:
- All configuration is done through the
.env
file - Available environment variables:
# LLM API KeysOPENAI_API_KEY=your_key_hereANTHROPIC_API_KEY=your_key_hereGOOGLE_API_KEY=your_key_here# Browser SettingsCHROME_PERSISTENT_SESSION=true # Set to true to keep browser open between AI tasksRESOLUTION=1920x1080x24 # Custom resolution format: WIDTHxHEIGHTxDEPTHRESOLUTION_WIDTH=1920 # Custom width in pixelsRESOLUTION_HEIGHT=1080 # Custom height in pixels# VNC SettingsVNC_PASSWORD=your_vnc_password # Optional, defaults to "vncpassword"
- All configuration is done through the
Platform Support:
- Supports both AMD64 and ARM64 architectures
- For ARM64 systems (e.g., Apple Silicon Macs), the container will automatically use the appropriate image
Browser Persistence Modes:
Default Mode (CHROME_PERSISTENT_SESSION=false):
- Browser opens and closes with each AI task
- Clean state for each interaction
- Lower resource usage
Persistent Mode (CHROME_PERSISTENT_SESSION=true):
- Browser stays open between AI tasks
- Maintains history and state
- Allows viewing previous AI interactions
- Set in
.env
file or via environment variable when starting container
Viewing Browser Interactions:
- Access the noVNC viewer at
http://localhost:6080/vnc.html
- Enter the VNC password (default: "vncpassword" or what you set in VNC_PASSWORD)
- Direct VNC access available on port 5900 (mapped to container port 5901)
- You can now see all browser interactions in real-time
- Access the noVNC viewer at
Container Management:
# Start with persistent browserCHROME_PERSISTENT_SESSION=true docker compose up -d# Start with default mode (browser closes after tasks)docker compose up -d# View logsdocker compose logs -f# Stop the containerdocker compose down
- 2025/01/26: Thanks to @vvincent1234. Now browser-use-webui can combine with DeepSeek-r1 to engage in deep thinking!
- 2025/01/10: Thanks to @casistack. Now we have Docker Setup option and also Support keep browser open between tasks.Video tutorial demo.
- 2025/01/06: Thanks to @richard-devbot. A New and Well-Designed WebUI is released.Video tutorial demo.
About
Run AI Agent in your browser.