Skip to main content

Multi-Swarm Framework

A powerful framework for creating collaborative AI agent swarms, supporting multiple LLM providers and advanced agent management capabilities.

Latest Version: 1.0.5

What's New

  • Plugin system for extensible agent capabilities
  • Centralized YAML configuration for model management
  • Enhanced experimental model support
  • Improved version compatibility handling
  • Enhanced knowledge coordination across agents
  • Improved temporal awareness in document retrieval
  • Better knowledge gap detection and analysis
  • Advanced knowledge synthesis capabilities
  • Optimized collaborative search functionality
  • Improved communication flows between agents
  • Enhanced state management and persistence
  • Better error handling and recovery mechanisms

Features

Plugin System

  • Extensible plugin architecture for custom tools
  • Built-in plugin registry and management
  • Example tools including Git integration
  • Easy-to-implement plugin interface
  • Automatic plugin discovery and loading
  • Plugin health monitoring and lifecycle management

Multi-LLM Support

  • Claude (Anthropic) integration with latest models:
    • claude-3-5-sonnet-latest (balanced)
    • claude-3-5-opus-latest (research)
  • Gemini (Google) integration with latest models:
    • gemini-2.0-flash-exp (high performance)
  • Automatic model selection based on agent roles and tasks

Advanced Agency Management

  • Flexible agent creation and configuration
  • Sophisticated communication flows between agents
  • State persistence and thread management
  • Automated task distribution and coordination
  • Knowledge synthesis and gap analysis

Built-in Tools

  • Plugin-based tool architecture
  • Git integration for version control
  • Code Interpreter for executing Python code
  • RAG system with temporal awareness
  • File Search with semantic capabilities
  • Docker integration for isolated environments
  • Customizable tool creation framework

Installation

pip install multi-swarm

For development:

pip install multi-swarm[dev]

For GPU support:

pip install multi-swarm[gpu]

Quick Start

from multi_swarm import Agency, Agent
from multi_swarm.plugins.tools.development import GitTool

# Create agents with specific roles
ceo = Agent(
    name="CEO",
    description="Manages overall strategy and coordination",
    llm_provider="claude",  # Will use claude-3-5-sonnet-latest
    provider_config={
        "model": "claude-3-5-sonnet-latest",
        "api_version": "2024-03"
    }
)

developer = Agent(
    name="Developer",
    description="Handles technical implementation",
    llm_provider="gemini",  # Will use gemini-2.0-flash-exp
    provider_config={
        "model": "gemini-2.0-flash-exp",
        "api_version": "2024-01"
    }
)

# Register tools with agents
git_tool = GitTool()
developer.register_tool(git_tool)

# Create agency with communication flows
agency = Agency([
    ceo,  # Entry point for user communication
    [ceo, developer],  # CEO can communicate with Developer
])

# Run the agency
agency.run()

Plugin Development

Create custom plugins by extending the base plugin class:

from multi_swarm.plugins.base import PluginBase, PluginMetadata

class CustomTool(PluginBase):
    """Custom tool implementation."""
    def __init__(self):
        metadata = PluginMetadata(
            name="custom_tool",
            version="1.0.0",
            description="Custom tool description",
            author="Your Name",
            requirements=["required-package"],
            tags=["custom", "tool"]
        )
        super().__init__(metadata=metadata)
    
    def get_capabilities(self):
        return ["custom_capability"]

Task-Specific Model Selection

The framework automatically selects the best model based on the agent's role:

Claude Models

  • Code Generation & Development: claude-3-5-sonnet-latest
  • Research & Analysis: claude-3-5-opus-latest
  • Technical Writing: claude-3-5-sonnet-latest

Gemini Models

  • Data Processing: gemini-2.0-flash-exp
  • Real-time Operations: gemini-2.0-flash-exp
  • Machine Learning Tasks: gemini-2.0-flash-exp

Documentation

For detailed documentation, visit:

Requirements

  • Python 3.8+
  • Dependencies:
    • anthropic>=0.18.1
    • google-generativeai>=0.3.2
    • pydantic>=2.0.0
    • python-dotenv>=1.0.0
    • docker>=6.1.0
    • sentence-transformers>=2.2.0
    • faiss-cpu>=1.7.4 (or faiss-gpu for GPU support)
    • transformers>=4.38.0
    • torch>=2.0.0
    • numpy>=1.24.0
    • click>=8.0.0

Optional Dependencies

Development Tools

  • pytest>=8.0.0
  • pytest-asyncio>=0.25.0
  • pytest-cov>=6.0.0
  • black>=24.0.0
  • isort>=5.0.0
  • mypy>=1.8.0

GPU Support

  • faiss-gpu>=1.7.4
  • torch>=2.0.0 (with CUDA support)

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please read our Contributing Guidelines and Code of Conduct.

Support

Authors

Metadata

Release files for multi-swarm 1.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for multi-swarm 1.0.5
File Size Uploaded Provenance
multi_swarm-1.0.5.tar.gz 195.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for multi-swarm 1.0.5
File Interpreter ABI Platform
multi_swarm-1.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 331.4 kB

Release files / multi_swarm-1.0.5.tar.gz

Download URL multi_swarm-1.0.5.tar.gz
Size 195.1 kB
Tags Source
SHA-256 checksum
How to use checksums
93d7cf40a1b2919b4c68c07ebc51d9d0ef27424d5054f9004e0ab6217347c5d8
BLAKE2b-256 checksum
How to use checksums
b424e2090b1a496bd72ba690968e737a41381b750db807de6a9c914d91e381f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release files / multi_swarm-1.0.5-py3-none-any.whl

Download URL multi_swarm-1.0.5-py3-none-any.whl
Size 136.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
594a48e866bf2a6e3257f9bc4594e3ebd111995c12ad9362f2a13b5f4c30572b
BLAKE2b-256 checksum
How to use checksums
5546aaa94610216867c68494102bd9597f0cee9ff2ccdecd00cf35335f885603
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Security for multi-swarm 1.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page