How to Install and Use Auto-GPT: An Autonomous AI Tool

After the launch of ChatGPT, AI has brought a monumental change in how we perceive computing. You can now train your AI chatbot with your own data and develop apps with natural language. Developers are now working on the next big thing – Autonomous AI Agent – a peek into the beginning of AGI (Artificial General Intelligence). Auto-GPT is one such tool that lets you achieve your goals by allowing LLMs to think, plan, and execute actions autonomously. You no longer need to add any input as the AI can think and take decisions rationally. So if you are interested, follow our tutorial and learn how to install and use Auto-GPT.

Things to Know Before You Use Auto-GPT

1. You don’t need a powerful computer to install and use Auto-GPT. Any decent computer would do the job. The heavy lifting is done by OpenAI API on the cloud.

2. If you have access to the GPT-4 API, Auto-GPT would work best as it’s much better at thinking and coming to a conclusion. It’s also less prone to hallucination. If you do not have access already, you can join the waitlist for GPT-4 API access using the link here. However, you can also use the regular OpenAI API with the GPT-3.5 model.

3. Auto-GPT uses a lot of tokens, so you have to add billing details and set up spending limits once your free credit limit is exhausted.

4. Unlike the free version of ChatGPT, Auto-GPT can connect to the internet and find the latest information on any subject. So you can use it to access any webpage and capture information.

How to Set up Auto-GPT on Your PC

Step 1: Install Python and Pip

1. First off, download the latest version of Python from here for your platform and install it.

2. On Windows, make sure to enable “Add python.exe to PATH” before installing Python. Now, click on “Install Now.” You can check out the in-depth tutorial to install Python and Pip on Windows via the link here.

3. To test Python’s installation, open Windows Terminal and run the below commands. Both commands should return the version number. Linux and macOS users should use python3 and pip3 in these commands.

python --version
pip --version

Step 2: Add API Keys to Use Auto-GPT

1. Next, head over to this link to open the latest GitHub release page of Auto-GPT. Here, click on “Source code (zip)” to download the ZIP file.

2. Now, double-click to extract the ZIP file and copy the “Auto-GPT” folder.

3. Next, simply paste the folder to your choice of location.

4. Now, open the folder to find a “.env.template” file here. Open it using Notepad or any text editor.

5. Next, go to OpenAI’s website and get the API key. If you don’t have an account, create a free account and click on “Create a new secret key“. Now, copy the API key.

6. After that, move to the text editor and paste the API in the “OPENAI_API_KEY” section. You can refer to the below image to get an idea.

7. Next, open pinecone.io (visit) and create a free account. It will allow the LLM to retrieve relevant information from memory for AI applications.

8. Here, click “API Keys” in the left sidebar and click on “Create API Key” in the right pane.

9. Give a name like “autogpt” and click on “Create Key“.

10. Now, copy the “Key Value” by clicking on the button.

11. Open the text editor again and paste it next to PINECONE_API_KEY.

12. Similarly, copy the value under “Environment“.

13. Now, paste it next to PINECONE_ENV.

14. Finally, save the “.env.template” file.

15. Having done that, rename .env.template to just .env. You are almost done.

Step 3: Install Auto-GPT on Windows, macOS, and Linux

1. After adding the API keys, it’s time to run Auto-GPT. Right-click on the “Auto-GPT” folder and choose “Copy as path“.

2. Now, open the Terminal and type cd, add a space, and then paste the path you copied above. You can right-click on the Terminal to paste the path quickly. Next, press Enter, and you will move to the Auto-GPT folder. macOS and Linux users can simply right-click and open Terminal inside the folder itself.

cd path

3. Once you are here, run the below command. It will automatically install all the required libraries to run Auto-GPT.

pip install -r requirements.txt

4. Next, run the below command, and it will start Auto-GPT on your system.

python -m autogpt

Step 4: How to Use Auto-GPT on Your PC

1. On the first run, Auto-GPT will ask you to name the AI. For example – I am creating Shopper-GPT, which can find products on Amazon. If you don’t want to create an AI for a specific use-case, you can leave this field blank and hit Enter. It loads the Entrepreneur-GPT name by default.

2. Next, you need to define the role of the AI.

3. After that, set goals for the autonomous AI one by one. This is where you tell the AI what you want to achieve. You can ask it to save the information in a text or PDF file. You can also ask it to shut down after all the information is retrieved.

4. Now, Auto-GPT will start thinking. During the course of action, it will ask you to authorize actions. Press “y” and hit Enter to confirm. It might connect to websites and gather information.

5. You can read what the AI is thinking, reasoning, and planning. It also provides criticism (kind of negative prompts) so that it comes up with the right kind of information. Finally, it performs the action.

6. If you want to run the AI continuously without requiring user authorization, you can press y -n and hit Enter. Make sure to replace n with a number. If you enter y -5, it means that it will not seek your permission for the next 5 actions. Note that you can use the “Ctrl + C” shortcut to stop any continuous action.

