Browser AI Library
A lightweight, browser-first AI library for running large language models, multimodal models, and AI agents directly in the browser.
BrowserAI brings the power of AI directly to your web browser. Whether you’re building a chatbot, adding voice capabilities, or creating interactive AI experiences, BrowserAI makes it simple to run advanced AI models directly in the browser - no server required!
Key Features
- Multiple Model Backends: Support for both MLC and Transformers backends to run models efficiently in the browser
- Multimodal Support: Handle text, images (Coming Soon), audio, and speech with a unified API
- Browser Agent [WIP]: Built-in agent system for automated browser interaction and content analysis
- Web Workers: Run AI models in background threads for improved performance and responsiveness
- Structured Output: Native support for JSON, markdown, and other structured formats
- Streaming Support: Real-time streaming of model outputs for faster response times
- Persistent Storage: Built-in database support using IndexedDB and SQLite for managing AI data
- Optimized Performance: WebGPU, WebNN, and WASM acceleration support
Features
🔒 Privacy First
All processing happens right in the user’s browser - no data ever leaves their device.
💰 Cost-Effective
No expensive API calls or cloud computing costs - everything runs locally on the user’s device.
🚀 Lightning Fast
Powered by WebGPU acceleration for optimal performance, making AI interactions smooth and responsive.
🌐 Works Offline
Download once, use anywhere! After the initial model download, everything works offline.
🔄 Flexible Engine Support
Choose between MLC and Transformers.js engines to best suit your needs.
📦 Ready to Use
Pre-configured with popular models - just load and start building!
🎯 Developer Friendly
Simple, intuitive API that gets you up and running in minutes.
💾 Built-in Database
Powerful in-browser database support for storing conversations, embeddings, and AI data.
🧵 Background Processing
Web Worker support keeps your UI responsive while running complex AI tasks.
📝 Structured Outputs
Native handling of JSON, markdown, and other formats for clean, structured responses.
⚡ Real-time Streaming
Stream model outputs in real-time for more responsive user experiences.
Getting Started
Ready to get started? Choose from the following options:
- Installation - Install BrowserAI in your own environment
- Basics - Learn the basic usage of BrowserAI
- Demo - Check out our demos to see BrowserAI in action