-
-
login page for specific business person to access their own dashboard
-
customers needing their attention and ai recommendation
-
CLTV, sentimental analysis and customer sales values
-
customer transaction data analysis
-
able to send email directly through dashboard
-
showcasing agents and their esecution rate
-
gemini reasoning of customer sentiment
-
mongodb mcp operations used
Inspiration
Small business owners in India — salon owners, cafe operators, electronics retailers — lose customers silently. A bad haircut, a cold delivery, an unresolved warranty complaint. By the time they notice, the customer is gone. We built SMB Sentinel AI to catch these signals in real-time and give business owners the power to act before it's too late.
What it does
SMB Sentinel AI is a multi-tenant customer intelligence platform where each business owner logs in and sees:
- Real-time sentiment analysis of customer messages across WhatsApp, Google Reviews, Zomato, and Instagram
- AI-generated recovery plans personalized for each unhappy customer
- One-click action buttons to send recovery emails or WhatsApp messages directly
- Root cause analysis showing WHY customers are unhappy (pricing, delays, quality)
- Churn prediction scores identifying who's about to leave
The entire system runs on 6 AI agents that collaborate through MongoDB's Model Context Protocol (MCP) — with zero direct database calls.
How we built it
Architecture: A multi-agent pipeline where each agent has a specialized role:
- Sentiment Agent — Analyzes customer messages using Gemini 2.5 Flash
- Supervisor Agent — Routes to downstream agents based on severity
- Churn Agent — Predicts churn probability using behavioral signals
- Root Cause Agent — Identifies the operational failure category
- Recovery Agent — Generates personalized recovery strategies
- Executive Agent — Creates prioritized executive briefs
The MCP layer: Every MongoDB operation — saving workflows, storing agent findings, inter-agent messaging, task delegation — flows through the official MongoDB MCP Server via stdio transport. The agents don't know they're talking to MongoDB; they just call MCP tools like find, insert-many, and update-many.
The dashboard: A Streamlit multi-tenant app where 3 demo business owners (salon, cafe, electronics store) each have separate logins, separate customer data, and industry-specific insights.
Challenges we ran into
- MCP response parsing — The official MongoDB MCP Server wraps results in
<untrusted-user-data-UUID>security boundary tags. We had to build a regex-based extractor to pull JSON from these wrapped responses. - Gemini rate limits — With 6 agents processing 10 customers, that's 60+ Gemini calls. We implemented exponential backoff (2s → 4s → 8s → 16s) to gracefully handle 503/429 errors.
- BSON ObjectId mismatch — MongoDB's
_idfield is a BSON ObjectId, but MCP passes it as a string. We couldn't use_idfor task completion — had to switch to composite filters (workflow_id+agent_name). - Persistent MCP sessions — The MCP server runs as a subprocess. We built a background-thread architecture with an async queue to maintain a single persistent session across all agent calls.
Accomplishments that we're proud of
Zero PyMongo architecture — every single MongoDB operation (50+ per run) flows through the Model Context Protocol. We proved that MCP can completely replace traditional database drivers in a production-grade multi-agent system. The 6-agent pipeline processes 10 customers end-to-end with full inter-agent communication, shared memory, and autonomous actions — all through a single persistent MCP session. We also built a multi-tenant SaaS platform where different business owners log in and get completely personalized AI-powered insights with one-click recovery actions.
What we learned
- MCP is a powerful abstraction layer — it completely decouples application logic from database specifics
- Multi-agent systems need shared memory (not just message passing) to collaborate effectively
- Small business owners don't want dashboards; they want action buttons that solve problems
What's next for SMB Sentinel AI
- Real Twilio/SendGrid integration for actual email and WhatsApp delivery
- Voice channel analysis (call center recordings via Gemini audio)
- Drag-and-drop dashboard customization per business owner
- Onboarding flow for new businesses to connect their channels
Log in or sign up for Devpost to join the conversation.