How to setup Auto-GPT on macOS π½
Read on to find out how to easily install Auto-GPT on your Mac using Python, plus additional tips & tricks.
After a month of scrolling past the occasional tweet that referenced Auto-GPT and all of the cool things it can do, I finally decided to give it a go.
I've simplified and tailored the instructions specifically for macOS, and have done my best to make it accessible for anyone non-technical.
Link to this headingSteps to set up Auto-GPT on macOS:
- Get the code
- Set up your OpenAI account
- Setup your Auto-GPT environment
- Install Python 3
- Run Auto-GPT
- Bonus tips & tricks
Link to this heading1. Get the code
Download Auto-GPT from this zip file or git clone
the [Auto-GPT repository}(https://github.com/Significant-Gravitas/Auto-GPT).
Link to this heading2. Set up your OpenAI account
- Sign-up for a developer account at OpenAI(https://platform.openai.com/overview) if you don't already have one.
- Create an OpenAI API key if you don't already have one.
- Make sure you have a paid OpenAI account by going to Billing within your OpenAI account.
Link to this heading3. Setup your Auto-GPT environment
If you unzip the zip file you downloaded/cloned in step 1, you should see a folder called Auto-GPT-master
.
Within that, you should see a file called .env.template
. If you don't see it, you might need to enable viewing hidden files on your Mac.
Now you can:
- Rename
.env.template
to.env
- Open
.env
in a text editor - Update
OPENAI_API_KEY=your-openai-api-key
to be the API key you setup in the previous step (no quotes or anything after the=
): OPENAI_API_KEY=skfeafaefefefesfsf
Link to this heading4. Install Python 3
You likely already have Python 3 on your Mac, as macOS installations have been including Python 3 since 2018.
If you're not sure, you can check by running python3 --version
in your terminal. If you see something like Python 3.10.10
, you're good to go.
Otherwise, you can install Python 3 with homebrew.
Link to this heading5. Run Auto-GPT
- Open your terminal
- Navigate to the
Auto-GPT-master
folder you downloaded/cloned in step 1 (e.g.cd ~/Downloads/Auto-GPT-master
in terminal) - Run
./run.sh
in terminal
- Note: if you don't have access to GPT 4, you should instead run
./run.sh --gpt3only
in terminal. If you're not sure, use thegpt3only
flag anyway.
You should see something like this:
Missing packages:
beautifulsoup4, colorama, distro, openai, playsound, python-dotenv, pyyaml, readability-lxml, requests, tiktoken, gTTS, docker, duckduckgo-search, google-api-python-client, pinecone-client, redis, orjson, Pillow, selenium, webdriver-manager, jsonschema, tweepy, click, charset-normalizer, spacy, en-core-web-sm, coverage, flake8, numpy, pre-commit, black, isort, gitpython, auto-gpt-plugin-template, mkdocs, pymdown-extensions, openapi-python-client, pytest, asynctest, pytest-asyncio, pytest-benchmark, pytest-cov, pytest-integration, pytest-mock, vcrpy, pytest-recording
Installing missing packages...
And then after a few minutes, you should see something like this:
Welcome to Auto-GPT! run with '--help' for more information.
Create an AI-Assistant: input '--manual' to enter manual mode.
Asking user via keyboard...
I want Auto-GPT to:
Now that you have Auto-GPT running, try giving it a few fun easy tasks to start, eg I want Auto-GPT to: summarize the latest news in the United States
or `
Link to this headingPotential issues
python: command not found
If instead you see
./run.sh: line 2: python: command not found
./run.sh: line 8: python: command not found
Then the simplest solution is to open run.sh
in your text editor, and replace each instance of python
with python3
and pip
with pip3
and then re-run ./run.sh
.
DOUBLE CHECK CONFIGURATION
error
This can happen for at least two reasons: either you don't have a paid OpenAI account, and/or you don't have access to GPT 4.
Make sure you have a paid account with OpenAI. When I first started trying out Auto-GPT, I kept getting an error message that said:
DOUBLE CHECK CONFIGURATION Please double check that you have setup a PAID OpenAI API Account. You can read more here: https://docs.agpt.co/setup/#getting-an-api-key
It took me a minute to realize that the Auto-GPT docs also reiterated this point and that I did not in fact have a paid account with proper billing info attached π€¦ββοΈ
If you don't have access to GPT 4, then use ./run.sh --gpt3only
instead of ./run.sh
to run Auto-GPT.
Link to this heading6. Tips & tricks
- Be specific. If you want Auto-GPT to use the internet or to write to a file, it can help to specify that.
- Think big with your tasks. You can use Auto-GPT to help you:
- buy products online
- to do research synthesizing a bunch of search engine results into a single document since it can make Google requests itself
- to write a blog post, a song, or code.
- Checkout the Ideas section of the Auto-GPT discussions for inspiration: https://github.com/Significant-Gravitas/Auto-GPT/discussions/categories/ideas
Link to this headingAdditional resources:
- Auto-GPT docs: https://docs.agpt.co/
- the docs are useful for learning how to use text to speech with auto gpt, to learn more about how it works, or for additional use cases
- OpenAI API documentation if you want to learn more about how that works: https://beta.openai.com/docs/api-reference/introduction