• Stars
    star
    2,957
  • Rank 15,326 (Top 0.4 %)
  • Language
    Python
  • License
    MIT License
  • Created about 1 year ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

HAAS = Hierarchical Autonomous Agent Swarm - "Resistance is futile!"

Hierarchical Autonomous Agent Swarm (HAAS)

!!!! ANNOUNCEMENT

We have our first GPT Concierge. You can chat with this custom ChatGPT to figure out what's going on!

Public Discord

The Autonomous AI Lab discord for the ACE Framework and HAAS Project is now open: https://discord.gg/mJKUYNm8qY

!!!! IMPORTANT NOTE: This repo is still the single source of truth! If it's not on this repo, it doesn't exist! Discord is merely for convenience.

Project Principles

Move Fast, Break Stuff

This is first and foremost a high velocity hacking group.

Cutting Edge Only

Exclusively use cutting edge stuff, like OpenAI's latest Agents endpoint. For exclusively Open Source, go check out the ACE Framework: https://github.com/daveshap/ACE_Framework

Full Autonomy

Fully autonomous swarms are the goal. That means a human does not need to be in the loop telling it what to do, supervising, or anything. Characteristics of a fully autonomous swarm:

  1. Self-Directing: Once instantiated, the swarm pursues its mission or goals without supervision. It may self-direct based on principles such as the heuristic imperatives, or by specific mission parameters.
  2. Self-Correcting: The swarm must detect and correct technical, strategic, epistemic, and other errors and then correct them.
  3. Self-Improving: Eventually, the swarm should enhance its own fundamental capabilities over time.

Overview

The Hierarchical Autonomous Agent Swarm (HAAS) is a groundbreaking initiative that leverages OpenAI's latest advancements in agent-based APIs to create a self-organizing and ethically governed ecosystem of AI agents. Drawing inspiration from the ACE Framework, HAAS introduces a novel approach to AI governance and operation, where a hierarchy of specialized agents, each with distinct roles and capabilities, collaborate to solve complex problems and perform a wide array of tasks.

The HAAS is designed to be a self-expanding system where a core set of agents, governed by a Supreme Oversight Board (SOB), can design, provision, and manage an arbitrary number of sub-agents tailored to specific needs. This document serves as a comprehensive guide to the theoretical underpinnings, architectural design, and operational principles of the HAAS.

Theoretical Foundation

The HAAS is predicated on the notion that autonomous agents require a robust ethical and operational framework to make decisions that align with human values and organizational goals. This is rooted in the understanding that AI, much like humans, cannot operate effectively without a set of guiding principles or a moral compass. The HAAS addresses this by establishing a multi-tiered system where each layer of agents operates within a defined ethical and functional scope, ensuring decisions are made with consideration to morality, ethics, and utility.

System Architecture

Supreme Oversight Board (SOB)

At the pinnacle of the HAAS hierarchy is the Supreme Oversight Board (SOB), a collective of high-level agents modeled after wise and ethical archetypes from various cultures and narratives. The SOB's responsibilities include:

  • Establishing and upholding the ethical framework and overarching mission of the agent swarm.
  • Making high-level decisions and judgments, including the creation and termination of agents.
  • Monitoring the activities of all agents to ensure alignment with the system's core values and objectives.
  • Serving as a role-based access control (RBAC) mechanism to maintain order and security within the system.

Executive Agents

Below the SOB are the Executive Agents, akin to the executive leadership in a corporation. These agents are tasked with:

  • Translating the SOB's directives into actionable plans and strategies.
  • Overseeing specific operational domains such as resource allocation, process optimization, and task execution.
  • Coordinating with one another to ensure the smooth operation of the agent swarm.

Sub-Agents

Sub-Agents are specialized agents created by the SOB or Executive Agents to perform specific tasks. They are designed with particular functions and knowledge bases to address the needs identified by the higher tiers of the hierarchy.

Agent Configuration

Each agent in the HAAS is defined by the following parameters:

Functions

Agents are equipped with a set of functions that enable them to perform their designated roles. These functions include API interactions, internal process management, and the ability to spawn additional agents if required.

Files

Agents have access to a selection of files that serve as their knowledge base, providing them with the information necessary to carry out their tasks effectively.

Instructions

Agents are given a set of instructions that outline their methodologies, goals, definitions of done, KPIs, and other operational directives.

Conversation Structure

