This is the official implementation of the paper "WebDART: Dynamic Decomposition and Re-planning for Complex Web Tasks."
Overview of the WebDART framework. A complex web task is dynamically decomposed into three sequential subtasks. (1) Navigation: the agent explores the site—issuing actions such as click, type, and go_back—to gather every page that could contain the required information. (2) Information extraction: given these pages, a dedicated module isolates task-relevant content and converts it into a standardised, structured form based on the objective. (3) Execution: the extracted data are analysed to meet the task constraints, e.g., by generating and running Python code on the fly to perform filtering, aggregation, or other computations.
The web environment set up is same as WebArena.
Download the image tar from the following mirrors:
- https://drive.google.com/file/d/1gxXalk9O0p9eu1YkIJcmZta1nvvyAJpA/view?usp=sharing
- https://archive.org/download/webarena-env-shopping-image
- http://metis.lti.cs.cmu.edu/webarena-images/shopping_final_0712.tar
docker load --input shopping_final_0712.tar
docker run --name shopping -p 7770:80 -d shopping_final_0712
# wait ~1 min to wait all services to start
docker exec shopping /var/www/magento2/bin/magento setup:store-config:set --base-url="http://<your-server-hostname>:7770" # no trailing slash
docker exec shopping mysql -u magentouser -pMyPassword magentodb -e 'UPDATE core_config_data SET value="http://<your-server-hostname>:7770/" WHERE path = "web/secure/base_url";'
docker exec shopping /var/www/magento2/bin/magento cache:flush
Now you can visit http://<your-server-hostname>:7770.
Download the image tar from the following mirrors:
- https://drive.google.com/file/d/1See0ZhJRw0WTTL9y8hFlgaduwPZ_nGfd/view?usp=sharing
- https://archive.org/download/webarena-env-shopping-admin-image
- http://metis.lti.cs.cmu.edu/webarena-images/shopping_admin_final_0719.tar
docker load --input shopping_admin_final_0719.tar
docker run --name shopping_admin -p 7780:80 -d shopping_admin_final_0719
# wait ~1 min to wait all services to start
docker exec shopping_admin /var/www/magento2/bin/magento setup:store-config:set --base-url="http://<your-server-hostname>:7780" # no trailing slash
docker exec shopping_admin mysql -u magentouser -pMyPassword magentodb -e 'UPDATE core_config_data SET value="http://<your-server-hostname>:7780/" WHERE path = "web/secure/base_url";'
docker exec shopping_admin /var/www/magento2/bin/magento cache:flush
Now you can visit http://<your-server-hostname>:7780/admin.
Download the image tar from the following mirrors:
- https://drive.google.com/file/d/17Qpp1iu_mPqzgO_73Z9BnFjHrzmX9DGf/view?usp=sharing
- https://archive.org/download/webarena-env-forum-image
- http://metis.lti.cs.cmu.edu/webarena-images/postmill-populated-exposed-withimg.tar
docker load --input postmill-populated-exposed-withimg.tar
docker run --name forum -p 9999:80 -d postmill-populated-exposed-withimg
Now you can visit http://<your-server-hostname>:9999/.
Download the image tar from the following mirrors:
- https://drive.google.com/file/d/19W8qM0DPyRvWCLyQe0qtnCWAHGruolMR/view?usp=sharing
- https://archive.org/download/webarena-env-gitlab-image
- http://metis.lti.cs.cmu.edu/webarena-images/gitlab-populated-final-port8023.tar
docker load --input gitlab-populated-final-port8023.tar
docker run --name gitlab -d -p 8023:8023 gitlab-populated-final-port8023 /opt/gitlab/embedded/bin/runsvdir-start
# wait at least 5 mins for services to boot
docker exec gitlab sed -i "s|^external_url.*|external_url 'http://<your-server-hostname>:8023'|" /etc/gitlab/gitlab.rb
docker exec gitlab gitlab-ctl reconfigure
It might take 5 mins to start and then you can visit http://<your-server-hostname>:8023/explore.
cd WebDART
git clone https://github.com/web-arena-x/webarena.git
cd webarena
conda create -n webdart python=3.10; conda activate webdart
pip install -r requirements.txt
pip install --upgrade transformers
pip install --upgrade openai
pip install numpy==1.26.4
playwright install
cd ~/AgentOccam
pip install -r requirements.txt
mkdir .authYou need to replace <your_base_url> in files with your actual URL. To achieve this, run the following command:
python utils/replace_script.py --your_url "your url (e.g., ec2..)"Run the following command to create the task JSON file specific to your URL.
source scripts/env_setup.sh
cd config_files
python generate_test_data_new_shopping_admin.py
python generate_test_data_new_shopping.py
python generate_test_data_new_reddit.py
python generate_test_data_new_gitlab.py
cd ../Run the decomposition and navigation.
python decomp_navi.py --config_file AgentOccam/configs/navigation.ymlExtract the needed information and execute it based on navigation trajectory. Modify the result directory accordingly before running the script.
python ie_exec.pySome of our implementations are based on WebArena, WebChoreArena, and AgentOccam. We Appreciate their great work.