Vercel AI SDK
An open source library for building AI-powered user interfaces.
The Vercel AI SDK is an open-source library designed to help developers build conversational streaming user interfaces in JavaScript and TypeScript. The SDK supports React/Next.js, Svelte/SvelteKit, and Vue/Nuxt as well as Node.js, Serverless, and the Edge Runtime (opens in a new tab).
Serverless & Edge-ready
Build AI-powered apps that are fast across Node.js, Serverless, and Vercel Edge Functions.
Built-in Adapters
First-class support for LangChain, OpenAI, Anthropic, and Hugging Face.
Streaming UI Helpers
SWR-powered React, Svelte, and Vue helpers for fetching and rendering streaming text responses.
Stream Lifecycle Callbacks
Callbacks for saving completed streaming responses to a database in the same request.
Templates & Examples
You can also clone or deploy a Vercel AI SDK starter repository to get a head start on your AI journey. For even more examples and starters, see the Vercel AI SDK examples directory on GitHub (opens in a new tab).
Next.js AI Chatbot
Full-featured AI chatbot built with Next.js (opens in a new tab), shadcn/ui (opens in a new tab), NextAuth.js (opens in a new tab), Vercel AI SDK (opens in a new tab), and Vercel KV (opens in a new tab)
Next.js OpenAI Starter
Starter template for building AI-powered chat with Next.js (opens in a new tab), OpenAI (opens in a new tab), and the Vercel AI SDK (opens in a new tab)
SvelteKit OpenAI Starter
Starter template for building AI-powered chat with SvelteKit (opens in a new tab), OpenAI (opens in a new tab), and the Vercel AI SDK (opens in a new tab)
Nuxt OpenAI Starter
Starter template for building AI-powered chat with Nuxt (opens in a new tab), OpenAI (opens in a new tab), and the Vercel AI SDK (opens in a new tab)
Next.js Hugging Face Starter
Starter template for building AI-powered chat with Next.js (opens in a new tab), Hugging Face (opens in a new tab), and the Vercel AI SDK (opens in a new tab)
Next.js LangChain Starter
Starter template for building AI-powered chat app with Next.js (opens in a new tab), LangChain (opens in a new tab), and the Vercel AI SDK (opens in a new tab)
Nuxt LangChain Starter
Starter template for building AI-powered chat app with Nuxt (opens in a new tab), LangChain (opens in a new tab), and the Vercel AI SDK (opens in a new tab)