Answer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4) Use React hooks like useChat or useCompletion. Triggers on: "AI SDK", "Vercel AI SDK", "generateTe
Detected risks:
The 'ai-sdk' skill provides developers with the tools to integrate AI-powered features into their applications. It helps answer questions about the AI SDK, which includes various functions for text generation, streaming, tool interaction, and embedding. Developers can use this skill when building AI agents, chatbots, or Retrieval-Augmented Generation (RAG) systems, and when they need guidance on using specific functions such as generateText, streamText, and embed. It aims to simplify the process of building AI-driven features by offering clear instructions on using the SDK's APIs, handling provider integrations, and working with modern JavaScript frameworks like React.
You should always verify the current APIs by searching the 'node_modules/ai/docs/' directory or consult the ai-sdk.dev documentation. It's crucial to avoid relying on obsolete information from training data.
Initially, you should only install the 'ai' package using your project's package manager. Other provider and client packages should be installed based on the specific requirements of the user later on.
Yes, the AI SDK supports various AI providers like OpenAI, Anthropic, and Google. You should use the Vercel AI Gateway provider by default unless specified otherwise.
To build AI agents, you should use the 'ToolLoopAgent' pattern. This provides the structure and type safety needed when consuming agents, especially when using the 'useChat' hook for interaction.
Yes, the 'useChat' hook has undergone significant changes. It's essential to review the Common Errors documentation before implementing it in your code to avoid common issues.
Quick Setup:
.claude/skills/Repository
vercel/ai