GithubHelp home page GithubHelp logo

omarnagy91 / swarms Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kyegomez/swarms

0.0 0.0 0.0 9.22 MB

Millions of agents working in unison

Home Page: https://apac.ai/Agora

License: Apache License 2.0

Python 99.30% HCL 0.70%

swarms's Introduction

Agora

Agora banner

Swarms is brought to you by Agora, the open source AI research organization. Join Agora and Help create swarms and or recieve support to advance Humanity.

Swarming Language Models (Swarms)

Swarming banner

Share on Twitter

Share on Facebook

Share on LinkedIn

Welcome to Swarms - the future of AI, where we leverage the power of autonomous agents to create 'swarms' of Language Models (LLM) that work together, creating a dynamic and interactive AI system.

Vision

In the world of AI and machine learning, individual models have made significant strides in understanding and generating human-like text.

But imagine the possibilities when these models are no longer solitary units, but part of a cooperative and communicative swarm. This is the future we envision.

Just as a swarm of bees works together, communicating and coordinating their actions for the betterment of the hive, swarming LLM agents can work together to create richer, more nuanced outputs.

By harnessing the strengths of individual agents and combining them through a swarming architecture, we can unlock a new level of performance and responsiveness in AI systems. We envision swarms of LLM agents revolutionizing fields like customer support, content creation, research, and much more.

Table of Contents

  1. Installation
  2. Sharing

Installation

There are 2 methods, one is through git clone and the other is by pip install swarms. Check out the document for more information on the classes.

Method1

  • Pip install python3 -m pip install swarms

  • Create new python file and unleash superintelligence

from swarms import boss_node

#create a task
task = boss_node.create_task(objective="Write a research paper on the impact of climate change on global agriculture")

#or 
# task = boss_node.create_task('Find a video of Elon Musk and make him look like a cat')

boss_node.execute(task)

Method2

Download via Github, and install requirements

git clone https://github.com/kyegomez/swarms.git
cd swarms
pip install -r requirements.txt

Method 3

Simple example by git cloning https://github.com/kyegomez/swarms.git python3 example.py

BossNode

The BossNode class is a key component of Swarms. It represents a "boss" in the system that assigns tasks to other components.

Here is an example of how you can use it:

class BossNode:
    def __init__(self, tools):
        # initialization code goes here

    def create_task(self, objective):
        return {"objective": objective}

    def execute_task(self, task):
        # task execution code goes here

With the BossNode class, you can create tasks for your tools to perform. For example, you can create a task to write a summary of a specific topic:

from swarms import boss_node
#create a task
task = boss_node.create_task(objective="Write a research paper on the impact of climate change on global agriculture")
#execute the teask
boss_node.execute_task(task)

This will create and execute a task to write a summary about the latest news on quantum computing. The result will be the summary of the news.

Share with your Friends

Share on Twitter: Share on Twitter

Share on Facebook: Share on Facebook

Share on LinkedIn: Share on LinkedIn

Share on Reddit: Share on Reddit

Share on Hacker News: Share on Hacker News

Share on Pinterest: Share on Pinterest

Share on WhatsApp: Share on WhatsApp

Contribute

We're always looking for contributors to help us improve and expand this project. If you're interested, please check out our Contributing Guidelines.

Thank you for being a part of our project!

Open Source Roadmap

Here is the detailed roadmap of our priorities and planned features for the near term:

TODO

  1. Multi-Agent Debate Integration: Integrate multi-agent debate frameworks (Multi Agent debate and Multi agent2 debate) to improve decision-making.

  2. Meta Prompting Integration: Include meta prompting across all worker agents to guide their actions.

  3. Swarms Class: Create a main swarms class swarms('Increase sales by 40$', workers=4) for managing and coordinating multiple worker nodes.

  4. Integration of Additional Tools: Integrate Jarvis as worker nodes, add text to speech and text to script tools (whisper x), and integrate Hugging Face agents and other external tools.

  5. Task Completion and Evaluation Logic: Include task completion logic with meta prompting, and evaluate task completion on a scale from 0.0 to 1.0.

  6. Ocean Integration: Use the Ocean vector database as the main embedding database for all the agents, both boss and worker.

  7. Improved Communication: Develop a universal vector database that is only used when a task is completed in this format [TASK][COMPLETED].

  8. Testing and Evaluation: Create unit tests, benchmarks, and evaluations for performance monitoring and continuous improvement.

  9. Worker Swarm Class: Create a class for self-scaling worker swarms. If they need help, they can spawn an entirely new worker and more workers if needed.

