v1.0 Dashboard Public Profile GitHub
✅ Complete (Core) Phase 10

Phase 10 — Local Intelligence Engine

Makes the AI hyper-local — aware of national and regional holidays, cultural greetings, religious calendar, weather disruptions, and seasonal context for the tenant's timezone and location.

What It Does

The Local Intelligence Engine enriches every AI call with contextual awareness. When a caller rings a dental clinic in Chennai on Pongal, the AI knows it's a Tamil Nadu state holiday, greets them with "Vanakkam", mentions the clinic may have adjusted hours, and suggests monsoon-appropriate health tips. All of this is injected automatically into the system prompt before each call.

Key Routes

URLDescription
GET /settings/local-intelligenceLocal Intelligence settings tab
POST /settings/local-intelligenceSave location, language, religion, and toggle settings
GET /settings/local-intelligence/previewJSON preview of AI context that will be injected

Key Files

TypePath
Serviceapp/Services/LocalIntelligenceService.php — buildAiContext()
Modelapp/Models/HolidayTemplate.php
Tableholiday_templates — country, state, date, name, type (national/religious/regional), religion
Seederdatabase/seeders/HolidayTemplatesSeeder.php — 98 holidays across 6 countries
Viewresources/views/settings/local-intelligence.blade.php

Holiday Database

CountryHolidays SeededIncludes
India 🇮🇳~40National + all major religious + state-specific (MH, GJ, TN, PB, KL, WB)
United States 🇺🇸~12Federal holidays
United Kingdom 🇬🇧~8Bank holidays
UAE 🇦🇪~10National + Islamic holidays
Singapore 🇸🇬~11National holidays
Australia 🇦🇺~10National public holidays

Religion-Aware Greetings

ReligionGreetingLanguage
HinduNamaste / Jai Shri KrishnaHindi
MuslimAssalamu AlaikumArabic / Urdu
ChristianGod bless you / HelloEnglish
SikhSat Sri AkalPunjabi
JewishShalomHebrew
TamilVanakkamTamil

Weather Disruption Detection

Uses the Open-Meteo free API (no API key required) to detect significant weather events based on WMO weather code. If heavy rain, snow, or storms are detected for the tenant's location, the AI adds a contextual note:

Example AI injection when heavy rain detected
Weather note: Heavy rainfall expected in Mumbai today (WMO code 65).
Patients calling about travel may mention disruptions.
Suggest the business can accommodate appointment reschedules due to weather.

What Gets Injected into the AI System Prompt

Example LocalIntelligenceService::buildAiContext() output
LOCAL INTELLIGENCE:
Date: Saturday, 14 Jan 2026 | Time: 10:30 AM IST | Timezone: Asia/Kolkata
Season: Winter (North India) | Region: Maharashtra

Cultural greeting for this context: "Namaste"
Upcoming holiday: Makar Sankranti (15 Jan) — business may be closed.
Today's weather: Clear sky. No disruptions expected.
Regional note: Pongal celebrations ongoing in Tamil Nadu — mention if caller is from TN.

Settings Toggles

At Settings → Local Intelligence, tenants can enable or disable:

  • Holiday awareness (show upcoming closures to AI)
  • Cultural greetings (religion-aware greeting injection)
  • Weather disruption awareness (inject weather context)
  • Seasonal recommendations (monsoon/summer/winter service tips)

What's Complete

  • 98-holiday database seeded across 6 countries
  • Religious holidays engine (6 religion calendars)
  • Regional festivals calendar (6 Indian states)
  • Local language packs (Hindi, Tamil, Arabic, English) with time-of-day greetings
  • Cultural etiquette logic with religion-aware greetings
  • Timezone intelligence and season detection per tenant timezone
  • Open-Meteo weather disruption detection (WMO code-based)
  • Seasonal service recommendations in AI prompt
  • LocalIntelligenceService::buildAiContext() wired into ConversationEngine
  • Settings UI with 4 toggle switches and upcoming holidays panel (next 60 days)
  • Preview API endpoint returning JSON context

What's Deferred

  • Accent/local tone engine (needs multilingual TTS)
  • Local dialect support (Hindi, Tamil voice — needs multilingual LLM)
  • Traffic delay awareness (Google Maps API — paid)
  • Geo-location auto-detect (browser geolocation)
  • Emergency closure rules from local government alerts