Skip to content
← Tools / Skills
ToolVercel/10 trustVerified

AI SDK

The TypeScript standard for building AI apps and agents: unified providers, streaming UI.

Visit official site →

About

The AI SDK (npm i ai) is Vercel's provider-agnostic TypeScript toolkit for AI-powered apps and agents: one generateText/streamText API across OpenAI, Anthropic, Google, and more; Zod-schema structured outputs; a ToolLoopAgent for tool-calling agents; and UI hooks (useChat and friends) for Next.js, React, Svelte, Vue, and Angular with streaming baked in. By default it routes through the Vercel AI Gateway (pass any model string); provider packages (@ai-sdk/openai, etc.) connect directly. A npx skills add vercel/ai skill teaches coding agents the SDK. Apache-2.0 (confirmed in the LICENSE file), 123M npm downloads/month.

What it can do

  • **Unified providers**: one API for OpenAI, Anthropic, Google, and dozens more
  • **Streaming**: text, object, and UI streaming primitives built in
  • **Structured outputs**: Zod schemas via `Output.object`
  • **ToolLoopAgent**: tool-calling agent loops with framework UI integration
  • **UI hooks**: `useChat` etc. for React, Svelte, Vue, Angular
  • **Coding-agent skill**: `npx skills add vercel/ai` teaches Claude Code/Cursor the SDK

Setup

```bash

npm install ai

```

```ts

import { generateText } from 'ai';

const { text } = await generateText({

model: 'anthropic/claude-opus-5-5', // via Vercel AI Gateway by default

prompt: 'What is an agent?',

});

```

Needs Node.js 22+. For chat UIs add @ai-sdk/react and the useChat hook. Docs: ai-sdk.dev/docs.

Prerequisites

Node.js 22+. Model access: Vercel AI Gateway (default) or direct provider API keys.

Use cases

chat UIsagentsstreamingstructured outputs

Works with

CursorClaude Codecustom

Trust score — 9/10

/10 trustVerified

Scored 9/10 (verified tier, metrics-v1). Evidence: 27,280 GitHub stars (log-scaled vs catalog peers); blended with ~123,020,637 monthly package downloads; last push 0d ago; 100 releases/12mo; 1899 open issues. Manual review: TypeScript standard for AI apps (unified providers, streaming, ToolLoopAgent, useChat); 27.3k stars, 123M npm/mo; default routes through Vercel AI Gateway — a vendor dependency to know about. License: Apache-2.0 (confirmed in LICENSE file; GitHub API reports NOASSERTION).

★ 27,280 GitHub stars

How the trust score is built

Full methodology →
Adoption · stars/downloads, log-scaled vs peers
8.8/10
Maintenance · recency, releases, issue load
8.2/10
Openness · license + docs
10.0/10
Manual review · sanity read + red-flag check
9.0/10
  • · 27,280 GitHub stars (log-scaled vs catalog peers)
  • · blended with ~123,020,637 monthly package downloads
  • · last push 0d ago; 100 releases/12mo; 1899 open issues
  • · manual review: TypeScript standard for AI apps (unified providers, streaming, ToolLoopAgent, useChat); 27.3k stars, 123M npm/mo; default routes through Vercel AI Gateway — a vendor dependency to know about

Sources

Every fact above was checked against these sources. Where a claim comes from the provider and couldn't be independently verified, the text says so.