# ๐Ÿงช browser-task-bench > **Benchmark suite of 200+ web tasks for AI agent evaluation โ€” forms, navigation, search, authentication, and checkout flows.** [![Python](https://img.shields.io/badge/Python-3.11+-3776ab?style=flat&logo=python&logoColor=white)](https://python.org) [![Playwright](https://img.shields.io/badge/Playwright-1.44-2EAD33?style=flat)](https://playwright.dev) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) --- ## Overview `browser-task-bench` is a curated collection of 200+ web interaction tasks for benchmarking AI browser agents. Each task has a clear starting point, ground truth, and success criteria. Designed to work with [`agent-eval-harness`](https://github.com/TradeStackDev/agent-eval-harness) and [`webenv-sim`](https://github.com/TradeStackDev/webenv-sim), but usable with any evaluation framework that accepts task YAML files. --- ## Task Categories | Category | Count | Examples | |----------|-------|---------| | Navigation | 28 | Follow breadcrumbs, paginate results, expand menus | | Search & Filter | 35 | Keyword search, filter by category, sort results | | Forms | 40 | Fill contact form, multi-step signup, date pickers | | Authentication | 22 | Login, logout, password reset, 2FA | | eCommerce | 45 | Add to cart, apply coupon, complete checkout | | Data Extraction | 20 | Scrape table, extract price, read article | | Multi-Step | 15 | Booking flows, account setup wizards | | **Total** | **205** | | --- ## Quick Start ```bash git clone https://github.com/TradeStackDev/browser-task-bench.git pip install -r requirements.txt playwright install chromium ``` ### Run a task ```python from browser_task_bench import TaskLoader task = TaskLoader.load("ecommerce/add_item_to_cart_001") print(task.description) print(task.start_url) print(task.success_criteria) ``` ### Run full suite ```bash python -m browser_task_bench.cli run \ --suite ecommerce \ --agent your_agent:YourAgent \ --workers 4 \ --output results/ ``` --- ## Task Format Each task is a YAML file: ```yaml # tasks/ecommerce/checkout_with_coupon_001.yaml id: ecommerce_checkout_coupon_001 name: Complete Checkout with Coupon Code category: ecommerce difficulty: medium start_url: https://demo-store.webenv.dev/cart/ description: > Apply the coupon code SAVE20 at checkout, fill in shipping details, and complete the purchase using the test credit card. setup: - action: add_to_cart product_id: 42 inputs: coupon_code: "SAVE20" shipping: first_name: "John" last_name: "Doe" address: "123 Main St" city: "New York" state: "NY" zip: "10001" payment: card_number: "4242 4242 4242 4242" expiry: "12/26" cvv: "123" success_criteria: - type: url_contains value: /order-received/ weight: 0.4 - type: dom_text_contains selector: ".order-total" condition: "float(text.replace('$','')) < 100" weight: 0.3 - type: dom_element_exists selector: ".woocommerce-order-overview" weight: 0.3 max_steps: 20 timeout_seconds: 90 optimal_steps: 8 ``` --- ## Difficulty Levels | Level | Description | Avg Steps | |-------|-------------|-----------| | Easy | Single action, clear UI | 1โ€“3 | | Medium | Multi-step, some navigation | 4โ€“8 | | Hard | Complex flows, edge cases | 9โ€“15 | | Expert | Multi-page, dynamic content | 15+ | --- ## Demo Environment All tasks target a demo WordPress/WooCommerce environment hosted at `demo-store.webenv.dev`. The environment resets every 24 hours so tasks always start from a clean state. --- ## Adding Custom Tasks ```bash # Copy a template cp tasks/_template.yaml tasks/mysite/my_task_001.yaml # Validate task syntax python -m browser_task_bench.cli validate tasks/mysite/my_task_001.yaml # Test task manually python -m browser_task_bench.cli preview tasks/mysite/my_task_001.yaml --headed ``` --- ## License MIT ยฉ Adam Johnson