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.2.tar.gz (9.3 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.2-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: multi_swarm-0.1.2.tar.gz
  • Upload date:
  • Size: 9.3 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.2.tar.gz
Algorithm Hash digest
SHA256 b4ba4892f34c2ab4a668a89e38c738cd226e8468b5d0b3e512946daa50240cda
MD5 e6038879410785ee6efea31f9d3bca05
BLAKE2b-256 e846c9e76200d11d0b91fdcdc4fdbd152906f779affab8ac55fa880bb65fdc07

See more details on using hashes here.

File details

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

File metadata

  • Download URL: multi_swarm-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 8.1 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 72649f745766d0b3bc50938ebd791e5a59d1c0327db7ea32e065a2a5a28b5cbd
MD5 93c74fc64fca282642ef92a0d301ea3a
BLAKE2b-256 65154772add746a2f7125ab203c8e62343120aee767c51141e7eb54e1ea9a69b

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