AI SDK
  • Docs
  • Cookbook
  • Providers
  • Showcase
  • Playground

Viewing AI SDK 4 Documentation

View AI SDK 5
AI SDK by Vercel
AI SDK 5 Beta
Foundations
Overview
Providers and Models
Prompts
Tools
Streaming
Agents
Getting Started
Navigating the Library
Next.js App Router
Next.js Pages Router
Svelte
Vue.js (Nuxt)
Node.js
Expo
AI SDK Core
Overview
Generating Text
Generating Structured Data
Tool Calling
Prompt Engineering
Settings
Embeddings
Image Generation
Transcription
Speech
Language Model Middleware
Provider & Model Management
Error Handling
Testing
Telemetry
AI SDK UI
Overview
Chatbot
Chatbot Message Persistence
Chatbot Tool Usage
Generative User Interfaces
Completion
Object Generation
OpenAI Assistants
Streaming Custom Data
Error Handling
Smooth streaming japanese text
Smooth streaming chinese text
Stream Protocols
AI SDK RSC
Advanced
Reference
AI SDK Core
AI SDK UI
AI SDK RSC
streamUI
createAI
createStreamableUI
createStreamableValue
readStreamableValue
getAIState
getMutableAIState
useAIState
useActions
useUIState
useStreamableValue
render (Removed)
Stream Helpers
AI SDK Errors
Migration Guides
Troubleshooting
ReferenceAI SDK RSC

AI SDK RSC

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.

streamUI
Use a helper function that streams React Server Components on tool execution.
createAI
Create a context provider that wraps your application and shares state between the client and language model on the server.
createStreamableUI
Create a streamable UI component that can be rendered on the server and streamed to the client.
createStreamableValue
Create a streamable value that can be rendered on the server and streamed to the client.
getAIState
Read the AI state on the server.
getMutableAIState
Read and update the AI state on the server.
useAIState
Get the AI state on the client from the context provider.
useUIState
Get the UI state on the client from the context provider.
useActions
Call server actions from the client.
Previous
StreamData
Next
streamUI
On this page
AI SDK RSC
Elevate your AI applications with Vercel.
Trusted by OpenAI, Replicate, Suno, Pinecone, and more.
Vercel provides tools and infrastructure to deploy AI apps and features at scale.

Resources

DocsCookbookProvidersShowcaseGitHubDiscussions

More

PlaygroundContact Sales

About Vercel

Next.js + VercelOpen Source SoftwareGitHubX

Legal

Privacy Policy

© 2025 Vercel, Inc.