This project is a multi-agent AI system designed to handle user requests by coordinating between different specialized AI agents. It demonstrates a hierarchical architecture, intent recognition, and robust error handling.
This system uses a three-level hierarchical agent architecture:
The communication flows from top to bottom and back up.
graph TD
User -->|Request| A[L1: Super Agent];
A -->|"What's the intent?"| B[L2: Intent Agent];
B -->|"Intent: get_weather<br/>Entity: London"| A;
A -->|"Get weather for London"| C[L3: Weather Agent];
C -->|API Call| D[External Weather API];
C -.->|Logs Error| E[L2: Error Monitoring Agent];
D -->|Weather Data| C;
C -->|Weather Info| A;
A -->|Final Response| User;
(This is a Mermaid diagram. It will render automatically on platforms like GitHub.)
get_weather: Retrieves current weather for a specified location. [cite: 17]get_news: Fetches the latest news headlines for a given topic. [cite: 18]Clone the repository:
git clone <your-repo-url>
cd multi-agent-system
Create and activate a virtual environment:
python -m venv venv
# On Windows: venv\Scripts\activate
# On macOS/Linux: source venv/bin/activate
Install the required dependencies:
pip install -r requirements.txt
Configure API keys:
.env in the root directory..env file:GROQ_API_KEY="YOUR_GROQ_API_KEY"
WEATHER_API_KEY="YOUR_OPENWEATHERMAP_API_KEY"
NEWS_API_KEY="YOUR_NEWS_API_KEY"
Run the application:
python main.py
(You will add a link to your demo video here later)