AI SDK

AI SDK is Vercel's open-source TypeScript toolkit for building AI applications and agents across popular web frameworks, runtimes, and model providers.

Visit Website
AI SDK

Introduction

Overview

AI SDK is a unified TypeScript toolkit from Vercel for building AI-powered applications and agents. It standardizes model integration across supported providers so developers can work with consistent APIs instead of coupling application logic to one provider.

The framework-agnostic toolkit supports React, Next.js, Vue, Svelte, Angular, Nuxt, Solid, Node.js, and other environments. It covers generative interfaces as well as server-side AI operations.

Key Features

  • AI SDK Core provides unified APIs for text generation, structured objects, tool calls, and LLM-based agents.
  • AI SDK UI supplies framework-agnostic hooks for chat and generative user interfaces.
  • AI SDK Harnesses offers a uniform HarnessAgent API for established agent harnesses.
  • Streaming enables real-time responses without requiring custom response parsing.
  • Built-in fallbacks support more reliable production behavior.
  • Multi-provider support allows developers to switch providers with a small code change.

Models and Modalities

AI SDK works with multiple model providers, including Vercel AI Gateway, OpenAI, Anthropic, Google Generative AI, xAI Grok, Azure, Amazon Bedrock, Groq, Mistral, Cohere, DeepSeek, and others. Provider capabilities vary, with supported operations spanning image input, image generation, object generation, tool usage, and tool streaming.

Beyond text generation, the toolkit presents support for image generation, speech, transcription, and video generation. AI Gateway compatibility can route requests to supported models through one endpoint.

Development Use Cases

AI SDK can underpin chatbots, multi-modal chat, retrieval-augmented knowledge bases, semantic image search, natural-language database interfaces, and agents that use tools. Available starter examples include a persistent chatbot, a Slackbot agent, and a SQL agent.

The broader ecosystem also includes Vercel Sandbox for securely running agent-generated code, Workflows for long-running applications that suspend and resume, and AI Elements for building AI-native interfaces.