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.1.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.1-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: multi_swarm-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 719baa6c114de5cc5f9a23e508e4a3f56392a6e7010e9289982da006094eddcb
MD5 3098acd7288d55610cf817b3f2536480
BLAKE2b-256 61695b98b9f11ef03be1777ec38ebf88d87274fb2fc3fb046373e415aca19176

See more details on using hashes here.

File details

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

File metadata

  • Download URL: multi_swarm-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 86feb5a02c25ccc50dc2dbc2929ed2ba707b41604ecd6fb9f9d6847e20e6368e
MD5 5150df1e5d9942b3f7e222c3c4e52efa
BLAKE2b-256 bc43124fd4d8f7975abc0613ebe548593c8073c55bfc34ae473fd11e8f0db370

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