A web application for AI-powered browser automation. Users type natural language commands in a chat interface, and an AI vision model analyzes the browser screenshot to find and click elements.
- Frontend: React 18, WebSocket, CSS (no UI libraries)
- Backend: FastAPI, Playwright (headless Chromium), OpenAI SDK β OpenRouter API
- AI Models: Configurable vision model (default:
nvidia/nemotron-nano-12b-v2-vl:free) + bbox processor (alibaba/tongyi-deepresearch-30b-a3b:free)
- User enters a URL β Playwright navigates to it
- User sends a chat message β backend captures screenshot
- Screenshot + message sent to vision model β returns bounding box coordinates
- Coordinates cleaned by a second model β backend generates JS click code
- JS executed in browser β updated screenshot sent back
# Backend
python3 -m venv venv && source venv/bin/activate
pip install -r requirements.txt
playwright install chromium
cd backend && uvicorn main:app --reload --host 0.0.0.0 --port 8000
# Frontend (separate terminal)
cd frontend && npm install && npm startSet your OpenRouter API key via the π button in the UI.
- No authentication or user sessions
- Single shared browser instance
- API key saved in plaintext to
backend/config.json - In-memory chat history (lost on restart)
- AI-generated JavaScript executed without sandboxing
- Not suitable for public/production deployment without additional security
| File | Purpose |
|---|---|
backend/main.py |
FastAPI app, WebSocket handler, bbox β JS pipeline |
backend/browser_manager.py |
Playwright lifecycle, screenshots, JS execution |
backend/openrouter_client.py |
OpenAI SDK client, vision + bbox processor calls |
frontend/src/App.js |
Main React component, WebSocket routing, modals |
frontend/src/components/BrowserView.js |
Screenshot display, URL bar, bbox overlay |
frontend/src/components/ChatPanel.js |
Chat message list and input |
frontend/src/hooks/useWebSocket.js |
WebSocket connection with auto-reconnect |