AAIニュース
最新ニュースAI日報Hacker日報週報動画AIツールトレンド企業
AAIニュース

世界中のAI最新情報を日本語で。毎時自動収集・翻訳・要約。

コンテンツ

最新ニュースAI日報週報

分析

トレンド企業動画

サイト

についてRSSお問い合わせ
© 2026 ainew.jp — All rights reserved.特定商取引法に基づく表記
ニュース一覧元記事を開く
TLDR AI·2026年6月26日 09:00·約14分

Vercel、ストリーミングとツールオーケストレーションを強化した AI SDK 7 を発表

#Agent Framework#TypeScript SDK#MCP (Model Context Protocol)#Multimodal AI#Vercel
TL;DR

Vercel は AI SDK の最新版 7 をリリースし、エージェントの設計・実行・統合・観測・マルチモーダル対応を強化した。

AI深層分析2026年6月27日 01:03
4
重要/ 5段階
深度40%
5
関連度30%
5
実用性20%
4
革新性10%
3

キーポイント

1

エージェント開発機能の強化

推論制御、ツールおよびランタイムコンテキスト管理、MCP アプリサポート、ターミナル UI などの新機能を追加し、高品質なエージェント構築を支援する。

2

本番環境向け実行機能の拡充

ツールの承認フロー、耐久性を持つ WorkflowAgent、タイムアウト制御、サンドボックスサポートなどを導入し、安定したエージェント運用を実現する。

3

マルチモーダル対応と統合拡張

テキストを超えたリアルタイム音声や動画生成をサポートするとともに、Codex や Claude Code などのあらゆるエージェントハーンとの統合を可能にする。

影響分析・編集コメントを表示

影響分析

このリリースは、AI エージェント開発のライフサイクル全体(設計から運用まで)をカバーする包括的なフレームワークとして AI SDK の地位をさらに強固にするものであり、特に本番環境での安定性と複雑な推論制御への対応は、実務レベルの開発者にとって大きな価値を持つ。Vercel が提供するオープンソースエコシステムが、マルチモーダルや MCP などの最新トレンドに即座に対応できる基盤として機能することで、開発スピードと品質の向上が期待される。

編集コメント

Vercel は AI SDK の進化を続ける中で、単なるライブラリから「エージェント開発の基盤プラットフォーム」へとその役割を進化させています。特に本番環境での信頼性を高める機能追加は、実務でエージェントを活用するチームにとって即戦力となる重要なアップデートです。

AI SDK は、週に 1,600 万回以上のダウンロードを誇る、あらゆるモデルプロバイダーを対象とした AI アプリケーション、機能、フレームワーク、エージェントを構築するための TypeScript SDK です。これは Vercel のオープンソースエージェントフレームワークである eve も同じレイヤーの上に構築されています。

AI SDK 7 は、5 つの領域におけるエージェント作業のための本番環境レベルの深みを追加します:

  • 推論制御、ツールおよびランタイムコンテキスト、プロバイダーファイル、スキルサポート、MCP アプリ、ターミナル UI を備えたエージェントの開発。
  • ツール承認、耐久性(WorkflowAgent)、タイムアウト、サンドボックスサポートを備えたエージェントの実行。
  • Codex、Claude Code、Deep Agents、OpenCode、Pi などのあらゆるエージェントハネスとの統合。
  • テレメトリ、Node.js トレースチャネル、ライフサイクルイベント、パフォーマンス統計によるエージェントの観測。
  • プロバイダー非依存のリアルタイム音声サポートとビデオ生成により、テキストベースのエージェントを超えた拡張。

pnpm add ai@latest

AI SDK 7 のインストール

AI SDK 6 からアップグレードする場合?最小限の変更で自動的に移行するには npx @ai-sdk/codemod v7 を実行するか、移行スキルを使用してください:npx skills add vercel/ai --skill migrate-ai-sdk-v6-to-v7

リンク見出し: エージェントの開発

振る舞いの良いエージェントを構築するには、モデルの推論、ツールのコンテキスト、ファイル処理に対する微細な制御が必要です。

リンク見出し: 推論制御

最先端モデルのほとんどは構成可能な推論をサポートしていますが、各プロバイダー API はそれを異なる方法で公開しています。

