∆ SECURE AI ASSISTANTS · AUTHORIZATION · HUMAN APPROVAL ∆ AGENTIC WORKFLOWS · APIS · WEBHOOKS ∆ RETRIEVAL SYSTEMS · SOURCE GROUNDING ∆ LLM EVALUATION · ERROR ANALYSIS · REGRESSION TESTING ∆ BUILD · EVALUATE · DEPLOY

FORM PR-02 · PROJECT PR-0001 · Applied AI

Secure AI WhatsApp Assistant

A secure WhatsApp assistant that lets parents retrieve school information and authorized student records through natural-language conversations. It demonstrates agent orchestration, LLM routing, grounded retrieval, identity verification, guardrails, observability, and business-process automation.

PR-0001.1

The problem

Private data needs hard boundaries

Why it matters

Parents repeatedly contact school staff for routine information. Automation can reduce that workload, but student-specific requests introduce privacy and authorization risks that a general chatbot cannot safely handle without verified identity, relationship checks, and grounded data access.

PR-0001.2

The solution

Authenticated, intent-aware routing

StepSystem behavior
01Receive the WhatsApp message through Twilio and match the sender to an authorized parent record.
02Unknown or unverified users complete a six-digit OTP flow with a five-minute expiration.
03Classify intent; route balances and attendance to PostgreSQL, and policy questions to the RAG pipeline.
04Validate required fields and the parent-to-student relationship before returning protected information.
05Return a concise answer, log the outcome, and send consequential write actions for human review.
  • Access · Verified parents
  • Mode · Read-only by default
PR-0001.3

Key workflow

From message to verified answer

  • Receive an inbound WhatsApp message through Twilio and match the sender's phone number.
  • Trigger short-lived OTP verification when the sender is unknown or unverified.
  • Classify the request into a supported intent using structured model output.
  • Route structured requests to PostgreSQL and policy questions to the grounded RAG pipeline.
  • Validate required fields and confirm the parent-to-student relationship before disclosure.
  • Format a concise WhatsApp-friendly response and validate it before sending.
  • Log outcomes, handle failures safely, and escalate sensitive write actions for human review.
PR-0001.4

System coverage

Technology · Intents · Safety controls

Technology

  • Twilio WhatsApp
  • n8n
  • PostgreSQL
  • Supabase
  • Pinecone
  • OpenAI Models
  • Embeddings
  • Webhooks
  • OTP Auth
  • RAG
  • Logging
  • Alerting
  • Human Review

Supported intents

  • Fee Balance
  • 7-Day Attendance
  • Feeding Menu
  • Admissions
  • School Policies
  • Complaints
  • Other / Unsupported

Safety controls

  • Authorization Checks
  • Deterministic Record Queries
  • Short-Lived OTP
  • Human Approval for Writes
  • Fallbacks + Validation
  • Regression + Injection Tests