FrameworksAgenticMCP

AI SDK by Vercel

by Vercel

IntermediateDocumentationFreeSelf-paced reference; ~3-4 hours to work through Getting Started plus the Agents guides

The TypeScript toolkit for shipping production agents across any model provider

Start LearningAdded Aug 3, 2026 · Updated Aug 3, 2026

Overview

The AI SDK docs are organised into eleven sections: Foundations, Getting Started, Agents, AI SDK Core, AI SDK Harnesses, AI SDK UI, AI SDK RSC, Advanced, Reference, Migration Guides and Troubleshooting. Core covers the provider-agnostic primitives — text generation, structured output against Zod or any JSON Schema library, embeddings, reranking and image editing — across 20+ providers including OpenAI, Anthropic, Google, xAI, Bedrock, Groq, Mistral, Cohere and DeepSeek. The Agents section is the substantive part for engineers building autonomous systems: Building Agents introduces the ToolLoopAgent class that owns the model-tool-loop cycle, then Loop Control (stopWhen, prepareStep), Configuring Call Options, Memory, Tool Approvals, Policy-Based Tool Approvals, Subagents, WorkflowAgent and a Terminal UI for fast iteration. AI SDK UI supplies the streaming chat and generative-UI hooks for React, Next.js, Vue, Nuxt, Svelte, SvelteKit, Expo, TanStack Start and Solid. The material is current: AI SDK 6 shipped 22 December 2025 with the Agent abstraction, needsApproval and stable MCP support, and AI SDK 7 followed on 25 June 2026 adding HarnessAgent (wrapping Claude Code, Codex, Deep Agents and OpenCode), durable resumable WorkflowAgent runs, redesigned telemetry, MCP Apps and experimental realtime voice. It is Apache-2.0, developed in the open at github.com/vercel/ai (26k stars, 7,780 commits), and carries over 16 million weekly npm downloads.

At a Glance

Topic
Frameworks
Level
Intermediate
Format
Documentation
Cost
Free
Duration
Self-paced reference; ~3-4 hours to work through Getting Started plus the Agents guides
Provider
Vercel
Hands-on
Yes — code/exercises
Certificate
None

What You’ll Learn

  • Call 20+ model providers through one unified TypeScript API without rewriting application code
  • Build a tool-calling agent with ToolLoopAgent and control termination using stopWhen and prepareStep
  • Gate destructive tool calls behind human approval with needsApproval and policy-based approval rules
  • Stream chat and generative UI into React, Next.js, Vue, Svelte or Expo using the AI SDK UI hooks
  • Generate typed structured output with Zod or any JSON Schema library inside a multi-step tool loop
  • Connect MCP servers with OAuth, resources, prompts and MCP Apps via the @ai-sdk/mcp package
  • Make agent runs durable and resumable across process restarts using WorkflowAgent
  • Instrument agents with telemetry, lifecycle events and per-step performance stats, then debug in DevTools

Highlights

  • Over 16 million weekly npm downloads and 26k GitHub stars — the default TypeScript AI toolkit, not a niche one
  • AI SDK 7 (25 June 2026) reframed the library from chat primitives into a production agent platform: approvals, durability, telemetry, sandboxes
  • HarnessAgent puts existing harnesses — Claude Code, Codex, Deep Agents, OpenCode — behind one consistent interface
  • Provider portability is real: swapping OpenAI for Anthropic, Google or Bedrock is a one-line change, so vendor risk stays low
  • Apache-2.0 with a public monorepo and per-version migration guides, so upgrades are documented rather than archaeological

Who It’s For

Best For

  • TypeScript and JavaScript engineers building LLM features into an existing web app
  • Teams shipping production agents on Next.js, Node.js or Vercel infrastructure
  • Developers who want provider portability instead of locking into one vendor SDK
  • Full-stack devs who need streaming chat and generative UI, not just server-side calls

Prerequisites

  • Working TypeScript and Node.js — the SDK is TypeScript-first and the examples assume it
  • Familiarity with at least one supported frontend framework (React, Next.js, Vue or Svelte) for the UI sections
  • Basic understanding of LLM prompting and tool/function calling

FAQ

What is AI SDK by Vercel?

The official documentation for Vercel's AI SDK, the TypeScript toolkit for building AI applications and agents with React, Next.js, Vue, Svelte, Node.js and Expo. It is written for JavaScript and TypeScript engineers who want one provider-agnostic API instead of six vendor SDKs, and who need agent loops, tool approvals, streaming UI and observability that survive contact with production. After working through it you can ship a tool-calling agent with human approval gates, durable execution and typed structured output.

Is AI SDK by Vercel free?

AI SDK by Vercel is free to access.

What level is AI SDK by Vercel for?

AI SDK by Vercel is aimed at a intermediate audience. Recommended background: Working TypeScript and Node.js — the SDK is TypeScript-first and the examples assume it, Familiarity with at least one supported frontend framework (React, Next.js, Vue or Svelte) for the UI sections, Basic understanding of LLM prompting and tool/function calling.

How long does AI SDK by Vercel take?

Expect roughly Self-paced reference; ~3-4 hours to work through Getting Started plus the Agents guides. Most learners work through it at their own pace.

What will I learn from AI SDK by Vercel?

You'll learn: Call 20+ model providers through one unified TypeScript API without rewriting application code; Build a tool-calling agent with ToolLoopAgent and control termination using stopWhen and prepareStep; Gate destructive tool calls behind human approval with needsApproval and policy-based approval rules; Stream chat and generative UI into React, Next.js, Vue, Svelte or Expo using the AI SDK UI hooks; Generate typed structured output with Zod or any JSON Schema library inside a multi-step tool loop; Connect MCP servers with OAuth, resources, prompts and MCP Apps via the @ai-sdk/mcp package; Make agent runs durable and resumable across process restarts using WorkflowAgent; Instrument agents with telemetry, lifecycle events and per-step performance stats, then debug in DevTools.

Topics

ai-sdktypescriptai-agentstool-callingvercel

Sources

This page was written from 4 sources, 3 on domains other than ai-sdk.dev.

  1. 1.ai-sdk.devintroductionvendor
  2. 2.github.comai
  3. 3.vercel.comai sdk 7
  4. 4.vercel.comai sdk 6