The customer support system that enterprises pay £100K+ for - now open source with complete tutorials
🎥 Watch the Complete Tutorial Series →
- 🤖 Multi-Agent Architecture - Intelligent routing between specialized agents
- 🧠 RAG + Database Hybrid - Best of both worlds for knowledge management
- 🌍 Location Intelligence - Smart defaults based on customer location
- 🏢 Production Ready - 15 test scenarios, deployment docs, error handling
- 💰 Proven ROI - Companies save £150K+ annually vs traditional support teams
Try it yourself (30 seconds):
git clone https://github.com/ntg2208/production-ai-customer-support
cd production-ai-customer-support
pip install -r requirements.txt
cp .env.example .env # Add your GOOGLE_API_KEY
python interactive_test.py
This isn't just code - it's a complete learning experience:
🎬 Tutorial Series: Building Enterprise AI Customer Support
- Introduction & Architecture (15 min)
- Database & RAG Setup (25 min)
- Policy Agent Build (20 min)
- Ticket Agent Build (25 min)
- Master Agent Design (20 min)
- Location Intelligence (15 min)
- Testing & Deployment (25 min)
- Business Applications (20 min)
Real companies using this approach report:
- 📉 60% reduction in customer support costs
- ⏰ 24/7 availability without human agents
- 📈 Consistent service quality across all interactions
- 🌐 Multi-language support ready out of the box
- Master Agent: Primary orchestrator that analyzes customer queries, maintains context, and intelligently routes requests to specialist agents
- Policy Agent: RAG-powered specialist for company policies, refund rules, terms & conditions, and fare regulations
- Ticket Agent: Operational specialist for ticket searches, bookings, modifications, and transaction processing
🧠 Intelligent Routing: The Master Agent acts as the central intelligence hub, determining which specialist agent can best handle each customer request while preserving conversation context across all interactions.
- Location Intelligence: Auto-detects customer departure stations
- State Management: Maintains context across conversations
- Error Handling: Comprehensive exception management
- Testing Suite: 15 realistic customer scenarios
- Deployment Ready: Docker, cloud deployment guides
- Scalable Architecture: Handle 1000+ concurrent users
- Database Integration: SQLite, PostgreSQL, MySQL support
- API Ready: RESTful endpoints for integration
- Monitoring: Built-in logging and metrics
- LLM Framework: Google AI Platform / Google Cloud Vertex AI
- Multi-Agent: Google ADK Agents Framework
- Vector Database: Embeddings with similarity search
- Database: SQLite (development) / PostgreSQL (production)
- Backend: Python 3.8+, FastAPI
- Deployment: Docker, Google Cloud, AWS
┌─────────────────────────────────────────────────────────────────┐
│ Customer Interface │
│ • Natural Language Processing │
│ • Context Awareness • Location Intelligence │
└─────────────────────────────────┬───────────────────────────────┘
▼
┌─────────────────────────┐
│ Master Agent │ ◄── Main Orchestrator
│ (Coordinator) │
│ │
│ • Query Analysis │
│ • Intelligent Routing │
│ • Context Preservation │
│ • Response Coordination │
└─────────────┬───────────┘
▼
┌─────────────┼─────────────┐
▼ ▼
┌──────────────────┐ ┌─────────────────┐
│ Policy Agent │ │ Ticket Agent │
│ (Specialist) │ │ (Specialist) │
│ │ │ │
│ • Company Policy │ │ • Ticket Search │
│ • Refund Rules │ │ • Booking Mgmt │
│ • T&C, Fares │ │ • Customer Data │
│ • RAG Knowledge │ │ • Transactions │
└──────────────────┘ └─────────────────┘
🎯 Orchestration Flow:
- Customer Query → Master Agent analyzes intent and context
- Intelligent Routing → Routes to appropriate specialist agent
- Specialist Processing → Policy or Ticket agent handles specific task
- Response Coordination → Master agent ensures seamless customer experience
Simple Policy Query:
Customer: "What's your refund policy?"
Master Agent: [Analyzes: policy question] → Routes to Policy Agent
Policy Agent: [RAG search] → Returns policy details
Master Agent: [Coordinates response] → Customer receives seamless answer
Complex Booking Operation:
Customer: "Cancel my booking UKC005 and tell me the refund amount"
Master Agent: [Analyzes: booking + policy] → Sequential routing
↓ Step 1: Ticket Agent → Cancels booking, calculates base refund
↓ Step 2: Policy Agent → Applies refund rules and fees
Master Agent: [Synthesizes] → "Booking cancelled, £67.50 refunded"
Mixed Query Handling:
Customer: "I need to change my London-Manchester ticket, what are my options?"
Master Agent: [Analyzes: operational + policy] → Parallel consultation
↓ Ticket Agent: Available alternative trains and pricing
↓ Policy Agent: Change fees and conditions
Master Agent: [Combines responses] → Comprehensive options presented
Perfect for these industries:
- 🚄 Transportation (rail, bus, airline booking)
- 🏨 Hospitality (hotel, restaurant reservations)
- 🏥 Healthcare (appointment scheduling, patient queries)
- 🛒 E-commerce (order management, product support)
- 🏠 Property (tenant services, maintenance requests)
- Python 3.8+
- Google AI API key (free tier available)
- 10 minutes setup time
- Clone the repository
git clone https://github.com/ntg2208/production-ai-customer-support
cd production-ai-customer-support
- Install dependencies
pip install -r requirements.txt
- Set up environment
cp .env.example .env
# Edit .env and add your GOOGLE_API_KEY
- Initialize database
python -c "from utils.create_schema import create_database_schema; create_database_schema()"
python -c "from utils.populate_data import populate_data; populate_data()"
# Quick demo with 3 scenarios
python run_test_scenarios.py
# Try specific interactions
python run_test_scenarios.py --session 1 # New customer
python run_test_scenarios.py --session 11 # Casual style
python run_test_scenarios.py --session 15 # Complex booking
# Interactive demo
python interactive_test.py
Here's what you'll see when you run the demo:
Session 1 - New Customer Journey:
User: Hi, I'm new to UKConnect. Can you help me book a train ticket?
Agent: Welcome! I'd be happy to help you book your first ticket. Where would you like to travel from and to?
User: I need to go from London to Manchester tomorrow morning
Agent: Perfect! I can see several morning options from London Euston to Manchester Piccadilly...
[Shows available tickets with prices and times]
Session 11 - Casual Style:
User: yo need train london to bham tmrw
Agent: Hey! Got it - London to Birmingham tomorrow. Let me check the available trains for you...
[Adapts to casual communication style while maintaining professionalism]
- Quick Start Guide - 5-minute setup
- Architecture Guide - System design
- Deployment Guide - Production setup
- Customization Guide - Adapt for your domain
- API Reference - Integration endpoints
- Test Scenarios - All 15 test cases
If this helps you or your company:
- ⭐ Star this repository (free, helps others find it)
- 💖 Sponsor on GitHub (monthly support)
- ☕ Buy me a coffee (one-time donation)
- 🎯 Support on Ko-fi (one-time or monthly)
- 💼 Hire for consulting (custom implementations)
Need this customized for your business?
Get Enterprise Implementation →
- Custom domain adaptation
- Integration with existing systems
- Production deployment support
- Training and ongoing maintenance
Contributions welcome! See CONTRIBUTING.md
Areas we need help:
- 🌐 Translations - Multi-language support
- 🏭 Industry Adaptations - Healthcare, e-commerce examples
- 📚 Documentation - Tutorials, guides, examples
- 🐛 Bug Fixes - Issue resolution
- ✨ New Features - Enhanced capabilities
MIT License - see LICENSE file
Built by Truong Giang Nguyen - ML Engineer specializing in production AI systems that solve real business problems.
Background:
- 4+ years building enterprise AI solutions
- MSc Data Science (Distinction) from Northumbria University
- Specialized in multi-agent systems and production deployment
- Based in London, available for consulting
Connect:
- 🌐 Website: twentytwotensors.co.uk
- 📺 YouTube: @truonggiangai
- 💼 LinkedIn: linkedin.com/in/ntg2208
- 📧 Email: ntg2208@gmail.com
Customer support is broken in most companies:
- ❌ Long wait times (avg 8 minutes)
- ❌ Inconsistent service quality
- ❌ High operational costs (£40K+ per agent/year)
- ❌ Limited availability (business hours only)
This system solves all of these problems while being:
- ✅ Instant: Immediate responses 24/7
- ✅ Consistent: Same quality every interaction
- ✅ Cost-effective: 90% cost reduction vs human agents
- ✅ Scalable: Handle unlimited concurrent users
The best part? You get the complete blueprint to build and deploy this yourself.
⭐ Star this repo if it helps you build better customer support!