@browser-ai/core

Installation

Setup @browser-ai/core for AI SDK v7

Package Installation

npm i @browser-ai/core

Version Compatibility

@browser-ai/coreAI SDKNotes
v3.0.0 and abovev7.xCurrent stable for AI SDK v7
v2.xv6.xUse for AI SDK v6
v1.0.0v5.xUse for AI SDK v5

For AI SDK v6, please refer to the v6 documentation, and for AI SDK v5 the v5 documentation.

Edge Setup

  1. Use Edge Dev/Canary version 138.0.3309.2 or higher
  2. Navigate to edge://flags/#prompt-api-for-phi-mini
  3. Set it to Enabled
  4. Restart Edge

For more information, check out Chrome's official guide.

Verifying Installation

After installation, you can verify browser support:

import { doesBrowserSupportBrowserAI } from "@browser-ai/core";

if (doesBrowserSupportBrowserAI()) {
  console.log("Browser supports browser AI!");
} else {
  console.log("Browser AI not available, use server fallback");
}

On this page