Kye
32c476e1d2
|
1 year ago | |
---|---|---|
.github | 1 year ago | |
docs | 1 year ago | |
images | 1 year ago | |
playground | 1 year ago | |
swarms | 1 year ago | |
tests | 1 year ago | |
.env.example | 1 year ago | |
.flake8 | 1 year ago | |
.gitignore | 1 year ago | |
.pre-commit-config.yaml | 1 year ago | |
.readthedocs.yml | 1 year ago | |
CODE_OF_CONDUCT.md | 1 year ago | |
CONTRIBUTING.md | 1 year ago | |
Dockerfile | 1 year ago | |
LICENSE | 2 years ago | |
README.md | 1 year ago | |
SECURITY.md | 1 year ago | |
code_quality.sh | 1 year ago | |
example.py | 1 year ago | |
mkdocs.yml | 1 year ago | |
pyproject.toml | 1 year ago | |
requirements.txt | 1 year ago | |
sequential_workflow_example.py | 1 year ago |
README.md
Swarms is a modular framework that enables reliable and useful multi-agent collaboration at scale to automate real-world tasks.
Installation
pip3 install --upgrade swarms
Usage
Flow
Example
- Reliable Structure that provides LLMS autonomy
- Extremely Customizeable with stopping conditions, interactivity, dynamical temperature, loop intervals, and so much more
- Enterprise Grade + Production Grade:
Flow
is designed and optimized for automating real-world tasks at scale!
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 workflow
flow = Flow(
llm=llm,
max_loops=2,
dashboard=True,
)
out = flow.run("Generate a 10,000 word blog on health and wellness.")
SequentialWorkflow
- A Sequential swarm of autonomous agents where each agent's outputs are fed into the next agent
- Save and Restore Workflow states!
- Integrate Flow's with various LLMs and Multi-Modality Models
from swarms.models import OpenAIChat, BioGPT, Anthropic
from swarms.structs import Flow
from swarms.structs.sequential_workflow import SequentialWorkflow
# Example usage
api_key = (
"" # Your actual API key here
)
# Initialize the language flow
llm = OpenAIChat(
openai_api_key=api_key,
temperature=0.5,
max_tokens=3000,
)
biochat = BioGPT()
# Use Anthropic
anthropic = Anthropic()
# Initialize the agent with the language flow
agent1 = Flow(llm=llm, max_loops=1, dashboard=False)
# Create another agent for a different task
agent2 = Flow(llm=llm, max_loops=1, dashboard=False)
# Create another agent for a different task
agent3 = Flow(llm=biochat, max_loops=1, dashboard=False)
# agent4 = Flow(llm=anthropic, max_loops="auto")
# Create the workflow
workflow = SequentialWorkflow(max_loops=1)
# Add tasks to the workflow
workflow.add("Generate a 10,000 word blog on health and wellness.", agent1)
# Suppose the next task takes the output of the first task as input
workflow.add("Summarize the generated blog", agent2)
workflow.add("Create a references sheet of materials for the curriculm", agent3)
# Run the workflow
workflow.run()
# Output the results
for task in workflow.tasks:
print(f"Task: {task.description}, Result: {task.result}")
Features 🤖
The Swarms framework is designed with a strong emphasis on reliability, performance, and production-grade readiness. Below are the key features that make Swarms an ideal choice for enterprise-level AI deployments.
🚀 Production-Grade Readiness
- Scalable Architecture: Built to scale effortlessly with your growing business needs.
- Enterprise-Level Security: Incorporates top-notch security features to safeguard your data and operations.
- Containerization and Microservices: Easily deployable in containerized environments, supporting microservices architecture.
⚙️ Reliability and Robustness
- Fault Tolerance: Designed to handle failures gracefully, ensuring uninterrupted operations.
- Consistent Performance: Maintains high performance even under heavy loads or complex computational demands.
- Automated Backup and Recovery: Features automatic backup and recovery processes, reducing the risk of data loss.
💡 Advanced AI Capabilities
The Swarms framework is equipped with a suite of advanced AI capabilities designed to cater to a wide range of applications and scenarios, ensuring versatility and cutting-edge performance.
Multi-Modal Autonomous Agents
- Versatile Model Support: Seamlessly works with various AI models, including NLP, computer vision, and more, for comprehensive multi-modal capabilities.
- Context-Aware Processing: Employs context-aware processing techniques to ensure relevant and accurate responses from agents.
Function Calling Models for API Execution
- Automated API Interactions: Function calling models that can autonomously execute API calls, enabling seamless integration with external services and data sources.
- Dynamic Response Handling: Capable of processing and adapting to responses from APIs for real-time decision making.
Varied Architectures of Swarms
- Flexible Configuration: Supports multiple swarm architectures, from centralized to decentralized, for diverse application needs.
- Customizable Agent Roles: Allows customization of agent roles and behaviors within the swarm to optimize performance and efficiency.
Generative Models
- Advanced Generative Capabilities: Incorporates state-of-the-art generative models to create content, simulate scenarios, or predict outcomes.
- Creative Problem Solving: Utilizes generative AI for innovative problem-solving approaches and idea generation.
Enhanced Decision-Making
- AI-Powered Decision Algorithms: Employs advanced algorithms for swift and effective decision-making in complex scenarios.
- Risk Assessment and Management: Capable of assessing risks and managing uncertain situations with AI-driven insights.
Real-Time Adaptation and Learning
- Continuous Learning: Agents can continuously learn and adapt from new data, improving their performance and accuracy over time.
- Environment Adaptability: Designed to adapt to different operational environments, enhancing robustness and reliability.
🔄 Efficient Workflow Automation
- Streamlined Task Management: Simplifies complex tasks with automated workflows, reducing manual intervention.
- Customizable Workflows: Offers customizable workflow options to fit specific business needs and requirements.
- Real-Time Analytics and Reporting: Provides real-time insights into agent performance and system health.
🌐 Wide-Ranging Integration
- API-First Design: Easily integrates with existing systems and third-party applications via robust APIs.
- Cloud Compatibility: Fully compatible with major cloud platforms for flexible deployment options.
- Continuous Integration/Continuous Deployment (CI/CD): Supports CI/CD practices for seamless updates and deployment.
📊 Performance Optimization
- Resource Management: Efficiently manages computational resources for optimal performance.
- Load Balancing: Automatically balances workloads to maintain system stability and responsiveness.
- Performance Monitoring Tools: Includes comprehensive monitoring tools for tracking and optimizing performance.
🛡️ Security and Compliance
- Data Encryption: Implements end-to-end encryption for data at rest and in transit.
- Compliance Standards Adherence: Adheres to major compliance standards ensuring legal and ethical usage.
- Regular Security Updates: Regular updates to address emerging security threats and vulnerabilities.
💬 Community and Support
- Extensive Documentation: Detailed documentation for easy implementation and troubleshooting.
- Active Developer Community: A vibrant community for sharing ideas, solutions, and best practices.
- Professional Support: Access to professional support for enterprise-level assistance and guidance.
Swarms framework is not just a tool but a robust, scalable, and secure partner in your AI journey, ready to tackle the challenges of modern AI applications in a business environment.
Documentation
- For documentation, go here, 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 and our contributing board
Community
- Join the Swarms community on Discord!
- Join our Swarms Community Gathering every Thursday at 1pm NYC Time to unlock the potential of autonomous agents in automating your daily tasks Sign up here
Discovery Call
Book a discovery call with the Swarms team to learn how to optimize and scale your swarm! Click here to book a time that works for you!
License
MIT