BrowserMind is a full-stack autonomous web automation agent. By leveraging a ReAct (Reasoning and Acting) orchestration loop and a headless Playwright browser, BrowserMind can execute complex, multi-step tasks on the live web driven purely by natural language instructions.
- LLM-Driven ReAct Loop: At the core of BrowserMind is an autonomous reasoning engine. The LLM iterates in a continuous loop—thinking, invoking tools, evaluating results, and correcting its own path.
- Set-of-Marks (SoM) Navigation: Instead of forcing the LLM to parse raw HTML or guess CSS selectors, the backend assigns a unique integer ID to every interactive element. The agent interacts with extreme precision using the
interact_with_idtool. - "Industrial Telemetry" Console: A brutalist, high-trust Operator Console built with React. Features include a Live Viewport Stream, a continuous Telemetry Tape log of machine reasoning, and a Vision Timeline Filmstrip.
The system is built on a decoupled architecture:
- Backend (Express/Node.js): Manages Playwright, the in-memory RunStore, and communication with the OpenRouter API.
- Frontend (React/Vite): An interactive dashboard consuming REST endpoints and real-time SSE streams.
Deep Dives: See
ARCHITECTURE.mdfor the visual architecture diagram andbackend/README.mdfor the backend execution engine details.
- Node.js (v18 or higher)
- An OpenRouter API key
Install the packages for both the backend and frontend:
git clone https://github.com/your-username/browsermind.git
cd browsermind
# Install backend dependencies & Playwright Chromium
cd backend
npm install
npx playwright install chromium
# Install frontend dependencies
cd ../frontend
npm installIn the backend/ directory, duplicate the .env.example file and rename it to .env:
OPENROUTER_API_KEY=your_openrouter_api_key
MODEL_ID=openai/gpt-4o-mini # Recommended model
MAX_STEPS=30
PORT=3000
HEADLESS_BROWSER=false # Set to true to hide the chromium window locallyYou will need two terminal windows to run the stack.
Start the Backend:
cd backend
npm run devStart the Frontend:
cd frontend
npm run dev- Navigate to the frontend at
http://localhost:5173. - Toggle between Light/Dark mode in the top right.
- In the command input, enter a natural language task. For example: "Open scaler.com and try to login."
- Click INITIALIZE RUN.
- Watch the Telemetry Tape update in real-time as the agent thinks and acts. The Live Viewport will automatically stream screenshots as the browser navigates the task!
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request