ai-sdk

Answers AI SDK questions and guides building agents, chatbots, and streaming features with version-matched documentation.

Updated Sep 16, 2026
One-click install
npx skills add https://github.com/jasonviipers/vipers --skill ai-sdk-jasonviipers
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ai-sdk
Source: https://github.com/jasonviipers/vipers/tree/main/.agents/skills/ai-sdk
Command: npx skills add https://github.com/jasonviipers/vipers --skill ai-sdk-jasonviipers

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? The Vercel AI SDK changes rapidly across versions, so code written from memory often uses renamed, removed, or deprecated APIs. This Skill forces verification against the documentation bundled inside node_modules, ensuring every generateText, streamText, tool calling, or useChat implementation matches the actually installed version. ## Core Features & Use Cases - Version-Matched Guidance: Reads docs and source from node_modules/ai/docs and node_modules/@ai-sdk/<name>/docs so answers always match the installed release. - Agent and App Building: Helps build agents with ToolLoopAgent, chatbots with useChat, RAG systems, structured output, tool calling, and embeddings across providers like OpenAI, Anthropic, and Google. - AI Gateway Setup: Guides configuration of the Vercel AI Gateway for multi-provider model access and fetches the current model list instead of relying on outdated model IDs. - Use Case: A developer asks to add a streaming chat endpoint to a Next.js app; the Skill checks the installed ai package version, reads its bundled docs, and produces code using the current streamText and useChat APIs. ## Quick Start Ask the assistant to build an AI chat feature with the AI SDK and have it verify every API against the docs bundled in node_modules before writing code.

Frequently Asked Questions about ai-sdk

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build an AI agent with the Vercel AI SDK?▼

Use the SDK's built-in agent abstraction such as ToolLoopAgent instead of hand-rolling tool-calling loops. Check the agents section of the bundled docs in node_modules/ai/docs for the current API, since agent interfaces change between versions.

How to use streamText and useChat in a Next.js app?▼

streamText runs on the server to stream model responses, while useChat from @ai-sdk/react consumes them on the client. These hooks change frequently, so always read the bundled docs for your installed version before writing code.

Which AI providers does the AI SDK support?▼

The AI SDK supports OpenAI, Anthropic, Google, and other providers through dedicated @ai-sdk packages, or all of them through the Vercel AI Gateway with a single API key. Provider packages bundle their own docs under node_modules/@ai-sdk/<name>/docs.

Why does my AI SDK code fail after upgrading versions?▼

Most failures come from APIs that were renamed or removed between major versions, especially UI hooks like useChat. Compare your installed version against the latest with npm view ai version and follow the migration guides at ai-sdk.dev/docs/migration-guides.

How do I find current model IDs for the AI SDK?▼

Fetch the live model list from the AI Gateway with curl https://ai-gateway.vercel.sh/v1/models instead of using remembered IDs. Models are released and retired frequently, so prefer the highest version number when multiple variants exist.