NLWeb is a lightweight JavaScript library that enables developers to create natural language interfaces directly in the browser without server-side processing.
NLWeb delivers seamless natural language experiences for modern web applications
Tiny library size (<10KB), no external dependencies, ensures fast loading and responsive experience.
All processing happens client-side, user data never leaves the browser, ensuring privacy.
Simple API for easy integration with existing web apps, supports all modern frameworks.
Advanced language models accurately interpret user intent, supporting complex queries.
Fully customizable UI components and interaction flows to match any design language.
Built-in multilingual capabilities for global applications.
// Initialize NLWeb instance const nlpEngine = new NLWeb({ elementId: 'chat-container', // Use local model modelPath: './models/nlp-model.bin', // Custom command handlers commands: { 'search *': (query) => { // Handle search command return `Searching for: ${query}`; }, 'show my profile': () => { // Show user profile return { action: 'show-profile' }; } } }); // Add natural language processing event listener nlpEngine.on('response', (response) => { if (response.action) { // Perform specific action switch(response.action) { case 'show-profile': showUserProfile(); break; // Other actions... } } else { // Display text response displayMessage(response.text); } }); // Launch the conversation interface nlpEngine.start();
How NLWeb transforms user interactions with web applications
"Find blue shirts", "Sort by price", "Show sale items" - let users find products through natural language.
"Show recent tech news", "Find articles about AI", "Recommend related content" - enhance content navigation.
"Show 2023 sales trends", "Compare Product A and B", "Create revenue chart" - explore data through conversation.
Everything you need to get started with NLWeb