You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
132 lines
5.6 KiB
132 lines
5.6 KiB

|
|
|
|
<div align="center">
|
|
|
|
Swarms is a modular framework that enables reliable and useful multi-agent collaboration at scale to automate real-world tasks.
|
|
|
|
|
|
[](https://github.com/kyegomez/swarms/issues) [](https://github.com/kyegomez/swarms/network) [](https://github.com/kyegomez/swarms/stargazers) [](https://github.com/kyegomez/swarms/blob/main/LICENSE)[](https://star-history.com/#kyegomez/swarms)[](https://libraries.io/github/kyegomez/swarms) [](https://pepy.tech/project/swarms)
|
|
|
|
|
|
### Share on Social Media
|
|
|
|
[](https://twitter.com/intent/tweet?text=Check%20out%20this%20amazing%20AI%20project:%20&url=https%3A%2F%2Fgithub.com%2Fkyegomez%2Fswarms) [](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fgithub.com%2Fkyegomez%2Fswarms) [](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fgithub.com%2Fkyegomez%2Fswarms&title=&summary=&source=)
|
|
|
|
[](https://www.reddit.com/submit?url=https%3A%2F%2Fgithub.com%2Fkyegomez%2Fswarms&title=Swarms%20-%20the%20future%20of%20AI) [](https://news.ycombinator.com/submitlink?u=https%3A%2F%2Fgithub.com%2Fkyegomez%2Fswarms&t=Swarms%20-%20the%20future%20of%20AI) [](https://pinterest.com/pin/create/button/?url=https%3A%2F%2Fgithub.com%2Fkyegomez%2Fswarms&media=https%3A%2F%2Fexample.com%2Fimage.jpg&description=Swarms%20-%20the%20future%20of%20AI) [](https://api.whatsapp.com/send?text=Check%20out%20Swarms%20-%20the%20future%20of%20AI%20%23swarms%20%23AI%0A%0Ahttps%3A%2F%2Fgithub.com%2Fkyegomez%2Fswarms)
|
|
|
|
</div>
|
|
|
|
[](https://github.com/users/kyegomez/projects/1)
|
|
|
|
## Vision
|
|
At Swarms, we're transforming the landscape of AI from siloed AI agents to a unified 'swarm' of intelligence. Through relentless iteration and the power of collective insight from our 1500+ Agora researchers, we're developing a groundbreaking framework for AI collaboration. Our mission is to catalyze a paradigm shift, advancing Humanity with the power of unified autonomous AI agent swarms.
|
|
|
|
-----
|
|
|
|
## 🤝 Schedule a 1-on-1 Session
|
|
|
|
Book a [1-on-1 Session with Kye](https://calendly.com/swarm-corp/30min), the Creator, to discuss any issues, provide feedback, or explore how we can improve Swarms for you.
|
|
|
|
|
|
----------
|
|
|
|
## Installation
|
|
`pip3 install --upgrade swarms`
|
|
|
|
---
|
|
|
|
## Usage
|
|
We have a small gallery of examples to run here, [for more check out the docs to build your own agent and or swarms!](https://docs.apac.ai)
|
|
|
|
### `Flow` Example
|
|
- The `Flow` is a superior iteratioin of the `LLMChain` from Langchain, our intent with `Flow` is to create the most reliable loop structure that gives the agents their "autonomy" through 3 main methods of interaction, one through user specified loops, then dynamic where the agent parses a <DONE> token, and or an interactive human input verison, or a mix of all 3.
|
|
```python
|
|
|
|
from swarms.models import OpenAIChat
|
|
from swarms.structs import Flow
|
|
|
|
api_key = ""
|
|
|
|
|
|
# Initialize the language model,
|
|
# This model can be swapped out with Anthropic, ETC, Huggingface Models like Mistral, ETC
|
|
llm = OpenAIChat(
|
|
openai_api_key=api_key,
|
|
temperature=0.5,
|
|
)
|
|
|
|
# Initialize the flow
|
|
flow = Flow(
|
|
llm=llm,
|
|
max_loops=5,
|
|
)
|
|
|
|
out = flow.run("Generate a 10,000 word blog, say Stop when done")
|
|
print(out)
|
|
|
|
|
|
```
|
|
|
|
|
|
## `GodMode`
|
|
- A powerful tool for concurrent execution of tasks using multiple Language Model (LLM) instances.
|
|
|
|
```python
|
|
from swarms.swarms import GodMode
|
|
from swarms.models import OpenAIChat
|
|
|
|
api_key = ""
|
|
|
|
llm = OpenAIChat(
|
|
openai_api_key=api_key
|
|
)
|
|
|
|
|
|
llms = [
|
|
llm,
|
|
llm,
|
|
llm
|
|
]
|
|
|
|
god_mode = GodMode(llms)
|
|
|
|
task = 'Generate a 10,000 word blog on health and wellness.'
|
|
|
|
out = god_mode.run(task)
|
|
god_mode.print_responses(task)
|
|
```
|
|
|
|
------
|
|
|
|
### `OmniModalAgent`
|
|
- OmniModal Agent is an LLM that access to 10+ multi-modal encoders and diffusers! It can generate images, videos, speech, music and so much more, get started with:
|
|
|
|
```python
|
|
from swarms.models import OpenAIChat
|
|
from swarms.agents import OmniModalAgent
|
|
|
|
api_key = "SK-"
|
|
|
|
llm = OpenAIChat(model_name="gpt-4", openai_api_key=api_key)
|
|
|
|
agent = OmniModalAgent(llm)
|
|
|
|
agent.run("Create a video of a swarm of fish")
|
|
|
|
```
|
|
|
|
---
|
|
|
|
## Documentation
|
|
|
|
- For documentation, go here, [swarms.apac.ai](https://swarms.apac.ai)
|
|
|
|
|
|
## 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](CONTRIBUTING.md).
|
|
|
|
# License
|
|
|
|
MIT
|