Code Monkey home page Code Monkey logo

babyagi-js's Introduction

BabyAGI - JavaScript Implementation

This repository contains a JavaScript implementation of the Baby AGI task management system, originally created by Yohei Nakajima in Python. The system uses OpenAI and SQLLite to create, prioritize, and execute tasks. The main idea behind this system is that it creates tasks based on the result of previous tasks and a predefined objective. The script then uses OpenAI's natural language processing (NLP) capabilities to create new tasks based on the objective, and SQLLite to store and retrieve task results for context.

This README will cover the following:

  • How the script works
  • How to use the script
  • Warning about running the script continuously

How It Works

The script works by running an infinite loop that does the following steps:

  1. Pulls the first task from the task list.
  2. Sends the task to the execution agent, which uses OpenAI's API to complete the task based on the context.
  3. Enriches the result and stores it in SQL.
  4. Creates new tasks and reprioritizes the task list based on the objective and the result of the previous task.

How to Use

To use the script, you will need to follow these steps:

  1. Clone the repository and navigate to the project directory.
  2. Install the required packages: npm install
  3. Set your OpenAI API keys in the environment variables OPENAI_API_KEY.
  4. Set the initial objective and the first task in the script.
  5. Run the script using node index.js.

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.

Credits

This JavaScript implementation was created by Nathan Wilbanks (@NathanWilbanks_). The original Python code was created by Yohei Nakajima (@yoheinakajima).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.