AutoGPT: Download, Install, Setup, Use, with Example

Advertisement

AutoGPT, Is one of the great tools in AI to do automation on localhost or on the clout platform with docker.

You can use it anywhere you want.

You can do whatever you want.

The most amazing features of AutoGPT are:

  • Internet access for searches and information gathering
  • Long-term and short-term memory management
  • GPT-4 instances for text generation
  • Access to popular websites and platforms
  • File storage and summarization with GPT-3.5
  • Extensibility with Plugins

So, Without wasting time let’s see how to install, and use AutoGPT with an example.

You are going to learn:

Top ↑

Download AutoGPT from GitHub Download AutoGPT from GitHub

Always use the latest version of AutoGPT.

Step 1: Visit https://github.com/Significant-Gravitas/Auto-GPT/releases/latest

AutoGPT: Download, Install, Setup, Use, with Example 1
GitHub download page for AutoGPT

Step 2: Scroll down to the Assets section and download the Source code (zip) or Source code (tar.gz)

AutoGPT: Download, Install, Setup, Use, with Example 2
Download the Source code of AutoGPT

Step 3: Create a directory and unzip the files where you want.

I have created a directory AI into the c:\ drive and unzipped the files which created the new directory Auto-GPT-0.2.2

AutoGPT: Download, Install, Setup, Use, with Example 3
Unzipped the AutoGPT downloaded file

Note: Here, I am using the old version Auto-GPT-0.2.2. Always refer to the new version.

Top ↑

Install Anaconda for Python Install Anaconda for Python

To use AutoGPT, we need the Python environment.

The Anaconda provides the same environment which we want.

If you are new here, or aware of Anaconda then don’t worry.

Just follow below simple steps:

Step 1: Visit the site and click on the download button

AutoGPT: Download, Install, Setup, Use, with Example 4
Download Anaconda software for Windows Operating System

Note: If you are using MacOS or another operating system then the website detects it and shows the exact download button as per operating system.

Step 2: Install Anaconda: Just like any other software just click next, next, next, and ok.

AutoGPT: Download, Install, Setup, Use, with Example 5
Anaconda Installation Step 1: Welcome screen

Note: I’m avoiding other installation steps to keep this article as small as possible.

Top ↑

Open Terminal with Admin Privileges Open Terminal with Admin Privileges

To set up the Python environment for AutoGPT, we need to use:

  • Windows PowerShell
  • Command Prompt
  • Git Bash
  • Terminal

Anyone with admin privileges will work.

Sharing some screenshots to see how to open the terminal with Administrator privileges.

Open Windows PowerShell with Administrator privileges Open Windows PowerShell with Administrator privileges

AutoGPT: Download, Install, Setup, Use, with Example 6
Open Windows PowerShell with Administrator privileges

Top ↑

Open Command Prompt with Administrator privileges Open Command Prompt with Administrator privileges

AutoGPT: Download, Install, Setup, Use, with Example 7
Open Command Prompt with Administrator privileges

Top ↑

Open GitBash with Administrator privileges Open GitBash with Administrator privileges

AutoGPT: Download, Install, Setup, Use, with Example 8
Open GitBash with Administrator privileges

Top ↑

Setup AutoGPT Environment with Anaconda Setup AutoGPT Environment with Anaconda

After opening the command prompt or terminal with admin privileges then you are able to perform the next steps.

I’m using Git Bash so, sharing the screenshots of them.

It’ll be the same commands on different terminals so keep the below screenshots just for your reference.

Step 1: Create Anaconda python environment for auto-gpt with conda create command.

Use the below command to setup the auto-gpt:

conda create -n auto-gpt python=3.8
AutoGPT: Download, Install, Setup, Use, with Example 9
Git Bash creating Anaconda python environment for auto-gpt

After executing the command you’ll get some permissions as below:

AutoGPT: Download, Install, Setup, Use, with Example 10
Anaconda environment setup permissions

Just press y the key from the keyboard and press enter a key to proceed.

Top ↑

Install AutoGPT Requirements Install AutoGPT Requirements

Navigate to the AutoGPT directory:

As we have unzipped the AutoGPT in c:/AI/Auto-GPT-0.2.2 the directory so just go to that directory from the same terminal.

I’m using the below command to Auto-GPT-0.2.2

cd /c/ai/Auto-GPT-0.2.2
AutoGPT: Download, Install, Setup, Use, with Example 11
Navigate to c:/ai/Auto-GPT-0.2.2 directory.

