SaaS & Software Support Chatbot
Resolve API and technical documentation questions with zero-hallucination accuracy from your docs and sitemaps.
Embed an under 20 KB vanilla JavaScript AI support agent using next/script with zero SSR hydration warnings. Keep app/layout.tsx as a Server Component while Knogents handles sitemap syncing, PDF and Excel retrieval, and email lead alerts.
Pick the snippet that matches your router and widget layout.
Add two next/script tags inside <body> using strategy="afterInteractive". The widget loads site-wide after hydration without adding 'use client' to your root layout.
import Script from "next/script";
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<body>
{children}
<Script id="knogents-config" strategy="afterInteractive">
{`window.widgetConfig = {
chatbotId: "YOUR_CHATBOT_ID"
};`}
</Script>
<Script
id="knogents-widget-script"
data-id="YOUR_CHATBOT_ID"
src="https://knogents.com/embed.js"
strategy="afterInteractive"
/>
</body>
</html>
);
}If your app uses the Pages Router, place the same next/script tags directly inside pages/_app.tsx.
import type { AppProps } from "next/app";
import Script from "next/script";
export default function App({ Component, pageProps }: AppProps) {
return (
<>
<Component {...pageProps} />
<Script id="knogents-config" strategy="afterInteractive">
{`window.widgetConfig = {
chatbotId: "YOUR_CHATBOT_ID"
};`}
</Script>
<Script
id="knogents-widget-script"
data-id="YOUR_CHATBOT_ID"
src="https://knogents.com/embed.js"
strategy="afterInteractive"
/>
</>
);
}Mount the chat interface inside a dedicated page (such as app/support/page.tsx) or a Vite React app. The useEffect cleanup prevents duplicate widgets during client-side navigation. Leave the global floating script out of app/layout.tsx when using inline mode.
"use client";
import React, { useEffect } from "react";
declare global {
interface Window {
widgetConfig?: Record<string, unknown>;
ChatWidget?: { destroy?: () => void };
KnogentsWidget?: { destroy?: () => void };
__knogents_widget_initialized?: boolean;
__rag_widget_initialized?: boolean;
}
}
export function KnogentsInlineChat() {
useEffect(() => {
window.widgetConfig = {
chatbotId: "YOUR_CHATBOT_ID",
display: "inline",
};
if (window.KnogentsWidget && typeof window.KnogentsWidget.destroy === "function") {
window.KnogentsWidget.destroy();
} else if (window.ChatWidget && typeof window.ChatWidget.destroy === "function") {
window.ChatWidget.destroy();
}
window.__knogents_widget_initialized = false;
window.__rag_widget_initialized = false;
const oldScript = document.getElementById("knogents-widget-script");
if (oldScript && oldScript.parentNode) {
oldScript.parentNode.removeChild(oldScript);
}
const script = document.createElement("script");
script.id = "knogents-widget-script";
script.async = true;
script.setAttribute("data-id", "YOUR_CHATBOT_ID");
script.type = "text/javascript";
script.src = "https://knogents.com/embed.js";
document.body.appendChild(script);
return () => {
const activeScript = document.getElementById("knogents-widget-script");
if (activeScript && activeScript.parentNode) {
activeScript.parentNode.removeChild(activeScript);
}
if (window.KnogentsWidget && typeof window.KnogentsWidget.destroy === "function") {
window.KnogentsWidget.destroy();
} else if (window.ChatWidget && typeof window.ChatWidget.destroy === "function") {
window.ChatWidget.destroy();
}
window.__knogents_widget_initialized = false;
window.__rag_widget_initialized = false;
};
}, []);
return (
<div
id="rag-inline-bot"
style={{ width: "100%", height: "600px", minHeight: "450px" }}
/>
);
}Skip maintaining your own vector database, document parsers, and cron crawlers.
Standalone vanilla JavaScript with zero third-party libraries. Loads asynchronously after interactive hydration so it never bloats your Next.js client bundle or triggers React mismatch warnings.
Ingest multi-sheet .xlsx, .xls, and .csv pricing or limit matrices alongside .pdf, .docx, .md, and .txt files. Column headers stay attached across chunks in PostgreSQL pgvector.
Point Knogents at your sitemap.xml (including sitemaps generated by Next.js sitemap.ts or next-sitemap). Pages re-index automatically (monthly on Free, weekly on Basic, daily on Standard) and every response links back to its source.
Capture visitor details or book consultations directly inside the widget with natural language date/time detection and conflict checking. Instant email alerts send leads straight to your inbox.
Decide whether a managed RAG widget or raw React primitives fits your sprint.
| Requirement | Knogents | DIY with Vercel AI SDK |
|---|---|---|
| Time to Production | Under 3 minutes | Days to weeks (parsers, vectors, UI) |
| PDF, Word & Excel Table RAG | Managed ingestion & pgvector search | Build chunking and vector DB yourself |
| Scheduled Sitemap Sync | Built-in monthly, weekly, or daily sync | Build and host cron crawlers yourself |
| Headless React Hooks (useChat) | Managed widget UI (themes + custom CSS) | Full primitive hooks for custom UIs |
| Lead Capture & Scheduling | Built-in meeting capture + email alerts | Custom tool calls + email setup |
| Pricing | Flat monthly ($0, $29, $59) + add-ons | Open source SDK + LLM API & DB hosting bills |
Start free in development and upgrade when your Next.js app scales.
100 messages/mo, 1 agent, 30K chars, monthly sync, 0 extra seats (Owner only)
1,000 messages/mo, 2 agents, 150K chars, weekly sync, 2 extra seats, 5 themes
3,000 messages/mo, 6 agents, 500K chars, daily sync, 3 extra seats, custom CSS
Optional add-ons: +1,500 messages ($10/mo), +1 agent ($8/mo), Remove Branding ($10/mo).
Clear engineering boundaries before you install.
Technical answers for deploying Knogents in Next.js and React codebases.
Import Script from 'next/script' inside app/layout.tsx and render two <Script> tags inside <body> with strategy="afterInteractive": one to set window.widgetConfig with your chatbotId, and one to load https://knogents.com/embed.js. Because next/script runs after hydration, there are no SSR mismatch errors.
No. Next.js supports next/script inside Server Components, so your root layout stays a Server Component when using the floating widget. You only need a Client Component if you mount an inline container inside a specific route.
Use the KnogentsInlineChat Client Component below on routes that render <div id="rag-inline-bot" />. Its useEffect cleanup removes the previous script tag and resets the widget instance when users navigate between pages.
Yes. In Pages Router, place the same next/script tags inside pages/_app.tsx. In Vite or standard React SPAs, inject the script inside a useEffect hook with cleanup on unmount.
The Vercel AI SDK gives you low-level hooks like useChat, but you still have to build and host your own vector database, PDF and Excel parsers, sitemap crawler, and widget UI. Knogents ships all of that as a managed platform with flat monthly pricing ($0, $29, $59/mo). Note that Knogents does not expose headless React hooks for custom UIs.
Knogents is an automated AI agent and does not include a shared live-chat helpdesk console. When a visitor asks for a consultation or human help, the agent captures their name, email, and notes (or checks scheduling conflicts and books a meeting slot) and sends an instant email notification to your inbox.
Connect your sitemap, upload your docs or Excel sheets, and drop in the next/script snippet.
Solutions Powered by this Integration
Explore autonomous AI customer service and sales workflows built for your platform.
SaaS & Software Support Chatbot
Resolve API and technical documentation questions with zero-hallucination accuracy from your docs and sitemaps.
Answer customer inquiries instantly at any hour with verified factual accuracy and zero waiting.
Lead Generation & Consultation Scheduling
Qualify website visitors, capture contact details, and book consultations in real-time.
Setup Guides & Tutorials
Step-by-step technical guides for setting up Knogents on this platform.
How to Add an AI Chatbot to React & Next.js
Best practices for loading Knogents via next/script strategy lazyOnload in Next.js 14 App Router.
How to Add an AI Chatbot to an HTML Website
Complete guide to pasting the standalone vanilla JS snippet into static HTML, PHP, or custom stacks.
How to Add an AI Chatbot to Shopify
Step-by-step tutorial on embedding Knogents into Shopify theme.liquid with Storefront API tools.
Explore Other Platform Integrations
Deploy Knogents across Shopify, WordPress, WooCommerce, Wix, Webflow, and custom stacks.
Embed vanilla JS AI support into any static HTML, PHP, or custom web application.
Under 20 KB vanilla JavaScript embed loader supporting floating, inline, and fullscreen modes.
Add responsive AI support to Webflow projects via Custom Code head/footer integrations.
24/7 STOREFRONT ASSISTANT
Deploy Knogents on Your Website in 2 Minutes
Connect your website sitemap, upload your documentation or product catalog, and embed with a single snippet.