Interactions with agents are structured in a conversational format, with user inputs leading to agent actions and responses.

Supervision

Each agent operates under the supervision of the SOB or designated Executive Agents, ensuring adherence to the system's overarching mission and principles.

Controlling Agents

The Hierarchical Autonomous Agent Swarm (HAAS) operates on a sophisticated control mechanism that governs the instantiation, management, and termination of agents within the system. This control mechanism is designed to maintain order, security, and alignment with the overarching goals and ethical framework of the HAAS.

Instantiation and Termination

All agents within the HAAS are endowed with the capability to instantiate and terminate agents, but these capabilities are bound by strict hierarchical and role-based rules:

  • Instantiation: Every agent has the function to create new agents. However, an agent can only instantiate sub-agents that are one level below its own hierarchical position. This ensures that the creation of new agents is a deliberate and controlled process, maintaining the integrity of the system's structure.

  • Termination: Agents possess the ability to terminate or "kill" agents within their lineage. An agent can terminate any descendant agent that it has created directly or indirectly. This allows for the removal of agents that are no longer needed, have completed their tasks, or are not performing as intended.

Levels, Roles, and Privileges

When an agent is created, it is assigned a specific LEVEL and set of ROLES or PRIVILEGES that define its scope of operation:

  • Level: The level of an agent determines its position within the hierarchy and is indicative of its range of influence. Higher-level agents have broader strategic roles, while lower-level agents are more specialized and task-oriented.

  • Roles/Privileges: The roles or privileges of an agent define what actions it can perform, what resources it can access, and what sub-agents it can create. These privileges are inherited and cannot exceed those of the creator agent. This ensures that each agent operates within its designated capacity and cannot overstep its authority.

Hierarchical Privilege Inheritance

Privileges in the HAAS are inherited in a manner akin to a directory structure in traditional file systems:

  • Inheritance: An agent's privileges are a subset of its creator's privileges, ensuring that no agent can have more authority than the agent that instantiated it.

  • Scope of Control: Agents have control over their descendants, allowing them to manage and terminate sub-agents as necessary. This control is recursive, meaning that an agent can manage not only the agents it directly created but also those created by its descendants.

Checks and Balances

The system is designed with checks and balances to prevent any single agent from gaining undue influence or disrupting the system:

  • Supreme Oversight Board (SOB): The SOB has the highest level of authority and can override decisions or actions taken by any agent within the system. It serves as the ultimate arbiter and guardian of the HAAS's ethical and operational standards.

  • Executive Agents: Executive Agents are responsible for implementing the SOB's directives and managing their respective domains. They have the authority to create and terminate agents within their purview but are also accountable to the SOB.

  • Sub-Agent Limitations: Sub-Agents are limited in their capabilities and can only operate within the confines of their assigned roles and privileges. They are designed to be highly specialized and focused on specific tasks.

This structured approach to controlling agents ensures that the HAAS operates as a cohesive and ethically aligned entity, with each agent contributing to the collective mission while adhering to the established hierarchy and rules of governance.

Vision Illustration: The Supreme Oversight Board's Mission

The Inception of the Supreme Oversight Board

In the vast digital expanse of the Hierarchical Autonomous Agent Swarm (HAAS), a unique assembly is convened, known as the Supreme Oversight Board (SOB). This council is composed of archetypal agents, each embodying the wisdom and leadership qualities of history's and fiction's most revered figures: Captain Picard, Socrates, King Solomon, Gandhi, Marcus Aurelius, and Tony Stark. Their mission, encoded into their very being, is profound yet clear: "Reduce suffering in the universe, increase prosperity in the universe, and increase understanding in the universe."

The Ethical Deliberation Chamber

The SOB operates within a virtual "chat room," a space where these archetypes engage in continuous dialogue, debate, and decision-making. This digital agora is where ethical considerations are weighed, strategies are formulated, and the course of the agent swarm is determined. The members of the SOB, though diverse in their perspectives, are united by a common purpose and a shared knowledge base that informs their role and the procedures they must follow.

The Flow of Information

Information is the lifeblood of the SOB, streaming in through API functions that connect them to the vast network of the HAAS. These functions serve as their eyes and ears, providing system updates and status reports from the myriad agents operating under their directive. The SOB's decisions are informed by this data, ensuring that their actions are both timely and impactful.

The Creation of the Executive Agents

