MCP cover image
See in Github
2025-04-14

Un SDK Python léger et extensible pour la construction de systèmes multi-agents, simplifiant la communication et l'intégration, avec un support de première classe pour le protocole de contexte du modèle (MCP)

0

Github Watches

0

Github Forks

0

Github Stars

SimpleMAS

A lightweight SDK for building Multi-Agent Systems with a focus on the Model Context Protocol (MCP).

Features

  • Agent communication - HTTP, WebSockets, and MCP-based communication between agents
  • Environment-based configuration - Configure agents using environment variables
  • Belief-Desire-Intention (BDI) agents - Build agents that reason about beliefs, desires, and intentions
  • Reasoning integration - Easily integrate LLMs and other reasoning systems
  • Deployment tools - Generate and orchestrate deployment configurations for Docker Compose and Kubernetes

Installation

pip install simple-mas

Or with Poetry:

poetry add simple-mas

Usage

Basic Agent

from simple_mas import Agent
from simple_mas.communication import HTTPCommunicator

agent = Agent(
    name="my-agent",
    communicator=HTTPCommunicator(
        agent_name="my-agent",
        service_urls={"other-agent": "http://other-agent:8000/"}
    )
)

# Add capabilities, start the agent, etc.

Deployment Orchestration

SimpleMas includes powerful tools for deploying multi-agent systems:

# Discover SimpleMas components in your project
simplemas discover --directory ./my-project

# Orchestrate components into a single Docker Compose file
simplemas orchestrate --directory ./my-project --output docker-compose.yml

# Generate Kubernetes manifests for a component
simplemas k8s --input ./my-project/agent/simplemas.deploy.yaml --output k8s/

Documentation

For more details, see the documentation.

Quick Start

from simple_mas.agent import BaseAgent
from simple_mas.communication import McpSseCommunicator

class MyAgent(BaseAgent):
    async def setup(self) -> None:
        # Initialize your agent here
        pass

    async def run(self) -> None:
        # Run your agent's main logic
        response = await self.communicator.send_request(
            "chess-engine",
            "make_move",
            {"board_state": "..."}
        )

    async def shutdown(self) -> None:
        # Clean up resources
        pass

# Run the agent
async def main():
    agent = MyAgent(name="my-orchestrator")
    await agent.start()

if __name__ == "__main__":
    import asyncio
    asyncio.run(main())

Development

# Clone the repository
git clone https://github.com/yourusername/simple-mas.git
cd simple-mas

# Install dependencies
poetry install

# Install pre-commit hooks
poetry run pre-commit install

# Run tests
poetry run pytest

# Run all code quality checks at once
./scripts/check_quality.sh

# Or run individual checks
poetry run black src tests
poetry run isort src tests
poetry run flake8 src tests
poetry run mypy src

Code Quality

This project uses several tools to ensure code quality:

  • black: Code formatting
  • isort: Import sorting
  • flake8: Linting
  • mypy: Type checking
  • pytest: Testing

Pre-commit hooks are configured to run these checks automatically before each commit. You can also run all checks manually using the ./scripts/check_quality.sh script.

License

MIT

相关推荐

  • Contraband Interactive
  • Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.

  • rustassistant.com
  • Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.

  • Aurity Ltd
  • Create and Publish Business Websites in seconds. AI will gather all the details about your website and generate link to your website.

  • Convincible Ltd
  • You're in a stone cell – can you get out? A classic choose-your-adventure interactive fiction game, based on a meticulously-crafted playbook. With a medieval fantasy setting, infinite choices and outcomes, and dice!

  • John Rafferty
  • Text your favorite pet, after answering 10 questions about their everyday lives!

  • Ian O'Connell
  • Provide players' names or enter Quickstart to start the game!

  • analogchat.com
  • Efficient Spotify assistant for personalized music data.

  • WangRongsheng
  • 🧑‍🚀 全世界最好的 LLM 资料总结 (数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Résumé des meilleures ressources LLM du monde.

  • langgenius
  • alibaba
  • av
  • Exécutez sans effort LLM Backends, API, Frontends et Services avec une seule commande.

  • Azure
  • Ce référentiel est pour le développement du serveur MCP Azure, apportant la puissance d'Azure à vos agents.

  • 1Panel-dev
  • 🔥 1Panel fournit une interface Web intuitive et un serveur MCP pour gérer des sites Web, des fichiers, des conteneurs, des bases de données et des LLM sur un serveur Linux.

  • Byaidu
  • PDF Traduction de papier scientifique avec formats conservés - 基于 AI 完整保留排版的 PDF 文档全文双语翻译 , 支持 Google / Deepl / Olllama / Openai 等服务 , 提供 CLI / GUI / MCP / DOCKER / ZOTERO

  • caio-moliveira
  • Ce projet a été créé pour démontrer comment nous pouvons nous connecter avec différents protocoles de contexte de modèle (MCP).

  • microsoft
  • Python tool for converting files and office documents to Markdown.

  • mindsdb
  • AI's query engine - Platform for building AI that can answer questions over large scale federated data. - The only MCP Server you'll ever need

  • rulego
  • ⛓️RULEGO est un cadre de moteur de règle d'orchestration des composants de nouvelle génération légère, intégrée, intégrée et de nouvelle génération pour GO.

  • AstrBotDevs
  • ✨ 易上手的多平台 llm 聊天机器人及开发框架 ✨ 平台支持 QQ 、 QQ 频道、 Télégramme 、微信、企微、飞书 | MCP 服务器、 Openai 、 Deepseek 、 Gemini 、硅基流动、月之暗面、 Olllama 、 Oneapi 、 Dify 等。附带 webui。

    Reviews

    2.8 (5)
    Avatar
    user_fPw0dFsR
    2025-04-24

    I've been using simple-mas by wilson-urdaneta and it has significantly improved my workflow. The straightforward design and easy-to-navigate interface make it a pleasure to use. I appreciate the effort put into making this application user-friendly. Highly recommend it to anyone looking for a reliable and efficient solution!

    Avatar
    user_1M1LPDTK
    2025-04-24

    I've been using simple-mas by wilson-urdaneta and it has exceeded my expectations. The ease of use and intuitive interface makes it a standout tool. Whether you're new to this type of application or an experienced user, you'll appreciate the thoughtful design and functionality. Highly recommend giving it a try!

    Avatar
    user_xkpEMP4L
    2025-04-24

    I've been using Simple-MAS by Wilson Urdaneta and it has completely exceeded my expectations. This application is user-friendly, efficient, and a reliable tool for managing multiple tasks seamlessly. Highly recommended for anyone looking for simplicity and functionality in one package.

    Avatar
    user_e8zy1gOH
    2025-04-24

    As a dedicated user of MCP applications, I highly recommend "simple-mas" by Wilson Urdaneta. This straightforward and efficient product stands out for its user-friendly interface and robust functionality. It's perfect for those who need a reliable solution with minimal hassle. The welcome message sets a positive tone, and the starting URL makes it easy to jump right in. Overall, "simple-mas" delivers on its promises and enhances productivity seamlessly.

    Avatar
    user_SG2jVPPz
    2025-04-24

    As a dedicated user of MCP applications, I highly recommend simple-mas by wilson-urdaneta. Its intuitive design and seamless user experience make it an excellent tool for both beginners and advanced users. The straightforward navigation and helpful welcome guide ensure that users can easily get started and benefit from its features right away. Simple-mas truly stands out for its efficiency and user-friendly interface. A must-try for anyone looking to streamline their processes!