0% found this document useful (0 votes)
244 views23 pages

Getting Started With Auto-GPT For Beginners - Setup & Usage

This document provides instructions on how to set up and use Auto-GPT, an experimental open-source application that uses multiple instances of GPT-4 to complete tasks without much human input. It covers the requirements, installing Python, Git, and Auto-GPT from GitHub, and configuring API keys to run Auto-GPT.

Uploaded by

Jonathan Peters
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
244 views23 pages

Getting Started With Auto-GPT For Beginners - Setup & Usage

This document provides instructions on how to set up and use Auto-GPT, an experimental open-source application that uses multiple instances of GPT-4 to complete tasks without much human input. It covers the requirements, installing Python, Git, and Auto-GPT from GitHub, and configuring API keys to run Auto-GPT.

Uploaded by

Jonathan Peters
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

4/12/23, 3:38 AM Getting Started with Auto-GPT for Beginners: Setup & Usage

P — PYTHON

Getting
GPT for Started with
Beginners: Auto-
Setup &
Usage
by EdXD · Updated April 12, 2023 ·  No comments ·  7 minute read

https://bytexd.com/getting-started-with-auto-gpt-for-beginners-setup-usage/ 1/23
4/12/23, 3:38 AM Getting Started with Auto-GPT for Beginners: Setup & Usage

Auto-GPT is an experimental open-source application that shows off the abilities of the
well-known GPT-4 language model.
It uses GPT-4 to perform complex tasks and achieve goals without much human input.
Auto-GPT links together multiple instances of OpenAI’s GPT model, allowing it to do
things like complete tasks without help, write and debug code, and correct its own writing
mistakes.
Instead of simply asking ChatGPT to create code, Auto-GPT makes several AI agents work
together to develop websites, create newsletters, compile online pages based on user
https://bytexd.com/getting-started-with-auto-gpt-for-beginners-setup-usage/ 2/23
4/12/23, 3:38 AM Getting Started with Auto-GPT for Beginners: Setup & Usage

requests, and more. This level of independence is an essential feature of Auto-GPT, as it turns
the language model into a more capable agent that can act and learn from its errors.

## Quick Demo
This is a quick demo of me using Auto-GPT to find topics for my Linux blog. I don’t go through
with it until the end because it would take some time. But this should give you a good idea of
what Auto-GPT can do.

You can give Auto-GPT tasks such as:


Improve my online store’s web presence at storexd.com (not a real site)
Help grow my Linux-themed socks business
https://bytexd.com/getting-started-with-auto-gpt-for-beginners-setup-usage/ 3/23
4/12/23, 3:38 AM Getting Started with Auto-GPT for Beginners: Setup & Usage

Collect all competing Linux tutorial blogs and save them to a CSV file
Code a Python app that does X
Auto-GPT has a framework to follow and tools to use, including:
Browsing websites
Searching Google
Connecting to ElevenLabs for text-to-speech (like Jarvis from Iron Man)
Evaluating its own thoughts, plans, and criticisms to self-improve
Running code
Reading/writing files on your hard drive
And more
This push for autonomy is part of ongoing AI research to create models that can simulate
thought, reason, and self-critique to complete various tasks and subtasks.
In this tutorial we’ll install Auto-GPT on your local computer, and we’ll also cover a bit
on how to use it and some additional considerations.
The steps are laid out in a beginner friendly way, so you don’t need to have in-depth
programming knowledge to set it up.
If you’re not familiar with Python, Git, or JSON syntax you may feel a little
intimidated, but you can still run it just the same. The process will probably seem a
bit confusing until you’re up and running.
TABLE OF CONTENTS

https://bytexd.com/getting-started-with-auto-gpt-for-beginners-setup-usage/ 4/23
4/12/23, 3:38 AM Getting Started with Auto-GPT for Beginners: Setup & Usage

1 Quick Demo
2 Requirements
(Optional) Set OpenAI Usage Limit
Install Python
Install Git
Install virtualenvwrapper (Optional)
3 Install Auto-GPT
Video Demo Installing Auto-GPT
Download Auto-GPT from Github
4 Configure Auto-GPT API Keys
Run Auto-GPT
Troubleshooting
“Warning: Failed to parse AI output, attempting to fix.” Loop
5 Conclusion
6 Resources & Acknowledgements

## Requirements
To run Auto-GPT, the minimum requirements are:
Pretty much any modern device. Even a low spec laptop or small server.
Python 3.7 or later and Git installed
An OpenAI Account and API Key
Optional: If you want the AI to speak you also need an ElevenLabs.io Account and API
Key