Documentation

  1. Examples: Create extensive and useful examples for a variety of use cases.

  2. README: Update the README to include the examples and usage instructions.

Mid-Long term

Here are some potential middle-to-long-term improvements to consider for this project:

  1. Modular Design: Aim to design a more modular and scalable framework, making it easy for developers to plug-and-play various components.

  2. Interactive User Interface: Develop a more interactive, user-friendly GUI that allows users to interact with the system without needing to understand the underlying code.

  3. Advanced Error Handling: Implement advanced error handling and debugging capabilities to make it easier for developers to diagnose and fix issues.

  4. Optimized Resource Utilization: Improve the efficiency of resource use, aiming to reduce memory consumption and improve speed without sacrificing accuracy.

  5. Collaborative Learning: Integrate more sophisticated techniques for collaborative learning among the swarm, allowing them to share knowledge and learn from each other's successes and failures.

  6. Autonomous Self-Improvement: Implement mechanisms that allow the swarm to autonomously learn from its past experiences and improve its performance over time.

  7. Security Enhancements: Include robust security measures to protect sensitive data and prevent unauthorized access.

  8. Privacy-Preserving Techniques: Consider incorporating privacy-preserving techniques such as differential privacy to ensure the confidentiality of user data.

  9. Support for More Languages: Expand language support to allow the system to cater to a more global audience.

  10. Robustness and Resilience: Improve the system's robustness and resilience, ensuring that it can operate effectively even in the face of hardware or software failures.

  11. Continual Learning: Implement continual learning techniques to allow the system to adapt and evolve as new data comes in.

  12. More Contextual Understanding: Enhance the system's capability to understand context better, making it more effective in handling real-world, complex tasks.

  13. Dynamic Task Prioritization: Develop advanced algorithms for dynamic task prioritization, ensuring that the most important tasks are addressed first.

  14. Expanding the Swarm's Skills: Train the swarm on a wider range of tasks, gradually expanding their skill set and problem-solving capabilities.

  15. Real-World Deployment: Test and refine the system in real-world settings, learning from these experiences to further improve and adapt the system.

Remember, these are potential improvements. It's important to revisit your priorities regularly and adjust them based on project needs, feedback, and learning from both successes and failures.

Optimization Priorities

  1. Reliability: Increase the reliability of the swarm - obtaining the desired output with a basic and un-detailed input.

  2. Speed: Reduce the time it takes for the swarm to accomplish tasks by improving the communication layer, critiquing, and self-alignment with meta prompting.

  3. Scalability: Ensure that the system is asynchronous, concurrent, and self-healing to support scalability.

Our goal is to continuously improve Swarms by following this roadmap, while also being adaptable to new needs and opportunities as they arise.

Inspiration

Agent System Overview

In a LLM-powered autonomous agent system, LLM functions as the agent’s brain, complemented by several key components:

  • Planning Subgoal and decomposition: The agent breaks down large tasks into smaller, manageable subgoals, enabling efficient handling of complex tasks. Reflection and refinement: The agent can do self-criticism and self-reflection over past actions, learn from mistakes and refine them for future steps, thereby improving the quality of final results.

  • Memory Short-term memory: I would consider all the in-context learning (See Prompt Engineering) as utilizing short-term memory of the model to learn. Long-term memory: This provides the agent with the capability to retain and recall (infinite) information over extended periods, often by leveraging an external vector store and fast retrieval.

  • Tool use The agent learns to call external APIs for extra information that is missing from the model weights (often hard to change after pre-training), including current information, code execution capability, access to proprietary information sources and more.

  • Communication -> How reliable and fast is the communication between each indivual agent.

swarms's People

Contributors

kyegomez avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.