---
title: "Vercel AI SDK: features, version and quickstart · DotsAgent"
description: "Vercel AI SDK by Vercel: licence, latest version, MCP support, durable runs, human approval, tracing and evals, plus a quickstart to copy."
url: https://dotsagent.io/frameworks/vercel-ai-sdk
---

Framework · Vercel

# Vercel AI SDK at a glance

Vercel's provider-agnostic TypeScript toolkit, where ToolLoopAgent is the main agent class as of AI SDK 7. It ties tool loops to streaming UI helpers, and WorkflowAgent adds runs that survive restarts.

**Best for:**  Next.js and web developers who want tool-loop agents tied closely to streaming UI.

## Key facts

- **Maintainer**: Vercel
- **Languages**: TypeScript
- **Licence**: Apache-2.0
- **Latest version**: `ai 7.0.126` · September 30, 2026
- **Repository**: [vercel/ai](https://github.com/vercel/ai) · 27,070 stars
- **Hosted option**: [Vercel Functions + Vercel Workflow](https://ai-sdk.dev/docs/agents/workflow-agent)A general hosting platform rather than an agent-specific runtime.

## Quickstart

Install the package, set the credentials, then run the smallest agent from the official docs. Model IDs are the ones the docs use and may not be enabled on your account.

`Install`

```
npm install ai zod  (inferred; not copied from docs)
```

Needs AI Gateway or provider key

`TypeScript`

```
import { ToolLoopAgent, tool } from 'ai';
import { z } from 'zod';

const weatherAgent = new ToolLoopAgent({
  model: "anthropic/claude-sonnet-5.5",
  tools: {
    weather: tool({
      description: 'Get the weather in a location (in Fahrenheit)',
      inputSchema: z.object({
        location: z.string().describe('The location to get the weather for'),
      }),
      execute: async ({ location }) => ({
        location,
        temperature: 72 + Math.floor(Math.random() * 21) - 10,
      }),
    }),
    convertFahrenheitToCelsius: tool({
      description: 'Convert temperature from Fahrenheit to Celsius',
      inputSchema: z.object({
        temperature: z.number().describe('Temperature in Fahrenheit'),
      }),
      execute: async ({ temperature }) => {
        const celsius = Math.round((temperature - 32) * (5 / 9));
        return { celsius };
      },
    }),
  },
});

const result = await weatherAgent.generate({
  prompt: 'What is the weather in San Francisco in celsius?',
});

console.log(result.text); // agent's final answer
console.log(result.steps); // steps taken by the agent
```

[Quickstart source](https://ai-sdk.dev/docs/agents/overview)

## Features

| Any model | — | Any provider package, or AI Gateway strings such as anthropic/claude-sonnet-5.5 |
| --- | --- | --- |
| MCP client | — | @ai-sdk/mcp client |
| MCP server | — | — |
| Multi-agent | — | Subagents; HarnessAgent runs Claude Code, Codex or Pi |
| Durable runs | — | WorkflowAgent, which needs the Workflow 5 beta |
| Human approval | — | toolApproval with HMAC-signed approvals and OPA policies |
| Tracing | — | — |
| Evals | — | — |

## Recent changes

- AI SDK 7 makes ToolLoopAgent the recommended agent class.
- HarnessAgent runs Claude Code, Codex or Pi as the agent.
- WorkflowAgent (@ai-sdk/workflow) replaces the Workflow DevKit's DurableAgent.
- runtimeContext and toolsContext replace experimental_context.

## Alternatives in the same language

- [OpenAI Agents SDK (JS)](https://dotsagent.io/frameworks/openai-agents-js)

- [Claude Agent SDK](https://dotsagent.io/frameworks/claude-agent-sdk)

- [Google ADK](https://dotsagent.io/frameworks/google-adk)

- [LangGraph](https://dotsagent.io/frameworks/langgraph)

- [LlamaIndex](https://dotsagent.io/frameworks/llamaindex)

- [Mastra](https://dotsagent.io/frameworks/mastra)

## Sources

1. [ai-sdk.dev](https://ai-sdk.dev/docs/agents/overview)/docs/agents/overview
2. [ai-sdk.dev](https://ai-sdk.dev/docs/agents/tool-approvals)/docs/agents/tool-approvals
3. [ai-sdk.dev](https://ai-sdk.dev/docs/agents/workflow-agent)/docs/agents/workflow-agent
4. [ai-sdk.dev](https://ai-sdk.dev/docs/ai-sdk-core/mcp-tools)/docs/ai-sdk-core/mcp-tools
5. [vercel.com](https://vercel.com/kb/guide/durableagent-to-workflowagent)/kb/guide/durableagent-to-workflowagent
6. [registry.npmjs.org](https://registry.npmjs.org/ai)/ai
7. [api.github.com](https://api.github.com/repos/vercel/ai)/repos/vercel/ai

Independent reference for people who build AI agents. Not affiliated with any vendor named here.

© 2026 DotsAgent · Facts checked October 1, 2026
