Skip to main content

WorkArena benchmark for BrowserGym

Project description

WorkArena: How Capable are Web Agents at Solving Common Knowledge Work Tasks?

[Paper][Benchmark Contents][Getting Started][Live Demo][BrowserGym][Citing This Work]

WorkArena is a suite of browser-based tasks tailored to gauge web agents' effectiveness in supporting routine tasks for knowledge workers. By harnessing the ubiquitous ServiceNow platform, this benchmark will be instrumental in assessing the widespread state of such automations in modern knowledge work environments.

WorkArena is included in BrowserGym, a conversational gym environment for the evaluation of web agents.

https://github.com/ServiceNow/WorkArena/assets/2374980/68640f09-7d6f-4eb1-b556-c294a6afef70

Benchmark Contents

At the moment, WorkArena includes 19,912 unique instances drawn from 33 tasks that cover the main components of the ServiceNow user interface. The following videos show an agent built on GPT-4-vision interacting with every such component. As emphasized by our results, this benchmark is not solved and thus, the performance of the agent is not always on point.

Knowledge Bases

Goal: The agent must search for specific information in the company knowledge base.

The agent interacts with the user via BrowserGym's conversational interface.

https://github.com/ServiceNow/WorkArena/assets/1726818/352341ba-b501-46ac-bfa6-a6c9be1ac2b7

Forms

Goal: The agent must fill a complex form with specific values for each field.

https://github.com/ServiceNow/WorkArena/assets/1726818/e2c2b5cb-3386-4f3c-b073-c8c619e0e81b

Service Catalogs

Goal: The agent must order items with specific configurations from the company's service catalog.

https://github.com/ServiceNow/WorkArena/assets/1726818/ac64db3b-9abf-4b5f-84a7-e2d9c9cee863

Lists

Goal: The agent must filter a list according to some specifications.

In this example, the agent struggles to manipulate the UI and fails to create the filter.

https://github.com/ServiceNow/WorkArena/assets/1726818/7538b3ef-d39b-4978-b9ea-8b9e106df28e

Menus

Goal: The agent must navigate to a specific application using the main menu.

https://github.com/ServiceNow/WorkArena/assets/1726818/ca26dfaf-2358-4418-855f-80e482435e6e

Dashboards

Goal: The agent must answer a question that requires reading charts and (optionally) performing simple reasoning over them.

Note: For demonstration purposes, a human is controlling the cursor since this is a pure retrieval task

https://github.com/ServiceNow/WorkArena/assets/1726818/0023232c-081f-4be4-99bd-f60c766e6c3f

Getting Started

To setup WorkArena, you will need to get your own ServiceNow instance, install our Python package, and upload some data to your instance. Follow the steps below to achieve this.

a) Create a ServiceNow Developer Instance

  1. Go to https://developer.servicenow.com/ and create an account.
  2. Click on Request an instance and select the Washington release (initializing the instance will take a few minutes)
  3. Once the instance is ready, you should see your instance URL and credentials. If not, click Return to the Developer Portal, then navigate to Manage instance password and click Reset instance password.
  4. You should now see your URL and credentials. Based on this information, set the following environment variables:
    • SNOW_INSTANCE_URL: The URL of your ServiceNow developer instance
    • SNOW_INSTANCE_UNAME: The username, should be "admin"
    • SNOW_INSTANCE_PWD: The password, make sure you place the value in quotes "" and be mindful of escaping special shell characters. Running echo $SNOW_INSTANCE_PWD should print the correct password.
  5. Log into your instance via a browser using the admin credentials. Close any popup that appears on the main screen (e.g., agreeing to analytics).

Warning: Feel free to look around the platform, but please make sure you revert any changes (e.g., changes to list views, pinning some menus, etc.) as these changes will be persistent and affect the benchmarking process.

b) Install WorkArena and Initialize your Instance

Run the following command to install WorkArena in the BrowswerGym environment:

pip install browsergym-workarena

Then, run this command in a terminal to upload the benchmark data to your ServiceNow instance:

workarena-install

Finally, install Playwright:

playwright install

Your installation is now complete! 🎉

Live Demo

Run this code to see WorkArena in action.

Note: the following example executes WorkArena's oracle (cheat) function to solve each task. To evaluate an agent, calls to env.step() must be used instead.

import random

from browsergym.core.env import BrowserEnv
from browsergym.workarena import ALL_WORKARENA_TASKS
from time import sleep


random.shuffle(ALL_WORKARENA_TASKS)
for task in ALL_WORKARENA_TASKS:
    print("Task:", task)

    # Instantiate a new environment
    env = BrowserEnv(task_entrypoint=task,
                    headless=False)
    env.reset()

    # Cheat functions use Playwright to automatically solve the task
    env.chat.add_message(role="assistant", msg="On it. Please wait...")
    cheat_messages = []
    env.task.cheat(env.page, cheat_messages)

    # Send cheat messages to chat
    for cheat_msg in cheat_messages:
        env.chat.add_message(role=cheat_msg["role"], msg=cheat_msg["message"])

    # Post solution to chat
    env.chat.add_message(role="assistant", msg="I'm done!")

    # Validate the solution
    reward, stop, message, info = env.task.validate(env.page, cheat_messages)
    if reward == 1:
        env.chat.add_message(role="user", msg="Yes, that works. Thanks!")
    else:
        env.chat.add_message(role="user", msg=f"No, that doesn't work. {info.get('message', '')}")

    sleep(3)
    env.close()

Citing This Work

Please use the following BibTeX to cite our work:

@misc{workarena2024,
      title={WorkArena: How Capable Are Web Agents at Solving Common Knowledge Work Tasks?}, 
      author={Alexandre Drouin and Maxime Gasse and Massimo Caccia and Issam H. Laradji and Manuel Del Verme and Tom Marty and Léo Boisvert and Megh Thakkar and Quentin Cappart and David Vazquez and Nicolas Chapados and Alexandre Lacoste},
      year={2024},
      eprint={2403.07718},
      archivePrefix={arXiv},
      primaryClass={cs.LG}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

browsergym_workarena-0.3.0.tar.gz (6.3 MB view details)

Uploaded Source

Built Distribution

browsergym_workarena-0.3.0-py3-none-any.whl (6.8 MB view details)

Uploaded Python 3

File details

Details for the file browsergym_workarena-0.3.0.tar.gz.

File metadata

  • Download URL: browsergym_workarena-0.3.0.tar.gz
  • Upload date:
  • Size: 6.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for browsergym_workarena-0.3.0.tar.gz
Algorithm Hash digest
SHA256 6ff1adf708a95721adc04aef562ecf8f46a2807f0e247fe3171990acbcaff112
MD5 5c084f300ec424105a32c5a2473a5025
BLAKE2b-256 f72fa0427d3bccb14af7ac26a9dbb9a52f0b5bc7d27e0b70c540220aca3a0dab

See more details on using hashes here.

File details

Details for the file browsergym_workarena-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for browsergym_workarena-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4c9208c7b37fdc676d200e4ecf29c395b71a9f05d0de91ac69f4ab0f474ee85f
MD5 07e18a7bf93de9e80bffc3be904181fc
BLAKE2b-256 7217eb849d60fee2cfdcaecbad73a8279c0e1e4f835e7b1f3dd23b294f4aaf6d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page