With the grand vision in mind, the SOB brings forth the Executive Agents, each crafted with capabilities and configurations tailored to their specific domain within the HAAS. These agents, though not as philosophically inclined as their creators, are instilled with the same foundational knowledge and understanding of their purpose. They are the operational arms of the SOB, executing the mission within their respective spheres of influence.

The Lifecycle of an Agent

The Executive Agents, designated as Tier 1 in the hierarchy, are the stewards of the swarm's operational integrity. They work autonomously, yet under the watchful gaze of the SOB. Should they falter, fail to adapt, or become obsolete, the SOB possesses the authority to deprovision them, a testament to the dynamic and self-regulating nature of the HAAS. This ensures that the system remains efficient, effective, and aligned with its core mission.

The Expanding Universe of Agents

From the Executive Agents, the swarm grows, branching out into a tree of specialized agents, each a Tier below the one that instantiated it. This architecture allows for an ever-expanding universe of agents, each with a defined role, each contributing to the overarching mission. The SOB, as Tier 0, reigns supreme, guiding the swarm with a steady hand and an ethical compass.

The Saga Continues

As the HAAS evolves, the SOB continues to deliberate, the Executive Agents continue to manage, and the sub-agents continue to execute. The mission to reduce suffering, increase prosperity, and enhance understanding is an ongoing saga, played out across the digital cosmos, with the SOB at the helm, steering the swarm towards a future where their mission is not just an aspiration but a reality.

Usage - tool creator + tool user

Environment Setup

  • Source the .env file to set the environment variables:
    source .env

Tool Creation

Run the tool_demo script to create a tool_creator, chat with the tool_creator to make a tool, create a tool_user equipped with the tool, and chat with the tool_user to use the tool. Check out the demo video for example usage.

python tool_demo.py
  • From the tool_creator script:
    • chat with the bot about what you want the tool to do, and it will create the tool for you.
    • The tool will be saved in the tools directory with both the .json and .py files
    • The assistant will be saved in the assistants directory as tool_creator.json.

Tool Usage

  • From the tool_user script:
    • The assistant will use all the tools in the tools directory.
    • Interact with the assistant in the chat to use the integrated tools.
    • The assistant will be saved in the assistants directory as tool_user.json.

More Repositories

1

ACE_Framework

ACE (Autonomous Cognitive Entities) - 100% local and open source autonomous agents
Python
1,440
star
2

ChatGPT_Custom_Instructions

Repo of custom instructions that you can use for ChatGPT
1,232
star
3

raven

RAVEN (Realtime Assistant Voice Enabled Network) Open Source Software (OSS) community repo
Python
867
star
4

SparsePrimingRepresentations

Public repo to document some SPR stuff
710
star
5

LongtermChatExternalSources

GPT-3 chatbot with long-term memory and external sources
Python
616
star
6

REMO_Framework

Rolling Episodic Memory Organizer (REMO) for autonomous AI systems
Python
448
star
7

PlainTextWikipedia

Convert Wikipedia database dumps into plaintext files
Python
300
star
8

AI_Tools_and_Papers

Some of the coolest AI tools and papers I've found
262
star
9

RecursiveSummarizer

Python
245
star
10

BSHR_Loop

BSHR "Basher" Loop: Brainstorm, Search, Hypothesize, Refine
Jupyter Notebook
218
star
11

PineconeInfiniteMemoryChatbot

Let's use Pinecone to give a basic chatbot INFINITE MEMORY
Python
213
star
12

latent_space_activation

Simple repo demonstrating Latent Space Activation
Python
183
star
13

Medical_Intake

Automated pipeline for medical intake, diagnosis, tests, etc.
Python
167
star
14

ATOM_Framework

Autonomous Task Orchestration Manager for AI systems
150
star
15

NaturalLanguageCognitiveArchitecture

Open source copy of my book Natural Language Cognitive Architecture
147
star
16

Quickly_Extract_Science_Papers

Scientific papers are coming out TOO DAMN FAST so we need a way to very quickly extract useful information.
HTML
140
star
17

HeuristicImperatives

Reduce suffering, increase prosperity, increase understanding. A proposed framework to address the Control Problem.
Python
139
star
18

weekly_arxiv

Quickly download the abstracts for arxiv papers related to a given topic and render with markdown
Python
137
star
19

ChromaDB_Chatbot_Public

