I Built an AI Customer Service Platform You Can Deploy in One Click 🤖
After spending weeks building customer service bots for different projects, I kept rebuilding the same infrastructure: database setup, Redis caching, AI integration, sentiment analysis, escalation logic...
So I packaged it all into a one-click deployable template.
What It Is
An open-source, production-ready AI customer service platform that handles:
- 💬 Multi-channel support - Chat, email, and SMS (via Twilio)
- 🧠Claude AI integration - Intelligent, context-aware responses
- 📊 Sentiment analysis - Detects frustrated customers automatically
- 🚨 Smart escalation - Knows when to hand off to humans
- 💾 Full conversation history - PostgreSQL database with analytics
- âš¡ Redis caching - Fast response times at scale
- 🔌 Real-time WebSockets - Live updates via Socket.io
Why I Built This
Most AI customer service solutions are either:
- Enterprise-only (expensive, complex)
- Code-heavy (requires weeks of setup)
- Closed-source (can't customize)
I wanted something that just works - deploy it, add your API key, and you're handling customer support with AI in minutes.
The Tech Stack
// Core dependencies
- Claude AI (Anthropic) - The brain
- PostgreSQL - Conversation storage
- Redis - Session caching
- Socket.io - Real-time connections
- Express.js - API server
- Node.js - Runtime
Key Features I'm Proud Of
Intelligent Escalation
The bot doesn't just blindly respond. It analyzes:
- Customer sentiment (positive/negative/neutral)
- Message intent (question/complaint/request)
- Conversation complexity
When it detects frustration or confusion, it automatically suggests human escalation.
Multi-Channel Support
Same conversation, different channels:
// Customer starts on chat
POST /api/conversations
// Switches to email
POST /api/conversations/:id/messages
// Bot maintains context across channels
Built-in Knowledge Base
Feed it your docs, FAQs, product info - it'll reference them in responses:
const kbArticles = await aiService.searchKnowledgeBase(query);
const response = await aiService.generateResponse(
conversation,
messages,
kbArticles
);
One-Click Deploy
The entire thing deploys to Railway in literally 60 seconds:
- Click the button
- Add your Anthropic API key
- Done. PostgreSQL and Redis auto-configure.
Live Demo
Check it out running live: ai-customer-service-agent-production.up.railway.app
The /health endpoint shows all services connected:
{
"status": "healthy",
"timestamp": "2026-04-23T00:34:08.719Z",
"ai": true
}
API Endpoints
Once deployed, you get:
GET /health # Health check
POST /api/customers # Create/get customer
POST /api/conversations # Start conversation
POST /api/conversations/:id/messages # Send message
GET /api/conversations # List conversations
POST /api/conversations/:id/escalate # Escalate to human
GET /api/dashboard # Analytics
How AI Responses Work
Here's the flow when a customer sends a message:
- Search knowledge base for relevant articles
- Analyze sentiment of customer message
- Extract intent (question/issue/request)
- Generate response using Claude with context
- Check escalation - does this need a human?
- Save everything to PostgreSQL
- Broadcast via WebSocket for real-time updates
const aiResponse = await aiService.generateResponse(
conversation,
messageHistory,
knowledgeBaseArticles
);
if (aiResponse.needsEscalation) {
await escalateToHuman(conversationId);
}
What's Next
I'm working on:
- [ ] Voice support (Twilio Voice API)
- [ ] Multi-language detection
- [ ] Custom AI training on conversation history
- [ ] Slack integration
- [ ] API rate limiting per customer
Try It Yourself
GitHub: github.com/Jeah84/ai-customer-service-agent
Deploy: railway.com/deploy/ddWbPN
Stack: Node.js, Claude AI, PostgreSQL, Redis, Socket.io
Built this because I needed it for my own projects. Figured others might too.
What features would you add? Drop a comment! 👇
Also submitted this as a Railway Template - hoping to help more developers ship AI-powered support faster.
Top comments (0)