ai-sdk

Guide developers in building AI features with the AI SDK.

Updated Feb 11, 2026
One-click install
npx skills add https://github.com/lexand-dev/subtrack-monorepo --skill ai-sdk-lexand-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ai-sdk
Source: https://github.com/lexand-dev/subtrack-monorepo/tree/main/.agents/skills/ai-sdk
Command: npx skills add https://github.com/lexand-dev/subtrack-monorepo --skill ai-sdk-lexand-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers build AI-powered features by providing guidance on using the AI SDK, including text generation, streaming, tool calling, and embeddings.

Core Features & Use Cases

  • AI SDK Functions: Understand and use functions like generateText, streamText, ToolLoopAgent, embed.
  • AI Agent Development: Build agents, chatbots, RAG systems, and text generation features.
  • Provider Integration: Get help with AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, and embeddings.
  • React Hooks: Utilize hooks like useChat or useCompletion.

Quick Start

Use the ai-sdk skill to generate text using the generateText function.

Frequently Asked Questions about ai-sdk

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

FAQPage Schema
How do I build a chatbot using AI SDK with React hooks?

AI SDK supports React hooks like useChat and useCompletion to build chatbots by managing conversation state and streaming responses directly in your UI components. It integrates with providers like OpenAI and Anthropic to power the underlying language models.

What is the difference between generateText and streamText in AI SDK?

The generateText function returns the complete generated text as a single string, while streamText sends the output in real-time chunks as it is generated. Use streamText for responsive user interfaces where immediate feedback is required during text generation.

Can I use AI SDK with Anthropic and Google providers?

Yes, AI SDK supports provider integrations with Anthropic, Google, and OpenAI. This allows you to connect to various large language models for text generation, streaming, tool calling, and embeddings using a unified API interface.

How do I develop an AI agent with tool calling and RAG capabilities?

Build AI agents and RAG systems using AI SDK functions like ToolLoopAgent for iterative tool calling and embed for generating vector embeddings. This allows your application to retrieve external context and execute multi-step reasoning tasks.

Does the AI SDK support structured output and embeddings?

Yes, AI SDK addresses structured output and embeddings, allowing you to constrain model responses to specific JSON formats and generate vector representations of text for retrieval-augmented generation systems.