+1
Daily
+8
Weekly
+3
Monthly
22,360
stars
2,831
forks
303
watchers
252
prs
167
issues
0
releases
README
BabyAGI
[!NOTE]
The original BabyAGI from March 2023 introduced task planning as a method for developing autonomous agents. This project has been archived and moved to the babyagi_archive repo (September 2024 snapshot).
[!CAUTION]
This is a framework built by Yohei who has never held a job as a developer. The purpose of this repo is to share ideas and spark discussion and for experienced devs to play with. Not meant for production use. Use with cautioun.
---
This newest BabyAGI is an experimental framework for a self-building autonomous agent. Earlier efforts to expand BabyAGI have made it clear that the optimal way to build a general autonomous agent is to build the simplest thing that can build itself.
Check out this introductory X/Twitter thread for a simple overview.
The core is a new function framework (functionz) for storing, managing, and executing functions from a database. It offers a graph-based structure for tracking imports, dependent functions, and authentication secrets, with automatic loading and comprehensive logging capabilities. Additionally, it comes with a dashboard for managing functions, running updates, and viewing logs.
Table of Contents
- Quick Start
- Basic Usage
- Function Metadata
- Function Loading
- Key Dependencies
- Execution Environment
- Log
- Dashboard
- Pre-loaded Functions
- Future/Draft Features
- API Reference
- Contributing
- License
Quick Start
To quickly check out the dashboard and see how it works:
1. Install BabyAGI:
bash
pip install babyagi
2. Import BabyAGI and load the dashboard:
python
import babyagi
if __name__ == "__main__":
app = babyagi.create_app('/dashboard')
app.run(host='0.0.0.0', port=8080)
3. Navigate to the dashboard:
Open your browser and go to http://localhost:8080/dashboard to access the BabyAGI dashboard.
Basic Usage
Start by importing babyagi and registering your functions. Here's how to register two functions, where one depends on the other:
python
import babyagi
Register a simple function
@babyagi.register_function()
def world():
return "world"
Register a function that depends on 'world'
@babyagi.register_function(dependencies=["world"])
def hello_world():
x = world()
return f"Hello {x}!"
Execute the function
print(babyagi.hello_world()) Output: Hello world!
if __name__ == "__main__":
app = babyagi.create_app('/dashboard')
app.run(host='0.0.0.0', port=8080)
Function Metadata
Functions can be registered with metadata to enhance their capabilities and manage their relationships. Here's a more comprehensive example of function metadata, showing logical usage of all fields:
python
import babyagi
@babyagi.register_function(
imports=["math"],
dependencies=["circle_area"],
key_dependencies=["openai_api_key"],
metadata={
"description": "Calculates the volume of a cylinder using the circle_area function."
}
)
def cylinder_volume(radius, height):
Top issues
#397option to set the model this app uses6 comments · 2024-12-01#418📝 Integration Proposal: CAJAL — Scientific Paper Agent4 comments · 2026-05-04#415Tool: DeFi Token Safety Check for Agent Tasks4 comments · 2026-04-05#390dashboard not loading3 comments · 2024-10-02#421Security: Memory poisoning protection for BabyAGI task memory2 comments · 2026-05-14#393How do agents communicate? I can contribute to this feature. 2 comments · 2024-10-11#392Typo in README2 comments · 2024-10-08#425Federation Partnership — Runtime Open Federation (open task loop + USDC on-chain)1 comments · 2026-06-09