aibrow v1.1.2
aiBrow is a browser extension that brings AI to your device. It uses small language models on your machine, making it fast and keeping your data private. With AiBrow, you can complete sentences, improve your writing, rephrase text, or sum up complex information using the latest small LLMs such as Llama 3.2, Phi 3.5, Gemma 2 and Qwen 2.5.
The development API follows the current proposal for the browser Prompt API in development within Chrome. It uses llama.cpp as the inference engine and supports the use of grammar schemas and LoRA Adapters.
The extension works on all Chromium based browsers as well as Firefox.
How can I try AiBrow?
The easiest way is to download through the Chrome Web Store or Mozilla add-on store. If you want to try the latest version, you can also install the developer version of the extension.
Chrome & Chromium based browsers
(Chrome, Chrome Beta, Edge, Vivaldi, Opera, Wavebox, Arc, Chromium)
- Install from the Chrome Web Store
- Follow the setup wizard after installing the extension
- Try out the playground
Firefox
- Open the Releases page, download the latest
moz.zip
, then extract it on disk - Open
about:debugging#/runtime/this-firefox
- Click the
Load temporary Add-on
- Install the native helper
- Try out the playground
How can I use the AiBrow API?
Website
AiBrow embeds itself into all pages using the window.aibrow
namespace (also window.ai
is polyfilled if it's not available natively in the browser). Check out our developer docs on how to get started!
if (window.aibrow) {
const { helper } = await window.aibrow.capabilities()
if (helper) {
const session = await window.aibrow.languageModel.create()
const stream = await sess.promptStreaming('Write a poem about AI in the browser')
for await (const chunk of stream) {
console.log(chunk)
}
} else {
console.log('Aibrow helper not installed')
}
} else {
console.log('Aibrow not installed')
}
Extension
Install the library using npm install @aibrow/extension
import aibrow from '@aibrow/extension'
const { helper, extension } = await window.aibrow.capabilities()
if (extension) {
if (helper) {
const session = await window.aibrow.languageModel.create()
const stream = await sess.promptStreaming('Write a poem about AI in the browser')
for await (const chunk of stream) {
console.log(chunk)
}
} else {
console.log('Aibrow helper not installed')
}
} else {
console.log('Aibrow not installed')
}
How can I build AiBrow myself?
npm run watch
ornpm start
to build the extension- Run
out/native/boot.cjs --install
to install the native manifest hooks - Install the extension from
out/extension
into the browser - Logs from the native binary are available in
out/native/aibrow.log
Examples
cd examples
npm start
8 months ago