You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A multi-tenant RAG + Chatwoot platform where customers interact through Chatwoot, while a RAG backend retrieves relevant knowledge, queries an external LLM, and posts AI-generated responses back to the conversation. Operators manage tenants, users, knowledge documents, and Chatwoot integrations through a centralized dashboard. Each tenant has an isolated knowledge base, Chatwoot configuration, conversations, and vector store, ensuring complete data separation and secure AI-powered customer support.
A multi-tenant RAG + Chatwoot platform. Customers chat through Chatwoot; rag-backend retrieves knowledge, calls an external LLM, and posts replies back. Operators manage tenants, documents, and Chatwoot integration in the dashboard portal.
This monorepo has three parts. Use this README for the big picture; each folder has its own setup guide.
Single tenant — settings, knowledge, users, Chatwoot
ENTERPRISE_USER
Single tenant — knowledge and query (limited admin)
HUMAN_AGENT
Chatwoot inbox only
VIEWER
Read-only overview
Tenant isolation is enforced in the API (enterpriseId on every row).
Enterprise (tenant)
An enterprise is one customer organization (tenant) on the platform — for example a company, brand, or support desk. Everything that belongs to that customer is scoped by a single enterpriseId (UUID). One Priyo deployment can host many enterprises; their data never mixes.
Field
Description
id
UUID — used in API paths and the Chatwoot webhook URL
name
Display name (e.g. Acme Corp)
slug
Unique URL-safe id (e.g. acme-corp, lowercase and hyphens)
description
Optional notes about the tenant (max 2000 characters)
status
ACTIVE, SUSPENDED, or INACTIVE
What belongs to an enterprise
Resource
Purpose
Users
ENTERPRISE_ADMIN and ENTERPRISE_USER accounts tied to this tenant (SUPER_ADMIN has no enterprise)
Knowledge documents
PDF, DOCX, TXT, etc. — chunked, embedded, and searched only within this tenant
Chatwoot integration
Base URL, account id, API token, inbox — one integration record per enterprise
Conversations & messages
Chat history from Chatwoot webhooks, linked for RAG context
Webhook
POST /api/v1/webhooks/chatwoot/{enterpriseId} routes inbound Chatwoot events to the correct tenant
Typical lifecycle
SUPER_ADMIN creates an enterprise in the dashboard (name, slug, optional description).
Upload knowledge for that enterprise until documents are READY.
ENTERPRISE_ADMIN opens Settings in the dashboard — configure name, description, status.
Configure Chatwoot Setting for the same enterpriseId.
Register the webhook in Chatwoot using that UUID.
End-customer messages on the Chatwoot inbox trigger RAG using only that enterprise’s knowledge base.
Platform (one rag-backend)
├── Enterprise A → knowledge A → Chatwoot inbox A → webhook …/chatwoot/{id-A}
├── Enterprise B → knowledge B → Chatwoot inbox B → webhook …/chatwoot/{id-B}
└── SUPER_ADMIN → manages all enterprises (no tenant scope)
The stack has four layers — Users, Part 1 (Chatwoot), Part 2 (RAG), and External (OpenAI). Each enterprise gets isolated knowledge, webhook URL, and Chatwoot settings.
A multi-tenant RAG + Chatwoot platform where customers interact through Chatwoot, while a RAG backend retrieves relevant knowledge, queries an external LLM, and posts AI-generated responses back to the conversation. Operators manage tenants, users, knowledge documents, and Chatwoot integrations through a centralized dashboard.