What is JavaScript SDK?
The @kelu/sdk package is the core Kelu client library. It works in any JavaScript environment: browser, Node.js, React Native, Deno, and edge runtimes. The React package is built on top of this SDK. Use it directly when you need maximum control or when your stack is not React-based.
How Kelu works with JavaScript SDK
Everything you can do once the integration is connected.
Universal environment support
Works in browser, Node.js, React Native, and edge runtimes (Cloudflare Workers, Deno Deploy, Vercel Edge). One package, all environments.
Search and Chat APIs
The SDK wraps Kelu's search (hybrid vector + full-text) and chat (SSE streaming RAG) endpoints with a clean, typed API.
Public and server-side auth
Use public client keys (kl_pk_...) for browser-side code and client ID + secret (kl_ci_... / kl_cs_...) for server-side integrations.
Streaming response support
The SDK handles SSE stream parsing and provides an async iterator for streaming chat responses in any JavaScript environment.
How to set it up
Install: npm install @kelu/sdk
Initialize the client with your client key: const kelu = new KeluClient({ clientKey: 'kl_pk_...' })
Call kelu.chat() for streaming RAG answers or kelu.search() for hybrid search results.
Related integrations
The Kelu web widget embeds in any HTML page. One script tag, full style customization, mobile-ready, WCAG AA accessible.
Install @kelu/react for a <KeluChat /> drop-in or the useKeluChat headless hook for a fully custom UI.
An MCP server at api.kelu.dev/mcp, scoped to a knowledge base by its client key, lets any MCP-aware AI tool query your knowledge base as structured tools.
JavaScript SDK — Frequently Asked Questions
Common questions about connecting Kelu to JavaScript SDK.
Ready to connect JavaScript SDK?
Start free. No credit card required. Connect your first integration in under 5 minutes.