What Celai provides
MessageGateway
MessageGateway is the central HTTP server that orchestrates all message processing. It is configured with:- An assistant (the LogicRouter that selects agents)
- Host and port for the HTTP server
- Webhook URL for channel callbacks
- A message enhancer for formatting outbound responses
- An on_startup hook for initialization tasks
MessageGateway registers encrypted callback endpoints via
HttpCallbackProvider, enabling secure communication between Lola Send and frontend web widgets for operations like payment confirmation and identity verification.LogicRouter
LogicRouter is the entry-point assistant that evaluates each inbound message and delegates it to the appropriate specialized agent. It accepts:- A list of registered assistants (agents)
- An assistant selector function that inspects the sender’s identity and compliance status
- Shared state and history stores
MacawAssistant
MacawAssistant is the agent implementation used by all of Lola Send’s specialized agents. Each agent is a self-containedMacawAssistant with its own configuration:
MacawSettings
MacawSettings controls the AI model behavior for each agent:
The architecture uses three models, each with a bounded role:
The core and blend models handle agent logic. Gemini runs on Google Cloud Vertex AI, which supports VPC Service Controls — keeping all inference traffic within the bank’s GCP perimeter. This three-model architecture isolates each concern (reasoning, refinement, channel formatting) and allows the bank to configure or replace models independently.
PromptTemplate
Each agent’s behavior is defined by aPromptTemplate with dynamic variables:
The bank can customize agent behavior by modifying system prompts and the values injected into these variables — without changing application code.
Tool functions
Each agent declares a specific set of tool functions that it can invoke. These are the only operations available to the AI model during a conversation. The model cannot invent or call undeclared capabilities.RAG retrieval
Agents can be configured with retrieval-augmented generation viaast.set_rag_retrieval(rag), grounding their responses in bank-approved knowledge bases. See RAG capabilities for details.
Event system
Agents can register event handlers to intercept specific message types before standard processing:Security considerations
- Encrypted callbacks:
HttpCallbackProvideruses AES encryption and HMAC signing for all communication between Lola Send and frontend widgets. The encryption key and secret key are loaded from environment variables managed by Doppler. - Deterministic routing: Every message follows the same auditable path — connector → middleware → LogicRouter → agent. No message bypasses the pipeline.
- Scoped agent capabilities: Each agent can only invoke its declared tool functions. The AI model has no access to undeclared operations.
- Stateless application: Celai’s application layer holds no persistent data. State and history live in Redis; identity lives in backend services.