Connect with us

AI

How to use Auto-GPT

Uncover the magic behind this AI tool that elevates your internet searches, goal achievements, and task automation, and much more.

The image shows an example of AutoGPT, a machine learning system that can generate natural language text. Full Text: AutoGPT K
Image: KnowTechie

Auto-GPT is an open-source Python application that leverages OpenAI’s GPT-4, a large language model (LLM), to automate complex, multi-step projects and tasks. 

Auto GPT is a powerful tool that helps users generate high-quality written content at the press of the enter key. Unlike ChatGPT, Auto-GPT can search the internet for information, gather data, and complete tasks.

Consider it your very own personal assistant, taking care of tasks you don’t want to do or don’t have the time to tackle. Yea, we could all use one of these days to make our lives a bit easier and more efficient.

In this article, we’ll show you what you’ll need to get one of these AI agents up and running and the skills required.

Things to know before using Auto-GPT

In this image, the user is asking a GPT agent to find songs that match their mood, and is providing the GPT agent with the genre of music they prefer in order to help the agent find the best songs to add to the playlist. Full Text: PLAN: Ask the GPT agent to find songs that match your mood CRITICISM: I need to make sure that the songs provided by the GPT agent are appropriate for the playlist a nd match your mood. NEXT ACTION: COMMAND = message_agent ARGUMENTS = {'key': 0, 'message': 'Can you please find songs that mat Enter 'y' to authorise command, 'y -N' to run N continuous commands, 'n' to exit program, or enter feedback ch my mood? ' } for Input : y =-=-=-=-=-= COMMAND AUTHORISED BY USER SYSTEM: Command message_agent returned: Sure, I'd be happy to help you find some songs that match your hap py mood. What genre of music do you prefer? THOUGHTS: I think the next step is to provide the GPT agent with the genre of music you prefer. This will help the agent find songs that match your mood and preferred genre. REASONING: Providing the GPT agent with the genre of music you prefer will help it find songs that match y our mood and preferred genre. This will help me create a playlist that matches your mood and preferred genr e PLAN: Provide the GPT agent with the genre of music you prefer CRITICISM: I need to make sure that the genre of music provided to the GPT agent is accurate so that it ca n find the best songs to add to the playlist. NEXT ACTION: COMMAND = message_agent ARGUMENTS = {'key': 0, 'message': 'I prefer pop music. ' } Enter 'y' to authorise command, 'y -N' to run N continuous commands, 'n' to exit program, or enter feedback for .. Input:y === COMMAND AUTHORISED BY USER SYSTEM: Command message_agent returned: Great! Here are some pop songs that might match your happy mood: 1 "Happy" by Pharrell Williams 2. "Can't Stop the Feeling!" by Justin Timberlake 3. "Shut Up and Dance" by Walk the Moon 4. "Good Time" by Carly Rae Jepsen and Owl City 5. "I Gotta Feeling" by The Black Eyed Peas 6 "Uptown Funk" by Mark Ronson ft. Bruno Mars 7. "Love on Top" by Beyonce 8. "Walking on Sunshine" By katri na and the Waves 9. "Best Day of My Life" by American Authors 10. "I'm Yours" by Jason Mraz I hope you enjo y listening to these songs! Let me know if you need any more recommendations. A Thinking
Image: KnowTechie
  1. First, you should understand what Auto-GPT is and how it works. I wrote an introductory article here
  2. Following this Auto-GPT tutorial requires some basic programming experience and a laptop, as it requires a Python installation and other necessary dependencies.
  3. To use Auto-GPT, you will also need an OpenAI account to generate your API key. The API allows Auto-GPT to communicate with OpenAI’s GPT-4 and ChatGPT. Lastly, you’ll need access to GPT-4. There’s a waitlist here, and the wait times aren’t typically long.

Once you have all the things you’ll need, go ahead and create an OpenAI account here. You will come back to this later.

Quick Tip: Auto-GPT utilizes tokens.

A token can be seen as a measurement of words: One token is approximately four characters. Pricing is based on how many tokens you use in your prompt and output result.

How to Install Auto-GPT on your PC

Now we have everything we need to get started with Auto-GPT, now we are ready to run it. However, if you don’t already have Python installed, we’ll need to set it up first. Here’s how. 

Step 1: Install Python 

  1. Download Python from the official website and follow the steps to install it. For Windows users, make sure you tick the “Add python.exe to PATH” option during installation.
In this image, instructions are being provided on how to download the latest version of Python for Windows, Linux/UNIX, macOS, and other operating systems. Full Text: Download the latest version of Python Download Python 3.11.3 Looking for Python with a different OS? Python for Windows, Linux/UNIX, macOS, Other Want to help test development versions of Python? Prereleases, Docker images "K
Image: KnowTechie
  1. Test your Python installation to be sure everything is good to go. Open your command prompt or terminal and run “python –version” and “pip –version” to get the version number.

    Linux and MacOS users should use “python3” and “pip3” commands instead. 
This image shows a folder named "Auto-GPT-0.2.2" that was last modified on April 28, 2023 at 12:39 AM. Full Text: › This PC > Desktop > Auto-GPT-0.2.2 V Name Date modified Type Size Auto-GPT-0.2.2 4/28/2023 12:39 File folder ·K
Image: KnowTechie

Step 2: Get Auto-GPT Source Code and OpenAI API Key

Now that we have Python out of the way, we need to tie in OpenAi to our environment. Here’s how to do it.

  1. Next,  visit  Auto-GPT’s GitHub repository here to download the source code for the latest release. The other versions might be buggy, so it’s best to go for the latest one as it’s the most stable.
This image is showing the release of Auto-GPT version 0.2.2, which includes various bug fixes and improvements. Full Text: Product ~ Solutions . Open Source ~ Pricing Search 1 Sign in Sign up @ Significant-Gravitas / Auto-GPT Public Sponsor Notifications ¥ Fork 24.8k Star 126k Code O Issues 450 13 Pull requests 280 QDiscussions O Actions Projects DO Wiki Security Insights Releases / v0.2.2 Auto-GPT v0.2.2 Compare richbeales released this 2 weeks ago . 362 commits to stable since this release v0.2.2 - c9bf95e Welcome to Auto-GPT release 0.2.2. This is largely a release focussed on stability over 0.2.1. More exciting stuff will becoming in 0.3.0! What's Changed . Add "Memory Backend Setup" subtitle by @jakubbober in #1983 · benchmark json errors, clean json parsing code and implement json schema by @merwanehamadi in #1866 . Fixed new backends not being added to supported memory by @cryptidv in #1977 . Fix README.md by @MrBrain295 in #1925 . Add run scripts for shell by @lonrun in #1743 · data_ingestion.py 'no module named 'autogpt"" fix and ReadMe update by @Slowly-Grokking in #1679 · minimall add pytest by @0xArty in #1859 Change ci to pytest by @0xArty in #2009
  1. After downloading, double-click to extract the file to your local machine and save it in your preferred location.
This image shows a folder named "Auto-GPT-0.2.2" which was last modified on April 28th, 2023 at 12:39 AM. Full Text: > This PC > Desktop > Auto-GPT-0.2.2 v Name Date modified Type Size Auto-GPT-0.2.2 4/28/2023 12:39 File folder K
Image: KnowTechie
  1. Open the folder and look for the “.env.template” file. Open this with Notepad or your preferred text editor.
  2. Next, go to the OpenAI API dashboard and get your API secret key. If you don’t have one, click “Create new secret key.” Copy the created key and keep it somewhere safe.
  3. After that, move back to the text editor and paste the API’s secret key, as seen in the image below
This image is a .env.template file which contains settings for an Artificial Intelligence (AI) system, such as an API key and temperature settings. Full Text: .env.template - Notepad File Edit Format View Help ## AI_SETTINGS_FILE - Specifies which AI Settings file to use (defaults to ai_settings.yaml) # AI_SETTINGS_FILE=ai_settings.yaml ## ## ### LLM PROVIDER ## ### OPENAI ## OPENAI_API_KEY - OpenAI API Key (Example: my-openai-api-key) ## TEMPERATURE - Sets temperature in OpenAI (Default: 0) ## USE AZURE - Use Azure OnenAT or not (Default: False) OPENAI_API_KEY=your-openai-api-key # TEMPERATURE=0 # USE_AZURE=False K
Image: KnowTechie
  1. After saving the file, rename the “.env.template” file to just “.env

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

Alright, we’re almost there. The next step in the process is getting Auto-GPT installed on your device.  

  1. After adding your API key to the env file, select the Auto-GPT folder and choose the “Copy as path” option
The image is showing a folder on the desktop of a computer containing a file named "Auto-GPT-0.2.2" with its properties such as date modified, type, and size. Full Text: & Cut New item - V Open Copy path Easy access Edit Copy Paste Paste shortcut Move Copy Delete Rename New Properties to + to + folder History Clipboard Organize New Open > This PC > Desktop > Auto-GPT-0.2.2 V Sear Name Date modified Type Size Auto-GPT-0.2.2 4/28/2023 12:39 File folder İK
Image: KnowTechie
  1. Open Terminal, type cd with a space, paste the path you copied, and press enter. MacOS and Linux users can right-click and open the terminal inside the folder itself.
This image shows a folder named "Auto-GPT-0.2.2" which was last modified on April 28th, 2023 at 12:39 AM. Full Text: > This PC > Desktop > Auto-GPT-0.2.2 v Name Date modified Type Size Auto-GPT-0.2.2 4/28/2023 12:39 File folder K
Image: KnowTechie
  1. After completing the previous step, run “pip install -r requirements.txt” to automatically install all the necessary libraries for Auto-GPT. You may see a lot of technical text on your screen, and the process might take some time, but don’t worry; this means it’s working!
This image shows the process of installing various packages and libraries from the command line using the pip install command. Full Text: C: UsersHPOneDriveDesktopAuto-GPT-0.2.2Auto-GPT-0.2.2>pip install -r requirements.txt Collecting en_core_web_sm@ https://github.com/explosion/spacy-models/releases/download/en_core_web_s m-3.4.0/en_core_web_sm-3.4.0-py3-none-any.wh1 Downloading https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.4.0/en_co re_web_sm-3.4.0-py3-none-any.wh1 (12.8 MB) 12.8/12.8 MB 1.6 MB/s eta 0:00:00 Collecting beautifulsoup4 Downloading beautifulsoup4-4.12.2-py3-none-any.whl (142 KB) -- 143.0/143.0 KB 303.1 KB/s eta 0:00:00 Collecting colorama == 0.4.6 Downloading colorama-0.4.6-py2.py3-none-any.whl (25 KB) Collecting openai == 0.27.2 Downloading openai-0.27.2-py3-none-any.whl (70 KB) Collecting playsound == 1.2.2 -- 70.1/70.1 KB 636.7 KB/s eta 0:00:00 Downloading playsound-1.2.2-py2.py3-none-any.whl (6.0 KB) Collecting python-dotenv == 1.0.0 Downloading python_dotenv-1.0.0-py3-none-any.wh1 (19 KB) Collecting pyyaml == 6.0 Downloading PyYAML-6.0-cp39-cp39-win_amd64.wh1 (151 KB) 151.6/151.6 KB 3.0 MB/s eta 0:00:00 K
Image: KnowTechie
  1. Next, run “python -m autogpt” to start Auto-GPT on your system

How to Run Auto-GPT on your PC

Alright, now we’re in the home stretch. Finally, let’s take her out for a spin and see what she’s made off. 

  1. Auto-GPT will ask you to name the AI the first time you run it (“python -m autogpt”). For this tutorial, I am creating Playlist-GPT, which should be able to create a playlist based on my mood.

If you don’t want to create a specific AI, you can leave it blank and hit Enter, which loads the Entrepreneur-GPT by default. 

  1. The next steps would be to describe your AI’s role and enter up to 5 goals for your AI, as seen in my example in the image below
This image shows the process of installing various packages and libraries from the command line using the pip install command. Full Text: C: UsersHPOneDriveDesktopAuto-GPT-0.2.2Auto-GPT-0.2.2>pip install -r requirements.txt Collecting en_core_web_sm@ https://github.com/explosion/spacy-models/releases/download/en_core_web_s m-3.4.0/en_core_web_sm-3.4.0-py3-none-any.wh1 Downloading https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.4.0/en_co re_web_sm-3.4.0-py3-none-any.wh1 (12.8 MB) 12.8/12.8 MB 1.6 MB/s eta 0:00:00 Collecting beautifulsoup4 Downloading beautifulsoup4-4.12.2-py3-none-any.whl (142 KB) -- 143.0/143.0 KB 303.1 KB/s eta 0:00:00 Collecting colorama == 0.4.6 Downloading colorama-0.4.6-py2.py3-none-any.whl (25 KB) Collecting openai == 0.27.2 Downloading openai-0.27.2-py3-none-any.whl (70 KB) Collecting playsound == 1.2.2 -- 70.1/70.1 KB 636.7 KB/s eta 0:00:00 Downloading playsound-1.2.2-py2.py3-none-any.whl (6.0 KB) Collecting python-dotenv == 1.0.0 Downloading python_dotenv-1.0.0-py3-none-any.wh1 (19 KB) Collecting pyyaml == 6.0 Downloading PyYAML-6.0-cp39-cp39-win_amd64.wh1 (151 KB) 151.6/151.6 KB 3.0 MB/s eta 0:00:00 K
Image: KnowTechie
  1. Auto-GPT works in these ways
    • Thoughts: created based on your goals and the role of your AI.
    • Reasoning: how best to achieve the goals set.
    • Plan: steps to figure out ways to successfully complete its tasks.
    • Criticism: to constantly improve its performance to provide the best results.

