Skip to main content

AI SDK RSC

Warning

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.