Technical Documentation

This documentation provides an overview of the system architecture for developers contributing to KUMUL AI.

System Architecture

KUMUL AI is an event-driven application. It relies on webhooks from the WhatsApp Business API.

User -> WhatsApp -> FastAPI Webhook -> LangChain Agent -> Tools/Search -> Response -> WhatsApp -> User

The system is stateless; all context is persisted in a PostgreSQL database.

Database Schema

We use two primary tables:

  • user_profiles: Stores current user state (Profession, Location, Lat/Long). Updates dynamically.
  • interaction_logs: Permanent record of every message for compliance and analytics.

Local Setup

To run KUMUL AI locally:

git clone https://github.com/your-repo/kumul.git cd kumul python -m venv venv source venv/bin/activate # or .\venv\Scripts\activate on Windows pip install -r requirements.txt uvicorn main:app --reload

You will need to expose your localhost via ngrok to configure the WhatsApp webhook.