Skip to content

How to install Auto-GPT on Mac

Auto-GPT is an application that uses GPT-4 to achieve your goals. Tell it what you want to achieve, and it will try to find out how to do it by searching the internet.

You will learn how to install and run Auto-GPT on Mac.

(See the installation guide for Windows.)

What is Auto-GPT?

Auto-GPT is an open-source program exploring the utility of the GPT-4 language model. You tell it some goals, and It uses GPT-4 to come up with a step-by-step plan to achieve your goals.

It can perform actions such as searching the internet to find relevant information. It will come up with the next steps based on the result of the first step. It will go on and go until your set goals are achieved.

Many goals would require Auto-GPT to perform multiple actions to complete. You can pre-approve it to run on its own. So the name Auto.

Auto-GPT can:

  • Search the internet
  • Send emails
  • Write files
  • Write codes

In this guide, we will only enable it to search the internet.

Install Auto-GPT

Step 1: Install Homebrew

Install Homebrew, a package manager for Mac, if you haven’t already.

Open the Terminal app, type the following command, and press return.

/bin/bash -c "$(curl -fsSL"

Step 2: Install git and python

Run the following command in the Terminal app to get Git and Python if you haven’t installed them already.

brew install git [email protected]

Step 3: Clone the Auto-GPT repository

Run the following command to clone the Auto-GPT repository.

git clone

Go into the newly created folder.

cd 'Auto-GPT'

Since the code is constantly under development, you are recommended to use the stable branch.

git checkout stable

Step 4: Install the required packages

Set up a clean virtual environment.

python3 -m venv venv

The benefit of using a virtual environment are

  • Starting with a clean Python slate.
  • Anything you install for Auto-GPT will not interfere with other programs you are playing with.

Activate the virtual environment.

source venv/bin/activate

You should see the label (venv) in front of the command prompt.

Install the required packages.

pip install -r requirements.txt

Step 5: Create an OpenAI API key

You will need to have an OpenAI account to create the API key. You will be prompted to sign up for one if you don’t have one already.

Open this link:

Click the “+ Create new secret key” button.

Name the key “Auto-GPT”.

After clicking the button “Create secret key“, you will see the secret key. This is the only time you can see it. Copy the key and paste it into a safe document.

Step 6: Put your API key in Auto-GPT

Create a new config file from the template.

cp .env.template .env

Now you will need to edit the file .env and put in your OpenAI API key.

Use the following command to get the location of your current directory.


You should see a response like the one below. This is the path of the Auto-GPT folder.

Install Auto-GPT folder

Copy the path (/Users/XXXX/Auto-GPT).

Open Finder. On the top menu, click Go and then click Go to Folder

Paste the path of Auto-GPT to the dialog box and press Enter.

When you get there, you may not be able to find the file .env. Any file that starts with a dot is a hidden file.

Press Command + Shift + . to view hidden files in Finder.

Now you should see the .env file.

Double-click the file .env to edit TextEdit.

Find and change the line


to include your OpenAI API key. It should look like


Press Command-S to save the file. Close the file.

Step 7: Setup a paid OpenAI account

You will need to set up a paid account at OpenAI in order to use the GPT API.

Go to the billing page:

Click Set up paid account.

You have completed the necessary setup after putting in the way to pay them.

You can optionally set a monthly usage limit on the same page. Put down a $10 hard limit and a $5 soft limit.

Step 8: Install Chrome browser

Auto-GPT uses Chrome to browse the internet by default. Download and install Chrome here.

Run Auto-GPT

Make sure you are in the virtual environment. You should see the label (venv_autogpt) in front of the prompt.

If you don’t see it, open the Terminal App and go into the Auto-GPT folder.

cd 'Auto-GPT'

Activate the virtual environment.

source venv/bin/activate

Now you should see the venv label.

Start Auto-GPT by running the following command.

python -m autogpt

You should see the following prompt.

Now, name your AI.

Next, you will be prompted to describe your AI’s role. The role should be relevant to the goals you are going to put in later.

