Skip to content

Browser Use Service

LLM-powered browser automation service for the infrastructure.

Quick Reference

Item Value
Web UI https://browser-use.rbnk.uk/ui/
REST API https://browser-use.rbnk.uk/task
API Docs https://browser-use.rbnk.uk/docs
Health https://browser-use.rbnk.uk/health
Metrics https://browser-use.rbnk.uk/metrics
Default Model gpt-5.1
Stack Location /srv/dockerdata/browser-use/

What It Does

Browser Use enables AI agents to control a web browser through natural language commands. Use cases include:

  • Web Scraping: Extract data from websites
  • Form Automation: Fill and submit forms
  • Testing: Automated UI testing
  • Research: Gather information from multiple sources
  • Data Entry: Automate repetitive web tasks

API Usage

Basic Request

curl -X POST https://browser-use.rbnk.uk/task \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
    "task": "Go to example.com and get the page title",
    "max_steps": 10
  }'

Request Parameters

Parameter Type Default Description
task string required Natural language task
backend string playwright playwright or browserless
max_steps int 50 Max agent steps
headless bool true Headless browser mode
save_screenshot bool false Save final screenshot
timeout int 300 Timeout in seconds
model string gpt-5.1 LLM model to use

Response

{
  "task_id": "uuid",
  "status": "success",
  "result": "The page title is 'Example Domain'",
  "steps_taken": 3,
  "duration_seconds": 15.5,
  "model_used": "gpt-5.1"
}

n8n Integration

Use in n8n workflows with HTTP Request node:

  1. URL: https://browser-use.rbnk.uk/task
  2. Method: POST
  3. Auth: Header Auth with X-API-Key
  4. Body: JSON with task parameters

Operations

# Start service
cd /srv/dockerdata/browser-use && docker compose up -d

# View logs
docker compose logs -f browser-use-api

# Restart
docker compose restart browser-use-api

# Check health
curl -s https://browser-use.rbnk.uk/health | jq .

Configuration

Environment variables in .env:

BROWSER_USE_API_KEY=...      # API authentication
LITELLM_API_URL=http://litellm:4000  # LLM proxy
LITELLM_API_KEY=...          # LiteLLM virtual key
DEFAULT_MODEL=gpt-5.1        # Default model
MAX_STEPS=50                 # Max steps limit
TASK_TIMEOUT=300             # Timeout seconds

LiteLLM Virtual Keys

Browser-use uses LiteLLM virtual keys for secure AI model access: - Budget: $10/month allocation for browser automation tasks - Models: Access to gpt-5.1, claude-4, and other models via LiteLLM proxy - Cost Tracking: Real-time usage monitoring and budget alerts

For virtual key setup and management, see: LiteLLM Virtual Keys

Architecture

  • FastAPI application with Gradio UI
  • Playwright for browser automation (Chromium)
  • LiteLLM proxy for LLM routing
  • Traefik for SSL and routing
  • Prometheus metrics for monitoring

Full Documentation

See /srv/dockerdata/browser-use/README.md for complete documentation including: - Detailed API reference - Example tasks - MCP integration - Troubleshooting guide - Architecture diagrams