Note: You can navigate to your directory where you have unzipped the Auto-GPT.

Install AutoGPT Requirements

Use command:

pip install -r requirements.txt
AutoGPT: Download, Install, Setup, Use, with Example 12
Install the AutoGPT requirements with the pip install command.

The installation requirements take a bit of time depending on your internet connection.

After successful installation you’ll see the message something as below:

AutoGPT: Download, Install, Setup, Use, with Example 13
Successfully installed AutoGPT requirements.

Top ↑

Create the .env file Create the .env file

Create the

Use the below command:

cp .env.template .env

The above command simply copies the file .env.template and create a new file .env

You can do it manually as well.

Top ↑

Add OpenAI API key Add OpenAI API key

Step 1: Open the .env file and find the OPENAI_API_KEY

AutoGPT: Download, Install, Setup, Use, with Example 14
OpenAI API Key

Top ↑

Setup the OpenAI Account, Payments, and API keys Setup the OpenAI Account, Payments, and API keys

Top ↑

Create OpenAI API key Create OpenAI API key

To create the OpenAI API key follow the below steps:

Step 1: Login or Register OpenAI website

Step 2: Setup the Payment Methods

Note: OpenAI is not expensive. To use the OpenAI API, you need to add some amount to your account.

AutoGPT: Download, Install, Setup, Use, with Example 15
Add a new Payment Method in the OpenAI platform.

Step 3: IMPORTANT – Set the Usage limits in the OpenAI platform

It’s important to set the usage limit as we using the AutoGPT + GPT4 APIs.

If you do not set the limit then it may cause an unnecessary loss of money.

So, Set the usage limit for your financial safety.

After adding the amount you can see it in the usage limit section something as below:

AutoGPT: Download, Install, Setup, Use, with Example 16
Set usage limit in the OpenAI platform

Here, You can see:

  • Approved usage limit – I have added a $120.00 amount to use the OpenAI APIs.
  • Current usage – This month, I have used $0.72 amount for the OpenAI APIs.
  • Hard limit – I have set the $60.00 hard limit for my usage. So, When it reaches that amount my OpenAI API requests will work.
  • Soft limit – I have set the $50.00 soft limit for my usage. So, When it reaches that amount then I get an email notification about it to take further action.

Thats it.

Top ↑

Create the OpenAI API Keys Create the OpenAI API Keys

AutoGPT: Download, Install, Setup, Use, with Example 17
Create new OpenAI API keys
AutoGPT: Download, Install, Setup, Use, with Example 18
Created the new API key

Just copy the API key and paste it into the OPENAI_API_KEY from .env file

AutoGPT: Download, Install, Setup, Use, with Example 19
Add the API key to the AutoGPT .env file

Top ↑

Activate Conda AutoGPT Activate Conda AutoGPT

To activate the AutoGPT follow the below command:

conda activate auto-gpt
AutoGPT: Download, Install, Setup, Use, with Example 20
Activate AutoGPT with the conda activate auto-gpt command

Top ↑

Run AutoGPT Run AutoGPT

Now, Everything is ready to use the AutoGPT.

Execute the file run.sh from Git Bash. Or If you using another Windows terminal then use run.bat file.

I’m using Git Bash so using the run.sh as below:

AutoGPT: Download, Install, Setup, Use, with Example 21
AutoGPT: Download, Install, Setup, Use, with Example 28

For the first time, It prepares the setup and downloads the necessary packages:

AutoGPT: Download, Install, Setup, Use, with Example 22
Download and install the necessary packages for AutoGPT to start

Top ↑

Use the AutoGPT Use the AutoGPT

Finally, You see the Welcome screen something as below:

AutoGPT: Download, Install, Setup, Use, with Example 23
AutoGPT welcome message

Step 1: Enter the AI Name.

You can enter any name which you want.

I’m entering the CoderPro name as:

AutoGPT: Download, Install, Setup, Use, with Example 24
Add the AI name in AutoGPT

Step 2: Add the AI role to the description

I have added the AI description as “A full stack developer

AutoGPT: Download, Install, Setup, Use, with Example 25
Add the AI role to the description

(Ah! Typo mistake 😀 – It’s the full-stack, not full stack.)

Step 3: Add the goals to do with AutoGPT

Now, You can add the goals which you want to achieve with AutoGPT