AI SDK 7 は、generateText および streamText に推論オプションを追加することでこれを標準化しました。これにより、プロバイダー固有の推論設定にマッピングされ、1 行で推論の努力度を制御できるようになります。また、より詳細なプロバイダー固有の推論設定が必要な場合は、依然としてプロバイダー側のオプションにフォールバックすることも可能です。

agent.ts

import { generateText } from 'ai';

const result = await generateText({

model,

prompt,

reasoning: 'high',

});

単一のオプションで推論の努力度を設定

詳細は 推論ドキュメント をご覧ください。

リンク先見出し:ツールコンテキスト

ツールは、特定のエージェントやアプリケーションとは独立して開発されるケースが増えています。例えば、サードパーティ企業が提供するツールにより、エージェントがその API を利用できるようになります。そのため、ツールには LLM によって生成されない追加の入力(API キーや設定値など)が必要です。

AI SDK 7 では、各ツールに対してスキーマを介して指定可能な、完全に型付けされたツールコンテキストを追加しました。このコンテキストは、サードパーティ製ツールが不要な情報にアクセスできないよう、該当するツールに限定されます。

agent.ts

const agent = new ToolLoopAgent({

model,

tools: {

weather: tool({

description,

inputSchema,

contextSchema: z.object({

apiKey: z.string(),

}),

execute: async (input, { context: { apiKey } }) => {

// ...

},

}),

},

toolsContext: {

weather: { apiKey: process.env.WEATHER_API_KEY! },

},

});

必要なツールに API キーをスコープする

ツールコンテキスト について詳しく学ぶ

リンク見出しランタイムコンテキスト

より複雑なエージェントループでは、プロンプトの調整やモデル選択などを行うために、prepareStep でアクセスして変更可能な変数が必要になることがよくあります。

AI SDK 7 では、ステップ準備時およびツール承認関数で使用できる型付きランタイムコンテキストが導入され、オプションでテレメトリサポートも提供されます。これにより、ToolLoopAgent により多くのロジックをカプセル化し、その内部ロジックを持つエージェントと共有することが可能になります。

agent.ts

const agent = new ToolLoopAgent({

// ランタイムコンテキストの設定

runtimeContext: {

var1: "something",

},

prepareStep: async ({ runtimeContext, steps }) => {

// ランタイムコンテキストの使用

// 更新されたランタイムコンテキストの返却

},

});

ステップ間での型付き変数のアクセスと更新

ランタイムコンテキスト について詳しく学ぶ。

リンク見出しプロバイダーファイルアップロード

多くのエージェントワークフローでは、PDF、画像、データセット、その他のアーティファクトなど、大規模な入力を処理する必要があります。これらのファイルをインラインで送信するのは遅く、特にステートレス推論(stateless inference)のように同じファイルを繰り返し送信する必要がある場合に非効率です。

AI SDK 7 は、ファイルを一度アップロードし、その後に軽量な参照をモデル呼び出しに渡すことができるトップレベルの uploadFile API を追加しました。これにより、同じバイト列を繰り返し再アップロードする必要がなくなり、反復処理や多段階の実行時に推論速度が向上し、帯域幅を節約できます。

uploadFile は、ファイルアップロードエンドポイントを提供するすべてのプロバイダーで使用可能です。この関数は、プロバイダー間でポータブルなプロバイダー参照オブジェクトを返します。

upload.ts

const { providerReference } = await uploadFile({

api: openai.files(),

data: readFileSync('./photo.png'),

filename: 'photo.png',

});

const result = await streamText({

model: openai.responses('gpt-5.5'),

messages: [

{

role: 'user',

content: [

{ type: 'text', text: 'Describe what you see in this image.' },

{ type: 'file', mediaType: 'image', data: providerReference },

],

},

],

});

ファイルを一度アップロードし、参照を後のモデル呼び出しに渡す

Provider File Uploads について詳しくはこちら

リンク先見出し:スキルアップロード

プロバイダー管理コンテナ環境へのリクエストごとにスキルをインラインで送信すると、ファイルをインラインで送信する場合と同じオーバーヘッドの問題が生じます。

AI SDK 7 は、スキルを一度アップロードし、その後の推論呼び出しで参照を使用して再利用できるトップレベルの uploadSkill API を追加しました。uploadFile と同様に、この関数はプロバイダー参照オブジェクトを返します。

upload.ts

const { providerReference } = await uploadSkill({

api: anthropic.skills(),

files: [

{

path: 'my-skill/SKILL.md',

content: readFileSync('./SKILL.md'),

},

],

displayTitle: 'My Skill',

});

const result = await streamText({

model: anthropic('claude-sonnet-4-6'),

tools: {

code_execution: anthropic.tools.codeExecution_20260120(),

},

prompt: 'Use the my-skill skill to complete the task.',

providerOptions: {

anthropic: {

container: {

skills: [{ type: 'custom', providerReference }],

},

} satisfies AnthropicLanguageModelOptions,

},

});

Upload a skill once, reference it across inference calls

Learn more about Provider Skill Uploads.

Link to headingMCP Apps

MCP has become a common way to connect agents to tools and resources. But not every tool should be model-visible, and some MCP servers need to expose specialized UI alongside their tools.

AI SDK 7 adds support for MCP Apps. MCP servers can now separate model-visible tools from app-only tools, preserve app metadata, and render app UIs inside sandboxed iframes. A JSON-RPC bridge connects tools, resources, and display interactions.

This lets you build richer agent experiences where the model can use the tools it needs, while the user sees an app-specific interface for review, configuration, or interaction.

imageimageimageimage

エージェントと共に UI をレンダリングする MCP アプリ

components/chat.tsx

import { experimental_MCPAppRenderer as MCPAppRenderer } from '@ai-sdk/react';

import { isToolUIPart } from 'ai';

{

messages.map(message =>

message.parts.map(part =>

isToolUIPart(part) ? (

<MCPAppRenderer

key={part.toolCallId}

part={part}

sandbox={{ url: '/mcp-app-sandbox', className: 'h-96 w-full' }}

loadResource={app => fetch(/api/mcp-apps?uri=${app.resourceUri})}

handlers={{ allowedTools: ['refreshDashboard'] }}

/>

) : null,

),

);

}

モデルの出力と共に MCP アプリの UI をレンダリングする

今日から AI SDK を使って最初の MCP アプリの構築を始めましょう。

Link to headingTUI

エージェントを開発する際、フルアプリケーションを作成せずに素早くテストできる必要があります。AI SDK 7 は、数行のコードだけでエージェントを実行できるターミナル UI (TUI) パッケージを追加しました。

この TUI は対話式であり、推論とツールのサポートに対応し、マークダウンを整形されたテキストとしてレンダリングします。

image
image

ターミナル UI で実行中のエージェント

dev.ts

import { runAgentTUI } from '@ai-sdk/tui';

await runAgentTUI({ agent });

ターミナルでのエージェント実行

独自のターミナルエージェントを作成する方法 について詳しく見る。

Link to headingRun agents

エージェントがより自律的になり、長時間実行されるようになると、承認の必要性、耐久性、サンドボックス化、そして堅牢性への要求が高まります。

Link to headingTool approvals

AI SDK 7 は、自動処理または人間をループに組み込むことができるエージェントレベルのツール承認をサポートしており、以下の承認タイプがあります:

  • 特定のツールに対するシンプルなユーザー承認機能。
  • 自動承認、自動拒否、またはユーザー承認へ転送が可能となる特定ツールの承認関数。
  • 汎用的な包括的なツール承認関数。

ツール承認は、特定のツールの使用シナリオが承認の必要性を駆動するため、ToolLoopAgent、generateText、streamText で定義されます。

agent.ts

const agent = new ToolLoopAgent({

model,

tools: { weather: weatherTool },

toolApproval: {

weather: 'user-approval',

},

});

ツール実行前のユーザー承認の要求

よりリスクの高いワークフローにおいては、AI SDK 7 は偽造された承認を防ぐためにオプトイン型の HMAC 署名付きツール承認を導入しました。また、SDK は実行を継続する前にツール入力とポリシーを再検証することで、リプレイ攻撃に対する耐性を強化しています。

ツール承認の仕組みについてはこちら をご覧ください。

リンク先見出し: WorkflowAgent (耐久性)

エージェントの実行が複数のステップにわたる場合や、人間の承認を待機している間にプロセスの再起動やデプロイが発生すると、実行は最初からやり直しになってしまいます。AI SDK 7 は、@ai-sdk/workflow と WorkflowAgent を導入し、プロセスの再起動、デプロイ、中断、遅延する承認といった状況に耐えうる、永続的で再開可能なエージェント実行を実現しました。

WorkflowAgent は、ワークフローベースのストリーミング、ツール、承認、コールバック、prepareCall、およびワークフローステップ間の境界を越えたプロバイダーモデルのシリアライズをサポートしています。また、共有されたエージェント状態と安定したテレメトリのための型付きランタイムコンテキストもサポートします。

コールバックには、ステップ番号、以前の結果、実行時間、成功または失敗の情報など、より豊富な実行データが含まれるようになりました。無効なツール呼び出しは、無効なツールを実行せずに保持され、ツールからモデル出力への変換では、UI やコールバックのために生データを保持することができます。

WorkflowAgent を使用してエージェントを構築する方法 をご覧ください。

リンク先見出し:タイムアウト

エージェントは、単純なリクエストの失敗よりも多くの方法で停止する可能性があります。プロバイダーがストリームを開いてチャンクの送信を停止したり、ツールが応答しなくなったり、多段階の実行が総予算を超えたりすることがあります。

AI SDK 7 では、テキスト生成およびエージェント API の全体にファーストクラスのタイムアウト設定が追加されました。これには、全体、ステップごと、チャンクごと、ツールごとの制限が含まれます。タイムアウトによる中止は TimeoutError を使用し、中止の理由はストリームおよび UI プロトコルを介して伝播します。

agent.ts

typescript
const result = await generateText({
  model,
  tools: { weather: weatherTool, slowApi: slowApiTool },
  timeout: {
    totalMs: 60000, // 合計 60 秒
    stepMs: 10000, // ステップあたり 10 秒
    chunkMs: 2000, // 2 秒以内にチャンクが受信されない場合は中止
    toolMs: 5000, // すべてのツールのデフォルト値
    tools: {
      weatherMs: 3000, // 天気ツールに 3 秒
      slowApiMs: 10000, // 低速 API ツールに 10 秒
    },
  },
  prompt: 'What is the weather in San Francisco?',
});

全体、ステップごと、ツールごとのタイムアウト制限の設定方法

タイムアウト に関する詳細はこちらをご覧ください。

Link to headingSandbox support

シェルコマンドを実行したり、ファイルの読み書きを行ったり、生成されたコードを実行するエージェントには、一貫した実行環境が必要です。しかし、基盤となるサンドボックスは、ローカル開発、CI(継続的インテグレーション)、本番環境の間で頻繁に変わってしまいます。AI SDK 7 では、ツールやエージェント内でのポータブルなコマンド実行のために、ファーストクラスの SandboxSession 抽象化が追加されました。これにより、ツールは特定のサンドボックスに依存せずに開発でき、サンドボックス対応のツールであれば、あらゆるサンドボックスプロバイダーと組み合わせて使用できます。

Vercel Sandbox に代表されるようなサンドボックス環境は、この目的に理想的です。

Link to headingIntegrate any agent harness

エージェントランタイムは、単一のアプリケーションサーバーを超えて進化しています。チームは、同じエージェントロジックをコーディング環境、ホストされたサンドボックス、ローカルセッション、サードパーティのハーンス(実行枠組み)内で実行したいと考えています。

Link to headingHarnessAgent

AI SDK 7 では、実験的なハーンス抽象化と HarnessAgent が導入されました。これは、Claude Code、Codex、Pi といった、完全に設定された確立済みのエージェントハーンスを動作させるための単一 API です。ハーンスは、動作するサンドボックス、カスタムインストラクション、スキル、ツールによって構成可能です。確立されたハーンスを一貫したインターフェースを通じて実行し、それぞれを独立して設定できます。また、統合層を変更することなく、一つのハーンスを別のものへ簡単に置き換えることも可能です。

内部では、この抽象化は v1 アダプタ仕様、ブリッジサポート、およびセッションの作成と再開のための拡張されたサンドボックスセッションプリミティブで構成されています。Harness セッションは一時停止して再開することができ、個々のターンも飛行中に中断して再開できます。

HarnessAgent は AI SDK の Agent インターフェースを実装しているため、その generate および stream 戻り値は既存の AI SDK 統合と完全に互換性があり、useChat() と新しい TUI は追加の配線なしで動作します。

agent.ts

const agent = new HarnessAgent({

harness: claudeCode,

sandbox: createVercelSandbox({

runtime: 'node24',

ports: [4000],

}),

instructions:

'You are a careful coding assistant. Prefer small changes and explain tradeoffs.',

<

原文を表示

AI SDK, with over 16 million weekly downloads, is the TypeScript SDK for building AI applications, features, frameworks, and agents across any model provider. It's the same layer eve, Vercel's open-source agent framework, is built on.

AI SDK 7 adds production depth for agent work across five areas:

  • Develop agents with reasoning control, tool and runtime context, provider files and skills support, MCP Apps, and a terminal UI.
  • Run agents with tool approvals, durability (WorkflowAgent), timeouts, and sandbox support.
  • Integrate any agent harness, such as Codex, Claude Code, Deep Agents, OpenCode, or Pi.
  • Observe agents with telemetry, Node.js tracing channel, lifecycle events, and performance statistics.
  • Go beyond text agents with provider-agnostic real-time voice support and video generation.
code
pnpm add ai@latest

Install AI SDK 7

Upgrading from AI SDK 6? Run npx @ai-sdk/codemod v7 to migrate automatically with minimal code changes, or use the migration skill: npx skills add vercel/ai --skill migrate-ai-sdk-v6-to-v7

Link to headingDevelop agents

Building well-behaved agents requires fine-grained control over model reasoning, tool context, and file handling.

Link to headingReasoning control

Most frontier models support configurable reasoning, but every provider API exposes it differently.

AI SDK 7 standardizes this with a reasoning option for generateText and streamText. It maps to provider-native reasoning settings, letting you control reasoning effort in a single line. You can also still fall back to provider options when you need more detailed provider-specific reasoning configuration.

agent.ts

code
import { generateText } from 'ai';const result = await generateText({  model,  prompt,  reasoning: 'high',});

Setting reasoning effort with a single option

Learn more in the reasoning documentation.

Link to headingTool context

Tools are increasingly developed independently of specific agents or applications. For example, third-party companies offer tools that enable agents to use their APIs. Therefore, tools require additional inputs that are not generated by LLMs, such as API keys or configuration settings.

AI SDK 7 adds a fully typed tool context that can be specified for each tool via a schema. The context is limited to the tool to prevent 3rd-party tools from accessing context they do not need.

agent.ts

code
const agent = new ToolLoopAgent({  model,  tools: {    weather: tool({      description,      inputSchema,      contextSchema: z.object({        apiKey: z.string(),      }),      execute: async (input, { context: { apiKey } }) => {        // ...      },    }),  },  toolsContext: {    weather: { apiKey: process.env.WEATHER_API_KEY! },  },});

Scoping an API key to the tool that needs it

Learn more about Tool Context

Link to headingRuntime context

For more complex agentic loops, you often need variables that you can access and modify in prepareStep to adjust prompts, model selection, and more.

AI SDK 7 introduces a typed runtime context available during step preparation and tool approval functions, with optional telemetry support. This enables you to encapsulate more logic in ToolLoopAgent and share those agents with that internal logic.

agent.ts

code
const agent = new ToolLoopAgent({  // setup runtime context  runtimeContext: {    var1: "something",  },  prepareStep: async ({ runtimeContext, steps }) => {    // use runtime context    // return updated runtime context  },});

Accessing and updating typed variables across steps

Learn more about Runtime Context.

Link to headingProvider file uploads

Many agent workflows require handling large inputs, such as PDFs, images, datasets, or other artifacts. Sending those files inline is slow and wasteful, especially for stateless inference, where they get sent over and over again.

AI SDK 7 adds a top-level uploadFile API that lets you upload a file once and then pass a lightweight reference into subsequent model calls. This avoids re-uploading the same bytes repeatedly, making inference faster and saving bandwidth during repeated or multi-step runs.

uploadFile can be used with any providers that offer a file uploading endpoint. The function returns a provider reference object that is portable across providers.

upload.ts

code
const { providerReference } = await uploadFile({  api: openai.files(),  data: readFileSync('./photo.png'),  filename: 'photo.png',});const result = await streamText({  model: openai.responses('gpt-5.5'),  messages: [    {      role: 'user',      content: [        { type: 'text', text: 'Describe what you see in this image.' },        { type: 'file', mediaType: 'image', data: providerReference },      ],    },  ],});

Upload a file once, pass a reference into subsequent model calls

Learn more about Provider File Uploads

Link to headingProvider skill uploads

Sending skills inline on every request to provider-managed container environments has the same overhead problem as sending files inline.

AI SDK 7 adds a top-level uploadSkill API that lets you upload a skill once and then use a reference to it in subsequent inference calls. Similar to uploadFile, the function returns a provider reference object.

upload.ts

code
const { providerReference } = await uploadSkill({  api: anthropic.skills(),  files: [    {      path: 'my-skill/SKILL.md',      content: readFileSync('./SKILL.md'),    },  ],  displayTitle: 'My Skill',});const result = await streamText({  model: anthropic('claude-sonnet-4-6'),  tools: {    code_execution: anthropic.tools.codeExecution_20260120(),  },  prompt: 'Use the my-skill skill to complete the task.',  providerOptions: {    anthropic: {      container: {        skills: [{ type: 'custom', providerReference }],      },    } satisfies AnthropicLanguageModelOptions,  },});

Upload a skill once, reference it across inference calls

Learn more about Provider Skill Uploads.

Link to headingMCP Apps

MCP has become a common way to connect agents to tools and resources. But not every tool should be model-visible, and some MCP servers need to expose specialized UI alongside their tools.

AI SDK 7 adds support for MCP Apps. MCP servers can now separate model-visible tools from app-only tools, preserve app metadata, and render app UIs inside sandboxed iframes. A JSON-RPC bridge connects tools, resources, and display interactions.

This lets you build richer agent experiences where the model can use the tools it needs, while the user sees an app-specific interface for review, configuration, or interaction.

An MCP App rendering a dashboard UI inside a sandboxed iframe alongside agent output
An MCP App rendering a dashboard UI inside a sandboxed iframe alongside agent output
An MCP App rendering a dashboard UI inside a sandboxed iframe alongside agent output
An MCP App rendering a dashboard UI inside a sandboxed iframe alongside agent output

An MCP App rendering its UI alongside the agent

components/chat.tsx

code
import { experimental_MCPAppRenderer as MCPAppRenderer } from '@ai-sdk/react';import { isToolUIPart } from 'ai';{  messages.map(message =>    message.parts.map(part =>      isToolUIPart(part) ? (        <MCPAppRenderer          key={part.toolCallId}          part={part}          sandbox={{ url: '/mcp-app-sandbox', className: 'h-96 w-full' }}          loadResource={app => fetch(`/api/mcp-apps?uri=${app.resourceUri}`)}          handlers={{ allowedTools: ['refreshDashboard'] }}        />      ) : null,    ),  );}

Rendering MCP app UIs alongside model output

Start building your first MCP App with AI SDK today.

Link to headingTUI

When developing agents, you need to be able to quickly test them without writing a full app. AI SDK 7 adds a terminal UI (TUI) package that lets you run agents with just a few lines of code:

The TUI is interactive, supports reasoning and tools, and renders markdown as formatted text.

An agent running interactively in the terminal UI, showing reasoning steps and tool calls
An agent running interactively in the terminal UI, showing reasoning steps and tool calls

An agent running in the terminal UI

dev.ts

code
import { runAgentTUI } from '@ai-sdk/tui';await runAgentTUI({ agent });

Running an agent in the terminal

Learn more about creating your own terminal agent.

Link to headingRun agents

As agents become more autonomous and longer running, the need for approvals, durability, sandboxing, and robustness increases.

Link to headingTool approvals

AI SDK 7 supports agent-level tool approvals that can be automatic or involve a human in the loop, with these approval types:

  • Simple user-approval for particular tools.
  • Tool approval function for a particular tool that can auto-approve, auto-deny, or forward to user approval.
  • Generic catch-all tool approval functions.

Tool approvals are defined on ToolLoopAgent, generateText, and streamText, because the usage scenario of a particular tool drives the need for approvals.

agent.ts

code
const agent = new ToolLoopAgent({  model,  tools: { weather: weatherTool },  toolApproval: {    weather: 'user-approval',  },});

Requiring user approval before a tool executes

For higher-risk workflows, AI SDK 7 introduces opt-in HMAC-signed tool approvals to prevent forged approvals. The SDK also hardens replay behavior by revalidating tool inputs and policies before continuing execution.

See how tool approvals work.

Link to headingWorkflowAgent (Durability)

When an agent run spans multiple steps or waits for a human approval, a process restart or deployment in the middle of that run means starting over. AI SDK 7 introduces @ai-sdk/workflow and WorkflowAgent for durable, resumable agent execution that survives process restarts, deploys, interruptions, and delayed approvals.

WorkflowAgent supports workflow-based streaming, tools, approvals, callbacks, prepareCall, and provider model serialization across workflow step boundaries. It also supports typed runtime context for shared agent state and stable telemetry.

Callbacks now include richer execution data such as step numbers, previous results, duration, and success or failure information. Invalid tool calls are preserved without executing invalid tools, and tool toModelOutput conversion can preserve raw outputs for UI and callbacks.

Learn how to build an agent with WorkflowAgent.

Link to headingTimeouts

Agents can stall in more ways than a simple request can: a provider can open a stream and stop sending chunks, a tool can hang, or a multi-step run can exceed its total budget.

AI SDK 7 adds first-class timeout configuration across text generation and agent APIs, including total, per-step, per-chunk, and per-tool limits. Timeout aborts use TimeoutError, and abort reasons propagate through stream and UI protocols.

agent.ts

code
const result = await generateText({  model,  tools: { weather: weatherTool, slowApi: slowApiTool },  timeout: {    totalMs: 60000, // 60 seconds total    stepMs: 10000, // 10 seconds per step    chunkMs: 2000, // abort if no chunk received for 2 seconds    toolMs: 5000, // default for all tools    tools: {      weatherMs: 3000, // 3 seconds for weather tool      slowApiMs: 10000, // 10 seconds for slow API tool    },  },  prompt: 'What is the weather in San Francisco?',});

Configuring total, per-step, and per-tool timeout limits

Learn more about timeouts.

Link to headingSandbox support

Agents that run shell commands, read and write files, or execute generated code need a consistent execution environment, but the underlying sandbox often changes across local dev, CI, and production. AI SDK 7 adds a first-class SandboxSession abstraction for portable command execution in tools and agents. Tools can be developed independently of any particular sandbox, and you can use any sandbox-aware tool with any sandbox provider.

Sandboxed environments, such as Vercel Sandbox, are ideal for this purpose.

Link to headingIntegrate any agent harness

Agent runtimes are moving beyond a single application server. Teams want to run the same agent logic inside coding environments, hosted sandboxes, local sessions, and third-party harnesses.

Link to headingHarnessAgent

AI SDK 7 introduces experimental harness abstractions and HarnessAgent: one API to run fully configured, established agent harnesses such as Claude Code, Codex, and Pi. Harnesses are configurable with a sandbox to operate in, custom instructions, skills, and tools. Run established harnesses through a consistent interface, configure each one independently, and swap one out without changing your integration layer.

Under the hood, the abstraction consists of a v1 adapter spec, bridge support, and expanded sandbox session primitives for creating and resuming sessions. Harness sessions can be parked and resumed, and even individual turns can be interrupted and resumed mid-flight.

HarnessAgent implements AI SDK's Agent interface, so its generate and stream return values are fully compatible with existing AI SDK integrations, and useChat() and the new TUI work without any additional wiring.

agent.ts

const agent = new HarnessAgent({

harness: claudeCode,

sandbox: createVercelSandbox({

runtime: 'node24',

ports: [4000],

}),

instructions:

'You are a careful coding assistant. Prefer small changes and explain tradeoffs.',

<

この記事をシェア

関連記事

Vercel Blog2026年6月26日 17:00

Vercel CLI から Web アナリティクスデータを照会可能に

Vercel Blog重要度42026年6月25日 22:00

AI SDK 7 の発表

Vercel Blog重要度42026年6月25日 16:00

AI SDK 7 が利用可能に

今日のまとめ

AI日報で今日の重要ニュースをまとめ読み

ニュース一覧に戻る元記事を読む