WhatsApp Copilot, Latency Shield & Continuous Learning Pipeline

WhatsApp Copilot, Latency Shield & Continuous Learning Pipeline A workflow diagram generated by Archify. 01 / Client & Broker Surfaces 02 / Supabase Edge & Ingestion 03 / Hermes AI & Decision Engine 04 / CRM Registry & Learning Vault Intake & Verify Cadastral Fast-Path & Ingest Reflex Shield & Learning Vault Fleet Reasoning & CRM Sync & Dispatch Secure Ingestion Sub-1ms Latency Shield Gemini Reasoning Teaching & RAG Vault WhatsApp Client · voice / deeds / text · Client & Broker Surfaces › Intake & Verify · WhatsApp WhatsApp Client voice / deeds / text Flutter Comms · broker triage inbox · Client & Broker Surfaces › Sync & Dispatch · realtime feed Flutter Comms broker triage inbox realtime feed Meta Cloud API · Graph API webhooks · Supabase Edge & Ingestion › Secure Ingestion › Intake & Verify Meta Cloud API Graph API webhooks whatsapp-webhook · Supabase Edge Fn · Supabase Edge & Ingestion › Secure Ingestion › Cadastral Fast-Path & Ingest · HMAC signature · Supabase whatsapp-webhook Supabase Edge Fn HMAC signature Jev Cloud API · TypeSafe AI failover · Supabase Edge & Ingestion › Reflex Shield & Learning Vault · circuit-broken Jev Cloud API TypeSafe AI failover circuit-broken send-whatsapp · Supabase Edge Fn · Supabase Edge & Ingestion › Sync & Dispatch · client ack · Supabase send-whatsapp Supabase Edge Fn client ack PACI Fast Path · cadastral ingress · Hermes AI & Decision Engine › Sub-1ms Latency Shield › Cadastral Fast-Path & Ingest · <30ms zero-LLM PACI Fast Path cadastral ingress <30ms zero-LLM In-Memory LRU · SHA-256 state hash · Hermes AI & Decision Engine › Sub-1ms Latency Shield › Reflex Shield & Learning Vault · <1ms hit (0% loss) In-Memory LRU SHA-256 state hash <1ms hit (0% loss) Gemini 3.8 Flash · multimodal fleet · Hermes AI & Decision Engine › Gemini Reasoning › Fleet Reasoning & CRM · tool loops Gemini 3.8 Flash multimodal fleet tool loops Supabase Storage · raw audio & deeds · CRM Registry & Learning Vault › Cadastral Fast-Path & Ingest · RLS vault · Supabase Supabase Storage raw audio & deeds RLS vault Learning Vault · user_feedback & notes · CRM Registry & Learning Vault › Teaching & RAG Vault › Reflex Shield & Learning Vault · 180-day pgvector · PostgreSQL Learning Vault user_feedback & notes 180-day pgvector CRM Memory · contacts & history · CRM Registry & Learning Vault › Teaching & RAG Vault › Fleet Reasoning & CRM · Postgres RLS · PostgreSQL CRM Memory contacts & history Postgres RLS queue ack notify broker embed feedback cadastral query inbound triage persist raw stage action & memory cloud decision post webhook feedback RAG in-scope lead circuit failover Legend User UI Agent logic Context / trace Cloud service External system

Sub-1ms Latency Shield & Circuit Breaker

  • • In-Memory LRU cache stores exact SHA-256 state & question hashes; hits return in <1ms with 100% deterministic quality
  • • Automated circuit breaker tracks :8150; skips offline probes for 60s to completely eliminate TCP timeout penalties
  • • Direct PACI fast-path resolves Kuwait zoning and FAR data in <30ms without invoking System 1 or LLM loops

Continuous Teaching & RAG Memory

  • • user_feedback table continuously embeds ratings, corrections, and reviews into 180-day pgvector RAG memory
  • • Gemini agent dynamically retrieves past learnings and CRM memory via semantic_search during reasoning turns
  • • Client context, transaction history, and preferences are automatically injected into the conversation

Automated Eval Harness & Guardrails

  • • npm run eval executes 20+ real-world fixtures to verify prompt changes, persona tone, and tool accuracy
  • • System 1 reflexively blocks sovereign Ministry of Justice and court requests per firm boundaries
  • • Islamic banking compliance (KFH, Boubyan, KIB, Warba) and Law 33/2016 FAR rules strictly enforced
Suite ↗