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 startedimport { 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();