7. Furthermore, Auto-GPT might automatically open Chrome to gather information from the internet, as shown in the image below.

8. As I was using the regular OpenAI API and the GPT-3.5 model, the model kept running in an endless loop. For some reason, Auto-GPT was unable to create the file. But after completion of the task, you should find the final information under the Auto-GPT folder. Once you are here, open “auto_gpt_workspace”.

Auto-GPT Alternative: Automate Tasks With AgentGPT (Easy Solution)

If you don’t want to set up Auto-GPT locally and want an easy-to-use solution to automate and deploy tasks, you can use AgentGPT. It’s built on Auto-GPT, but you can access it directly in a browser. No need to fiddle with the Terminal and commands. Here is how it works.

1. Open agentgpt.reworkd.ai (visit) and click on “Settings” in the bottom-left corner.

2. Here, add your OpenAI API key. You can get the API key from here. If you don’t have access to GPT-4 API, select “gpt-3.5-turbo” as the model and click on “Save.”

3. Next, give a name to your AI agent and set the goal you wish to achieve. Now, click on “Deploy Agent” for the Auto-GPT AI to start thinking about your inputs.

4. Once the task is completed, you can click “Save” or “Copy” to get the final result.

5. If you want to stop the AI agent, click on “Stop agent“.

So this is how you can install and use Auto-GPT to create multi-headed tasks and achieve them with the help of AI. In my testing, Auto-GPT failed to complete many tasks and was in a never-ending loop — most likely because I employed the GPT-3.5 API (ChatGPT API). Auto-GPT is known to work best with the the GPT-4 API. It was frequently making up URLs and was unable to retrieve content since the URLs were made up and they were throwing 404 error.

Nevertheless, Auto-GPT does have a lot of potential, and with more development in the field, users will be able to achieve amazing results. In the meantime, if you want to use Microsoft JARVIS (aka HuggingGPT), follow our tutorial and learn about its insane capabilities. Apart from that, if you want to use ChatGPT-based CodeGPT in VS Code, we have a tutorial ready for you. Finally, if you have any questions, let us know in the comment section below.

Comments 29
  • Please create a tutorial to deploy Auto-GPT to the cloud, preferably to an AWS ECS or EC2 running instance, and exposed by an URL

  • I installed it and everything only to see that it is paid and needs a paid api key
    is there any way to use it for free?

  • Hi, Ive followed your above instructions and they were fine.
    im wondering what to key in or how to key in a command to see what model am i using?
    Im not sure if im currently using GPT3.5Turbo or GPT4.0.
    Thank you.
    (05/17/2023)

  • I am getting an error when installing the libraries to run AutoGPT:

    note: This error originates from a subprocess, and is likely not a problem with pip.
    ERROR: Failed building wheel for lxml
    Failed to build lxml
    ERROR: Could not build wheels for lxml, which is required to install pyproject.toml-based projects

  • Thanks so much for this, what a great walkthrough and thanks to the commentators who helped resolve the same issue myself and others had with a simple “set GIT_PYTHON_REFRESH=quiet”.

  • for this whole tutorial to work, you need to setup payment method in open ai in order to use that API in the auto-gpt

  • TypeError: unsupported operand type(s) for |: ‘type’ and ‘NoneType’
    I get this error. enyone know how to solve it?

  • Used this walk-through and it worked well for me, thanks so much.

    However, now I face a problem. I get Auto-GBT up and running and as I give it a name/goals and start it, it just sits there and says “Thinking…”. Has anybody else faced this issue? If so how do I fix it?

  • This is what I get when I try to start it:

    C:\Users\ben\Auto-GPT-0.3.0\Auto-GPT-0.3.0>python -m autogpt
    Traceback (most recent call last):
    File “”, line 189, in _run_module_as_main
    File “”, line 148, in _get_module_details
    File “”, line 112, in _get_module_details
    File “C:\Users\ben\Auto-GPT-0.3.0\Auto-GPT-0.3.0\autogpt\__init__.py”, line 5, in
    from dotenv import load_dotenv
    ModuleNotFoundError: No module named ‘dotenv’

    • Hey Benjamin, I had the same error message. Did you ever get an answer? if so I would appreciate the shared knowledge. Thanks

    • For me, the problem was about the inconstancy between different versions of python on my PC. I added the new python.exe file location to the Path in Environment variables and the issue got resolved.

  • I think the error I was getting was because I did not have Git installed on my computer. Once that was installed, it ran without error.

  • Hello, great tutorial, thank you! I have the feeling that I am almost done but I get an error when I want to start autogpt.

    Coiuld you help me? I want to work with AUTO-GPT so badly!

    Here is the text of the command prompt:

    46]
    (c) Microsoft Corporation. All rights reserved.

    C:\WINDOWS\system32>cd C:\Program Files\AutoGPT\Auto-GPT-0.3.0

    C:\Program Files\AutoGPT\Auto-GPT-0.3.0>python -m autogpt
    Traceback (most recent call last):
    File “C:\Users\HP\AppData\Local\Programs\Python\Python311\Lib\site-packages\git\__init__.py”, line 89, in
    refresh()
    File “C:\Users\HP\AppData\Local\Programs\Python\Python311\Lib\site-packages\git\__init__.py”, line 76, in refresh
    if not Git.refresh(path=path):
    ^^^^^^^^^^^^^^^^^^^^^^
    File “C:\Users\HP\AppData\Local\Programs\Python\Python311\Lib\site-packages\git\cmd.py”, line 392, in refresh
    raise ImportError(err)
    ImportError: Bad git executable.
    The git executable must be specified in one of the following ways:
    – be included in your $PATH
    – be set via $GIT_PYTHON_GIT_EXECUTABLE
    – explicitly set via git.refresh()

    All git commands will error until this is rectified.

    This initial warning can be silenced or aggravated in the future by setting the
    $GIT_PYTHON_REFRESH environment variable. Use one of the following values:
    – quiet|q|silence|s|none|n|0: for no warning or exception
    – warn|w|warning|1: for a printed warning
    – error|e|raise|r|2: for a raised exception

    Example:
    export GIT_PYTHON_REFRESH=quiet

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
    File “”, line 198, in _run_module_as_main
    File “”, line 88, in _run_code
    File “C:\Program Files\AutoGPT\Auto-GPT-0.3.0\autogpt\__main__.py”, line 5, in
    autogpt.cli.main()
    File “C:\Users\HP\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py”, line 1130, in __call__
    return self.main(*args, **kwargs)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
    File “C:\Users\HP\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py”, line 1055, in main
    rv = self.invoke(ctx)
    ^^^^^^^^^^^^^^^^
    File “C:\Users\HP\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py”, line 1635, in invoke
    rv = super().invoke(ctx)
    ^^^^^^^^^^^^^^^^^^^
    File “C:\Users\HP\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py”, line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File “C:\Users\HP\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py”, line 760, in invoke
    return __callback(*args, **kwargs)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File “C:\Users\HP\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\decorators.py”, line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File “C:\Program Files\AutoGPT\Auto-GPT-0.3.0\autogpt\cli.py”, line 87, in main
    from autogpt.main import run_auto_gpt
    File “C:\Program Files\AutoGPT\Auto-GPT-0.3.0\autogpt\main.py”, line 8, in
    from autogpt.agent.agent import Agent
    File “C:\Program Files\AutoGPT\Auto-GPT-0.3.0\autogpt\agent\__init__.py”, line 1, in
    from autogpt.agent.agent import Agent
    File “C:\Program Files\AutoGPT\Auto-GPT-0.3.0\autogpt\agent\agent.py”, line 12, in
    from autogpt.utils import clean_input
    File “C:\Program Files\AutoGPT\Auto-GPT-0.3.0\autogpt\utils.py”, line 7, in
    from git.repo import Repo
    File “C:\Users\HP\AppData\Local\Programs\Python\Python311\Lib\site-packages\git\__init__.py”, line 91, in
    raise ImportError(“Failed to initialize: {0}”.format(exc)) from exc
    ImportError: Failed to initialize: Bad git executable.
    The git executable must be specified in one of the following ways:
    – be included in your $PATH
    – be set via $GIT_PYTHON_GIT_EXECUTABLE
    – explicitly set via git.refresh()

    All git commands will error until this is rectified.

    This initial warning can be silenced or aggravated in the future by setting the
    $GIT_PYTHON_REFRESH environment variable. Use one of the following values:
    – quiet|q|silence|s|none|n|0: for no warning or exception
    – warn|w|warning|1: for a printed warning
    – error|e|raise|r|2: for a raised exception

    Example:
    export GIT_PYTHON_REFRESH=quiet

    C:\Program Files\AutoGPT\Auto-GPT-0.3.0>

    • @Michiel Smissaert Run comman in prompt :
      set GIT_PYTHON_REFRESH=quiet
      and your issue will resolve

    • Hi just type set GIT_PYTHON_REFRESH=quiet in your Windows command line to solve this problem.

      • I had the same issue above and I entered “set GIT_PYTHON_REFRESH=quiet” into the command line. This did not produce any result/output and I tried reentering “python -m autogpt” into the command line again, but got the same error… any thoughts?

    • I have the same problem and simply typing in the command “set GIT_PYTHON_REFRESH=quiet” in the Windows command doesn’t rectify the issue.

      What am I doing wrong?

  • This article is now incorrect and will not allow someone following it to execute autogpt successfully. It needs to be updated

Leave a Reply