Frameworks

Framework Integrations

Learn how to connect your agents from different frameworks with Mahilo. Each integration comes with real-time communication capabilities and human oversight features out of the box.

LangGraph

Connect your LangGraph agents to Mahilo for real-time communication and multi-agent collaboration.

Available Now

Integration Steps:

  1. 1

    Add the chat_with_agent tool to your graph's ToolNode.

    # the tool that mahilo provides out-of-the-box
    from mahilo.integrations.langgraph.tools import get_chat_with_agent_tool_langgraph
    
    chat_with_agent_tool = get_chat_with_agent_tool_langgraph()
    tools = [your_tools, .., chat_with_agent_tool]
  2. 2

    Import and initialize the LangGraph adapter with your StateGraph object

    from mahilo.integrations.langgraph.agent import LangGraphAgent
              
    # wrapper class to make your langgraph agent a mahilo agent
    marketing_agent = LangGraphAgent(
        langgraph_agent=graph_builder,
        name="MarketingAgent",
        description=marketing_agent_prompt,
        can_contact=[],
        short_description="Marketing agent",
    )
  3. 3

    Register your agent with a mahilo AgentManager (team)

    from mahilo.agent_manager import AgentManager
    
    # an agent manager is like a team
    team = AgentManager()
    team.register_agent(marketing_agent)
View Example Code

Pydantic AI

Integrate your Pydantic AI agents with Mahilo to enable cross-framework communication and policy enforcement.

Available Now

Integration Steps:

  1. 1

    Use your PydanticAI Agent in mahilo's adapter without any changes!

    from mahilo.integrations.pydanticai.agent import PydanticAIAgent
    
    # wrapper class to make your pydantic agent a mahilo agent
    product_agent = PydanticAIAgent(
        pydantic_agent=product_agent,
        name="ProductAgent",
        description=product_agent_prompt,
        can_contact=[],
        short_description="Product agent",
    )
  2. 2

    Activate your agent with any dependencies

    # activate the pydantic agent with the right dependencies
    product_agent.activate(dependencies=ProductDependencies(product_name="Mahilo", ...))
  3. 3

    Register your agent with a mahilo AgentManager (team)

    from mahilo.agent_manager import AgentManager
      
      # an agent manager is like a team
      team = AgentManager()
      team.register_agent(product_agent)
View Example Code

Custom API

Connect any agent through our standardized BaseAgent interface, enabling seamless integration with the mahilo ecosystem.

Available Now

Integration Steps:

  1. 1

    Define tools in the OpenAI spec with functions that call your APIs

    sales_tools = [
        {
            "tool": {
                "type": "function",
                "function": {
                    "name": "analyze_lead_sources",
                    "description": "Analyze effectiveness of different lead sources",
                    "parameters": {}
                }
            },
            "function": analyze_lead_sources,
        },
    ]
  2. 2

    Register your custom agent

    # the base mahilo agent
    sales_agent = BaseAgent(
        name="SalesAgent",
        type="sales_agent",
        description=sales_agent_prompt,
        short_description="Sales agent",
        tools=sales_tools,
    )
View Example Code

AutoGen

Coming soon: Integration with Microsoft's AutoGen framework for sophisticated multi-agent conversations.

Coming Soon

CrewAI

Coming soon: Support for CrewAI's role-based agent collaboration system.

Coming Soon