Chaka WAP — case study by Jomiez Innovation
AI Development / WhatsApp Automation

Chaka WAP

A multi-modal, local-first AI engine integrated into WhatsApp as a human-like participant, featuring dynamic style learning and a robust failover architecture.
Date:
2026
Project:
AI Development / WhatsApp Automation
Customer:
Jomiez Innovation

Chaka WAP

Project Overview & Architecture

Chaka WAP is an advanced AI engine designed to operate autonomously on WhatsApp. Unlike traditional bots, it uses a "Dynamic Style Learning Engine" to mirror the conversational style, slang, and brevity of the user it is interacting with. The system is built on a decoupled architecture using a WhatsApp Web Bridge, a local SQLite memory engine, and a multi-LLM orchestrator.

The Tech Stack

  • Backend: Powered by Node.js and @whiskeysockets/baileys for the WhatsApp socket protocol.
  • Database: Uses local SQLite for ultra-fast, encrypted storage of chat logs and binary vector embeddings.
  • AI Brain: Primarily utilizes Gemini 2.5 Flash for reasoning and Gemini 1.5 Flash for vision capabilities.
  • Local Memory: Runs @xenova/transformers locally to generate 384-dimensional vectors for private, cost-free RAG.
  • Admin UI: A real-time dashboard built with Vanilla JS, TailwindCSS, and Socket.io for live telemetry and log monitoring.

Memory Logic & Style Learning

Chaka doesn't just process text; it remembers the entire relationship through an ingestion pipeline that saves message embeddings as binary BLOBs in SQLite. For every reply, the engine performs a Cosine Similarity Search to retrieve historical facts and injects them into the response context. Additionally, the engine analyzes the last 5-8 messages from a user to mirror their specific syntax, capitalization, and use of Nigerian Pidgin.

Vision & Failover Systems

The system is fully multimodal, intercepting media buffers to provide "Occasion Inference"—interpreting *why* a photo was sent based on the previous chat context. To ensure 100% uptime, Chaka uses an "Ironclad Routing Orchestrator" that automatically rotates through model versions and API keys if rate limits are hit.

Evolution & Optimization

  • Storage: Migrated from Firebase to local SQLite to bypass document size limits and high latency.
  • Embeddings: Replaced cloud-based APIs with local transformers to eliminate API costs and improve privacy.
  • Data Handling: Switched from string-based vector storage to Binary BLOBs, reducing database size and speeding up read times by 10x.
  • UI Fluidity: Transitioned to flex-based layouts to ensure the admin dashboard scales from 4k monitors down to mobile screens.