How haroon-world/ai-agent-cloud works
ClinicConnect AI is a multi-tenant clinic receptionist platform: patients ask questions and book or manage appointments through web chat or WhatsApp, while clinic staff can take over conversations and platform owners manage tenants and subscription requests. The graph separates channel entry points, AI processing, clinic operations, and administration. Edges are limited to relationships shown in the README, excerpts, or SOURCE INDEX; unsampled implementation details are not inferred.
Main entry points: agent.py Receptionist Agent · whatsapp.py WhatsApp Webhook · admin.py Clinic Admin · app.py Application
Components 27
Patient Channels
- Web Chat
routes/chat.py - WhatsApp Webhook
routes/whatsapp.py - WhatsApp Messaging
services/whatsapp_service.py
AI Receptionist
- Receptionist Agent
ai/agent.py - LLM Providers
ai/llm_client.py - Conversation Prompts
ai/prompts.py - Response Generation
ai/response_generator.py - Agent Tools
ai/tools.py - Speech Processing
ai/speech_client.py
Clinic Operations
- Booking & Availability
services/booking_service.py - Appointment Reminders
services/reminder_service.py - Human Handoff
services/handoff_service.py
Administration
- Clinic Admin
routes/admin.py - Platform Console
routes/platform.py - Subscription Lifecycle
services/subscription_service.py - Email Service
services/email_service.py
Persistence & Integrations
- Clinic & Conversation Records
models/business.py - User Records
models/user.py - WhatsApp Accounts
models/whatsapp_account.py - SQL Database
models/__init__.py
Other components
- Patient
- Clinic Staff
- Platform Owner
- LLM Provider
- Speech Provider
- Meta WhatsApp API
- Application
app.py
Connections 35
- Patient → Web Chat: uses
README.md - Patient → WhatsApp Webhook: messages
README.md - Web Chat → Receptionist Agent: routes chat
routes/chat.py - WhatsApp Webhook → Receptionist Agent: routes messages
routes/whatsapp.py - Web Chat → Speech Processing: transcribes audio
routes/chat.py - WhatsApp Webhook → Speech Processing: transcribes audio
routes/whatsapp.py - Receptionist Agent → LLM Providers: requests completions
ai/agent.py - Receptionist Agent → Conversation Prompts: uses prompts
ai/agent.py - Receptionist Agent → Response Generation: uses generator
ai/agent.py - Receptionist Agent → Agent Tools: dispatches tools
ai/agent.py - LLM Providers → Agent Tools: uses tool definitions
ai/llm_client.py - Agent Tools → Booking & Availability: calls booking
ai/tools.py - Agent Tools → Human Handoff: triggers handoff
ai/tools.py - Booking & Availability → Appointment Reminders: schedules reminders
services/booking_service.py - Clinic Admin → Booking & Availability: uses booking services
routes/admin.py - Clinic Admin → Human Handoff: requests takeover
routes/admin.py - Clinic Staff → Clinic Admin: manages clinic
README.md - Platform Owner → Platform Console: manages tenants
README.md - Platform Console → Subscription Lifecycle: manages requests
routes/platform.py - Platform Console → Email Service: uses email service
routes/platform.py - Clinic Admin → Subscription Lifecycle: checks access
routes/admin.py - Human Handoff → WhatsApp Messaging: sends staff replies
services/handoff_service.py - WhatsApp Webhook → WhatsApp Messaging: uses messaging service
routes/whatsapp.py - WhatsApp Messaging → Meta WhatsApp API: sends API requests
services/whatsapp_service.py - LLM Providers → LLM Provider: calls provider
- Speech Processing → Speech Provider: uses configured provider
- Receptionist Agent → Clinic & Conversation Records: reads conversation state
ai/agent.py - Booking & Availability → SQL Database: reads and writes
services/booking_service.py - Subscription Lifecycle → SQL Database: updates subscription data
services/subscription_service.py - WhatsApp Webhook → WhatsApp Accounts: looks up account
routes/whatsapp.py - Clinic Admin → User Records: queries users
routes/admin.py - Application → Web Chat: registers route
app.py - Application → WhatsApp Webhook: registers route
app.py - Application → Clinic Admin: registers route
app.py - Application → Platform Console: registers route
app.py