gitcommitshow / autogpt-node

AutoGPT for node.js
27 stars 3 forks source link
agent agi autogpt chatgpt cli gpt-3 gpt-4 llm openai-api

autogpt-node

AutoGPT for Node.js

npm version

This project has been put on hold due to other priorities of the author. Create an issue if you want to take it up ahead.

Description

Autonomous GPT as a Node.js library and CLI

What is AutoGPT?

AutoGPT attempts to make GPT-4 fully autonomous. AutoGPT is an experimental open-source project showcasing the capabilities of the GPT-4 language model. This program, driven by GPT-4, chains together LLM "thoughts", to autonomously achieve whatever goal you set. As one of the first examples of GPT-4 running fully autonomously, Auto-GPT pushes the boundaries of what is possible with AI.

This is not a finished product, just the beginning of the project. Join Discord community to get the latest updates.

Installation

To try, directly use without installation

npx autogpt-node

OR to use as a library in your Node.js project, install as a dependency

npm install --save autogpt-node

OR to use as a command-line interface (CLI) in your terminal, install it globally

npm install -g autogpt-node

Usage

Without installation

npx autogpt-node --continuous=true --speak=true --headless=true

Options

After this, it will ask for some inputs such as - role your AutoGPT instance should play, list of goals to achieve, prompts to stop or continue, etc.

# Name
What should we name it?
> SEO-GPT

# Role
What is the role of SEO-GPT?
> an AI to increase search traffic of a website using SEO

# Goal 1
Define the goal 1
> Fix technical SEO issues

# Goal 2
Define the goal 2
> Find the backlink opportunities

# ...3 more goals. enter to skip

Make sure to add one goal to stop the agent otherwise it might keep running for a very long time.

As a CLI with global installation

autogpt-node --speak=true --headless=true

Make sure that you define configurations

As a Node.js library

const autogpt = require('autogpt-node');

var seoGPT = new autogpt({ 
    openaiKey: process.env.OPENAI_API_KEY, 
    explain: true, 
    continuous: true 
});

seoGPT.setRole("an AI to help with SEO for website")

seoGPT.addGoal("Make a list of 10 technical SEO issues on the website")
seoGPT.addGoal("For each technical issue, write the possible fix alongwith code")
seoGPT.addGoal("Write the findings in a file")

seoGPT.on("thought", (thought, reasoning, plan, criticism) => {})

seoGPT.on("action", (command, arguments) => {})

seoGPT.on("end", (results) => {})

seoGPT.start()

🚀 Features

API

Document the API of your package here. ToDo.

Configurations

Variable Description
OPENAI_API_KEY Your OpenAI platform API key
ELEVELLABS_API_KEY Your ElevenLabs API key for TTS
IMAGE_PROVIDER How do you want to create images e.g. DALLE, STABLE_DIFFUSION
HUGGINGFACE_API_TOKEN Your Hugging Face API token

Make sure that .env.sample variables, whichever are relevant to you, are available in your environment

OpenAI API key configuration

Obtain your OpenAI API key from: https://platform.openai.com/account/api-keys.

To use OpenAI API key for Auto-GPT, you NEED to have billing set up (AKA paid account).

You can set up paid account at https://platform.openai.com/account/billing/overview.

ElevenLabs API key configuration for Text-To-Speech (TTS)

Obtain your ElevenLabs API key from: https://elevenlabs.io. You can view your xi-api-key using the "Profile" tab on the website.

Contributing

No contribution is small. Together, we can make this project that we all can be proud of. You can help with discovering bugs, new features, docs suggestions, code contribution, getting the word out, etc.

Credits

All credit to inspire this project goes to the original AutoGPT project which was written in Python. After experimenting with it for a while, I realized that a Node.js alternative to AutoGPT Python brings certain advantages such as

Support

Join Discord community for discussions and announcement. To report a bug or submit a feature request, create an issue on GitHub.

License

MIT License