(See example in screenshots below)

In this image, the speaker is planning to use a GPT agent to find the best songs to add to a playlist based on the user's mood. Full Text: THOUGHTS: I think the next step is to start a GPT agent to help me find the best songs to add to the play list based on your mood. REASONING: I believe that starting a GPT agent will help me find the best songs to add to the playlist bas ed on your mood. The agent can use its natural language processing capabilities to understand your mood and find songs that match it. PLAN: Start a GPT agent Provide the agent with information about your mood Ask the agent to find songs that match your mood CRITICISM: I need to make sure that I provide the agent with accurate information about your mood so that it can find the best songs to add to the playlist. NEXT ACTION: COMMAND = start_agent ARGUMENTS = {'name': 'song_finder', 'task': "Find songs that match the user's mood", 'prompt': 'What is your current mood?'} Enter 'y' to authorise command, 'y -N' to run N continuous commands, 'n' to exit program, or enter feedback for ... Input : happy SYSTEM: Human feedback: happy _ Thinking ... *K
Image: KnowTechie
In this image, the user is asking a GPT agent to find songs that match their mood, and is providing the GPT agent with the genre of music they prefer in order to help the agent find the best songs to add to the playlist. Full Text: PLAN: Ask the GPT agent to find songs that match your mood CRITICISM: I need to make sure that the songs provided by the GPT agent are appropriate for the playlist a nd match your mood. NEXT ACTION: COMMAND = message_agent ARGUMENTS = {'key': 0, 'message': 'Can you please find songs that mat Enter 'y' to authorise command, 'y -N' to run N continuous commands, 'n' to exit program, or enter feedback ch my mood? ' } for Input : y =-=-=-=-=-= COMMAND AUTHORISED BY USER SYSTEM: Command message_agent returned: Sure, I'd be happy to help you find some songs that match your hap py mood. What genre of music do you prefer? THOUGHTS: I think the next step is to provide the GPT agent with the genre of music you prefer. This will help the agent find songs that match your mood and preferred genre. REASONING: Providing the GPT agent with the genre of music you prefer will help it find songs that match y our mood and preferred genre. This will help me create a playlist that matches your mood and preferred genr e PLAN: Provide the GPT agent with the genre of music you prefer CRITICISM: I need to make sure that the genre of music provided to the GPT agent is accurate so that it ca n find the best songs to add to the playlist. NEXT ACTION: COMMAND = message_agent ARGUMENTS = {'key': 0, 'message': 'I prefer pop music. ' } Enter 'y' to authorise command, 'y -N' to run N continuous commands, 'n' to exit program, or enter feedback for .. Input:y === COMMAND AUTHORISED BY USER SYSTEM: Command message_agent returned: Great! Here are some pop songs that might match your happy mood: 1 "Happy" by Pharrell Williams 2. "Can't Stop the Feeling!" by Justin Timberlake 3. "Shut Up and Dance" by Walk the Moon 4. "Good Time" by Carly Rae Jepsen and Owl City 5. "I Gotta Feeling" by The Black Eyed Peas 6 "Uptown Funk" by Mark Ronson ft. Bruno Mars 7. "Love on Top" by Beyonce 8. "Walking on Sunshine" By katri na and the Waves 9. "Best Day of My Life" by American Authors 10. "I'm Yours" by Jason Mraz I hope you enjo y listening to these songs! Let me know if you need any more recommendations. A Thinking
Image: KnowTechie
  1. I asked Playlist-GPT to append the songs into a file called ‘playlist.txt’ and also save that file on my PC. I liked all the songs, so removing any was unnecessary.
