AI SDK 7 is now available
Quick Answer
AI SDK 7 from Vercel introduces a comprehensive platform for building production agents in TypeScript, supporting multiple modalities like text, audio, and video.
Quick Take
AI SDK 7 from Vercel introduces a comprehensive platform for building production agents in TypeScript, supporting multiple modalities like text, audio, and video. Key features include a new harness layer for integrating existing coding agents and enhanced UI for reliable streaming and message handling.
Key Points
- AI SDK 7 supports major providers out of the box, enhancing development flexibility.
- New harness layer integrates existing agents like Claude Code and Codex into the SDK.
- Migration to AI SDK 7 requires running v7 codemods for import and rename changes.
- Enhanced UI focuses on correct, composable, and reliable agent streaming.
- Durable execution allows agents to persist state across deployments and interruptions.
Article Content
From source RSS / original summaryAI SDK 7 is a major release for building production agents in TypeScript. The SDK has grown from model calls and chat primitives into a broader agent platform for developing, running, integrating, and observing agents across text, audio, realtime, image, and video. Every major provider is supported out of the box. AI SDK 7 introduces two breaking requirements:Run the v7 codemods to automate the majority of import and rename changes before reviewing semantic migration items manually. See the.
full v7 migration guideAI SDK 7 adds the primitives agents need once they leave local demos. AI SDK 7 introduces a harness layer for bringing established coding agents into the AI SDK ecosystem. Wrap harnesses such as Claude Code, Codex, and Pi behind the same agent interface used by the rest of the SDK. AI SDK 7 expands the SDK across realtime, video, speech, transcription, images, files, embeddings, and structured output.
The UI and streaming work in v7 focuses on making agent streams correct, composable, and reliable. The package grows from a tool transport layer into a richer integration surface for agent tools and app UIs.
Send this prompt to your AI coding agent to get started:The following highlights cover the most impactful promotions:The following highlights cover the most impactful renames:The following highlights cover the most impactful deprecations:Follow these steps to migrate an existing project to AI SDK 7:For a guided migration, install the AI SDK v7 migration skill and ask your agent to apply it to your app:Read moreAt a GlanceBefore You UpgradeDevelop AgentsRun Agents in ProductionIntegrate Agent HarnessesObserve AgentsBuild Beyond TextUI, Streams, and Message HandlingConfigure MCPConfigure Runtime and PackagingUpgrade Path with reasoning control, tool and runtime context, provider files and skills support, MCP Apps, and a terminal UI.
Develop agents with tool approvals, durable execution, first-class timeouts, and sandbox support. Run agentsWorkflowAgent such as Codex, Claude Code, Deep Agents, OpenCode, or Pi. Integrate any agent harness with redesigned telemetry,, Node. js tracing channel support, lifecycle callbacks, and step performance statistics.
Observe agent behavior@ai-sdk/otel with stable speech/transcription APIs, richer file parts, image generation and editing, multimodal embeddings, reranking, realtime voice (experimental), and video generation (experimental). Build beyond text through the new migration skill, codemods, and migration paths for ESM, Node. js 22,,,,,, and.
Upgrade with clearer APIsinstructionstelemetrystreamfinalStepruntimeContexttoolsContext: Node 22 is required because the SDK depends on APIs (including the native implementation and improved semantics) that are not backported to earlier LTS lines. Node. js 22 minimumfetchAsyncLocalStorage: AI SDK 7 requires ESM imports ( syntax or files). CommonJS is not supported. Update your to include or migrate individual files to. ESM imports requiredimport. mjsrequire()package. json"type": "module".
mjs: and now support a top-level option that maps to provider-native settings across OpenAI, Anthropic, Google, Groq, xAI, Bedrock, Fireworks, DeepSeek, Open Responses, and OpenAI-compatible providers. Note that exact behavior and available parameters vary by provider. Provider-agnostic reasoning controlgenerateTextstreamTextreasoning: Shared orchestration state lives in and flows through, approval functions, lifecycle callbacks, telemetry,, and.
Typed runtime contextruntimeContextprepareStepToolLoopAgentWorkflowAgent: Tools can declare a, and callers provide per-tool values through, so third-party tools only receive the secrets or config they need. Scoped tool contextcontextSchematoolsContext: uploads large inputs once and reuses provider references in later calls, reducing redundant uploads in repeated PDF, dataset, image, and multi-step workflows. Provider file uploadsuploadFile: brings the same pattern to provider-managed skill environments.
Provider skill uploadsuploadSkill: MCP support now includes model-visible versus app-only tools, app metadata, sandboxed iframe rendering, and JSON-RPC communication for tools, resources, logs, and display updates. MCP Apps: runs AI SDK agents in an interactive terminal UI, letting you test reasoning, tools, and markdown output before building a full app. Terminal agent development@ai-sdk/tui:,, and can define approval policies at the call or agent level.
Policies can require user approval, auto-approve, auto-deny, or delegate to typed approval functions. Tool approvalsgenerateTextstreamTextToolLoopAgent: Higher-risk approval flows can revalidate tool inputs and policies before continuation, use WorkflowAgent approval validation, and opt into HMAC signing. HMAC signing cryptographically binds the original tool inputs to the approval token, preventing tampering with tool arguments between the approval request and resumption.
Hardened approval replay: introduces for long-running agents. Execution state is persisted to durable storage between steps, so agents survive deploys, process restarts, interruptions, and delayed approvals. To learn more, see the. Durable execution@ai-sdk/workflowWorkflowAgentWorkflowAgent docs: supports streaming, tools, approvals, typed runtime and tool context, lifecycle callbacks, stable telemetry, provider-executed approval resumption, and tool result conversion.
Want this in your inbox every morning?
Daily brief at your local 8am — bilingual EN/中文, free.
More from Vercel AI
See more →
The Agent Stack
The Agent Stack by Vercel AI provides essential building blocks for creating production-grade agents, enabling seamless integration across multiple AI models and secure operations. It features components like AI Gateway for model routing, Workflow SDK for durable execution, and Vercel Connect for scoped access, streamlining agent development and deployment across various platforms.

