Browser LLM Demo

OCP chat widget with a local AI running in your browser — zero cloud API tokens. Open the chat widget (bottom-right) to try it.

Browser LLM

Waiting…

WebGPU

Checking…

Processing Tier

Three-Tier Processing Pipeline

1
Regex Intent Matcher
Instant, always available. Handles clear requests like "show me fiction" or "add X to cart" with pattern matching. No AI needed.
2
Browser LLM (SmolLM2 360M)
Free, local, private. Loaded via WebGPU when the regex matcher has low confidence. Handles ambiguous queries without cloud API calls.
3
Cloud LLM Fallback
Optional paid tier via processMessage callback. Only consulted when both local tiers can't handle the request.

Try these queries

Click a query to send it to the chat widget. High-confidence queries use Tier 1 (regex), ambiguous ones use Tier 2 (browser LLM).

How to enable Browser LLM in your store

// Option 1: Just enable it (sensible defaults)
OCP.init({
  handlers: { /* your tool handlers */ },
  widget: {
    browserLLM: true
  }
});

// Option 2: Fine-tune the behavior
OCP.init({
  handlers: { /* your tool handlers */ },
  widget: {
    browserLLM: {
      model: 'SmolLM2-360M-Instruct-q4f16_1-MLC',
      loadStrategy: 'on-widget-open',
      confidenceThreshold: 0.7,
      maxTokens: 256,
    },
    // Cloud LLM is still the Tier 3 fallback
    processMessage: async (msg, invoke) => { /* ... */ },
  }
});