### Environment Setup for WebVoyager Replication Source: https://github.com/amazon-science/agentoccam/blob/main/README.md Commands to clone the Agent-E repository, install dependencies, and set up the environment variables. ```bash git clone https://github.com/EmergenceAI/Agent-E.git cd Agent-E ./install.sh source .venv/bin/activate uv pip install beartype uv pip install gymnasium uv pip install lxml uv pip install text_generation uv pip install aiolimiter uv pip install boto3 uv pip install transformers export OPENAI_API_KEY="" export AUTOGEN_MODEL_NAME="gpt-4-turbo" cd ../AgentOccam ``` -------------------------------- ### Setup WebArena Environment Source: https://github.com/amazon-science/agentoccam/blob/main/README.md Commands to clone the WebArena repository, create a conda environment, install dependencies, and prepare the AgentOccam directory. ```bash git clone https://github.com/web-arena-x/webarena.git cd webarena conda create -n webarena python=3.10; conda activate webarena pip install -r requirements.txt pip install --upgrade transformers pip install --upgrade openai pip install numpy==1.26.4 playwright install pip install -e . cd ../AgentOccam pip install -r requirements.txt mkdir .auth ``` -------------------------------- ### Export Environment Configurations Source: https://github.com/amazon-science/agentoccam/blob/main/README.md Set the necessary environment variables for WebArena host addresses and API keys before running experiments. ```bash export SHOPPING="http://:7770" export SHOPPING_ADMIN="http://:7780/admin" export REDDIT="http://:9999" export GITLAB="http://:8023" export MAP="http://:3000" export WIKIPEDIA="http://:8888/wikipedia_en_all_maxi_2022-05/A/User:The_other_Kiwix_guy/Landing" export HOMEPAGE="http://:4399" export OPENAI_API_KEY="" export GEMINI_API_KEY="" # Optional, we provide several other agent base models, such as Claude and LLaMa. ``` -------------------------------- ### Configure AgentOccam environment settings Source: https://github.com/amazon-science/agentoccam/blob/main/README.md YAML configuration for the AgentOccam environment. Setting fullpage to true enables full page input, while prune enables observation space alignment. ```yml env: fullpage: true prune: true ``` -------------------------------- ### Run WebArena-Agent Source: https://github.com/amazon-science/agentoccam/blob/main/README.md Execute the WebArena-Agent using the provided shell script. ```bash bash scripts/run_webarena.sh ``` -------------------------------- ### Run AgentOccam WebArena Evaluation Source: https://github.com/amazon-science/agentoccam/blob/main/README.md Execute the evaluation script for AgentOccam using the specified configuration file. ```bash python eval_webarena.py --config AgentOccam/configs/AgentOccam-WebVoyager.yml ``` -------------------------------- ### Login to WebArena Source: https://github.com/amazon-science/agentoccam/blob/main/README.md Run the auto-login script to authenticate the browser environment. ```bash python browser_env/auto_login.py ``` -------------------------------- ### Test AgentOccam Source: https://github.com/amazon-science/agentoccam/blob/main/README.md Execute the evaluation script using a specific YAML configuration file. ```bash python eval_webarena.py --config AgentOccam/configs/AgentOccam.yml # Replace the yml config with your target one. ``` -------------------------------- ### Configure General Log Directory Source: https://github.com/amazon-science/agentoccam/blob/main/README.md Set the relative path for saving trajectories. ```yml logdir: "../AgentOccam-Trajectories" ``` -------------------------------- ### Run Agent-E Replication Task Source: https://github.com/amazon-science/agentoccam/blob/main/README.md Execute the Agent-E replication for a specific task ID. ```bash python -m agente_replication --task_ids Allrecipes--3 ``` -------------------------------- ### type [id] [content] [press_enter_after] Source: https://github.com/amazon-science/agentoccam/blob/main/AgentOccam/prompts/navigation_specifications/type.txt Types content into a field with a specific ID. Optionally presses the Enter key after typing. ```APIDOC ## type [id] [content] [press_enter_after] ### Description Types the specified content into a field identified by its ID. By default, the system presses the 'Enter' key after typing. ### Parameters - **id** (string/number) - Required - The identifier of the field to type into. - **content** (string) - Required - The text content to be typed into the field. - **press_enter_after** (0|1) - Optional - Determines if the 'Enter' key is pressed after typing. Defaults to 1 (enabled). ### Example `type [15] [Carnegie Mellon University] [1]` ``` -------------------------------- ### Configure Actor Output Source: https://github.com/amazon-science/agentoccam/blob/main/README.md Define the expected output fields for the actor. These must be parsed by the code and have corresponding descriptions in the prompts directory. ```yml agent: actor: output: ["interaction history summary", "observation description", "reason", "action", "observation highlight"] ``` -------------------------------- ### Define Actor Commands Source: https://github.com/amazon-science/agentoccam/blob/main/README.md Specify the valid planning and navigation commands for the actor. ```yml agent: actor: planning_command: ["branch", "prune"] navigation_command: ["click", "type", "stop", "note", "go_back"] ``` -------------------------------- ### Configure Actor Input Source: https://github.com/amazon-science/agentoccam/blob/main/README.md Define the input sequence for the actor. The order of elements in the list matters. ```yml agent: actor: input: ["step", "objective", "previous plans", "interaction history", "current observation"] ``` -------------------------------- ### Configure Broadcasting Content Source: https://github.com/amazon-science/agentoccam/blob/main/README.md Define the content to be broadcasted for play and trash series. ```yml agent: actor: play: ["step", "objective", "previous plans", "observation description", "reason", "action"] trash: ["objective", "step", "url", "instruction", "online input", "response", "alter ego response"] ``` -------------------------------- ### Configure Current Observation Source: https://github.com/amazon-science/agentoccam/blob/main/README.md Define the modality for the current observation input. ```yml agent: actor: current_observation: type: ["text"] ``` -------------------------------- ### Configure Agent Roles Source: https://github.com/amazon-science/agentoccam/blob/main/README.md Define debug and mode settings for actor, critic, and judge roles. ```yml agent: actor: debug: 0 verbose: 1 number: 1 critic: mode: false debug: 0 verbose: 1 judge: mode: false debug: 0 verbose: 1 ``` -------------------------------- ### Configure Log Name Source: https://github.com/amazon-science/agentoccam/blob/main/README.md Set the log name used for online files to differentiate runs. ```yml logname: "AgentOccam" agent: others: logname: "AgentOccam" ``` -------------------------------- ### Configure Best-of-N Actions Source: https://github.com/amazon-science/agentoccam/blob/main/README.md Set the number of actions for best-of-N evaluation when using a judge. ```yml agent: actor: number: 1 ``` -------------------------------- ### Configure Interaction History Source: https://github.com/amazon-science/agentoccam/blob/main/README.md Define the modality and history depth for the interaction history input. ```yml agent: actor: interaction_history: verbose: True type: ["text"] step_num: 3 ``` -------------------------------- ### Set Actor Model Source: https://github.com/amazon-science/agentoccam/blob/main/README.md Specify the LLM model to be used by the actor. ```yml agent: actor: model: "gpt-4-turbo" ``` -------------------------------- ### Define Actor Identities Source: https://github.com/amazon-science/agentoccam/blob/main/README.md Configure multiple specialized actor identities with distinct models and command sets. ```yml agent: actor: identities: identity_0: name: "QA" model: "gpt-4-turbo" output: ["response"] identity_1: name: "planning" model: "gpt-4-turbo" planning_command: ["branch", "prune"] output: ["interaction history summary", "observation description", "reason", "plan", "observation highlight"] identity_2: name: "reflection" model: "gpt-4-turbo" planning_command: ["branch", "prune"] navigation_command: ["click", "type", "stop", "note", "go_back"] output: ["interaction history summary", "observation description", "reflection", "reason", "action", "observation highlight"] ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.