Add Knosite to a Next.js site
Knosite is a chat assistant that answers your visitors from your own pages, with sources, and ranks them as leads by how they engage. The @knosite/next package adds it to Next.js. It loads with next/script using lazyOnload, so it never competes with your page. It works with the App Router and the Pages Router.
Install it
- Sign up and add your website address. Knosite reads your pages.
- Copy your site key from the dashboard’s Install page.
- Install the package.
npm install @knosite/nextThen add the component to your root layout, app/layout.tsx:
import { Knosite } from '@knosite/next';
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>
{children}
<Knosite siteKey="ks_live_…" />
</body>
</html>
);
}Using the Pages Router? Render the same component in pages/_app.tsx.
Deploy, and the chat appears in the bottom right corner of every page.
Options
siteKey: required, from the dashboard’s Install page.theme:light,darkorauto.position:rightorleft.
Or let your AI agent do it
Connect Claude, Cursor, Copilot, Codex or ChatGPT to Knosite and it adds the package, sets up Engage and tests it on your real site, asking before every change. Set it up with your agent.
Then add Engage
On the same site, Engage adds glossary tooltips, help tips and short on-site surveys, and ranks every engaged visitor hot, warm or nurture, with plain reasons. Plans start at $25 a month.