Kye
699c943394
|
1 year ago | |
---|---|---|
.github | 1 year ago | |
demos | 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 | |
.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.
Share on Social Media
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, 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!
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(
# model_name="gpt-4"
openai_api_key=api_key,
temperature=0.5,
# max_tokens=100,
)
## Initialize the workflow
flow = Flow(
llm=llm,
max_loops=2,
dashboard=True,
# stopping_condition=None, # You can define a stopping condition as needed.
# loop_interval=1,
# retry_attempts=3,
# retry_interval=1,
# interactive=False, # Set to 'True' for interactive mode.
# dynamic_temperature=False, # Set to 'True' for dynamic temperature handling.
)
# out = flow.load_state("flow_state.json")
# temp = flow.dynamic_temperature()
# filter = flow.add_response_filter("Trump")
out = flow.run("Generate a 10,000 word blog on health and wellness.")
# out = flow.validate_response(out)
# out = flow.analyze_feedback(out)
# out = flow.print_history_and_memory()
# # out = flow.save_state("flow_state.json")
# print(out)
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
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,
)
# Initialize the Flow with the language flow
flow1 = Flow(llm=llm, max_loops=1, dashboard=False)
# Create another Flow for a different task
flow2 = Flow(llm=llm, max_loops=1, dashboard=False)
# 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.", flow1)
# Suppose the next task takes the output of the first task as input
workflow.add("Summarize the generated blog", flow2)
# 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
License
MIT