Swarms Logo
[EN]Swarms: The Enterprise-Grade Multi-Agent Orchestration Framework
[EN]Build, deploy, and scale autonomous AI agent swarms
[EN]Now available in Python and Rust
[EN]Explore our no-code interfaces and cloud API
Enterprise-Grade

Swarms Product Suite

Build, deploy, and scale autonomous AI agent swarms with unprecedented control and efficiency using our comprehensive suite of tools and frameworks.

Development Frameworks

Build powerful multi-agent systems with our enterprise-grade frameworks available in multiple languages.

Swarms Python

Python
Production-Ready

The flagship enterprise-grade production-ready multi-agent orchestration framework in Python. Build complex agent systems with sequential workflows, parallel processing, and mixture architectures.

Swarms Rust

Rust
High Performance

A high-performance implementation of the Swarms framework in Rust, designed for maximum efficiency and safety. Perfect for systems requiring blazing-fast performance and minimal resource usage.

Quick Installation

Python Installation

bash
pip install -U swarms swarms-memory

Rust Installation

bash
cargo add swarm-rs

Example Usage

Python Example

python
import os
from dotenv import load_dotenv
from swarm_models import OpenAIChat
from swarms import Agent, GroupChat, expertise_based


if __name__ == "__main__":

    load_dotenv()

    # Get the OpenAI API key from the environment variable
    api_key = os.getenv("OPENAI_API_KEY")

    # Create an instance of the OpenAIChat class
    model = OpenAIChat(
        openai_api_key=api_key,
        model_name="gpt-4o-mini",
        temperature=0.1,
    )

    # Example agents
    agent1 = Agent(
        agent_name="Financial-Analysis-Agent",
        system_prompt="You are a financial analyst specializing in investment strategies.",
        llm=model,
        max_loops=1,
        autosave=False,
        dashboard=False,
        verbose=True,
        dynamic_temperature_enabled=True,
        user_name="swarms_corp",
        retry_attempts=1,
        context_length=200000,
        output_type="string",
        streaming_on=False,
    )

    agent2 = Agent(
        agent_name="Tax-Adviser-Agent",
        system_prompt="You are a tax adviser who provides clear and concise guidance on tax-related queries.",
        llm=model,
        max_loops=1,
        autosave=False,
        dashboard=False,
        verbose=True,
        dynamic_temperature_enabled=True,
        user_name="swarms_corp",
        retry_attempts=1,
        context_length=200000,
        output_type="string",
        streaming_on=False,
    )

    agents = [agent1, agent2]

    chat = GroupChat(
        name="Investment Advisory",
        description="Financial and tax analysis group",
        agents=agents,
        speaker_fn=expertise_based,
    )

    history = chat.run(
        "How to optimize tax strategy for investments?"
    )
    print(history.model_dump_json(indent=2))

Rust Example

rust
use std::env;

use anyhow::Result;
use swarms_rs::llm::provider::openai::OpenAI;
use swarms_rs::structs::concurrent_workflow::ConcurrentWorkflow;

#[tokio::main]
async fn main() -> Result<()> {
    dotenv::dotenv().ok();

    let subscriber = tracing_subscriber::fmt::Subscriber::builder()
        .with_env_filter(tracing_subscriber::EnvFilter::from_default_env())
        .with_line_number(true)
        .with_file(true)
        .finish();
    tracing::subscriber::set_global_default(subscriber)?;

    let base_url = env::var("DEEPSEEK_BASE_URL").unwrap();
    let api_key = env::var("DEEPSEEK_API_KEY").unwrap();
    let client = OpenAI::from_url(base_url, api_key).set_model("deepseek-chat");

    let agent_1 = client
        .agent_builder()
        .agent_name("Agent 1")
        .system_prompt("You are Agent 1, responsible for planning.")
        .user_name("M4n5ter")
        .max_loops(1)
        .temperature(0.3)
        .enable_autosave()
        .save_state_dir("./temp")
        .add_stop_word("<DONE>")
        .build();

    let agent_2 = client
        .agent_builder()
        .agent_name("Agent 2")
        .system_prompt("You are Agent 2, responsible for solving the problem.")
        .user_name("M4n5ter")
        .max_loops(1)
        .temperature(0.3)
        .enable_autosave()
        .save_state_dir("./temp")
        .add_stop_word("<DONE>")
        .build();

    let agents = vec![agent_1, agent_2]
        .into_iter()
        .map(|a| Box::new(a) as _)
        .collect::<Vec<_>>();

    let workflow = ConcurrentWorkflow::builder()
        .name("ConcurrentWorkflow")
        .metadata_output_dir("./temp/concurrent_workflow/metadata")
        .description("A Workflow to solve a problem with two agents.")
        .agents(agents)
        .build();

    let result = workflow.run("How to learn Rust?").await?;

    println!("{}", serde_json::to_string_pretty(&result)?);
    Ok(())
}

Enterprise-Grade Features

Swarms provides everything you need to build powerful multi-agent systems for production use.

🏢 Enterprise Architecture

Features

  • Production-Ready Infrastructure
  • High Reliability Systems
  • Modular Design
  • Comprehensive Logging

Benefits

  • Reduced downtime
  • Easier maintenance
  • Better debugging
  • Enhanced monitoring

🤖 Agent Orchestration

Features

  • Hierarchical Swarms
  • Parallel Processing
  • Sequential Workflows
  • Graph-based Workflows
  • Dynamic Agent Rearrangement

Benefits

  • Complex task handling
  • Improved performance
  • Flexible workflows
  • Optimized execution

🔄 Integration Capabilities

Features

  • Multi-Model Support
  • Custom Agent Creation
  • Extensive Tool Library
  • Multiple Memory Systems

Benefits

  • Provider flexibility
  • Custom solutions
  • Extended functionality
  • Enhanced memory management

📈 Scalability

Features

  • Concurrent Processing
  • Resource Management
  • Load Balancing
  • Horizontal Scaling

Benefits

  • Higher throughput
  • Efficient resource use
  • Better performance
  • Easy scaling

🛠️ Developer Tools

Features

  • Simple API
  • Extensive Documentation
  • Active Community
  • CLI Tools

Benefits

  • Faster development
  • Easy learning curve
  • Community support
  • Quick deployment

🔐 Security Features

Features

  • Error Handling
  • Rate Limiting
  • Monitoring Integration
  • Audit Logging

Benefits

  • Improved reliability
  • API protection
  • Better monitoring
  • Enhanced tracking

📊 Advanced Features

Features

  • SpreadsheetSwarm
  • Group Chat
  • Agent Registry
  • Mixture of Agents

Benefits

  • Mass agent management
  • Collaborative AI
  • Centralized control
  • Complex solutions

🔌 Provider Support

Features

  • OpenAI
  • Anthropic
  • ChromaDB
  • Custom Providers

Benefits

  • Provider flexibility
  • Storage options
  • Custom integration
  • Vendor independence

💪 Production Features

Features

  • Automatic Retries
  • Async Support
  • Environment Management
  • Type Safety

Benefits

  • Better reliability
  • Improved performance
  • Easy configuration
  • Safer code

Ready to Build the Future of AI?

Start building with Swarms today and join the revolution in enterprise AI orchestration.