For example, I want to ask Auto-GPT to find the best gaming laptop for under $1000.

In AI’s role, enter

an AI designed to find the best electronic products autonomously.

Next, it will ask you to put down up to 5 goals. You don’t need to come up with 5. Let’s just use one in your first Auto-GPT project. E.g.

Enter Goal 1

Find the best gaming laptop for under $1000.

When you are prompted for Goal 2, press Enter to finish.

Then Auto-GPT will start to run.

Auto-GPT running.

It will tell you its plan and the reasoning behind it.

Enter y to accept the plan.

It’s capable of searching the internet and reading web pages to find the answer for you.

Auto-GPT analyzing webpage.

You can keep entering y to approve its next plan.

Or y-5 to pre-approve the next 5 plans.

Enter n when you are done.

Exiting the virtual environment

You can deactivate the virtual environment by running


Run options

If you have problems running Auto-GPT, run in debug mode to see the error message.

python -m autogpt --debug

You will see information that would normally be hidden, such as whether you are running GPT-3.5 or 4.

26 thoughts on “How to install Auto-GPT on Mac”

  1. I only have one version of python that I can see in the applications folder. Yet when I run python –version command I get 3.9.6. When I run a python3 –version I get 3.11.

    The only version I have that I can see is 3.10.

    How do I clean this up?

    1. You likely have installed python in multiple ways. This needs some knowledge to clean up. I won’t be able to advise without accessing your computer.

      But for installing auto-gpt, you can try using python3 instead of python to see if that works.

  2. OK, I just deactivated after installing 3.10.

    But when I check the version, I get this…

    Installed Python-3.10.6 to /Users/alanmacdonald/.pyenv/versions/3.10.6
    (venv) alanmacdonald@MBP-117 Auto-GPT % deactivate
    alanmacdonald@MBP-117 Auto-GPT % cd
    alanmacdonald@MBP-117 ~ % python –version
    Python 3.9.6

  3. OK, I just went and installed the 3.10. I ran the python -m autogpt command again and still get the same error.

    Trust me, I know it’s me, not you 😉

    But any guidance would be awesome. Thanks Andrew.

    1. OK… make sure you don’t see (venv) in front of your prompt. Type deactivate if you do.

      After installing Python 3.10, you should delete the whole Auto-GPT folder and try again…

      confirm you are calling 3.10:
      python3 --version

      Now start over again from the beginning… That’s all I can think of.

  4. (venv) alanmacdonald@MBP-117 Auto-GPT % python -m autogpt
    Traceback (most recent call last):
    File “/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/”, line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
    File “/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/”, line 87, in _run_code
    exec(code, run_globals)
    File “/Users/alanmacdonald/Auto-GPT/autogpt/”, line 2, in
    import autogpt.cli
    File “/Users/alanmacdonald/Auto-GPT/autogpt/”, line 2, in
    import click
    ModuleNotFoundError: No module named ‘click’

  5. Awesome! Should I be seeing these things run in chrome or does it happen behidn the scenes? it seems to be doing something but the output is a bit funky in terminal.

    1. When I wrote this post (things changing so fast you never know), it literally brought up a Chrome browser when visiting a page. I think it only use the terminal for Google search thought.

  6. Hey There, I’m getting this when I try to Run Auto-GPT, can you help me out?

    Traceback (most recent call last):
    File “/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/”, line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
    File “/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/”, line 87, in _run_code
    exec(code, run_globals)
    File “/Users/XXXXXXX/Auto-GPT/autogpt/”, line 2, in
    import autogpt.cli
    File “/Users/XXXXXX/Auto-GPT/autogpt/”, line 2, in
    import click
    ModuleNotFoundError: No module named ‘click’

    1. Are you using the stable branch?

      Assume you are following this guide… (which you should be using Python 3.10)

      Inside the Auto-GPT folder

      source ./venv/bin/activate
      git checkout stable
      git pull
      pip install -r requirements.txt

      Let me know how it goes.

Leave a Reply

Your email address will not be published. Required fields are marked *