Qualix AI
I. Charge
Sales teams lose deals when they fail to respond quickly on WhatsApp, Instagram, and Telegram. Manual follow-up does not scale, and generic autoresponders fail to qualify leads.
II. Investigation
Qualix was built to automate lead qualification across WhatsApp, Instagram, and Telegram using an agentic pipeline. When a message arrives, the system retrieves relevant business context using a RAG pipeline, evaluates the buyer's intent, and either qualifies the lead or routes it for human follow-up. The backend exposes tool-calling endpoints that the agent uses to read CRM state, update records, and schedule callbacks without human intervention.
III. Exhibits - Architecture
- The RAG pipeline uses LangChain and ChromaDB. At query time, the pipeline retrieves chunks of business context before passing them to the model. This keeps the context window focused on relevant data rather than loading the full business knowledge base.
- Tool-calling endpoints are implemented in FastAPI. The agent calls these endpoints to read CRM records, create leads, and schedule follow-up tasks. Each endpoint is role-gated and logged.
- The backend runs on FastAPI with async SQLAlchemy 2.0 and exposes three separate portals: one for support agents, one for business clients, and one for administrators.
- PostgreSQL 16 is the primary data store, connection-pooled via PgBouncer. Redis 7 and Celery handle background task processing, including LLM calls that cannot block the HTTP response cycle.
- LLM requests route dynamically across OpenRouter, OpenAI, and Nvidia NIM based on cost and capability requirements. The routing logic allows model swaps without changing application code.
- The CI pipeline enforces code quality using Ruff, MyPy, Bandit, and pip-audit before any deployment. PyTest covers unit and integration tests for the backend.
- Infrastructure is containerized with Docker. Kubernetes manifests and GitHub Actions pipelines handle deployment.

IV. Cross-Examination
Q: Why use a RAG pipeline instead of a large context window?
A: A large context window stuffs every piece of business knowledge into every request. That increases cost and latency without improving relevance. The RAG pipeline retrieves only the chunks that are relevant to the current conversation. It also lets you swap the underlying model without changing the retrieval strategy.
Q: Why use Celery and Redis instead of a lighter task queue?
A: Lead qualification is a multi-step workflow. An LLM call might succeed while a CRM update fails. Celery provides per-step retry semantics. Redis persists task state across restarts. A lightweight queue with no retry mechanism would silently drop failed steps, and a dropped lead qualification is a business loss.
V. Failure Modes
- LLM provider timeout triggers automatic routing to an alternate provider via OpenRouter.
- WhatsApp webhook rate limits mean messages must be queued immediately on receipt. Processing delays are acceptable. Message loss is not.
VI. Lessons Learned
- LLM calls and CRM writes fail independently and at different rates. They need separate retry queues. A single Celery task that does both is harder to reason about when one step fails and the other succeeded.
VII. What I'd Build Next
- Instrument end-to-end response latency per channel. The system has no production metrics yet. That data is needed before making any further optimization decisions.
Verdict
ALLOW - Backend is built and tested. The CI pipeline enforces code quality. Production performance metrics have not yet been collected.