A framework for creating collaborative AI agent swarms
Project description
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
- Report issues on GitHub Issues
- Join discussions in GitHub Discussions
Authors
- Bart Van Spitaels (bart.vanspitaels@gmail.com)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file multi_swarm-1.0.5.tar.gz.
File metadata
- Download URL: multi_swarm-1.0.5.tar.gz
- Upload date:
- Size: 195.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93d7cf40a1b2919b4c68c07ebc51d9d0ef27424d5054f9004e0ab6217347c5d8
|
|
| MD5 |
084d2a81b541fb3d7a3145f5d975b72a
|
|
| BLAKE2b-256 |
b424e2090b1a496bd72ba690968e737a41381b750db807de6a9c914d91e381f7
|
File details
Details for the file multi_swarm-1.0.5-py3-none-any.whl.
File metadata
- Download URL: multi_swarm-1.0.5-py3-none-any.whl
- Upload date:
- Size: 136.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
594a48e866bf2a6e3257f9bc4594e3ebd111995c12ad9362f2a13b5f4c30572b
|
|
| MD5 |
e846d651e922156077294bab1fdeb713
|
|
| BLAKE2b-256 |
5546aaa94610216867c68494102bd9597f0cee9ff2ccdecd00cf35335f885603
|