web-ai-sdk: experimenting with browser-native AI APIs and WebMCP
The web-ai-sdk provides building blocks for utilizing the Web's native AI APIs. It is designed to be composable and requires no runtime dependencies, supporting Vanilla TypeScript and optional React hooks. The SDK includes various packages for prompts, summarization, translation, and detection, with browser support primarily for Chrome and Edge.
- ▪The web-ai-sdk is built for the Web's built-in AI APIs and is composable.
- ▪It offers packages for prompts, summarization, translation, and detection, with lifecycle and streaming support.
- ▪Browser support is primarily for Chrome and Edge with built-in AI flags enabled.
Opening excerpt (first ~120 words) tap to expand
web-ai-sdk Building blocks for the Web's built-in AI APIs. Composable. No runtime deps. Just lifecycle, streaming, AbortSignals. Vanilla TypeScript by default, with optional React hooks. Install npm i @web-ai-sdk/all # all five wrappers npm i @web-ai-sdk/prompt # one wrapper at a time Packages Package Guide React hook @web-ai-sdk/all Meta-package— @web-ai-sdk/prompt Prompt usePrompt · useSession @web-ai-sdk/webmcp WebMCP useWebMCP @web-ai-sdk/summarizer Summarizer useSummarizer @web-ai-sdk/translator Translator useTranslator @web-ai-sdk/detector Detector useDetector Browser support Chrome and Edge 138+ with the Built-in AI flags enabled. See the support matrix for the per-API breakdown. Links Documentation — Starlight site with guides, React hooks, browser support.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at web-ai-sdk.