Home

Awesome

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


from swarms import Swarms

# Retrieve your API key from the environment or replace with your actual key
api_key = "sksdsds"

# Initialize Swarms with your API key
swarm = Swarms(openai_api_key=api_key)

# Define an objective
objective = """
Please develop and serve a simple community web service. 
People can signup, login, post, comment. 
Post and comment should be visible at once. 
I want it to have neumorphism-style. 
The ports you can use are 4500 and 6500.
"""

# Run Swarms
swarm.run_swarms(objective)

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:

from swarms.swarms import Swarms

# Retrieve your API key from the environment or replace with your actual key
api_key = "sksdsds"

# Initialize Swarms with your API key
swarm = Swarms(openai_api_key=api_key)

# Define an objective
objective = """
Please develop and serve a simple community web service. 
People can signup, login, post, comment. 
Post and comment should be visible at once. 
I want it to have neumorphism-style. 
The ports you can use are 4500 and 6500.
"""

# Run Swarms
swarm.run_swarms(objective)

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.

Bounty Program

Our bounty program is an exciting opportunity for contributors to help us build the future of Swarms. By participating, you can earn rewards while contributing to a project that aims to revolutionize digital activity.

Here's how it works:

  1. Check out our Roadmap: We've shared our roadmap detailing our short and long-term goals. These are the areas where we're seeking contributions.

  2. Pick a Task: Choose a task from the roadmap that aligns with your skills and interests. If you're unsure, you can reach out to our team for guidance.

  3. Get to Work: Once you've chosen a task, start working on it. Remember, quality is key. We're looking for contributions that truly make a difference.

  4. Submit your Contribution: Once your work is complete, submit it for review. We'll evaluate your contribution based on its quality, relevance, and the value it brings to Swarms.

  5. Earn Rewards: If your contribution is approved, you'll earn a bounty. The amount of the bounty depends on the complexity of the task, the quality of your work, and the value it brings to Swarms.

The Three Phases of Our Bounty Program

Phase 1: Building the Foundation

In the first phase, our focus is on building the basic infrastructure of Swarms. This includes developing key components like the Swarms class, integrating essential tools, and establishing task completion and evaluation logic. We'll also start developing our testing and evaluation framework during this phase. If you're interested in foundational work and have a knack for building robust, scalable systems, this phase is for you.

Phase 2: Optimizing the System

In the second phase, we'll focus on optimizng Swarms by integrating more advanced features, improving the system's efficiency, and refining our testing and evaluation framework. This phase involves more complex tasks, so if you enjoy tackling challenging problems and contributing to the development of innovative features, this is the phase for you.

Phase 3: Towards Super-Intelligence

The third phase of our bounty program is the most exciting - this is where we aim to achieve super-intelligence. In this phase, we'll be working on improving the swarm's capabilities, expanding its skills, and fine-tuning the system based on real-world testing and feedback. If you're excited about the future of AI and want to contribute to a project that could potentially transform the digital world, this is the phase for you.

Remember, our roadmap is a guide, and we encourage you to bring your own ideas and creativity to the table. We believe that every contribution, no matter how small, can make a difference. So join us on this exciting journey and help us create the future of Swarms.

<!-- **To participate in our bounty program, visit the [Swarms Bounty Program Page](https://swarms.ai/bounty).** Let's build the future together! -->

Inspiration

Agent System Overview

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