Each Remote Agent runs in an secure, independent environment in the cloud. This enables each agent to have its own workspace, copy of the repository, and virtualized operating system to run other tools and commands. The base image is built from Ubuntu 22.04 and you can customize it with your own setup script tailored to your project.
Before you can create a Remote Agent you must select an environment for it to run in. You can use the default environment, a previously created one, or you can create a new one. Scripts for Remote Agents are written in bash and are executed when the virtual machine initializes.
You can have Augment automatically generate a new environment script for you by clicking the Auto-generate a script button. An agent will launch to analyze your repository, write the script, and test that it works. After the script is complete, you will see an option to save it to your local filesystem or to check it into the repository so it can be used by other collaborators.
You can also write your own environment script by hand by clicking the Write a script by hand button. This will open a new file in your editor with a template you can fill in. Scripts created by hand can only be saved to your local filesystem. You can add the script to your repository by committing the file at .augment/env/script-name.sh.
You can install packages, set environment variables, and perform other setup tasks in the script. The following is an example script for a Flask project that uses uv to manage dependencies.
Copy
Ask AI
#!/bin/bashset -e# Update package listssudo apt-get update# Install Python and required system dependenciessudo apt-get install -y python3 python3-venv python3-pip# Create a virtual environmentpython3 -m venv /mnt/persist/workspace/.venv# Add virtual environment activation to profileecho 'source /mnt/persist/workspace/.venv/bin/activate' | sudo tee -a /etc/profile# Activate the virtual environmentsource /mnt/persist/workspace/.venv/bin/activate# Install uv package manager (used by the project)pip install uv# Add uv to PATHecho 'export PATH=$PATH:$HOME/.local/bin' | sudo tee -a /etc/profileexport PATH=$PATH:$HOME/.local/bin# Install project dependencies using uvcd /mnt/persist/workspaceuv pip install -e .# Install test dependenciesuv pip install pytest# Install additional dependencies for testinguv pip install --group tests