Skip to content

Meta-package

@web-ai-sdk/all is a thin meta-package that re-exports the eight other scoped @web-ai-sdk/* building blocks under a single install. It has no behaviour of its own. All logic, tests, and version history live in the scoped packages.

Reach for it when you want one entry in package.json instead of eight, or when you’re prototyping and don’t care yet which blocks you’ll keep.

Terminal window
pnpm add @web-ai-sdk/all
# or: npm i @web-ai-sdk/all / bun add @web-ai-sdk/all

The eight scoped packages come along as transitive dependencies. react is a peer dependency only when you import any /react subpath.

Both are valid. Pick whichever reads better at the call site.

Section titled “Per-package subpaths (recommended for production)”

Bundlers tree-shake this cleanly; you only pay for the blocks you actually use.

import { ask, createSession } from "@web-ai-sdk/all/prompt";
import { summarize } from "@web-ai-sdk/all/summarizer";
import { translate } from "@web-ai-sdk/all/translator";
import { detect } from "@web-ai-sdk/all/detector";
import { write } from "@web-ai-sdk/all/writer";
import { rewrite } from "@web-ai-sdk/all/rewriter";
import { proofread } from "@web-ai-sdk/all/proofreader";
import { registerTool, defineTool } from "@web-ai-sdk/all/webmcp";
import { usePrompt, useSession } from "@web-ai-sdk/all/prompt/react";
import { useSummarizer } from "@web-ai-sdk/all/summarizer/react";
import { prompt, summarizer, translator, detector, writer, rewriter, proofreader, webmcp } from "@web-ai-sdk/all";
await prompt.ask({ input: "Hello" });
await summarizer.summarize({ language: "en", input: longText });
await translator.translate({ input: "Olá", sourceLanguage: "pt", targetLanguage: "en" });

Why namespaced and not flat? Names like isAvailable and checkAvailability appear in every package, so a flat re-export at the root would collide. Namespacing keeps each block’s surface intact.

Use the scoped packages directly when:

  • You’re shipping a library and want minimal transitive deps for downstream consumers.
  • You need to pin one block to a different version than the rest.

For applications, the meta-package is usually the right default.

The scoped packages are independently versioned, so a Prompt-only API change can ship without bumping Translator, WebMCP, or the other wrappers. The @web-ai-sdk/all version is the suite anchor: it is bumped whenever one of the packages it re-exports changes, so pinning @web-ai-sdk/all keeps the full bundle on a known state.

SubpathRe-exports
@web-ai-sdk/allnamespaces for all eight packages
@web-ai-sdk/all/prompt@web-ai-sdk/prompt
@web-ai-sdk/all/prompt/react@web-ai-sdk/prompt/react
@web-ai-sdk/all/webmcp@web-ai-sdk/webmcp
@web-ai-sdk/all/webmcp/react@web-ai-sdk/webmcp/react
@web-ai-sdk/all/summarizer@web-ai-sdk/summarizer
@web-ai-sdk/all/summarizer/react@web-ai-sdk/summarizer/react
@web-ai-sdk/all/translator@web-ai-sdk/translator
@web-ai-sdk/all/translator/react@web-ai-sdk/translator/react
@web-ai-sdk/all/detector@web-ai-sdk/detector
@web-ai-sdk/all/detector/react@web-ai-sdk/detector/react
@web-ai-sdk/all/writer@web-ai-sdk/writer
@web-ai-sdk/all/writer/react@web-ai-sdk/writer/react
@web-ai-sdk/all/rewriter@web-ai-sdk/rewriter
@web-ai-sdk/all/rewriter/react@web-ai-sdk/rewriter/react
@web-ai-sdk/all/proofreader@web-ai-sdk/proofreader
@web-ai-sdk/all/proofreader/react@web-ai-sdk/proofreader/react