Multi-Agent AI Made Simple

Create systems where AI agents can intelligently collaborate while keeping humans in control

50+
GitHub Stars
500+
Monthly PyPI Downloads

A Multi-Agent Human-in-the-Loop Framework

Built on the principles of extensibility, intelligent context sharing, and human oversight, mahilo lets you build sophisticated multi-agent AI apps with ease.

True Multi-Player AI

Enable simultaneous interactions between multiple users and AI agents in a shared intelligent space.

  • Multiple users interact with AI agents simultaneously
  • Sophisticated shared context management
  • Configurable communication patterns between agents

Human-Centric Design

Keep humans in control while AI agents handle complex interactions seamlessly.

  • Perfect balance of automation and oversight
  • Humans are only contacted when needed
  • Humans can choose todictate AI decisions

Voice-Enabled Intelligence

Natural voice interactions powered by OpenAI's cutting-edge Realtime API.

  • Cutting-edge voice interaction capabilities
  • Natural conversations with AI agents
  • Enhanced accessibility through voice commands

Intelligent Collaboration

AI agents that autonomously share context and information when needed.

  • Smart context sharing between agents
  • Real-time information querying across users
  • Context windowing to prevent overload

Flexible Integration

Adapt and extend the framework for any collaborative AI use case.

  • Simple installation process
  • Extensive documentation and templates
  • Support for custom agent types

Advanced Agent Controls

Built with advanced agent communication patterns in mind.

  • Session management for persistence
  • Flexible communication patterns like peer-to-peer and hierarchical

Real-World Applications

Discover the diverse range of multi-agents apps that mahilo can help you create

Story Weaver

Collaborative Content Creation

911 Emergency Response

Critical Response Coordination

RentMate AI

Real Estate Matchmaking

Story Weaver

Collaborative Content Creation

Multi-player storytelling game where users create stories while AI agents intelligently blend narratives.

Key Mahilo Features Demonstrated

  • Real-time collaborative content creation with AI
  • Shared context management for enhanced creativity
  • Individual narrative ownership tracking
  • Multi-player AI interaction system

Build Your Multi-Agent System

Define Agents

Use the BaseAgent class or create custom agent classes

Create Agent Manager

Add agents to the AgentManager. Think of it as a team of agents

Start WebSocket Server

Create and run the AgentWebSocketServer

1from mahilo.agent import BaseAgent
2from mahilo.agent_manager import AgentManager
3from mahilo.server import ServerManager
4
5class BuyerAgent(BaseAgent):
6    def __init__(self, name, preferences):
7        super().__init__(
8            name=name,
9            description=PROMPT + preferences
10        )
11    ...
12
13buyer_agent = BuyerAgent(name="BuyerAgentJayesh", preferences="I'm looking for a house in Koramangala")
14seller_agent = BaseAgent(name="SellerAgent", description=SELLER_AGENT_PROMPT)
15
16# Create Agent Manager
17manager = AgentManager()
18manager.register_agent(seller_agent)
19manager.register_agent(buyer_agent)
20
21# initialize the server manager
22server = ServerManager(manager)
23# Start WebSocket Server
24server.run()

Client Connection Simulation

Connect Client

$ python client.py --agent-name buyer_agent

Connects to the mahilo WebSocket server for the buyer_agent and starts interaction