AI Personal Learning
and practical guidance
Ali-painted frog

Mahilo: an integrated platform for connecting different AI intelligences frameworks to collaborate in real time

General Introduction

Mahilo is an open source multi-intelligence integration platform, released on GitHub by developer Jayesh Sharma, designed to help users connect AI intelligences from different frameworks to support real-time communication, human-computer interaction, and intelligent collaboration. The platform provides a common interface to integrate intelligences from frameworks such as LangGraph, Pydantic AI, or add intelligences through custom APIs. It supports voice and text interactions and allows multiple users to collaborate with intelligences in a shared space. With 50+ stars on GitHub and over 500 PyPI downloads per month as of March 2025, Mahilo is suitable for diverse scenarios such as content creation, emergency response, real estate matching, etc. Mahilo simplifies the development of multi-intelligent body systems with flexible tools and modules that make it easy to build solutions for complex automated tasks.

Mahilo: An Integrated Platform for Real-Time Collaboration of Multiple Intelligentsia Frameworks-1


 

Function List

  • General Intelligence Integration: Support for connecting to intelligences from frameworks such as LangGraph, Pydantic AI, or customizing intelligences through the BaseAgent interface.
  • real time communication: Provides WebSocket connections for instant voice and text interaction between intelligences.
  • Intelligent Collaboration: Intelligents can autonomously share context and information through AgentManager to improve task efficiency.
  • Multi-user support: Allows multiple users to collaborate with intelligences in real time in a shared intelligent space.
  • voice function: Support for voice input and output requires an additional installation of PyAudio.
  • Organizational level strategy: Enforce behavior and security policies uniformly across intelligences to ensure consistency.
  • Flexible Architecture: Support the construction of complex multi-intelligence body systems and adapt to multiple communication modes.

 

Using Help

Installation process

To use Mahilo locally, you need to complete the following installation steps:

  1. Environmental requirements
    • Install Python 3.8 or later.
    • Install Git for cloning GitHub repositories.
    • If you need voice functionality, prepare PyAudio (see below for installation).
  2. clone warehouse
    Run the following command in a terminal to get the Mahilo code:
git clone https://github.com/wjayesh/mahilo.git
cd mahilo
  1. Installation of dependencies
    Go to the project directory and install the core dependencies:
pip install -r requirements.txt

If voice support is required, run:

pip install "mahilo[voice]"
  1. Install PyAudio (voice-enabled dependencies)
  • Windows (computer): Run pip install pyaudioIf it fails, you can download the corresponding version of .whl File Installation.
  • MacOS: Install Homebrew first (brew install portaudio), then run pip install pyaudioThe
  • Linux: Install system dependencies (sudo apt-get install portaudio19-dev), then run pip install pyaudioThe
  1. Start the server
    After the installation is complete, run the following command to start the WebSocket server:
python -m mahilo.server

The default is to run in the http://localhost:8000The address and port can be modified through the configuration file.

How to use

The use of Mahilo is divided into three main steps: intelligences definition, server operation and client interaction. The following is a detailed operation guide:

1. Defining and managing intelligences

  • Creating Basic Intelligence: Use BaseAgent Define a simple intelligence, such as a sales intelligence:
from mahilo.agent import BaseAgent
from mahilo.agent_manager import AgentManager
sales_agent = BaseAgent(
type="sales_agent",
description="Intelligent responsible for handling sales tasks",
tools=["crm_tool"]
)
manager = AgentManager()
manager.register_agent(sales_agent)
  • Integration of external frame intelligences: by LangGraph As an example:
    from mahilo.integrations.langgraph.agent import LangGraphAgent
    marketing_agent = LangGraphAgent(
    langgraph_agent=graph_builder,
    name="MarketingAgent",
    description="Marketing Strategy Intelligent",
    can_contact=["sales_agent"]
    )
    manager.register_agent(marketing_agent)
    

2. Start the WebSocket server

  • Initialize and run the server in a script:
    from mahilo.server.import ServerManager
    server = ServerManager(manager)
    server.run()
    
  • Once the server is started, the smart body can accept client connections via WebSocket.

3. Client connection and interaction

  • text interaction: Run the following command to connect the intelligences:
    python client.py --agent-name sales_agent
    

    After a successful connection, enter text to talk to the smart body, such as "How can I increase sales?"

  • voice interaction: Add --voice parameter to enable the voice function:
    python client.py --agent-name sales_agent --voice
    

    The system listens for microphone input and returns a voice response through the speaker.

4. Multi-intelligence collaboration

  • context sharing: Multiple intelligences pass AgentManager Managing dialog context. For example, a Sales Intelligence may ask a Marketing Intelligence:
    [sales_agent] How to increase sales?
    [marketing_agent] Suggest increasing social media advertising.
    
  • Multi-User Collaboration: Multiple clients can connect at the same time, for example:
    python client.py --agent-name buyer_agent
    python client.py --agent-name seller_agent
    

    Users and intelligences can interact in real time in a shared space to simulate multi-person collaboration scenarios.

5. Examples of practical applications

  • Story Weaver: Run collaborative content creation applications:
    story_agent = BaseAgent(type="story_agent", description="Story Creation Assistant")
    manager.register_agent(story_agent)
    server.run()
    

    Once connected, enter "Start an adventure story" and the intelligence will generate content and collaborate with other users.

  • Emergency response coordination: Create multiple intelligences to process information and assign tasks, for example:
    emergency_agent = BaseAgent(type="emergency_agent", description="Emergency Response Coordination")
    
  • Real Estate Matching: Intelligent bodies can match listings and provide suggestions based on user needs.

6. Debugging and extensions

  • Log View: Communication logs, such as questions and answers between intelligences, are displayed while the server is running to facilitate debugging.
  • Support for more frameworks: LangGraph and Pydantic AI are currently supported, as are AutoGen and CrewAI Integration will be available soon and users can submit requests via GitHub.
  • Custom extensions: Reference examples Sample code in the catalog for quick personalization.

caveat

  • Ensure a stable network connection, WebSocket is sensitive to latency.
  • Before using the voice function, test that the microphone and speaker are working properly.
  • For first time users it is recommended to run examples catalog examples to familiarize yourself with the basic functions.
CDN1
May not be reproduced without permission:Chief AI Sharing Circle " Mahilo: an integrated platform for connecting different AI intelligences frameworks to collaborate in real time

Chief AI Sharing Circle

Chief AI Sharing Circle specializes in AI learning, providing comprehensive AI learning content, AI tools and hands-on guidance. Our goal is to help users master AI technology and explore the unlimited potential of AI together through high-quality content and practical experience sharing. Whether you are an AI beginner or a senior expert, this is the ideal place for you to gain knowledge, improve your skills and realize innovation.

Contact Us
en_USEnglish