WebArena
WebArena is a self-hostable web environment for building and evaluating autonomous web agents. It provides realistic, functional websites and a benchmark of 812 tasks to test agents' ability to perform complex, knowledge-intensive web navigation. It is intended for researchers and developers working on LLM-based autonomous agents.
✨ Key features
- Standalone, self-hostable web environment with realistic websites
- Includes benchmark tasks and evaluation harness
- Supports multiple observation and action spaces
- Provides baseline agents and prompt templates
- Integrates with OpenAI API for LLM-based agents
- Offers Docker setup and pre-installed Amazon Machine Image
🎯 Use cases
- Evaluate autonomous web agents on realistic tasks
- Develop and test prompt-based reasoning agents
- Benchmark LLM performance on web navigation
- Analyze agent trajectories with Zeno
- Reproduce results from the WebArena paper
📦 Installation
🧰 Requirements: Python 3.10+, Playwright, and an OpenAI API key for running evaluations with GPT models.
conda create -n webarena python=3.10; conda activate webarena
pip install -r requirements.txt
playwright install
pip install -e .pip install -e ".[dev]"
mypy --install-types --non-interactive browser_env agents evaluation_harness
pip install pre-commit
pre-commit install🚀 Usage
from browser_env import ScriptBrowserEnv, create_id_based_action
# init the environment
env = ScriptBrowserEnv(
headless=False,
observation_type="accessibility_tree",
current_viewport_only=True,
viewport_size={"width": 1280, "height": 720},
)
# prepare the environment for a configuration defined in a json file
config_file = "config_files/0.json"
obs, info = env.reset(options={"config_file": config_file})
# get the text observation (e.g., html, accessibility tree) through obs["text"]
# create a random action
id = random.randint(0, 1000)
action = create_id_based_action(f"click [id]")
# take the action
obs, _, terminated, _, info = env.step(action)
⚠️ Good to know
The repository hosts the canonical implementation for reproducing paper results; for enhanced features like parallel experiments and unified leaderboard, the README recommends using AgentLab.
❓ FAQ
What is the difference between WebArena and AgentLab?
WebArena is the canonical implementation for reproducing paper results, while AgentLab enhances the infrastructure with parallel experiments, integration of other benchmarks, and unified leaderboard reporting.
How do I set up the environment for evaluation?
You need to set up your own WebArena websites following the Docker instructions, configure the URLs via environment variables, generate test config files, and obtain auto-login cookies.
Can I use the demo sites for evaluation?
No, the demo sites are only for browsing to understand content. For correct evaluation, you must set up your own websites.
What is the purpose of the minimal_example.py script?
It provides a quick walkthrough on setting up the browser environment and interacting with it using demo sites, for educational purposes only.
📊 Repository
🤖 Overview, features, install steps and FAQ were generated from the project's README on Sep 4, 2026. Always check the original source before running commands.