Vercel AI SDK
The AI Toolkit for TypeScript, from the creators of Next.js.
AI SDK
The AI SDK is a provider-agnostic TypeScript toolkit for building AI-powered applications and agents with React, Next.js, Vue, Svelte, Node.js, and other JavaScript runtimes.
Use this page to find current AI SDK documentation. Prefer search results and targeted Markdown pages over loading the full documentation bundle.
Web Access
If you can fetch URLs, search the docs first:
- Search endpoint: https://ai-sdk.dev/api/search-docs?q=your+query
Examples:
- https://ai-sdk.dev/api/search-docs?q=building+agents
- https://ai-sdk.dev/api/search-docs?q=ToolLoopAgent
- https://ai-sdk.dev/api/search-docs?q=prepareStep
- https://ai-sdk.dev/api/search-docs?q=generating+structured+output
The search endpoint returns JSON with documentation URLs. Fetch the returned URLs with .md appended to get Markdown content.
Local Coding Agents
If you are working inside a local coding project with filesystem access, install the AI SDK skill first:
npx skills add vercel/ai
Then follow the skill instructions before changing code.
Common Starting Points
- Getting Started: Installation and first usage.
- Navigating the Library: How the AI SDK packages fit together.
- AI SDK Core: Core model calls like
generateText,streamText, structured output, tools, embeddings, and providers. - AI SDK UI: Framework-agnostic hooks for chatbots and generative UIs.
- Agents: Building agents with
ToolLoopAgentand related APIs. - AI Gateway: Default provider access through Vercel AI Gateway.
- Providers: Supported model providers.
- Reference: API reference.
- Sitemap: Full documentation index.
Full Documentation
- llms-full.txt: A concatenated Markdown copy of the AI SDK documentation for models with large context windows.
Meet the modern standard for public facing documentation. Beautiful out of the box, easy to maintain, and optimized for user engagement.
Search through billions of items for similar matches to any object, in milliseconds. It’s the next generation of search, an API call away.
Build and deploy reliable background jobs with no timeouts and no infrastructure to manage.
Get the simple developer experience of SQLite in production, and scale your multi-tenant backend with unlimited databases.
Upstash is a serverless data platform providing low latency and high scalability for real-time applications.
One-click deployments built for teams, tuned for Laravel, loaded with tools and goodies you're going to love.
Build, test, and send transactional emails at scale.