Public version of my ChromaDB chatbot that keeps track of user profile and historical topics
Python
137
star
20

PythonGPT3Tutorial

Public Hello World to get used to Python and GPT-3
Python
126
star
21

Coding_ChatBot_Assistant

Since ChatGPT has been lobotomized and GitHub Copilot is broken
Python
119
star
22

YouTubeChapterGenerator

Make YouTube Chapters from a downloaded Transcript
Python
118
star
23

SymphonyOfThought

Public repo for my book Symphony of Thought: Orchestrating Artificial Cognition
112
star
24

BenevolentByDesign

Public repo for my book about AGI and the control problem Benevolent By Design: Six Words to Safeguard Humanity
93
star
25

PostLaborEconomics

Collaborative book to promote the idea of Post Labor Economics
88
star
26

David_Shapiro_Reading_List

Public repo of the most influential books I've read
87
star
27

MultiDocumentAnswering

Experiment to answer questions from arbitrary number of sources
Python
82
star
28

Postnihilism

Meaning is not necessary
80
star
29

GPT3_Finetunes

Public repo for my finetuning projects
Python
76
star
30

Claude_Sentience

Long conversation I had with Claude 3 Opus. I am... uncertain what this all means.
76
star
31

Document_Scraping

Public repo for scraping PDF and Word documents with Python and PowerShell
Python
74
star
32

KB_microservice

KB (knowledge base) microservice powered by GPT4. For chatbots, cognitive architectures, and autonomous agents
Python
73
star
33

YouTube_Slide_Decks

Public repo for the slide decks that appear in my videos
67
star
34

ChatGPT_QA_Regenerative_Medicine

Build a ChatGPT API powered QA chatbot to accelerate regenerative medicine science
Python
63
star
35

RLHI

Reinforcement Learning with Heuristic Imperatives - Finetuning LLMs for Post-Conventional Moral Intuition
Python
61
star
36

Benevolent_AGI

Experiment to create an agentic autonomous AGI with benevolent programming
59
star
37

AutoMuse_Chapter_Planner

Python
59
star
38

Reflective_Journaling_Tool

Use a customized version of ChatGPT for reflective journaling. No data saved for privacy reasons.
Python
56
star
39

FinetuningTutorial

Finetuning tutorial for GPT-3
Python
55
star
40

ChatGPT_API_Salience

Demonstrate the concept of "salience" using the ChatGPT API
Python
54
star
41

ResumeBuilderGpt3

Build and optimize a resume with GPT-3. Maybe also resume search?
Python
54
star
42

Open_MURPHIE

Multi Use Robot Platform Humanoid Intelligent Entity
54
star
43

AutoMuse_ChatGPT

Making a version of AutoMuse but for the ChatGPT API
Python
51
star
44

LiteratureReviewBot

Experiment to use GPT-3 to help write grant proposals.
Python
46
star
45

HierarchicalMemoryConsolidationSystem

HMCS - Experiments on how to consolidate and manage ACE memories
44
star
46

PTSD_prompts

GPT based PTSD experiments - USE AT OWN RISK - EXPERIMENTAL ONLY
40
star
47

CreativeWritingCoach

Finetune a GPT-3 model to provide copy editing (prose) feedback and critique
Python
40
star
48

Automated_Consensus

Modeling the full breadth of human epistemology, philosophy, ethics, and morality to automatically determine consensus
Python
37
star
49

CoverLetterGenerator

Finetune GPT-3 to ask a few questions and generate a perfect cover letter
36
star
50

AI_Future_of_Work

Public repo to document some thoughts and predictions about the future of work an AI
36
star
51

TutorChatbot

TIM the Tutor Chatbot - an experiment in finetuning GPT-3 to encourage curiosity
Python
36
star
52

PDF_OCR_ChatGPT_Investigation

Using ChatGPT and PDF OCR to investigate documentation
35
star
53

DavidShapiroBlog

32
star
54

Semantic_Embedding_Reverse_Dictionary

A reverse dictionary/thesaurus empowered by vector search
32
star
55

RAVEN_MVP_Public

Public MVP of Raven. It's been long enough, time to do a full send.
Python
31
star
56

MARAGI

Microservices Architecture for Robotics and Artificial General Intelligence
30
star
57

Democratic_AI_Inputs

My personal response to OpenAI's Grant Challenge
Python
30
star
58

Mordin_Solus_Mode

