This multiagent chatbot leverages the capabilities of large language models and the LangChain library to showcase the use of multiple agents.
The bot is integrated into a user-friendly interface created with Streamlit, allowing users to interact with the AI in real time.
-
The User Proxy Agent acts as the mediator between the customer's inquiries and the specific functions of the Guardrail and Scheduler agents. It interprets user input and decides which agent should handle the request based on the content of the inquiry.
-
The Guardrail Agent is implemented to specifically handle inquiries for "post renovation cleaning" or any service currently outside the company's offerings.
-
The Scheduler Agent is responsible for handling specific inquiries related to scheduling a service and providing pricing information. It achieves this by retrieving data from external sources such as APIs and PDF documents via RAG.
-
Dynamic Interaction: Streamlit interface allows for real-time interaction with the bot, making it more engaging and responsive.
-
Conversation Management: Allows users to create, delete, and switch between different conversation threads. This feature will enable users to separate topics and maintain organised discussions. Each conversation thread could be named or tagged for easy identification.
-
Private Session: Own your conversations from other users! Create, delete and download any conversations with ease.
Try the streamlit here.
Access the API endpoint here.
Access the API Documentations here.
If you want to try it out and modify it:
- Clone the Repository
git clone https://github.com/timooo-thy/multiagent-chatbot
- Install Dependencies Ensure you have Python installed, and then run:
pip install -r requirements.txt
- Launch the App Navigate to the app's directory and run:
streamlit run cleaningCompanyChat.py
Login: Enter your Huggingface credentials at the sidebar.
Start Chatting: Simply type your query or message in the input field and press Enter.
Manage Sessions: Start new sessions or review past conversations for reference.
Download Conversations: Download the transcript of your current or past conversations for record-keeping.
-
Streamlit for providing an intuitive app-building framework.
-
Langchain for retrieval augmented generation.
-
OpenAI for text embeddings.
-
FAISS for vector store and similarity search.
Request: “I want to book general cleaning.”
Response: “Next available slot on 2025-01-01 00:00, and price is $100 for 3 hours.”
Request: “I want to book post renovation cleaning.”
Response: “We’re connecting you with a human agent.”
Request: "I want to book deep cleaning."
Response: "Sorry, we don't offer that service. We only offer post renovation cleaning."