Why you'd want it
The AI SDK is a provider-agnostic TypeScript toolkit with a unified API across providers such as OpenAI, Anthropic and Google. generateText covers text and Zod-typed structured output, ToolLoopAgent runs tool-calling agents, and AI SDK UI provides framework-agnostic hooks for chat and generative UIs in Next.js, React, Svelte and Vue. By default it routes model strings through the Vercel AI Gateway, and you can install provider packages to connect to providers directly.
Best for
- Next.js and React apps
- Streaming chat UIs
- Switching model providers in TypeScript
Use it when
You are building an AI feature or agent into a web app and want the model calls and the chat UI from one library.
Skip it if
You are not on JavaScript or TypeScript; it needs Node.js 22+. If you do not want the default Vercel AI Gateway routing, plan to install provider packages such as @ai-sdk/openai.