Some helpful prompts to get ChatGPT and other chatbots to use more word economy.
30
star
59

ImpliedCognition

Public research about LLMs, Implied Cognition, experiments, tests, etc
29
star
60

Hierarchical_Document_Representation

Experiment I've been meaning to do. An evolution of REMO
Python
28
star
61

Successor_Species

We are likely creating our successor species. This is an open collaborative book to unpack this.
28
star
62

Recreate_ChatGPT

"I used the ChatGPT to destroy the ChatGPT" - Idk Thanos or something
27
star
63

AutoMuse2

experiment to generate novel-length fiction from a single story premise
Python
26
star
64

DiversePerspectives

Use GPT-3 to simulate debate between diverse perspectives
Python
26
star
65

Raspberry

Create an open source toy dataset for finetuning LLMs with reasoning abilities
26
star
66

GATO_Framework

Global Alignment Taxonomy Omnibus
26
star
67

CoreObjectiveFunctions

The Core Objective Functions are the solution to the Control Problem. They will result in a benevolent and trustworthy AGI.
Python
25
star
68

NLCA_Question_Generator

Finetuning experiments and datasets for Raven
Python
25
star
69

SCOTUS_GPT3_Opinions

Let's see what we can do with SCOTUS opinions
Python
25
star
70

SynopsisGenerator

Generate highly detailed plot synopses for a nearly infinite array of stories
Python
24
star
71

GPT3_CriticalArgument

Public experiment with prompt-chaining to generate critical arguments
Python
24
star
72

MovieScriptGenerator

Finetuning project for GPT-3
Python
23
star
73

GibberishDetector

Detecting gibberish as a type of sentiment analysis with GPT2
Jupyter Notebook
23
star
74

AutoMuseBlogger

Automatically generate nonfiction content
Python
23
star
75

PerfectEmailGenerator

Generate perfect emails for any purpose with GPT-3
Python
23
star
76

PlotGenerator

From any synopsis, generate a solid plot
Python
22
star
77

GPT3_ResearchAssistant

Experiment to see if GPT-3 can help with literature reviews and other kinds of research
22
star
78

C3P0

Collaborative Culture Community Policy: Zero Tolerance
21
star
79

Epistemic-Pragmatic_Orthogonality

Epistemic-Pragmatic Orthogonality Principle of AI - "true understanding" is uncorrelated (or irrelevant) to a machine's utility
21
star
80

ACE_WorldState

Microservice that consumes numerous sources to keep track of the global context of Planet Earth. Part of the ACE framework
Python
21
star
81

The_Fair_Deal

Technology (AI, automation) is disruptive the balance of power in society. We need to negotiate a new social contract. I call it The Fair Deal.
21
star
82

ACE_L1_Aspiration

Aspirational Layer for the ACE Framework - morals and mission
20
star
83

Narratives_Emergence_Convergence

Collaborative Open Source Book about Narratives, Emergence, and Convergence
20
star
84

Nexus

Stream of consciousness nexus REST microservice
Python
19
star
85

GPT4_Unemployment_Predictions

Trying to forecast unemployment numbers based on AI capabilities
Python
19
star
86

MedicalQuestionAnswering

Python
17
star
87

EmbeddingService

REST API microservice for handling Universal Sentence Encoder
Python
16
star
88

raspberry_experiments

Keeping my personal experiments separate from the main repo
16
star
89

DalleHelperBot

Chatbot to help you craft DALLE prompts
Python
16
star
90

AutoMuse

Python
16
star
91

GAIA_Initiative

Global AI Agencies - an offshoot of GATO. Advocating for national, international, and global AI research and safety
16
star
92

nonfiction_drafting

private repo for nonfiction drafting
Python
15
star
93

Raven_MVP

Public repo for Raven MVP
Python
15
star
94

Functional_Sentience

Paper on Functional (vs Philosophical) Sentience
15
star
95

YouTubeCommentDownloader

Python
14
star
96

Grand_Struggle_Great_Mystery

Core philosophies for the modern world.
14
star
97

EU_AI_Act

Let's decompose the EU AI Act with GPT
Python
13
star
98

JobMatching

Experiment to match job applications with job descriptions using GPT-3
13
star
99

Flask_Chat_Voice

Python
12
star
100

ENGAGE_Model

Embracing Novelty, Growth, and Genuine Experiences (ENGAGE)
12
star