Skip to content

PelagiaGk/multi-agent-system-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Project: Destructuring Multi-Agent Systems

A Personal Development Deep-Dive into LLM Orchestration

🎯 Project Objective

This is a personal learning project designed to "deconstruct" the logic of Multi-Agent Systems. The goal was to move beyond simple chatbot interactions and build a system where specialized AI agents collaborate, share a memory of a database, and solve a specific business logic problem, in this case being for Automated Customer Data Retrieval and Support.

The focus of this project is on:

  1. Agent Specialization: Defining unique roles, goals, and backstories.
  2. Tool Integration: Bridging the gap between LLMs and real-world data (MongoDB).
  3. Dependency Orchestration: Navigating the complex "Dependency Hell" of modern AI libraries.

🧠 The Logic Flow

The system is built on the "Sequential Process" model:

  1. Retrieval: A specialized agent identifies a need for data and triggers the DatabaseRetrivalTool.
  2. Processing: The LLM receives raw JSON from MongoDB, "reads" it, and extracts relevant insights.
  3. Resolution: A secondary agent uses that insight to formulate a human-like response.

🛠 Technical Hurdles & Learning Milestones

1. The Python 3.12 Compatibility Bridge

One of the core challenges was running CrewAI on Python 3.12, where the legacy pkg_resources module was removed.

  • Solution: Implemented a "Mocking" strategy at the runtime level to bypass telemetry crashes without downgrading the entire system.

2. Custom Tool Engineering

Building the DatabaseRetrivalTool required a deep dive into Pydantic's Private Attributes.

  • Insight: LLM tools are essentially Pydantic models. To prevent the system from trying to "validate" a live MongoDB Client object, I utilized PrivateAttr to encapsulate the connection logic safely.

3. Version Synchronization

Navigating conflicts between langchain, crewai, and langchain-huggingface taught me the importance of Semantic Versioning.

  • The Fix: Manually aligned the versions to ensure the pydantic_v1 bridge remained intact for legacy tool support.

🏗️ Architecture

  • Framework: CrewAI
  • LLM: Hugging Face zephyr-7b-beta
  • Database: MongoDB Atlas (Cloud)
  • Environment: VS Code + Virtual Environments (.venv)

🔧 Setup & Installation

To replicate this environment, ensure you use the specific versioning discovered during development:

# Initialize Environment
python3 -m venv .venv
source .venv/bin/activate

# Install Dependencies
pip install setuptools \
    "langchain==0.1.20" \
    "langchain-core==0.1.53" \
    "langchain-community==0.0.38" \
    "langchain-huggingface==0.0.3" \
    crewai pymongo python-dotenv

**This project was built as part of a personal roadmap to comprehend multi-agentic systems better.**

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages