百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
B

babyagijs

> 编程语言
开源

JavaScript 中的由 AI 提供支持的任务管理系统

382 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

JavaScript 中的由 AI 提供支持的任务管理系统

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=
  1. Install the required dependencies using npm install.
  2. Write your code in the src directory.
  3. 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';
  1. Run the program with npm run start.
  2. 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.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

TypeScriptbabyagitypescript

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言