BabyAGI-ts
This is an attempt to port @yoheinakajima's BabyAGI from Python to TypeScript and provide a friendly CLI tool that can be installed as a global NPM module. A few small adjustments have been made:
- The dependency on Pincone has been removed in favor of using HNSW. This allows developers to get started more easily without having to make a Pinecone account and pay for an index.
- Configuration has been moved from environment variables to an Inquirer.js flow.
All other functionality remains the same.
Getting started
Export your OpenAI API Key:
export OPENAI_API_KEY=<YOUR_API_KEY>
Install the babyagi
NPM module globally:
npm install -g babyagi
Create a new directory for your agent to live:
mkdir travel-gpt
Move into the directory:
cd travel-gpt
Create a new agent:
babyagi run
This will begin the agent creation flow. You should see a screen like this:
After you finish the agent configuration your agent will start running.
Multiple Agents
If you'd like to create a new agent with a different objective, create a new folder and go through the the steps again:
mkdir research-gpt
Move into the directory:
cd research-gpt
Create a new agent:
babyagi run
Warning
This script is designed to be run continuously as part of a task management system. Running this script continuously can result in high API usage, so please use it responsibly. Additionally, the script requires the OpenAI API to be set up correctly, so make sure you have set up the API before running the script.
Credit
This project is a port of @yoheinakajima's BabyAGI. All credit goes to Yohei and everyone else who has contributed to the BabyAGI project.