EN — Voice & text AI for telecom customer-service scenarios: FastAPI, Next.js, Docker Compose, RAG (Milvus), MCP, Gemini.
TR — Telekom müşteri hizmetleri için sesli ve metin asistanı: FastAPI, Next.js, Docker Compose, RAG (Milvus), MCP, Gemini.
Umay AI-Gen is a voice and text AI assistant project built for telecom customer-service scenarios.
It includes a FastAPI backend, a Next.js frontend, and supporting services orchestrated with Docker Compose.
This repository is a competition demo/prototype and is shared publicly for portfolio and technical showcase purposes.
If you find this project useful, please consider starring the repository.
This project was developed for Turkcell's "Yarının Teknoloji Liderleri" competition and reached the semi-finals.
- Competition page: Yarının Teknoloji Liderleri Yarışması
| Area | Choices |
|---|---|
| Frontend | Next.js 14, React 18, TypeScript, Tailwind CSS, Zustand |
| Backend | FastAPI, Python 3.12+, LangChain/LangGraph, Google GenAI SDK |
| Data & infrastructure | Milvus, Redis, MinIO, Etcd, Traefik |
| Realtime & safety | SSE streaming, WebSocket, Presidio (PII masking) |
| Public integration | App via Traefik; MCP tools served under /mcp |
| Feature | What it is |
|---|---|
| Text chat + streaming | Server-sent streaming chat responses from the FastAPI layer |
| Live Voice | Real-time voice interaction (Google Live / GEMINI_LIVE_ENABLED) |
| RAG (Milvus) | Document-backed answers via a Milvus vector store |
| Personalization | Profile and usage-based flows; tool calls exposed through MCP |
| Local environment | docker compose up brings the full stack (see Quick Start) |
MCP is exposed for personalized telecom recommendations and analysis.
| Aspect | Details |
|---|---|
| Purpose | Standardized tool access for assistant-side personalization and recommendation logic |
| Focus area | Tariff/package fit, usage insights, customer risk–style signals |
| Integration | Invoked from assistant flows and available as an MCP-compatible HTTP surface |
| Tool (name) | Route | What it does |
|---|---|---|
get_personalized_tariff_recommendations |
/tariff-recommendations |
Suggests tariffs from profile + usage |
get_personalized_package_recommendations |
/package-recommendations |
Suggests add-on packages |
get_customer_risk_profile |
/customer-risk-profile |
Churn, loyalty, and value-oriented risk view |
get_usage_pattern_analysis |
/usage-pattern-analysis |
Time- and category-based usage patterns |
get_market_comparison |
/market-comparison |
Compare a selected Umay tariff to competitor-like market offers |
.
├── backend/ # FastAPI app, services, tests
├── frontend/ # Next.js app
├── traefik/ # Reverse proxy configuration
├── docker-compose.yml
└── .env.example
- Prepare environment variables:
cp .env.example .env- Check at least these values in
.env:
| Variable | Default / example | Meaning |
|---|---|---|
GEMINI_API_KEY |
empty | If empty, Gemini-powered features are limited/disabled |
NEXT_PUBLIC_API_URL |
http://localhost:8000 |
URL the browser uses to call the API |
GEMINI_LIVE_ENABLED |
false |
Set to true to enable real-time (Live) voice mode |
- Start services:
docker compose up --build- Open the app (local):
| What | URL |
|---|---|
| App (Traefik) | http://localhost |
| Frontend (direct) | http://localhost:3000 |
| Backend (direct) | http://localhost:8000 |
| Traefik dashboard | http://localhost:8080 |
| Kind | Path / prefix | Notes |
|---|---|---|
| Health | GET /api/health |
Liveness/health check |
| Chat / REST | /api/... |
App-specific HTTP routes |
| WebSocket | /ws/... |
Streaming and live features |
| MCP | /mcp |
Model Context Protocol tools and metadata |
Example:
curl http://localhost:8000/api/health- Hot-reload behavior can be limited under Docker Compose; rebuilding may be required after changes.
- Frontend dependencies are in
frontend/package.json; backend dependencies are inbackend/pyproject.toml. - Tests and evaluation files are under
backend/testsandbackend/eval.
Backend tests:
cd backend
pytestFrontend lint:
cd frontend
pnpm lint- Do not commit real API keys from
.env. - Run a secret scan before making the repository public.
- Use
.env.exampleas the configuration template.
This project was built as a competition/prototype project.
Umay AI-Gen, telekom müşteri hizmetleri senaryoları için geliştirilmiş, sesli ve metin tabanlı bir yapay zeka asistanı projesidir.
Proje; FastAPI tabanlı bir backend, Next.js tabanlı bir frontend ve Docker Compose ile orkestre edilen yardımcı servislerden oluşur.
Bu repo bir yarışma demosu/prototipi olarak geliştirilmiştir ve portföy ile teknik paylaşım amaçlı public olarak yayınlanmıştır.
Projeyi faydalı bulduysanız, repo'yu yıldızlamayı unutmayın.
Bu proje, Turkcell'in Yarının Teknoloji Liderleri yarışması kapsamında geliştirilmiştir ve yarı finale yükselmiştir.
- Yarışma sayfası: Yarının Teknoloji Liderleri Yarışması
| Alan | Seçimler |
|---|---|
| Ön uç (frontend) | Next.js 14, React 18, TypeScript, Tailwind CSS, Zustand |
| Arka uç (backend) | FastAPI, Python 3.12+, LangChain/LangGraph, Google GenAI SDK |
| Veri ve altyapı | Milvus, Redis, MinIO, Etcd, Traefik |
| Gerçek zaman ve güvenlik | SSE akışı, WebSocket, Presidio (PII maskeleme) |
| Dışa açılan entegrasyon | Uygulama Traefik üzerinden; MCP araçları /mcp altında |
| Özellik | Açıklama |
|---|---|
| Metin sohbet + akış | Sunucu tarafında akışlı (streaming) sohbet yanıtları |
| Live Voice | Gerçek zamanlı ses (Google Live / GEMINI_LIVE_ENABLED) |
| RAG (Milvus) | Milvus vektör veritabanı ile belge destekli yanıtlar |
| Kişiselleştirme | Profil ve kullanıma dayalı akışlar; araçlar MCP üzerinden |
| Yerel ortam | docker compose up ile tüm yığın (Hızlı Başlangıç’a bakın) |
MCP, kişiselleştirilmiş telekom önerileri ve analizleri için kullanılır.
| Boyut | Açıklama |
|---|---|
| Amaç | Asistan tarafındaki kişiselleştirme/öneri mantığı için standart araç sözleşmesi |
| Odak | Tarife ve paket uyumu, kullanım içgörüleri, müşteri riski tarzı sinyaller |
| Entegrasyon | Asistan akışlarının yanında, dışarıdan MCP uyumlu HTTP yüzeyi olarak da erişilebilir |
| Araç (ad) | Rota | Ne yapar |
|---|---|---|
get_personalized_tariff_recommendations |
/tariff-recommendations |
Profil + kullanıma göre tarife önerileri |
get_personalized_package_recommendations |
/package-recommendations |
Ek paket önerileri |
get_customer_risk_profile |
/customer-risk-profile |
Churn, sadakat ve değer odaklı risk görünümü |
get_usage_pattern_analysis |
/usage-pattern-analysis |
Zaman ve kategori bazlı kullanım kalıbı |
get_market_comparison |
/market-comparison |
Seçilen Umay tarifesini piyasadaki benzer tekliflerle kıyaslama |
.
├── backend/ # FastAPI uygulaması, servisler, testler
├── frontend/ # Next.js uygulaması
├── traefik/ # Reverse proxy ayarları
├── docker-compose.yml
└── .env.example
- Ortam değişkenlerini hazırla:
cp .env.example .env.enviçinde en az aşağıdaki alanları kontrol et:
| Değişken | Varsayılan / örnek | Anlamı |
|---|---|---|
GEMINI_API_KEY |
boş | Boşsa Gemini tabanlı özellikler sınırlı veya kapalı olabilir |
NEXT_PUBLIC_API_URL |
http://localhost:8000 |
Tarayıcının API’ye giderken kullandığı adres |
GEMINI_LIVE_ENABLED |
false |
Gerçek zamanlı (Live) ses için true yapın |
- Servisleri başlat:
docker compose up --build- Uygulamayı aç (lokal):
| Ne | Adres |
|---|---|
| Uygulama (Traefik) | http://localhost |
| Ön uç (doğrudan) | http://localhost:3000 |
| Arka uç (doğrudan) | http://localhost:8000 |
| Traefik paneli | http://localhost:8080 |
| Tür | Yol / önek | Not |
|---|---|---|
| Sağlık | GET /api/health |
Canlılık / health kontrolü |
| Sohbet / REST | /api/... |
Uygulamaya özel HTTP yolları |
| WebSocket | /ws/... |
Akış ve canlı özellikler |
| MCP | /mcp |
Model Context Protocol araçları ve metadata |
Örnek:
curl http://localhost:8000/api/health- Docker Compose üzerinde hot-reload davranışı sınırlı olabilir; değişikliklerden sonra yeniden build gerekebilir.
- Frontend bağımlılıkları
frontend/package.json, backend bağımlılıklarıbackend/pyproject.tomliçindedir. - Test ve değerlendirme dosyaları
backend/testsvebackend/evalaltındadır.
Backend testleri:
cd backend
pytestFrontend lint:
cd frontend
pnpm lint- Gerçek API anahtarlarını (
.env) repoya commit etmeyin. - Public paylaşım öncesi secret taraması yapın.
- Örnek yapılandırma için
.env.examplekullanın.
Bu proje yarışma/prototip amaçlı geliştirilmiştir.