AI SDK
The unified TypeScript SDK for building AI apps with modern streaming, fallbacks, and multi-model support.
Back to Knowledge BaseBuild with AI SDK 7
Add skills to your AI SDK agents
Use uploadSkill and provider references in the AI SDK to bundle a SKILL.md and supporting files, then attach the skill to generateText, streamText, or a ToolLoopAgent call on Anthropic or OpenAI.
Upload provider files with AI SDK
Use uploadFile in the AI SDK to upload an image, PDF, or document to a provider, get a ProviderReference, and reference it in generateText and streamText messages, including across multiple providers.
Add MCP Apps to your AI SDK application
Build an MCP Apps host with the AI SDK using @ai-sdk/mcp and @ai-sdk/react to filter model-visible tools, read ui:// resources, and render interactive tool UIs in a sandboxed iframe with experimental_MCPAppRenderer.
Pass state to AI SDK tools and agents with context
Use runtimeContext, toolsContext, and contextSchema in the AI SDK to pass tenant data, credentials, and other server-side state through a generation or agent loop without putting it in the prompt.
Run your AI SDK agent in the terminal
Use the @ai-sdk/tui package and runAgentTUI to run a ToolLoopAgent in an interactive terminal, with tool cards, reasoning, response statistics, and tool approval prompts.
Generate videos with AI SDK
Use experimental_generateVideo in the AI SDK to generate videos from a text prompt or an image, set aspect ratio, resolution, duration, FPS, and seed, and handle long-running generation with timeouts and polling.
How to migrate from DurableAgent to WorkflowAgent
Switch your app from DurableAgent (@workflow/ai) to WorkflowAgent (@ai-sdk/workflow) by updating imports, stream output, message conversion, stop conditions, tool approval, and context.
Investigate GitHub issues with HarnessAgent and Vercel Sandbox
Use HarnessAgent to run coding agent harness like Claude Code or Codex against untrusted code inside Vercel Sandbox. Reproduce GitHub issues with agent harness and generate report for the maintainer.
Getting Started with AI SDK
Build AI agents with AI Gateway and AI SDK
Build AI agents on Vercel with AI Gateway and AI SDK, then make them reliable, capable, and durable with Sandbox, Chat SDK, Vercel Connect, and Workflow.
Build your own Slackbot with Vercel Connect
Learn how to build your very own Slackbot with Chat SDK and AI SDK. Vercel Connect supplies runtime Slack tokens and forwards triggers, so you never store a long-lived bot token.
How to build a Slack bot that manages files in Vercel Blob
Build a Slack bot using Chat SDK, AI SDK, and Files SDK that can list, read, upload, and delete files in Vercel Blob through tool calls.
How to build an agent for Liveblocks with Chat SDK and AI SDK
Build an AI agent that replies to @-mentions in Liveblocks comment threads with streamed responses and tool calling, using Chat SDK, AI SDK, and Redis.
How to build an AI agent for Slack with Chat SDK and AI SDK
Build a Slack AI agent using Chat SDK, AI SDK's ToolLoopAgent, and Vercel AI Gateway. Covers project setup, tool definitions, streaming responses, deployment to Vercel, and scaling tool selection with toolpick.
Build a web research agent with Workflow SDK
Build a web research agent that searches the web and returns a cited report. Powered by AI SDK and Workflow SDK, it journals every step so progress survives any crash or retries.
Build an agent with eve
Draft content in your voice from Slack with eve
Deploy the eve content agent template, a Slack bot that drafts blog posts, LinkedIn posts, release notes, and newsletters in your house voice from Notion, using Vercel Connect, Vercel Blob, and AI Gateway.
Build your first Slack agent with eve
Deploy the eve Slack agent template: a starter Slack bot built on the eve framework with an example tool and skill.
All AI SDK Guides
- Pass state to AI SDK tools and agents with context
- Upload provider files with AI SDK
- Add skills to your AI SDK agents
- Run your AI SDK agent in the terminal
- How to migrate from DurableAgent to WorkflowAgent
- Generate videos with AI SDK
- Add MCP Apps to your AI SDK application
- Investigate GitHub issues with
HarnessAgentand Vercel Sandbox - Cost-aware model routing through AI Gateway
- Build your own Slackbot with Vercel Connect