Skip to content

AutoGPT Agent setup

🐋 Set up & Run with Docker  |  👷🏼 For Developers

📋 Requirements

Linux / macOS

Windows (WSL)

Windows

Attention

We recommend setting up AutoGPT with WSL. Some things don't work exactly the same on Windows and we currently can't provide specialized instructions for all those cases.

Setting up AutoGPT

Getting AutoGPT

Since we don't ship AutoGPT as a desktop application, you'll need to download the project from GitHub and give it a place on your computer.

Screenshot of the dialog to clone or download the repo

  • To get the latest bleeding edge version, use master.
  • If you're looking for more stability, check out the latest AutoGPT release.

Note

These instructions don't apply if you're looking to run AutoGPT as a docker image. Instead, check out the Docker setup guide.

Completing the Setup

Once you have cloned or downloaded the project, you can find the AutoGPT Agent in the autogpt/ folder. In this folder:

  1. Find the file named .env.template. This file may be hidden by default in some operating systems due to the dot prefix. To reveal hidden files, follow the instructions for your specific operating system: Windows and macOS.
  2. Create a copy of .env.template and call it .env; if you're already in a command prompt/terminal window:
    cp .env.template .env
    
  3. Open the .env file in a text editor.
  4. Set API keys for the LLM providers that you want to use: see below.
  5. Enter any other API keys or tokens for services you would like to use.

    Note

    To activate and adjust a setting, remove the # prefix.

  6. Save and close the .env file.

  7. Optional: run poetry install to install all required dependencies. The application also checks for and installs any required dependencies when it starts.

You should now be able to explore the CLI (./autogpt.sh --help) and run the application.

See the user guide for further instructions.

Setting up LLM providers

You can use AutoGPT with any of the following LLM providers. Each of them comes with its own setup instructions.

AutoGPT was originally built on top of OpenAI's GPT-4, but now you can get similar and interesting results using other models/providers too. If you don't know which to choose, you can safely go with OpenAI*.

* subject to change

OpenAI

Attention

To use AutoGPT with GPT-4 (recommended), you need to set up a paid OpenAI account with some money in it. Please refer to OpenAI for further instructions (link). Free accounts are limited to GPT-3.5 with only 3 requests per minute.

  1. Make sure you have a paid account with some credits set up: Settings > Organization > Billing
  2. Get your OpenAI API key from: API keys
  3. Open .env
  4. Find the line that says OPENAI_API_KEY=
  5. Insert your OpenAI API Key directly after = without quotes or spaces:

    OPENAI_API_KEY=sk-proj-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    

    Using a GPT Azure-instance

    If you want to use GPT on an Azure instance, set USE_AZURE to True and make an Azure configuration file.

    Rename azure.yaml.template to azure.yaml and provide the relevant azure_api_base, azure_api_version and deployment IDs for the models that you want to use.

    E.g. if you want to use gpt-3.5-turbo and gpt-4-turbo:

    # Please specify all of these values as double-quoted strings
    # Replace string in angled brackets (<>) to your own deployment Name
    azure_model_map:
        gpt-3.5-turbo: "<gpt-35-turbo-deployment-id>"
        gpt-4-turbo: "<gpt-4-turbo-deployment-id>"
        ...
    

    Details can be found in the openai/python-sdk/azure, and in the [Azure OpenAI docs] for the embedding model. If you're on Windows you may need to install an MSVC library.

Important

Keep an eye on your API costs on the Usage page.

Anthropic

  1. Make sure you have credits in your account: Settings > Plans & billing
  2. Get your Anthropic API key from Settings > API keys
  3. Open .env
  4. Find the line that says ANTHROPIC_API_KEY=
  5. Insert your Anthropic API Key directly after = without quotes or spaces:
    ANTHROPIC_API_KEY=sk-ant-api03-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    
  6. Set SMART_LLM and/or FAST_LLM to the Claude 3 model you want to use. See Anthropic's models overview for info on the available models. Example:
    SMART_LLM=claude-3-opus-20240229
    

Important

Keep an eye on your API costs on the Usage page.

Groq

Note

Although Groq is supported, its built-in function calling API isn't mature. Any features using this API may experience degraded performance. Let us know your experience!

  1. Get your Groq API key from Settings > API keys
  2. Open .env
  3. Find the line that says GROQ_API_KEY=
  4. Insert your Anthropic API Key directly after = without quotes or spaces:
    GROQ_API_KEY=gsk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    
  5. Set SMART_LLM and/or FAST_LLM to the Groq model you want to use. See Groq's models overview for info on the available models. Example:
    SMART_LLM=llama3-70b-8192