https://bytexd.com/getting-started-with-auto-gpt-for-beginners-setup-usage/ 5/23
### (Optional) Set OpenAI Usage Limit
4/12/23, 3:38 AM Getting Started with Auto-GPT for Beginners: Setup & Usage

Please keep in mind that your OpenAI API account charges you based on usage. Given that
Auto-GPT aims at being autonomous, it may be tempting to let it do it’s thing without
supervision, however sometimes it may throw errors repeatedly and will use up your funds.
Auto-GPT asks you what you want to do at every step by default, however you can also let it
do it’s thing for a number of steps or you can enable continuous mode, which you should be
careful with.
A good idea is to set usage limits in OpenAI https://platform.openai.com/account/billing/limits.

https://bytexd.com/getting-started-with-auto-gpt-for-beginners-setup-usage/ 6/23
4/12/23, 3:38 AM Getting Started with Auto-GPT for Beginners: Setup & Usage

You can set lower limits than mine. Auto-GPT doesn’t use many tokens. I’ve used it multiple
times and I’ve only used $1.59 over the past week.

### Install Python


https://bytexd.com/getting-started-with-auto-gpt-for-beginners-setup-usage/ 7/23
4/12/23, 3:38 AM Getting Started with Auto-GPT for Beginners: Setup & Usage

Python is a versatile programming language that’s user-friendly and widely used for AI
projects like Auto-GPT. Even if you’re not familiar with it, no worries!
You only need to install Python to run Auto-GPT.
To install it use this short tutorial that shows how to install it for Windows/Mac or
Linux https://python.land/installing-python.

### Install Git


To install Git go here (it’s a simple tutorial) https://github.com/git-guides/install-git and follow
the instructions corresponding to your operating system.
Git is a tool that helps developers keep track of their code, collaborate with others, and
handle different stages of a project. Imagine it as a smart “undo” and “redo” button that
makes organizing your projects a breeze.
GitHub is an online platform where people store and share their projects, making it easy
for others to access, contribute, or learn from them. Auto-GPT is one of these projects.
For our purposes, you just need to know how to download a Auto-GPT, or “pull” it,
from GitHub.
After installing Git on your computer, we’ll show you how to grab the Auto-GPT repo
in a few easy steps, so you can start using it in no time.

https://bytexd.com/getting-started-with-auto-gpt-for-beginners-setup-usage/ 8/23
### Install virtualenvwrapper (Optional)
4/12/23, 3:38 AM Getting Started with Auto-GPT for Beginners: Setup & Usage

I also recommend using virtualenvwrapper to install Auto-GPT, although this is optional.


Virtualenv and virtualenvwrapper are tools used in Python to create isolated
environments for your projects. They help keep each project’s packages and
dependencies separate, avoiding conflicts between them. You can think of it like a
sandbox, or VirtualBox or VMWare (if you’re familiar with them) but for Python.
Virtualenv is the basic tool that creates these environments, while virtualenvwrapper is an
extension that makes managing multiple environments easier and more convenient.
For Auto-GPT, using a virtual environment is beneficial because it has specific packages it
depends on. By creating a separate environment, you ensure that these packages won’t
interfere with other projects, making it safer and more organized.
We’ll easily install it using pip that comes with Python. Pip is a tool used in Python
for installing and managing packages, which are reusable pieces of code or libraries
that add functionality to your projects.
With pip, you can easily install, update, and remove packages from your Python
environment.

#### Install virtualenvwrapper on Linux/OS X


Open a terminal and run:
https://bytexd.com/getting-started-with-auto-gpt-for-beginners-setup-usage/ 9/23
4/12/23, 3:38 AM Getting Started with Auto-GPT for Beginners: Setup & Usage

$ pip install virtualenvwrapper

If you encounter the command not found error after installing it, check our related post on how
to fix it Fix Virtualenvwrapper workon/mkvirtualenv: command not found.

#### Install virtualenvwrapper on Windows


Open cmd or Powershell or your preferred terminal emulator and run:
$ pip install virtualenvwrapper-win

#### Create & Activate a Virtual Environment


Now that we’ve got virtualenvwrapper installed we can easily create a virtual environment and
then we’ll install Auto-GPT.
To do this run your operating system’s terminal and navigate to the directory where you’d like
to install Auto-GPT.
Then run the following command replacing name_of_virtual_environment with whatever
name you want, like autogpt .
$ mkvirtualenv name_of_virtual_environment

Example

https://bytexd.com/getting-started-with-auto-gpt-for-beginners-setup-usage/ 10/23
4/12/23, 3:38 AM Getting Started with Auto-GPT for Beginners: Setup & Usage

$ mkvirtualenv autogpt

#### Deactivate & Reactivate a Virtual Environment


