Skip to content

Installation from source

Installation from source is the preferred way to set up SWE-agent on your machine.

Issues on Windows

Expect some issues with Windows (we're working on them). In the meantime, use Docker.

  1. Install Docker (follow the docs or use the get-docker.sh script for linux), then start Docker locally. Problems? See docker issues.
  2. If you plan on using the web-based GUI: Install nodejs.
  3. Clone the repository, for example with
    git clone https://github.com/princeton-nlp/SWE-agent.git
    
  4. Run
    python -m pip install --upgrade pip && pip install --editable .
    
    at the repository root (as with any python setup, it's recommended to use conda or virtual environments to manage dependencies).
  5. Run
    docker pull sweagent/swe-agent:latest
    
    Optional. If you want to run EnIGMA for cybersecurity challenges, run also:
    docker pull sweagent/enigma:latest
    docker network create ctfnet
    
    Errors? See docker issues. Alternatively, you can run ./setup.sh to create your own swe-agent docker image or run ./setup_ctf.sh to create your own EnIGMA docker image.
  6. Set up your LM API keys as explained here.

Docker issues

If you run into docker issues, see the installation tips section for more help.

Updating

SWE-agent is still in active development. Features and enhancement are added often. To make sure you are on the latest version, periodically run git pull (there is no need to redo the pip install). You might also want to run docker pull sweagent/swe-agent:latest or ./setup.sh periodically (though changes to the container are more rare).

Development setup

Want to modify SWE-agent? Great! There are a few extra steps and tips: Please check our contribution guide.