
AI SDK
Open-source TypeScript toolkit from Vercel for building AI apps and agents with streaming and multi-model support
The AI SDK is an open-source TypeScript toolkit from Vercel for building AI applications and agents. It gives one API across model providers, so switching models takes a single line, and works with React, Next.js, Vue, Svelte, Angular, Nuxt, Solid and Node.js.
Key features:
- Generate text and structured objects, call tools and build agent loops with AI SDK Core.
- Build chat and generative interfaces with framework-agnostic AI SDK UI hooks.
- Stream responses without custom parsing.
- Fall back to other providers automatically when one fails.
- Generate images, speech, transcriptions and video.
- Route to more than 100 models through Vercel AI Gateway or use providers directly.
The SDK is free and open source under Apache 2.0, installs with npm install ai, and runs on any JavaScript host. It pairs with Vercel Sandbox for running agent-generated code, Workflows for long-running agents and AI Elements for UI components, which are billed separately on Vercel.