Vektr
A multi-tenant AI chatbot platform with RAG, vector search, and WebSocket token streaming.

Vektr is a self-hosted or cloud-deployable multi-tenant AI chatbot platform built on Laravel 13, Livewire 4, and Filament v5. The platform allows tenants to create custom AI assistants for customer support or sales workflows. Each tenant manages their own chatbots, uploads knowledge base documents (PDF, DOCX, text files, or URLs) which are processed and chunked to generate semantic vector embeddings. The chatbots resolve customer queries in real-time using context-aware Retrieval-Augmented Generation (RAG) over WebSockets, support custom branding, capture visitor leads, and automatically escalate complex queries to human agents via support tickets.
Understanding the friction.
Building a secure, isolated multi-tenant system where each customer's workspace, chatbots, documents, conversations, and billing subscriptions are completely separate. The platform needed to ingest and process text from multiple document formats, store their embeddings using pgvector, perform high-speed context retrieval, stream AI responses in real-time to front-end chat widgets over WebSockets, support automatic lead capture / human ticket escalation when the AI's confidence is low, and report usage limits dynamically to support tiered and metered pricing.
“Multi-tenancy, vector search, and WebSocket streaming in the same product — the architecture had to be robust from the start.”
Engineered with focus.
Engineered a robust single-database multi-tenancy model using custom global query scoping to isolate resources. Developed asynchronous ingestion queues running on Laravel Horizon to parse files (using Smalot/PdfParser and PhpOffice/PhpWord), chunk texts, and generate 1536-dimensional embeddings. Configured PostgreSQL pgvector and Laravel Reverb WebSockets to stream incremental AI response tokens directly to the client widget, bypassing standard HTTP latency. Designed confidence-threshold check triggers for human support ticket escalation and logged unanswered queries for model tuning. Integrated Cashier Stripe subscriptions and metered usage credit limits.
Real world outcome.
Completed a fully functional and tested platform (93 feature tests passing with 394 assertions) that guarantees multi-tenant isolation, sub-second semantic context retrieval, real-time WebSocket typing streams, automated lead capturing, and automated Stripe billing handling.
Building something similar?
Book a free 30-minute call. I'll scope your project, identify risks, and tell you honestly if I'm the right fit.