AutoGPT: Download, Install, Setup, Use, with Example 26
Add goals in AutoGPT to achieve.

For this tutorial, I have added 4 goals below:

Goal 1: Create a file hello-world.html into the c:\ai\Auto-GPT-0.2.2
Goal 2: Add a card HTML markup with the heading, sub-heading, and with button
Goal 3: Design the card with CSS
Goal 4: Put the code into the hello-world.html file and stop.

Let’s see how it works.

Note: After entering the 4th goal, you see Goal 5, Just press enter without adding anything to start the AutoGPT to generate process.

For me, After 15 seconds the AutoGPT generates the HTML page.

See what the HTML page looks like:

AutoGPT: Download, Install, Setup, Use, with Example 27
A Simple HTML page generated with AutoGPT

Below is the HTML markup which is generated by the AutoGPT bot

<!DOCTYPE html>
<html>
<head>
<title>Hello World</title>
<style>
.card {
  box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
  transition: 0.3s;
  width: 50%;
  margin: auto;
}

.card:hover {
  box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
}

.container {
  padding: 2px 16px;
}
</style>
</head>
<body>

<h2>Hello World</h2>

<div class="card">
  <div class="container">
    <h4><b>Card Heading</b></h4>
    <p>Card Sub-heading</p>
    <button>Button</button>
  </div>
</div>

</body>
</html>

We can see, the heading and the card generated as expected.

Not a more interesting page. But it is automated.

This is just a demo example of how to use AutoGPT.

Top ↑

What’s next? What’s next?

You can use AutoGPT as an assistant, do social automation, coding, design, etc.

AutoGPT allows you to do any kind of automation which uses the live internet.

Top ↑

How to set the OpenAI API key in AutoGPT? How to set the OpenAI API key in AutoGPT?

Open the file .env from the AutoGPT directory.

Find the OPENAI_API_KEY and add your API key.

To generate the API key, read the above article.

Top ↑

Can I enable the local command execution in AutoGPT? Can I enable the local command execution in AutoGPT?

Yes. With the help of a .env file, you can set up it.

EXECUTE_LOCAL_COMMANDS=true

By default it’s false.

Top ↑

Can I define a custom user agent while browsing the internet with AutoGPT? Can I define a custom user agent while browsing the internet with AutoGPT?

Yes. With the .env file, you can do it.

USER_AGENT={user-agent}

You can add your user agent.

Top ↑

Can I change the smart language model? Can I change the smart language model?

Yes. You can.

SMART_LLM_MODEL={model}

By default, the smart model is gpt-4

Top ↑

Can I change the fast language model? Can I change the fast language model?

Yes. You can.

FAST_LLM_MODEL={model}

By default, the smart model is gpt-3.5-turbo

Top ↑

How to set the fast token limit for OpenAI in AutoGPT? How to set the fast token limit for OpenAI in AutoGPT?

Yes. You can.

FAST_TOKEN_LIMIT={limit}

By default, the limit is 4000.

Top ↑

How to set the smart token limit for OpenAI in AutoGPT? How to set the smart token limit for OpenAI in AutoGPT?

Yes. You can.

SMART_TOKEN_LIMIT={limit}

By default, the limit is 8000.

Top ↑

Can I change the memory for AutoGPT? Can I change the memory for AutoGPT?

Yes. You can.

MEMORY_BACKEND={memory-type}

By default, the memory type is local.

Top ↑

Can I change the memory index for AutoGPT? Can I change the memory index for AutoGPT?

Yes. You can.

MEMORY_INDEX={index}

By default, the index is auto-gpt.

Top ↑

Can I use GitHub with AutoGPT? Can I use GitHub with AutoGPT?

Yes. You can.

GITHUB_API_KEY={github-key}
GITHUB_USERNAME={github-username}

Top ↑

Can I use Twitter with AutoGPT? Can I use Twitter with AutoGPT?

Yes. You can.

TW_CONSUMER_KEY={key}
TW_CONSUMER_SECRET={secret}
TW_ACCESS_TOKEN={token}
TW_ACCESS_TOKEN_SECRET={token-secret}

Top ↑

Can I use my custom Google API keys in AutoGPT? Can I use my custom Google API keys in AutoGPT?

Yes. You can.

Open the file .env and add/update the below code with your Google API keys.

GOOGLE_API_KEY={api-key}
CUSTOM_SEARCH_ENGINE_ID={search-engine-id}

Leave a Reply