Architecture layers
Message flow
Every inbound message follows the same deterministic path through the platform:-
Channel reception — A sender’s message arrives via WhatsApp webhook and is received by the
WhatsappConnector, which normalizes the payload into Celai’s internal message format. - MessageGateway — The central HTTP server accepts the normalized message and passes it into the middleware pipeline.
-
Middleware pipeline — The message flows through an ordered chain of processors:
CommandsAuthMiddleware— intercepts and authorizes slash commandsPayhubAuthMiddleware— authenticates the sender by phone number and injects identity into message metadataContactDecodingMiddleware— normalizes contact informationChatwootMiddleware— syncs the conversation to Chatwoot for human agent visibility and handoff
- LogicRouter — Evaluates the sender’s identity and compliance status to select the appropriate agent: onboarding, sender home, blocked, pending CIP, or service unavailable.
-
Agent processing — The selected
MacawAssistantprocesses the message using its system prompt, AI model, and declared tool functions. Tool functions retrieve all factual data — quotes, recipients, operations — from backend services. The model never generates this data. - Message enhancement — The agent’s response passes through the Gemini-powered message enhancer, which formats the output with WhatsApp-specific styling (bold, lists, spacing).
-
Channel delivery — The
WhatsappConnectorformats the enhanced response for the WhatsApp Business API and delivers it to the sender.
Lola Send does not make compliance decisions — it orchestrates the conversational flow and routes senders based on verdicts returned by the bank’s compliance services.
Bank control points
Financial institutions retain direct control over the following aspects of the platform:AI model strategy
Lola Send uses a multi-model architecture where each model serves a specific, bounded role:
Gemini powers the message enhancement pipeline — the last stage before responses reach the sender. It runs on Google Cloud Vertex AI, which supports VPC Service Controls to keep all inference traffic within the bank’s GCP perimeter. No conversation data leaves the controlled network boundary during enhancement.
The bank can configure model selection per agent via
MacawSettings and select the enhancement model independently. Model provider choices are driven by data governance requirements — not locked to a single vendor.