babyagi

An example of an AI-powered task management system.

babyagi

What is babyagi

BabyAGI is an experimental framework designed for creating self-building autonomous agents, focusing on task planning and function management. The primary purpose of this project is to enable developers to explore the capabilities of autonomous agents that can construct themselves by leveraging a simple yet effective function framework called functionz. Targeted at experienced developers and AI enthusiasts, BabyAGI addresses the challenge of building general autonomous agents by simplifying the process of function registration, dependency management, and execution tracking. The project is built using Python and utilizes various libraries for function management and logging, making it suitable for experimentation in the AI domain.

How to Use

To get started with BabyAGI, follow these installation instructions:

  1. Install BabyAGI:

    pip install babyagi
    
  2. Import BabyAGI and load the dashboard:

    import babyagi
    
    if __name__ == "__main__":
        app = babyagi.create_app('/dashboard')
        app.run(host='0.0.0.0', port=8080)
    
  3. Access the dashboard: Open your browser and navigate to http://localhost:8080/dashboard to interact with the BabyAGI dashboard.

Configuration and Dependencies

  • Ensure you have Python installed on your system.
  • The framework may require additional dependencies, which can be managed via the requirements.txt file if provided.
  • Set up any necessary API keys, such as openai_api_key, through the dashboard or code.

Usage Example

Here’s a basic example of how to register and execute functions:

import babyagi

@babyagi.register_function()
def world():
    return "world"

@babyagi.register_function(dependencies=["world"])
def hello_world():
    return f"Hello {world()}!"

print(babyagi.hello_world())  # Output: Hello world!

For more detailed documentation, refer to the API Reference section in the project.

Key Features

  • Function Registration and Management: Easily register functions with dependencies and metadata, enhancing modularity and reusability.
  • Graph-Based Dependency Tracking: Automatically manages and logs function dependencies, ensuring that all required functions are loaded before execution.
  • Comprehensive Logging System: Tracks function executions, inputs, outputs, and errors, providing detailed insights for monitoring and debugging.
  • User-Friendly Dashboard: A web-based interface for managing functions, visualizing dependencies, and monitoring executions in real-time.
  • Pre-loaded Function Packs: Comes with built-in function packs for common tasks, including AI-related functions for generating descriptions and embeddings.
  • Self-Building Agent Capabilities: Experimental features that allow the framework to generate new functions based on user input, showcasing its potential for autonomous coding.
  • Extensibility Options: Supports loading custom function packs, enabling developers to organize and manage related functions efficiently.
  • Secure Key Management: Allows for the secure addition and management of API keys and other sensitive information through the dashboard.

BabyAGI is designed for experimentation and exploration in the realm of autonomous agents, making it a valuable tool for developers interested in AI and function-based programming.

Statistics

Stars
21,618
Forks
2,837
Watchers
21,618
!
Issues
15

Language

Python