About Remote Agent environments

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.

Using an environment

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.

Selecting an exiting environment

Choose an existing environment, either the default base environment or one you have created previously, from the dropdown.

Generating a new environment

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.

Writing your own environment script

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.

Example script

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.

#!/bin/bash
set -e

# Update package lists
sudo apt-get update

# Install Python and required system dependencies
sudo apt-get install -y python3 python3-venv python3-pip

# Create a virtual environment
python3 -m venv /mnt/persist/workspace/.venv

# Add virtual environment activation to profile
echo 'source /mnt/persist/workspace/.venv/bin/activate' | sudo tee -a /etc/profile

# Activate the virtual environment
source /mnt/persist/workspace/.venv/bin/activate

# Install uv package manager (used by the project)
pip install uv

# Add uv to PATH
echo 'export PATH=$PATH:$HOME/.local/bin' | sudo tee -a /etc/profile
export PATH=$PATH:$HOME/.local/bin

# Install project dependencies using uv
cd /mnt/persist/workspace
uv pip install -e .

# Install test dependencies
uv pip install pytest

# Install additional dependencies for testing
uv pip install --group tests

Base environment

The base environment is an Ubuntu 22.04 image with a number of common tools pre-installed. The environment includes the following packages and tools:

  • Programming Languages
    • Python (3.9 - 3.12)
    • Go (v1.24.2)
    • Node.js (v22.x)
  • Package Managers
    • pip (Python)
    • npm (Node.js)
    • pnpm (Node.js)
    • Homebrew
  • Utilities
    • curl, wget
    • jq (JSON processor)
    • vim, nano (text editors)
    • tree, less