3.21.1 WhatsApp Stack Architecture
Currently, RAIA™ (Real estate Artificial Intelligence Agent) OS relies on TimelinesAI as an external, closed-source SaaS gateway. It provides a quick shared inbox UI but introduces significant systemic weaknesses:
1. The Current Stack: TimelinesAI
Closed-Source Legacy PatternCurrently, RAIA™ (Real estate Artificial Intelligence Agent) OS relies on TimelinesAI as an external, closed-source SaaS gateway. It provides a quick shared inbox UI but introduces significant systemic weaknesses:
2. The Proposed Stack: Self-Hosted Evolution API
Data Sovereignty & Ultra-Low LatencyWe propose migrating to Evolution API (or a self-hosted WPPConnect / Baileys Node). Running as a Dockerized container directly on our Tailscale VPN subnet, it bypasses SaaS systems completely:
3. Deep Architecture Comparison
| Capability | TimelinesAI (SaaS Web Wrapper) | Evolution API (Self-Hosted Open-Source) |
|---|---|---|
| Hosting & Control | Hosted on third-party public cloud. Closed-source. | Self-hosted inside private Tailscale VPN. 100% open-source. |
| Scaling Costs | High monthly flat fee per connected number. | **Zero cost**. Limited only by local server RAM/CPU. |
| Conversational Freedom | Unrestricted. (Send free-form texts without templates). | Unrestricted. (Uses Baileys WS emulation). |
| Agent Inbox Interface | Excellent out-of-the-box shared inbox web portal. | None built-in. Requires our custom Next.js UI integration. |
| Security & Encryption | Credentials and chat logs stored on external servers. | Private keys & Redis tokens encrypted locally in Tailscale. |
| Webhook Latencies | 5s to 12s queue-based latency. | Sub-millisecond direct internal LAN delivery. |
4. Developer Integration Blueprint (Direct API Call)
Developers can directly swap the comms backend transport inside comms-delivery-engine by executing direct Evolution API payloads:
// Sending a free-form WhatsApp message autonomously via Self-Hosted Evolution API Node
const axios = require('axios');
async function sendSovereignWhatsApp(number, message) {
const EVOLUTION_API_URL = "http://100.120.31.7:8080"; // Private Tailscale IP
const INSTANCE_KEY = process.env.EVOLUTION_INSTANCE_KEY;
const API_TOKEN=proces...
const payload = {
number: number, // E.g., "447551234567"
options: {
delay: 1200, // Natural human typing delay simulation
presence: "composing"
},
textMessage: {
text: message
}
};
try {
const res = await axios.post(
`${EVOLUTION_API_URL}/message/sendText/${INSTANCE_KEY}`,
payload,
{ headers: { "apikey": API_TOKEN } }
);
return res.data;
} catch (err) {
console.error("Evolution API failure:", err.message);
throw err;
}
}