A smart FAQ chatbot built with Spring Boot, MongoDB, and Google Gemini AI, featuring role-based agents for specialized IT support.
-
Role-based AI Agents Choose from 4 support roles:
- Help Desk: Password resets, basic troubleshooting
- Technical Troubleshooting: Network & system issues
- System Administration: User/security management, servers
- Infrastructure Management: Capacity planning, disaster recovery
-
Knowledge Base: Search corporate IT knowledge
-
Conversation Memory: Keeps chat context across turns
-
Incident Summarization: Generates ServiceNow-ready tickets
-
Powered by Gemini AI via LangChain4Java
- Java 17+
- Maven 3.8+
- MongoDB (local or cloud)
- Google AI API Key (Gemini model)
- (Optional) Qdrant/Milvus for semantic search
-
Clone & Setup
git clone <your-repo-url> cd faq-chatbot
-
Configure Database (
application.yml)spring: data: mongodb: uri: mongodb://localhost:27017/faqchatbot
-
Start Dependencies
docker run -p 27017:27017 mongo # MongoDB docker run -p 6333:6333 qdrant/qdrant # Optional: Qdrant
-
Run the App
mvn clean install mvn spring-boot:run
Server: http://localhost:8080
GET /api/chat→ Health checkPOST /api/chat→ Chat with AI agentPOST /api/chat/reset/{sessionId}→ Reset conversation
GET /api/agents/roles→ List agent rolesGET /api/agents/roles/{role}→ Get role details
POST /api/knowledge-base/populate-sample→ Load sample dataPOST /api/knowledge-base/add→ Add entryGET /api/knowledge-base/search→ Search
{
"sessionId": "session-123",
"message": "My computer won't connect to the internet",
"role": "TECHNICAL_TROUBLESHOOTING",
"priority": "HIGH"
}-
GET http://localhost:8080/api/chat– Health check -
POST http://localhost:8080/api/knowledge-base/populate-sample– Load data -
GET http://localhost:8080/api/agents/roles– List roles -
POST http://localhost:8080/api/chat– Example chat:{ "sessionId": "test-session", "message": "I forgot my password", "role": "HELP_DESK" }
- Phase 2: Semantic Search (Qdrant/Milvus, embeddings)
- Phase 3: Agent Actions (ServiceNow integration, system diagnostics, escalation)
- Phase 4: Frontend (React + Vite, role selector, chat history)
Frontend (React) → Spring Boot API → MongoDB
↓
Google Gemini AI ← Knowledge Base
↓
Vector DB (Future: Qdrant/Milvus)
- Backend: Spring Boot 3.x (Java 17)
- Database: MongoDB
- AI: Google Gemini (LangChain4Java)
- Build: Maven
- Containerization: Docker
- Search: Text-based (Vector search planned)
- Fork the repo
- Create a branch (
git checkout -b feature/your-feature) - Commit (
git commit -m 'Add feature') - Push (
git push origin feature/your-feature) - Open a PR
MIT License
Built with ❤️ using Spring Boot & AI