# AI SDK (Vercel)

CreateWithAI Hub page: https://createwithaihub.com/frameworks/vercel-ai-sdk
Latest version of this file: https://createwithaihub.com/frameworks/vercel-ai-sdk.md

- Type: Framework · Category: Harnesses & Frameworks
- Publisher: Vercel
- Pricing: Free · License: Apache-2.0

Vercel's provider-agnostic TypeScript toolkit for AI apps and agents, with UI hooks for React and other frameworks.

The AI SDK is an open-source TypeScript library from Vercel for building AI features and agents. It gives one API for generating text and structured data, calling tools and running agent loops across many model providers, and UI integrations such as useChat for streaming chat interfaces. It works with Next.js, React, Svelte, Vue, Angular and Node.js, and suits web developers adding AI to apps.

Useful for: Adding a streaming chat UI to a Next.js app, extracting typed JSON from model output, or building a tool-calling agent that can switch providers.

## Key features

- Unified API across providers such as OpenAI, Anthropic and Google
- Uses Vercel AI Gateway by default, or direct provider packages
- Text and structured data generation with tool calling
- ToolLoopAgent for agent loops
- UI integration (e.g. useChat) for React, Next.js and other frameworks

## Connection

- Language: TypeScript / JS
- Focus: Agents & tool use, Chat UI & streaming
- Model support: Multi-provider

## Before you start

- Node.js 22+
- npm or another package manager

## Install steps from the official documentation

Install:

```
npm install ai
```

Add skill for coding agents:

```
npx skills add vercel/ai
```

## Official links

- Website: https://ai-sdk.dev
- Source repository: https://github.com/vercel/ai
- Documentation: https://ai-sdk.dev/docs
- Source: https://github.com/vercel/ai (packages/ai README: description, Node.js 22+ requirement, install commands, provider architecture, agents and UI; LICENSE Apache-2.0)
