To get started with OpenBrowser you need to install the package and set up an API key.
1. Installing OpenBrowser
Quick install
Homebrew
pip
uv (recommended)
uvx (zero install)
pipx
From source
macOS / Linux curl -fsSL https://raw.githubusercontent.com/billy-enrizky/openbrowser-ai/main/install.sh | sh
Windows (PowerShell) irm https: // raw.githubusercontent.com / billy - enrizky / openbrowser - ai / main / install.ps1 | iex
Detects uv, pipx, or pip and installs OpenBrowser automatically. Install to ~/.local/bin without sudo: curl -fsSL https://raw.githubusercontent.com/billy-enrizky/openbrowser-ai/main/install.sh | sh -s -- --local
macOS / Linux brew tap billy-enrizky/openbrowser
brew install openbrowser-ai
Installs OpenBrowser into a Homebrew-managed virtualenv. pip install openbrowser-ai
With LLM agent support: pip install "openbrowser-ai[agent]"
uv pip install "openbrowser-ai[agent]"
Or create an isolated environment first: uv venv --python 3.12
source .venv/bin/activate
uv pip install "openbrowser-ai[agent]"
Run directly without installing — uvx downloads and caches the package automatically: # MCP server mode
uvx openbrowser-ai --mcp
# CLI daemon mode
uvx openbrowser-ai -c "await navigate('https://example.com')"
No virtual environment needed. Ideal for Claude Code, Cursor, and other MCP clients. pipx install openbrowser-ai
Installs into an isolated environment with the openbrowser-ai command available globally. git clone https://github.com/billy-enrizky/openbrowser-ai.git
cd openbrowser-ai
uv pip install -e ".[agent]"
No separate browser install needed. OpenBrowser auto-detects any installed Chromium-based browser (Chrome, Edge, Brave, Chromium) and uses it directly. If none is found and uvx is available, Chromium is installed automatically on first run. To pre-install manually (requires uvx): openbrowser-ai install
2. Choose your favorite LLM
Create a .env file and add your API key.
On Windows, use echo. > .env
Then add your API key to the file.
# add your key to .env file
GOOGLE_API_KEY =
# Get your free Gemini API key from https://aistudio.google.com/app/u/1/apikey
See Supported Models for more.
3. Run your first agent
OpenBrowser
Google
OpenAI
Anthropic
from openbrowser import Agent, ChatBrowserUse
from dotenv import load_dotenv
import asyncio
load_dotenv()
async def main ():
llm = ChatBrowserUse()
task = "Find the number 1 post on Show HN"
agent = Agent( task = task, llm = llm)
await agent.run()
if __name__ == "__main__" :
asyncio.run(main())
Custom browsers can be configured in one line. Check out
browsers for more.
4. Going to Production
For production deployments, see Going to Production for best practices on running OpenBrowser in production environments.