# RaggedAI - Complete Platform & Documentation Index > Official site: https://raggedai.com > Platform: RaggedAI AI-Powered Search & RAG Chatbot Builder > NPM Package: `ragged-chat-sdk` --- ## Table of Contents 1. Overview 2. Platform Architecture 3. Key Features 4. Installation & Quickstart 5. SDK API Reference 6. Custom Domain & DNS Configuration 7. Customization & Styling 8. System Events & Callbacks 9. Frequently Asked Questions --- ## 1. Overview RaggedAI is an enterprise-ready Retrieval-Augmented Generation (RAG) platform designed to eliminate the complexity of building custom AI document search and chatbot interfaces from scratch. Users can upload their knowledge base, documents, and web links, and instantly generate an intelligent AI assistant that answers questions grounded in their data. RaggedAI handles document parsing, automatic chunking, embedding generation, vector indexing, conversational context management, and client-side widget delivery. --- ## 2. Platform Architecture RaggedAI utilizes a high-performance distributed architecture: - **Frontend & Dashboard**: Next.js App Router (React 19, TypeScript, TailwindCSS) - **Node.js API Gateway**: Handles authentication, user management, project configuration, and domain routing. - **Go Processing Sidecar**: High-concurrency document chunking, parsing, and vector indexing pipeline. - **Vector Engine**: Qdrant vector database optimized for sub-millisecond semantic search. - **Embedding & Inference Models**: Powered by Gemini API, NVIDIA NeMo / Voyage AI, and Xenova Transformers for lightweight client/edge embeddings. - **Client Web Widget**: Lightweight SDK (`ragged-chat-sdk`) with zero external runtime UI dependencies. --- ## 3. Key Features ### Auto-Chunking & Intelligent Parsing - Supports PDF, Markdown, HTML, and plain text document uploads. - Smart document segmentation based on semantic section boundaries and heading structures. - Automatic metadata extraction (title, headers, source links, dates). ### High-Performance Vector Search - Sub-millisecond similarity search across millions of vector embeddings. - Hybrid search support combining dense vector embeddings with sparse keyword matching. ### Custom Domains & SSL Management - Connect custom domains (e.g., `chat.example.com` or `ai.yourdomain.com`). - Automatic TLS/SSL certificate issuance and zero-downtime routing via Vercel/Render edge. ### Embeddable Floating Chat Widget - Fully customizable chat button and drawer. - Support for markdown formatting, code syntax highlighting, dark mode styling, and streaming responses. --- ## 4. Installation & Quickstart ### Installing via NPM ```bash npm install ragged-chat-sdk ``` ### Initializing the SDK ```javascript import { init } from 'ragged-chat-sdk'; init({ subdomain: 'my-bot-subdomain' }); ``` ### HTML Script Tag Integration ```html ``` --- ## 5. SDK API Reference ### `init(options)` Initializes the SDK widget on the page. #### Parameters: | Option | Type | Default | Description | | --- | --- | --- | --- | | `subdomain` | `string` | **Required** | The unique subdomain identifier assigned to your chatbot. | | `apiUrl` | `string` | `https://ragflowdb.onrender.com/api` | Base API URL endpoint. | | `widgetShape` | `'circle' \| 'rounded-square'` | `'circle'` | Shape of the floating launcher button. | | `widgetSize` | `'small' \| 'medium' \| 'large'` | `'medium'` | Size dimensions of the floating launcher button. | ### `open()` Programmatically opens the chat drawer on screen. ```javascript import { open } from 'ragged-chat-sdk'; open(); ``` ### `close()` Programmatically closes the chat drawer on screen. ```javascript import { close } from 'ragged-chat-sdk'; close(); ``` ### `toggle()` Programmatically toggles the chat drawer state between open and closed. ```javascript import { toggle } from 'ragged-chat-sdk'; toggle(); ``` --- ## 6. Custom Domain & DNS Configuration To point your custom domain (e.g. `chat.yourcompany.com`) to RaggedAI: 1. Log into your DNS provider (Cloudflare, Namecheap, GoDaddy, Route53). 2. Add a `CNAME` record: - **Type**: `CNAME` - **Name/Host**: `chat` (or preferred subdomain prefix) - **Value/Target**: `cname.vercel-dns.com` (or as provided in your RaggedAI dashboard) - **TTL**: `Auto` / `300` 3. Enter your custom domain in the RaggedAI project dashboard. SSL verification will complete automatically within minutes. --- ## 7. Customization & Styling The floating widget launcher supports shape and size presets: ```javascript // Circle Launcher init({ subdomain: 'demo-bot', widgetShape: 'circle', widgetSize: 'medium' }); // Large Rounded Square Launcher init({ subdomain: 'demo-bot', widgetShape: 'rounded-square', widgetSize: 'large' }); ``` --- ## 8. System Events & Callbacks The SDK emits custom DOM events on the `window` object: ```javascript // Listener when SDK finishes loading window.addEventListener('ragged:ready', () => { console.log('RaggedAI Chat Widget is ready'); }); // Listener when chat widget is opened window.addEventListener('ragged:open', () => { console.log('Chat opened'); }); // Listener when chat widget is closed window.addEventListener('ragged:close', () => { console.log('Chat closed'); }); ``` --- ## 9. Frequently Asked Questions ### What is RaggedAI? RaggedAI is an AI platform for building custom RAG chatbots and document search solutions. ### How does RaggedAI process uploaded documents? Documents are parsed into semantic chunks, vectorized using embedding models, stored in Qdrant vector databases, and retrieved in real-time to generate accurate AI answers. ### Can I connect RaggedAI to my own domain? Yes, RaggedAI supports custom CNAME domain mappings with automatic SSL/TLS certificate generation. ### Where can I get support? Visit https://raggedai.com/docs or contact support through https://raggedai.com/contact.