import random
class AdmissionAgent:
def reply(self):
return (
"š Admission Agent\n"
"Admission Process (Step by Step):\n"
"1. First, fill out the online application form.\n"
" š Here you enter your personal details and academic records.\n"
"2. Next, upload the required documents.\n"
" š For example: 10th/12th marksheet, ID proof, and passport size photo.\n"
"3. Pay the registration fee.\n"
" š³ Payment can be done online (UPI, Netbanking, Card).\n"
"4. Once everything is complete, you will receive a confirmation email.\n"
" š§ This email contains your application number and further instructions.\n\n"
"⨠Tip: Fill in the details carefully, even a small mistake can cause rejection!"
)
class ExamAgent:
def reply(self):
return (
"š Exam Agent\n"
"Semester exams start from 10 December.\n"
"Admit card will be available 5 days before the exam."
)
class FeesAgent:
def reply(self):
return (
"š° Fees Agent\n"
"B.Tech First Year Fees:\n"
"⢠Tuition Fee : ā¹73,000\n"
"⢠Hostel Fee : ā¹20000\n"
"⢠Registration: ā¹5,000"
)
class ScholarshipAgent:
def reply(self):
return (
"š Scholarship Agent\n"
"Available Scholarships:\n"
"- Merit Scholarship\n"
"- SC/ST Scholarship\n"
"- OBC Scholarship"
)
class IntentClassifier:
def detect(self, text):
text = text.lower().strip()
if "admission" in text:
return "admission"
elif "exam" in text:
return "exam"
elif "fee" in text or "fees" in text:
return "fees"
elif "scholarship" in text:
return "scholarship"
elif text in ["bye", "exit", "quit"]:
return "exit"
elif "help" in text:
return "help"
else:
return "unknown"
class ResponseAgent:
def respond(self, intent):
if intent == "admission":
return AdmissionAgent().reply()
elif intent == "exam":
return ExamAgent().reply()
elif intent == "fees":
return FeesAgent().reply()
elif intent == "scholarship":
return ScholarshipAgent().reply()
elif intent == "help":
return (
"š I can help with:\n"
"- Admission\n"
"- Exam\n"
"- Fees\n"
"- Scholarship\n"
"Type 'bye' to exit."
)
elif intent == "exit":
exit_messages = [
"š Thank you! Have a nice day.",
"šŖ Session closed. Goodbye!",
"⨠Bye! Wishing you success.",
"šø Take care, see you soon!"
]
return random.choice(exit_messages)
else:
return (
"š¤ Sorry! I can help only with:\n"
"- Admission\n"
"- Exam\n"
"- Fees\n"
"- Scholarship\n"
"Type 'help' to see options."
)
def main():
print("=" * 50)
print("š UNIVERSITY AI MULTI-AGENT SYSTEM")
print("=" * 50)
name = input("\nš Hello! What's your name? ")
print(f"\nWelcome {name}! Ask about Admission, Exam, Fees or Scholarship.")
print("Type 'help' for options or 'bye' to exit.\n")
classifier = IntentClassifier()
response = ResponseAgent()
while True:
user = input("You : ")
intent = classifier.detect(user)
print("\nBot :")
print(response.respond(intent))
print()
if intent == "exit":
break
if __name__ == "__main__":
main()