To deactivate a virtual environment simply run the following command (or close the
terminal):
$ deactivate

To reactivate the virtual environment run:


$ workon name_of_virtual_environment

## Install Auto-GPT
Assuming you have all the requirements, we can get to installing Auto-GPT.

### Video Demo Installing Auto-GPT


This is a quick demo of me downloading Auto-GPT from Github and installing it’s
dependencies.

https://bytexd.com/getting-started-with-auto-gpt-for-beginners-setup-usage/ 11/23
4/12/23, 3:38 AM Getting Started with Auto-GPT for Beginners: Setup & Usage

### Download Auto-GPT from Github


To install Auto-GPT on your computer you just have to download it from Github and then
install some of its’ dependencies.
To do this, navigate the the directory where you want it downloaded, activate the virtual
environment you want to use (if you want to use one), and run:
$ git clone https://github.com/Torantulino/Auto-GPT.git

Next cd into the newly created Auto-GPT directory and run the following command to install
Auto-GPT’s dependencies. This will take a minute or so.
https://bytexd.com/getting-started-with-auto-gpt-for-beginners-setup-usage/ 12/23
4/12/23, 3:38 AM Getting Started with Auto-GPT for Beginners: Setup & Usage

$ pip install -r requirements.txt

$ pip install -r requirements.txt

## Configure Auto-GPT API Keys


Next we’ll need to use OpenAI’s API Keys so that Auto-GPT can use the GPT API.
You can generate an API key here https://platform.openai.com/account/api-keys.

https://bytexd.com/getting-started-with-auto-gpt-for-beginners-setup-usage/ 13/23
4/12/23, 3:38 AM Getting Started with Auto-GPT for Beginners: Setup & Usage

Make sure to keep that key secret because it’s like a password to using GPT from your account. If
someone else has access to it, it’s all they need to use GPT and use up your funds.

#### Edit The .env.template File


We’ll want to take that API Key from OpenAI and edit the .env.template file located in the
Auto-GPT directory.
If you don’t see it, depending on your operating system, it’s probably hidden. So make sure to
enable viewing hidden files.

https://bytexd.com/getting-started-with-auto-gpt-for-beginners-setup-usage/ 14/23
4/12/23, 3:38 AM Getting Started with Auto-GPT for Beginners: Setup & Usage

First, rename .env.template to .env (including the dot . )

After, if you open it up it will look something like the code below. Replace
your-openai-api-key with your actual OpenAI API key.

You can ignore all the other values right now, because we just want to get this up and running.
https://bytexd.com/getting-started-with-auto-gpt-for-beginners-setup-usage/ 15/23
4/12/23, 3:38 AM Getting Started with Auto-GPT for Beginners: Setup & Usage

PINECONE_API_KEY=your-pinecone-api-key
PINECONE_ENV=your-pinecone-region
OPENAI_API_KEY= your-openai-api-key
ELEVENLABS_API_KEY=your-elevenlabs-api-key
SMART_LLM_MODEL="gpt-4"
FAST_LLM_MODEL="gpt-3.5-turbo"
GOOGLE_API_KEY=
CUSTOM_SEARCH_ENGINE_ID=
USE_AZURE=False
OPENAI_API_BASE=your-base-url-for-azure
OPENAI_API_VERSION=api-version-for-azure
OPENAI_DEPLOYMENT_ID=deployment-id-for-azure
IMAGE_PROVIDER=dalle
HUGGINGFACE_API_TOKEN=

Save and close the file when you’re done.

### Run Auto-GPT


Finally we can run Auto-GPT.
To do this just run the following command in your command-line while in your Auto-GPT
directory (and with your virtual environment activated if you are using one):
$ python scripts/main.py

https://bytexd.com/getting-started-with-auto-gpt-for-beginners-setup-usage/ 16/23
4/12/23, 3:38 AM Getting Started with Auto-GPT for Beginners: Setup & Usage

If everything worked you should see a text welcoming you back, and if you’d like to use the
task given to Auto-GPT from the last run.

You can continue by inputting y or start a new task by inputting n .


That’s it! You can now start using Auto-GPT on your computer.

### Troubleshooting
### “Warning: Failed to parse AI output,
attempting to fix.” Loop
If you encounter this error, at the time of writing and in my experience, it’s best to just hit
Ctrl+Z to stop it and start over.
Error: Invalid JSON
{'thoughts': {'text': '...'}, 'command': {'name': 'browse_website',
'args': {'url': 'https://example.com'}}}

https://bytexd.com/getting-started-with-auto-gpt-for-beginners-setup-usage/ 17/23
4/12/23, 3:38 AM Getting Started with Auto-GPT for Beginners: Setup & Usage
PRODUCT FETCHER THOUGHTS:
REASONING:
CRITICISM:
Warning: Failed to parse AI output, attempting to fix.

If you see this warning frequently, it's likely that your prompt is
confusing the AI. Try changing it up slightly.
Failed to fix ai output, telling the AI.
NEXT ACTION: COMMAND = Error: ARGUMENTS = string indices must be
integers, not 'str'
SYSTEM: Command Error: returned: Unknown command Error:
Warning: Failed to parse AI output, attempting to fix.

If you see this warning frequently, it's likely that your prompt is
confusing the AI. Try changing it up slightly.
Failed to fix ai output, telling the AI.

## Conclusion
Stacking AI models on top of one another in order to complete more complex tasks does not
mean we’re about to see the emergence of artificial general intelligence let systems run
continuously and accomplish tasks with less human intervention and oversight. 
These examples don’t even show that GPT-4 is even necessarily “autonomous,” but that with
plug-ins and other techniques, it has greatly improved its ability to self-reflect and self-
critique, and introduces a new stage of prompt engineering that can result in more accurate
responses from the language model.
Hopefully this helped you get started with Auto-GPT. We’ll update this article or post new
ones with more information on how to use it.

https://bytexd.com/getting-started-with-auto-gpt-for-beginners-setup-usage/ 18/23
4/12/23, 3:38 AM Getting Started with Auto-GPT for Beginners: Setup & Usage

If you have any questions or feedback please feel free to let us know in the comments and
we’ll get back to you as soon as we can.

## Resources & Acknowledgements


Developers Are Connecting Multiple AI Agents to Make More ‘Autonomous’ AI – Helped
me explain a few concepts about Auto-GPT

 SHARE  TWEET  

EdXD
 

 Subscribe  Login

Be the First to Comment!

{} [+] 

 Name* POST COMMENT

 Email 

https://bytexd.com/getting-started-with-auto-gpt-for-beginners-setup-usage/ 19/23
4/12/23, 3:38 AM Getting Started with Auto-GPT for Beginners: Setup & Usage

 Website 

0 COMMENTS  

 — PREVIOUS ARTICLE
Resolving Git Authentication Issues Despite
Successful 'gh auth login' in GitHub CLI
YOU MAY ALSO LIKE
P — PYTHON

Python: How to Use


the If-Else Statement
in One Line
by EdXD · Updated January 3, 2023
Conditional statements in python are commands
for controlling actions and decisions. These
conditional constructs take action based on…
https://bytexd.com/getting-started-with-auto-gpt-for-beginners-setup-usage/ 20/23
4/12/23, 3:38 AM Getting Started with Auto-GPT for Beginners: Setup & Usage

L — LINUX

Fix Virtualenvwrapper
workon/mkvirtualenv:
command not found
by EdXD · Updated April 9, 2023
In this tutorial we’ll cover how to fix the
mkvirtualenv: command not found or workon:
command not founderror…

M — MACHINE LEARNING

Get Started with


Facebook Segment
Anything (SAM) in
Colab
by EdXD · Updated April 9, 2023
Facebook’s Segment Anything Model (SAM) is a
new and open-source state of the art computer
vision model designed…

https://bytexd.com/getting-started-with-auto-gpt-for-beginners-setup-usage/ 21/23
4/12/23, 3:38 AM Getting Started with Auto-GPT for Beginners: Setup & Usage

P — PYTHON

How to Write to a CSV


File in Python
by EdXD · Updated January 9, 2023
Knowing how to write to a CSV file in Python is
essential for handling excel-related files and
automating…

M — MACHINE LEARNING

Get Started with


Scikit-Learn: A
Machine Learning
Guide
by Mahmud Hasan Saikot ·
Updated January 24, 2023
Scikit-learn, sometimes referred to as sklearn, is
a Python machine learning framework that
simplifies and speeds up the…

FEATURED POSTS

https://bytexd.com/getting-started-with-auto-gpt-for-beginners-setup-usage/ 22/23
Resolving Git
4/12/23, 3:38 AM Getting Started with Auto-GPT for Beginners: Setup & Usage

Authentication Issues
Despite Successful ‘gh
auth login’ in GitHub CLI
Updated April 10, 2023
Motherboards with USB4
Updated April 10, 2023

Get Started with


Facebook Segment
Anything (SAM) in Colab
Updated April 9, 2023
Fix Virtualenvwrapper
workon/mkvirtualenv:
command not found
Updated April 9, 2023

© 2023 ByteXD.com
Contact Sitemap Privacy Policy Terms and Conditions Affiliate Disclosure

https://bytexd.com/getting-started-with-auto-gpt-for-beginners-setup-usage/ 23/23

You might also like