nlkitai/nlux

The 𝗣𝗼𝘄𝗲𝗿𝗳𝘂𝗹 Conversational AI JavaScript Library 💬 — UI for any LLM, supporting LangChain / HuggingFace / Vercel AI, and more 🧡 React, Next.js, and plain JavaScript ⭐️

What it solves

NLUX simplifies the development of conversational AI interfaces by providing ready-to-use components and hooks. It removes the complexity of building chat UIs from scratch, allowing developers to quickly integrate Large Language Models (LLMs) into their web applications.

How it works

It operates as a lightweight, zero-dependency library that provides a set of React components (like <AiChat />) and hooks to manage chat state and streaming responses. It uses "adapters" to connect to various LLM backends, including OpenAI, LangChain/LangServe, and Hugging Face, or custom endpoints. The library handles the UI rendering, markdown parsing, and syntax highlighting automatically.

Who it’s for

Developers building web applications who need to add chat interfaces powered by LLMs. It is designed for those who want a high-performance, accessible, and customizable UI without building the underlying chat infrastructure from the ground up.

Highlights

  • Provides pre-built React components and hooks for rapid UI development.
  • Includes built-in adapters for OpenAI, LangChain, and Hugging Face.
  • Supports streaming responses and generative UI components.
  • Highly customizable with theming and layout options.
  • Lightweight, zero-dependency core library.

Related

  • Project
  • Project
  • Project
  • Project