π§ Multi-Agent AI System using Groq Llama 3
π§© Overview
This project demonstrates a multi-agent AI system that uses Groqβs Llama-3 model to perform coordinated reasoning across multiple specialized agents.
Each agent has a distinct role and collaborates with others to analyze, improve, and review project descriptions or documentation.
Developed as part of the AAIDC Module 2 β Multi-Agent Systems, this project showcases how multiple agents can communicate, reason, and refine outputs to reach a high-quality consensus.
π― Objectives
Build and orchestrate a multi-agent workflow using Python and Groq API.
Demonstrate agent collaboration between Analyzer, Improver, and Reviewer.
Show how agents exchange messages and refine outputs iteratively.
Highlight secure design practices by managing API keys safely with .env and .gitignore.
π§± System Architecture
User Input
β
[Analyzer Agent] β Extracts key ideas & summarizes
β
[Improver Agent] β Refines structure, grammar, and clarity
β
[Reviewer Agent] β Evaluates quality & assigns feedback
β
Final Enhanced Output
Agents interact via an orchestrator script (main_multi_agent.py) that manages the entire reasoning loop until consensus or a target score is reached.
βοΈ Project Structure
agentic_ai_project/
β
βββ .gitignore
βββ main.py
βββ main_multi_agent.py
βββ agents/
βββ analyzer.py
βββ improver.py
βββ reviewer.py
File Roles
analyzer.py β Extracts purpose and main ideas from input.
improver.py β Suggests improvements and adds clarity.
reviewer.py β Evaluates and scores the improved text.
main_multi_agent.py β Coordinates all agents in a reasoning loop.
π» Technologies Used
Technology Purpose
Python 3.13 Core language
Groq API (Llama 3) AI reasoning model
dotenv Securely loads API key from .env
OOP & Classes Define modular agents
Control Flow & Loops Enable multi-agent coordination
π§ Example Run
π€ Multi-Agent System is running...
Enter a short project description:
This project builds an AI assistant to improve technical writing.
π§© Analyzer:
Summarized intent β improving technical communication using AI.
π‘ Improver:
Suggest adding examples, code snippets, and clearer headings.
π Reviewer:
Score: 92 / 100 β Clear and well-structured result. β
π Security
All API keys are stored in a local .env file and never pushed to GitHub.
.gitignore prevents accidental upload of sensitive files.
Old keys are revoked when rotating API credentials.
π§© How to Run
Clone the repository:
git clone https://github.com/shaiknawaz568/multi-agent-ai-project.git
cd multi-agent-ai-project
Create a virtual environment:
python -m venv .venv
..venv\Scripts\Activate.ps1
Install dependencies:
pip install groq python-dotenv
Create a .env file:
GROQ_API_KEY=gsk_your_new_generated_key_here
Run the multi-agent system:
python main_multi_agent.py
π§Ύ Results
Multi-agent collaboration improves content quality.
Autonomous iteration leads to high-scoring outputs.
Demonstrates AI orchestration using minimal, modular code.
π Future Enhancements
Add a Streamlit UI dashboard.
Implement memory for context retention.
Connect external tools (e.g., web search or API integration).
Add formal evaluation metrics for agent performance.
π Conclusion
This project demonstrates the power of Agentic AI systems β multiple specialized agents reasoning collaboratively to achieve improved, validated results.
It successfully fulfills the AAIDC Module 2 Multi-Agent System Project objectives.
π¨βπ» Author
Shaik Nawaz Shareef
AAIDC Module 2 Participant
GitHub: https://github.com/shaiknawaz568
π Project Links
Code: GitHub Repository
AAIDC Module: Module 2 β Multi-Agent Systems
Platform: Ready Tensor