Skip to main content
by Soverius AI

LLMs in the browser.
Speaking AG-UI.

Run Gemini Nano, WebLLM and transformers.js models on the user's device and plug them into CopilotKit or any AG-UI client.

pnpm add @soverius-ai/browser-models

Works with

  • AG-UIAG-UI
  • CopilotKitCopilotKit
  • Angular
  • React
  • Vue
  • Prompt API
  • WebLLM
  • transformers.js
  • WebGPU
  • MCP · WebMCP

Three engines

Prompt API (Gemini Nano, Phi-4-mini), WebLLM on WebGPU, transformers.js on WebGPU or WASM.

AG-UI native

Every model is an AG-UI agent. CopilotKit or any AG-UI client works unchanged.

Tool-call repair

Broken JSON, wrong names and types are fixed before a call reaches your app.

WebMCP and MCP

Use the page's WebMCP tools and remote MCP servers as agent tools.

Model manager

Download with progress, see what is cached, delete models. OPFS or Cache API.

No server

Prompts, tools and answers stay on the device. Nothing to deploy.

A few lines to an agent

Pick the models, pick the default. Users switch models at runtime; nothing is chosen for them.

Getting started
import { BrowserModelsAgent } from '@soverius-ai/browser-models/agent';
import { PromptApiEngine } from '@soverius-ai/browser-models/prompt-api';
import { WebLlmEngine } from '@soverius-ai/browser-models/web-llm';

const agent = new BrowserModelsAgent({
models: {
nano: new PromptApiEngine(),
qwen: new WebLlmEngine('Qwen3-0.6B-q4f16_1-MLC'),
},
defaultModel: 'nano',
});

// An AG-UI agent: hand it to CopilotKit or any AG-UI client.
agent.addMessage({ id: '1', role: 'user', content: 'Hello' });
await agent.runAgent();

Try it with your framework

Production AI engineering for application teams

browser-models is built and maintained by Soverius AI. Get new releases, talks and Quantized AI News in your inbox.