Skip to main content

A framework for creating collaborative AI agents using multiple LLM providers

Project description

Multi-Swarm: Multi-LLM Agent Framework

A framework for creating collaborative AI agents using multiple LLM providers (Google's Gemini and Anthropic's Claude).

Features

  • Multi-LLM Support: Leverage different LLM providers for specialized tasks
  • Flexible Agent Architecture: Create custom agents with specific roles and capabilities
  • Structured Communication: Define clear communication flows between agents
  • Easy Integration: Simple API for creating and running agent swarms

Installation

  1. Clone the repository
  2. Install dependencies:
pip install -r requirements.txt

Environment Setup

Create a .env file in your project root with your API keys:

GOOGLE_API_KEY=your_gemini_api_key
ANTHROPIC_API_KEY=your_claude_api_key

Usage

Basic Example

from multi_swarm import Agency, CEOAgent, TrendsAnalyst

# Initialize agents
ceo = CEOAgent()  # Uses Gemini 2.0 Pro
analyst = TrendsAnalyst()  # Uses Claude 3.5 Sonnet

# Create agency with communication flows
agency = Agency(
    agents=[
        ceo,  # CEO is the entry point
        [ceo, analyst],  # CEO can delegate to analyst
    ],
    shared_instructions="agency_manifesto.md"
)

# Run the agency
agency.run_demo()

Custom Agent Creation

  1. Create a new agent class:
from multi_swarm import BaseAgent

class CustomAgent(BaseAgent):
    def __init__(self):
        super().__init__(
            name="Custom Agent",
            description="Description of the agent's role",
            instructions="path/to/instructions.md",
            tools_folder="path/to/tools",
            model="model-name",  # gemini-2.0-pro or claude-3.5-sonnet
            temperature=0.7
        )
  1. Create instructions for your agent in a markdown file
  2. Add any custom tools in the agent's tools folder
  3. Integrate the agent into your agency's communication flow

License

MIT License - see LICENSE file for details

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

multi_swarm-0.1.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

multi_swarm-0.1.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file multi_swarm-0.1.0.tar.gz.

File metadata

  • Download URL: multi_swarm-0.1.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for multi_swarm-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f6f495e71bdf6266ad6118dd681c7cb7aa2e70a091be315db5387f1f3588260c
MD5 82d94902a327c3ff3c415f23c52c9092
BLAKE2b-256 259553dfe42770834153cf7e1ed297c4f48a50277a855d12396f29f05afd596f

See more details on using hashes here.

File details

Details for the file multi_swarm-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: multi_swarm-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for multi_swarm-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a6799d74cee94b4b2ba42fb20f2ae7d62ed0ea19e9a7a4692356b1ca675cd004
MD5 461b3d24fb2256957c41cb9a112ad3fc
BLAKE2b-256 11679fb4178392e5b850c2cf8bc36ef5b0fcd9a53376e02081f698d8e87e8579

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page