MCP ExplorerExplorer

Autogen Langchain Mcp Mix

@rinormalokuon 10 months ago
1 MIT
FreeCommunity
AI Systems
A multi-agent system for Kubernetes configuration using Autogen, Langchain, and MCP.

Overview

What is Autogen Langchain Mcp Mix

autogen-langchain-mcp-mix is a multi-agent system that integrates Autogen, Langchain, and MCP to assist with Kubernetes configuration tasks by enabling agents to collaborate on researching, modifying, and applying YAML configurations.

Use cases

Use cases include automating the setup of Kubernetes clusters, managing Istio configurations, and facilitating collaborative tasks among agents to streamline YAML file management.

How to use

To use autogen-langchain-mcp-mix, clone the repository, set up a virtual environment, install the required dependencies, configure environment variables, and then set up a Kubernetes environment before running the main script to initiate the multi-agent system.

Key features

Key features include a PlanningAgent for task decomposition, a WebSearchAgent for information gathering, a FixerAgent for YAML file manipulation, and a RunnerAgent for executing terminal commands related to Kubernetes configurations.

Where to use

autogen-langchain-mcp-mix can be used in DevOps, cloud computing, and any environment requiring automated management of Kubernetes configurations.

Content

Multi-Agent System that connects Autogen, Langchain, and MCP

This project demonstrates a multi-agent system using Autogen that assists with Kubernetes configuration tasks by combining
popular frameworks such as Autogen, langchain and shortly to be added too MCP.

The agents collaborate to research, modify, and apply YAML configurations.

Agents

The system comprises four specialized agents:

  • PlanningAgent: Decomposes complex tasks into smaller subtasks and delegates them to other agents.
  • WebSearchAgent: Gathers information from the web using DuckDuckGo search.
  • FixerAgent: Creates, modifies, or corrects YAML files based on gathered information and best practices.
  • RunnerAgent: Executes commands on the terminal, such as applying YAML configurations using kubectl.

Installation

  1. Clone the repository:

    git clone https://github.com/rinormaloku/autogen-langchain-mcp-mix.git
    cd autogen-langchain-mcp-mix
    
  2. Install dependencies in a venv:

    python3 -m venv .venv
    source .venv/bin/activate
    pip install -r requirements.txt
    

Configuration

  1. Set up environment variables:

    Copy the values from .env.example to a new file named .env:

    cp .env.example .env
    

    Update the environment variables in the .env file as needed.

Usage

Setup a k8s environment and run the main script:

kind create cluster
istioctl install -y

python main.py

This will start the multi-agent system and initiate a conversation based on the predefined user_question in main.py. The agents will collaborate to address the issue related to the Istio VirtualService configuration.

Notes

  • This project is a demonstration and may require adjustments for real-world applications.
  • The RunnerAgent’s ability to execute commands depends on the environment and permissions.
  • The termination condition is based on a maximum message count (30) or the mention of the word “TERMINATE”.
  • Ensure that you have kubectl configured correctly if you intend to apply the generated YAML configurations.

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers