An open API service indexing awesome lists of open source software.

https://github.com/tiger-ai-lab/browseragent

An agent that can interact with browser to complete tasks
https://github.com/tiger-ai-lab/browseragent

agent browser llm

Last synced: 8 months ago
JSON representation

An agent that can interact with browser to complete tasks

Awesome Lists containing this project

README

          

# BrowserAgent
An agent that can interact with browser to complete tasks

### Installation

#### 1. **Clone this repository and navigate to the folder:**
```bash
git clone https://github.com/TIGER-AI-Lab/BrowserAgent.git
cd BrowserAgent
```

**Install the inference package:**
```bash
conda create -n browseragent python=3.10
conda activate browseragent
pip install -r requirement.txt
cd verl-tool
pip install -e .
pip install -e verl
pip install vllm==0.8.4
pip install flash-attn --no-build-isolation
pip install -e ".[acecoder,torl]"
pip uninstall uvloop
```

#### 2. Data preparation

Download [📊 BrowserAgent-Data](https://huggingface.co/datasets/TIGER-Lab/BrowserAgent-Data) and place it in the data folder, the final structure should look like this:

```
benchmark
-- | nq
-- | hotpot
-- | 2wiki
-- | popqa
-- | musique
-- | bamboogle
```

#### 3. **Deploy the wiki webpage:**

We adopt the WikiPedia from [WebArena](https://github.com/web-arena-x/webarena/tree/main/environment_docker#wikipedia-website).

To deploy the Wiki webpage locally, run the following Docker command and open http://localhost:22015.
```bash
docker run -d --name=wikipedia --volume=/:/data -p 22015:80 ghcr.io/kiwix/kiwix-serve:3.3.0 wikipedia_en_all_maxi_2022-05.zim
```

For public deployment, see our live example at [tigerai.ca/wiki/.../Landing](https://tigerai.ca/wiki/wikipedia_en_all_maxi_2022-05/A/User:The_other_Kiwix_guy/Landing) and apply the Nginx template in this repo, updating `proxy_pass` to match your Docker port.

```conf
location = /search {
return 301 /wiki/search?$args;
}

location = /random {
return 301 /wiki/random?$args;
}

location ~ ^/wikipedia_en_all_maxi_2022-05 {
return 301 /wiki$request_uri;
}

location /wiki/ {
proxy_pass http://localhost:22015/;
proxy_buffering off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;

sub_filter_once off;

sub_filter '