The image shows a computer program prompting the user to authorize a command to append a text to a file, and then providing feedback that the command was successful. Full Text: NEXT ACTION: COMMAND = append_to_file ARGUMENTS = {'file': 'playlist. txt', 'text': "1. Happy - Pharrell Wi lliamsn2. Can't Stop the Feeling! - Justin Timberlaken3. Shut Up and Dance - Walk the Moonn4. Good Time Carly Rae Jepsen and Owl Cityn5. I Gotta Feeling - The Black Eyed Peasn6. Uptown Funk - Mark Ronson ft. Bruno Marsn7. Love on Top - Beyoncen8. Walking on Sunshine - Katrina and the Wavesn9. Best Day of My Li fe - American Authors n10. I'm Yours - Jason Mrazn"} Enter 'y' to authorise command, 'y -N' to run N continuous commands, 'n' to exit program, or enter feedback for . Input : y -=-=-= COMMAND AUTHORISED BY USER SYSTEM: Command append_to_file returned: Text appended successfully. THOUGHTS: I think the next step is to ask the user if they would like to remove any songs from the playli st. This will help me ensure that the playlist only contains songs that the user likes. REASONING: Asking the user if they would like to remove any songs from the playlist will help me ensure th at the playlist only contains songs that the user likes. This will help me create a playlist that matches t he user's mood and preferred genre. PLAN : Ask the user if they would like to remove any songs from the playlist CRITICISM: I need to make sure that the user is able to easily remove any songs they do not like from the playlist. İK
Image: KnowTechie

The image below shows my new playlist of songs in the ‘playlist.txt’ file, all done by Playlist-GPT!

This image is a list of popular songs in a "playlist" format, written in a Notepad text file. Full Text: playlist.txt - Notepad File Edit Format View Help Playlist: 1. Happy - Pharrell Williams 2. Can't Stop the Feeling! - Justin Timberlake 3. Shut Up and Dance - Walk the Moon 4. Good Time - Carly Rae Jepsen and Owl City 5. I Gotta Feeling - The Black Eyed Peas 6. Uptown Funk - Mark Ronson ft. Bruno Mars 7. Love on Top - Beyoncé 8. Walking on Sunshine - Katrina and the Waves 9. Best Day of My Life - American Authors 10. I'm Yours - Jason Mraz -
Image; KnowTechie

How to get Auto-GPT running in your browser (no Python or programming skills necessary)

The good news for the non-programmers, you can run Auto-GPT directly in your browser with Agent-GPT. Thanks to this online tool, you can assemble, configure and deploy autonomous AI agents in your browser.

It may take a while to analyze and complete the tasks, but eventually, you will be able to export and view the data.

This image is showing a user signing in to an online platform to assemble, configure, and deploy autonomous AI agents in order to create a healthy weekly food timetable for a young person living in Lagos, Nigeria. Full Text: My agents AgentGP DeLa " Sign In to be able to Assemble, configure, and deploy autonomous AI Agents in your browser. save agents and manage your account! AgentGPT Export V Current tasks * Added task: Research traditional Nigerian recipes that use affordable ingredients and modify the meal plan accordingly to ensure that the grocery * Consult with the young list stays within budget. person to determine their budget for groceries and adjust the meal plan * Added task: Explore alternate sources of healthy fats, such as nuts, accordingly. seeds, and avocados, to incorporate into the meal plan and ensure a well- k Research meal prep and rounded diet. batch cooking techniques to make the most out of affordable ingredients and * Added task: Consult with a local nutritionist or dietitian to obtain reduce food waste. + Sign Out 183. Name FoodieGPT ? Help Support * Goal Make a healthy weekly food timetable for a young person living in Lagos, Nigeria ¢ Settings 7 Running Stop Agent K
Image: KnowTechie

Bonus

I played around with Agent-GPT and uploaded a PDF document where you can read through the thought process and see how Auto-GPT works to achieve a given goal.

It goes on and on, thinking, planning, criticizing, and giving itself future tasks until it gets human input to stop.

But AgentGPT isn’t the only option to get AutoGPT running in your browser. Here are some alternatives worth checking out:

chatgpt bot logo
Image: KnowTechie

Wrapping it all up

Auto-GPT is an interesting tool that leverages OpenAI’s large language model to automate complex tasks. Additionally, Auto-GPT can save time and increase productivity with its ability to “think for itself.”

To fully utilize Auto-GPT features, you need to have Python installed on your PC, as well as an OpenAI API account. Sure, you can also use online alternatives like Agent-GPT, which is built on Auto-GPT.

In summary, Auto-GPT is a tool worth considering for anyone looking to increase productivity and streamline their workflow while completing tasks.

Have any thoughts on this? Drop us a line below in the comments, or carry the discussion over to our Twitter or Facebook.

Editors’ Recommendations:

Follow us on Flipboard, Google News, or Apple News

Toyosi Odukale, also known as Reine Dev, is a budding software developer and technical writer based in West Africa. With a passion for breaking down complex technical concepts into understandable terms, Reine Dev aims to leave her mark on the tech industry by helping people understand the world of technology through her writing. When not coding or writing, she can be found exploring new music or playing video games. Follow her on Twitter to keep up with her latest work.

Click to comment

Leave a Reply

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

More in AI