File: navigating-the-library.md | Updated: 11/15/2025
Menu
v5 (Latest)
AI SDK 5.x
Model Context Protocol (MCP) Tools
Copy markdown
================================================================================================================
The AI SDK is a powerful toolkit for building AI applications. This page will help you pick the right tools for your requirements.
Letās start with a quick overview of the AI SDK, which is comprised of three parts:
Choosing the Right Tool for Your Environment
When deciding which part of the AI SDK to use, your first consideration should be the environment and existing stack you are working with. Different components of the SDK are tailored to specific frameworks and environments.
| Library | Purpose | Environment Compatibility | | --- | --- | --- | | AI SDK Core | Call any LLM with unified API (e.g. generateText<br> and generateObject<br>) | Any JS environment (e.g. Node.js, Deno, Browser) | | AI SDK UI | Build streaming chat and generative UIs (e.g. useChat<br>) | React & Next.js, Vue & Nuxt, Svelte & SvelteKit | | AI SDK RSC | Stream generative UIs from Server to Client (e.g. streamUI<br>). Development is currently experimental and we recommend using AI SDK UI<br>. | Any framework that supports React Server Components (e.g. Next.js) |
These tools have been designed to work seamlessly with each other and it's likely that you will be using them together. Let's look at how you could decide which libraries to use based on your application environment, existing stack, and requirements.
The following table outlines AI SDK compatibility based on environment:
| Environment | AI SDK Core | AI SDK UI | AI SDK RSC | | --- | --- | --- | --- | | None / Node.js / Deno | | | | | Vue / Nuxt | | | | | Svelte / SvelteKit | | | | | Next.js Pages Router | | | | | Next.js App Router | | | |
AI SDK UI provides a set of framework-agnostic hooks for quickly building production-ready AI-native applications. It offers:
AI SDK UI Framework Compatibility
AI SDK UI supports the following frameworks:Ā React ,Ā Svelte ,Ā and Vue.js . Here is a comparison of the supported functions across these frameworks:
| Function | React | Svelte | Vue.js | | --- | --- | --- | --- | | useChat | | | | | useChat<br> tool calling | | | | | useCompletion | | | | | useObject | | | |
Contributions are welcome to implement missing features for non-React frameworks.
AI SDK RSC is currently experimental. We recommend using AI SDK UI for production. For guidance on migrating from RSC to UI, see our migration guide .
React Server Components (RSCs) provide a new approach to building React applications that allow components to render on the server, fetch data directly, and stream the results to the client, reducing bundle size and improving performance. They also introduce a new way to call server-side functions from anywhere in your application called Server Actions .
AI SDK RSC provides a number of utilities that allow you to stream values and UI directly from the server to the client. However, it's important to be aware of current limitations:
createStreamableUI
can lead to quadratic data transfer (quadratic to the length of generated text). You can avoid this using createStreamableValue
instead, and rendering the component client-side.createStreamableUI, components re-mount on .done(), causing flickering
.Given these limitations, we recommend using AI SDK UI for production applications.
On this page
Choosing the Right Tool for Your Environment
AI SDK UI Framework Compatibility
Deploy and Scale AI Apps with Vercel.
Vercel delivers the infrastructure and developer experience you need to ship reliable AI-powered applications at scale.
Trusted by industry leaders: