A simplified Task-Driven Autonomous AI Agent
This Python script is a powerful example of an AI-powered task management system that utilizes OpenAI and Pinecone APIs to create, prioritize, and execute tasks. The system is designed to create new tasks based on the objective and the results of previous tasks. OpenAI’s NLP capabilities are utilized to generate new tasks, while Pinecone provides a reliable storage and retrieval system for task results. Whether you’re looking for a pared-down version or a full-scale solution, this script is a must-try for anyone interested in task management systems.
To use the script, follow these steps:
- 1. Clone the repository by running ‘git clone https://github.com/yoheinakajima/babyagi.git’ and navigate into the cloned repository.
- 2. Install all required packages by running ‘pip install -r requirements.txt’
- 3. Copy the file ‘.env.example’ to ‘.env’ where you can configure the following variables.
- 4. Set your Pinecone and OpenAI API keys in the ‘pinecone_api_key’, ‘openai_api_key’, and ‘openapi_api_model’ variables.
- 5. Set the Pinecone environment in the ‘pinecone_environment’ variable.
- 6. Specify the name of the table to store task results in the ‘table_name’ variable.
- 7. (Optional) Set the objective of the task management system in the ‘objective’ variable.
- 8. (Optional) Set the first task of the system in the ‘initial_task’ variable.
- 9. Run the script.
The purpose of this script is to function persistently as a component of a task management system. However, using this script continuously can cause a surge in API usage, thus it is essential to utilize it prudently. Moreover, for the script to execute flawlessly, the OpenAI and pinecone APIs should be accurately configured beforehand. Therefore, it’s crucial to ensure that the APIs are set up correctly before running the script.
Join Guidady AI Mail List
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.