Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ericciarla/babyagijs
AI-powered task management system in Javascript
https://github.com/ericciarla/babyagijs
babyagi typescript
Last synced: about 19 hours ago
JSON representation
AI-powered task management system in Javascript
- Host: GitHub
- URL: https://github.com/ericciarla/babyagijs
- Owner: ericciarla
- Created: 2023-04-12T06:02:20.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-04-16T20:51:55.000Z (over 1 year ago)
- Last Synced: 2024-11-08T05:40:48.855Z (8 days ago)
- Topics: babyagi, typescript
- Language: TypeScript
- Homepage:
- Size: 94.7 KB
- Stars: 374
- Watchers: 7
- Forks: 36
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BabyAGI JS
BabyAGI JS is a JavaScript-based AI agent that creates, prioritizes, and executes tasks using the GPT 3.5 or GPT 4 architecture. It integrates with OpenAI's language model to create a powerful AI that can handle a wide range of tasks.
## Features
- Task creation: Generates new tasks based on the current context and objectives.
- Task prioritization: Reorders tasks according to their importance and relevance to the main objective.
- Task execution: Performs tasks and returns results.## How to use
1. Clone this repository.
2. Add API keys to your .env
```
OPENAI_API_KEY=
```
3. Install the required dependencies using `npm install`.
4. Write your code in the `src` directory.
5. Run your program with `npm run start`.## Main Files
### `src/index.ts`
This file initializes the BabyAGI agent with the required configurations, including the language model and objective. It imports the `BabyAGI` class from `babyagi.js` and creates a new instance to perform tasks based on the given objective.
### `src/babyagi.ts`
This file contains the core implementation of the BabyAGI agent. It defines three main classes, `TaskCreationChain`, `TaskPrioritizationChain`, and `ExecutionChain`, which are responsible for creating, prioritizing, and executing tasks, respectively.
The `BabyAGI` class combines these three classes and provides methods to add tasks, print tasks, and execute tasks. The `call` method is the main entry point to start the agent's task processing loop.
## Example
The following is an example of how to use the BabyAGI agent:
1. Set the objective in `src/index.ts`:
```javascript
const OBJECTIVE = 'Integrate stripe in typescript';
```2. Run the program with `npm run start`.
3. The BabyAGI agent will create, prioritize, and execute tasks based on the given objective.## Contributing
We welcome contributions to improve BabyAGI JS. Feel free to open an issue or submit a pull request.
## License
This project is licensed under the MIT License.