<KeluChat /> is a ready-made chat panel for React apps. It streams answers, lists citations under Sources, keeps follow-up questions in one conversation, and shows thumbs up/down under each answer. For your own markup, use the useKeluChat hook.
Set up
Create a public client key
Open the knowledge base, go to Integrations, and under Client Keys click Create key. Choose Public key. Add your site under Allowed origins to stop other sites from using it, and untick Allow MCP access unless the key is also for AI tools (MCP ignores allowed origins).
Render the panel
react and react-dom 18 or later are required. In the Next.js App Router, keep the "use client" line.Build your own UI
index, not its position in the list, because the numbers can skip.
Every prop, hook option and return value is in the @kelu/react reference.
Troubleshooting
unauthorized: the client key is missing, invalid or revoked, or your site is not in the key’s Allowed origins.forbidden: the key belongs to a different knowledge base thanknowledgeBaseId.captcha_required: the deployment requires reCAPTCHA v3 for public keys. PassgetCaptchaTokenand return a fresh token on every call.- “useState only works in Client Components” (Next.js): add
"use client"to the top of the file that renders the panel. - No thumbs under an answer: the workspace keeps no chat data (zero retention), so there is nothing to rate.