AI SDK 7 の発表
Vercel は AI SDK の主要バージョン 7 をリリースし、エージェント開発における推論制御、ツールコンテキストの標準化、ファイルアップロード効率化、およびマルチモーダル対応を強化した。
キーポイント
推論制御の標準化と統一
各プロバイダーごとの異なる API に依存せず、generateText や streamText で統一的な推論設定(reasoning option)を提供し、開発者の負担を軽減する。
ツール・ランタイムコンテキストの強化
API キーや設定値など LLM が生成しない入力値を安全に扱える型付きのツールコンテキストと、複雑なループ処理に対応したランタイムコンテキストを導入。
ファイルアップロード効率化
大規模な PDF や画像などを毎回送信するのではなく、一度アップロードして軽量な参照を渡す「uploadFile」API を追加し、帯域幅と推論コストを削減。
リアルタイム音声・動画生成のサポート
テキストベースのエージェントを超え、プロバイダーに依存しないリアルタイム音声対応や動画生成機能を統合し、マルチモーダルなエージェント開発を可能にする。
ファイルとスキルのアップロード機能
AI SDK 7 は uploadFile と uploadSkill API を追加し、リソースを一度アップロードして参照を使用することで、重複送信によるオーバーヘッドを削減します。
MCP アプリとターミナル UI のサポート
MCP サーバーがモデル可視ツールとアプリ固有の UI を分離可能になり、また TUI パッケージにより数行のコードで対話型エージェントをテストできるようになりました。
堅牢なワークフローと承認機能
ToolLoopAgent での多様なツール承認(人間介入や自動判定)と、プロセス再起動に対応する WorkflowAgent が導入され、長期実行エージェントの信頼性が向上しました。
影響分析・編集コメントを表示
影響分析
このアップデートは、分散する AI プロバイダー間の差異による開発コストを削減し、大規模で複雑なエージェントアプリケーションの生産性を劇的に向上させる可能性があります。特にファイル処理の最適化と推論制御の標準化は、実運用レベルのエージェント構築におけるボトルネックを解消する重要な一歩です。
編集コメント
Vercel の AI SDK は、開発者コミュニティにおいて事実上の標準ライブラリとして確立されており、今回のバージョン 7 による「推論制御」や「ファイル効率化」の機能追加は、実務レベルのエージェント構築における大きな転換点となります。
AI SDK は、週に 1,600 万回以上のダウンロードを誇る、あらゆるモデルプロバイダーを対象とした AI アプリケーション、機能、フレームワーク、エージェントの構築のための TypeScript SDK です。これは、Vercel のオープンソースエージェントフレームワークである "eve" が構築されている基盤レイヤーでもあります。
AI SDK 7 は、以下の 5 つの領域において、エージェント作業に対する本番環境での深み(production depth)を追加します:
推論制御、ツールおよびランタイムコンテキスト、プロバイダーファイルとスキルサポート、MCP アプリ、ターミナル UI を備えたエージェントの開発。
ツールの承認、耐久性(WorkflowAgent)、タイムアウト、サンドボックスサポートを備えたエージェントの実行。
Codex、Claude Code、Deep Agents、OpenCode、Pi などのあらゆるエージェントハネスへの統合。
テレメトリ、Node.js トレースチャネル、ライフサイクルイベント、パフォーマンス統計によるエージェントの観測。
テキストベースのエージェントを超え、プロバイダー非依存のリアルタイム音声サポートとビデオ生成を実現。
エージェントの開発
振る舞いの良いエージェントを構築するには、モデルの推論、ツールのコンテキスト、ファイル処理に対する微細な制御が必要です。
推論制御
最新の最先端モデルは設定可能な推論をサポートしていますが、各プロバイダー API はそれを異なる方法で公開しています。
AI SDK 7 は、generateText および streamText に対して推論オプション(reasoning option)を提供することでこれを標準化します。これはプロバイダー固有の推論設定にマッピングされ、1 行で推論の努力度を制御できます。より詳細なプロバイダー固有の推論設定が必要な場合は、引き続きプロバイダー側のオプションにフォールバックすることも可能です。
推論に関するドキュメントで詳しく学ぶことができます。
ツールコンテキスト
ツールは、特定のエージェントやアプリケーションとは独立して開発されるケースが増えています。例えば、サードパーティ企業が提供するツールにより、エージェントがその企業の API を利用できるようになります。そのため、ツールには LLM によって生成されない追加の入力(API キーや設定値など)が必要です。
AI SDK 7 では、各ツールに対してスキーマを介して指定可能な、完全に型付けされたツールコンテキストを追加しました。このコンテキストは特定のツールに限定されるため、サードパーティ製ツールが不要なコンテキストにアクセスすることを防止できます。
Tool Context について詳しくはこちら
ランタイムコンテキスト
より複雑なエージェントループでは、プロンプトの調整やモデル選択などを行うために、prepareStep でアクセス・変更可能な変数が必要になることがよくあります。
AI SDK 7 では、ステップ準備時およびツール承認関数で使用可能な型付けされたランタイムコンテキストを導入しました。オプションでテレメトリサポートも利用可能です。これにより、ToolLoopAgent 内でより多くのロジックをカプセル化し、その内部ロジックを持つエージェントを共有することが可能になります。
Runtime Context について詳しくはこちら。
プロバイダーファイルアップロード
多くのエージェントワークフローでは、PDF、画像、データセット、その他のアーティファクトなど、大規模な入力を扱う必要があります。これらのファイルをインラインで送信するのは遅く、特にステートレス推論においては、同じファイルが繰り返し送信されるため非効率です。
AI SDK 7 では、トップレベルの uploadFile API を追加しました。これにより、ファイルを一度アップロードした後に、軽量な参照を後続のモデル呼び出しに渡すことができます。これにより、同じバイト列を繰り返しアップロードする必要がなくなり、推論速度が向上し、反復実行や多段階の実行時に帯域幅を節約できます。
uploadFile は、ファイルアップロードエンドポイントを提供するすべてのプロバイダーで使用できます。この関数は、プロバイダー間で移植可能なプロバイダー参照オブジェクトを返します。
Provider File Uploads について詳しくはこちら
Provider skill uploads
provider-managed コンテナ環境に対してリクエストごとにスキルをインラインで送信すると、ファイルをインラインで送信する場合と同じオーバーヘッドの問題が生じます。
AI SDK 7 では、スキルを一度アップロードし、その後の推論呼び出しで参照を使用できるようにするトップレベルの uploadSkill API が追加されました。uploadFile と同様に、この関数もプロバイダー参照オブジェクトを返します。
Provider Skill Uploads について詳しくはこちら。
MCP Apps
MCP は、エージェントをツールやリソースに接続するための一般的な方法となっています。ただし、すべてのツールがモデルから見える必要があるわけではなく、一部の MCP サーバーはツールとともに専用の UI を公開する必要があります。
AI SDK 7 では MCP Apps のサポートが追加されました。これにより、MCP サーバーはモデルから見えるツールとアプリ専用ツールを分離し、アプリのメタデータを保持した上で、サンドボックス化された iframe 内にアプリ UI をレンダリングできるようになります。JSON-RPC ブリッジによって、ツール、リソース、表示インタラクションが接続されます。
これにより、モデルが必要なツールを使用できる一方で、ユーザーはレビュー、設定、または対話のためにアプリ固有のインターフェースを表示するという、より豊かなエージェント体験を構築することが可能になります。
AI SDK を使って今日から最初の MCP App の構築を開始しましょう。
TUI
エージェントを開発する際、フルなアプリケーションを作成せずに素早くテストできる必要があります。AI SDK 7 では、数行のコードだけでエージェントを実行できるターミナル UI (TUI) パッケージが追加されました:
TUI はインタラクティブであり、推論とツールをサポートし、マークダウンを整形されたテキストとしてレンダリングします。
独自のターミナルエージェントを作成する方法について詳しくはこちらをご覧ください。
エージェントの実行
エージェントがより自律的になり、実行時間が長くなるにつれて、承認、耐久性、サンドボックス化、および堅牢性に対する必要性が高まります。
ツールの承認
AI SDK 7 は、自動処理または人間をループに組み込むことができるエージェントレベルのツール承認をサポートしており、以下の承認タイプがあります:
特定のツールに対するシンプルなユーザー承認。
特定のツールに対して、自動承認、自動拒否、またはユーザー承認への転送を行うことができるツール承認関数。
汎用的なキャッチオール(包括的)ツール承認関数。
ツール承認は、特定のツールの使用シナリオが承認の必要性を駆動するため、ToolLoopAgent、generateText、streamText で定義されます。
よりリスクの高いワークフローでは、AI SDK 7 は偽造された承認を防ぐためのオプトイン HMAC 署名付きツール承認を導入しています。また、実行を継続する前にツール入力とポリシーを再検証することで、リプレイ動作の堅牢性を強化しています。
ツール承認の仕組みについてはこちらをご覧ください。
WorkflowAgent(耐久性)
エージェントの実行が複数のステップにわたる場合や、人間の承認を待機している場合に、その実行中にプロセスが再起動またはデプロイされると、最初からやり直すことになります。AI SDK 7 は、@ai-sdk/workflow と WorkflowAgent を導入し、プロセスの再起動、デプロイ、中断、遅延する承認に耐えうる、耐久性があり再開可能なエージェント実行を実現します。
WorkflowAgent は、ワークフローステップの境界を越えたストリーミング、ツール、承認、コールバック、prepareCall、およびプロバイダーモデルシリアライゼーションをサポートしています。また、共有エージェント状態のための型付きランタイムコンテキストと、安定したテレメトリもサポートしています。
コールバックには now、ステップ番号、以前の結果、実行時間、成功または失敗の情報など、より豊富な実行データが含まれるようになりました。無効なツールの呼び出しは、無効なツールを実行せずに保持され、ツールからモデル出力への変換では、UI やコールバックのために生データを保持することができます。
WorkflowAgent を使用してエージェントを構築する方法について学びましょう。
タイムアウト
エージェントは、単純なリクエスト以上の方法で停止することがあります:プロバイダーがストリームを開いてチャンクの送信を停止する、ツールが応答しなくなる、または多ステップの実行が総予算を超えてしまうことがあります。
AI SDK 7 は、テキスト生成およびエージェント API 全体に、合計、ステップごと、チャンクごと、ツールごとの制限を含む、ファーストクラスのタイムアウト設定を追加しました。タイムアウトによる中止は TimeoutError を使用し、中止の理由はストリームと UI プロトコルを通じて伝播します。
タイムアウトの詳細についてはこちらをご覧ください。
サンドボックスサポート
シェルコマンドの実行やファイルの読み書き、生成されたコードの実行を行うエージェントには、一貫した実行環境が必要ですが、基盤となるサンドボックスはローカル開発、CI、本番環境間で頻繁に異なります。AI SDK 7 は、ツールおよびエージェント内でのポータブルなコマンド実行のためのファーストクラスの SandboxSession 抽象化を追加しました。ツールは特定のサンドボックスに依存せずに開発でき、任意のサンドボックス対応ツールを任意のサンドボックスプロバイダーで使用できます。
Vercel Sandbox などのサンドボックス環境は、この目的に理想的です。
任意のエージェントハネスを統合可能
エージェントランタイムは単一のアプリケーションサーバーを超えて進化しています。チームは、コーディング環境、ホストされたサンドボックス、ローカルセッション、サードパーティのハネス内で同じエージェントロジックを実行したいと考えています。
HarnessAgent
AI SDK 7 では、実験的なハネス抽象化と HarnessAgent が導入されました。Claude Code、Codex、Pi などの完全に設定済みで確立されたエージェントハネスを、単一の API で実行できます。ハネスは、動作するサンドボックス、カスタムインストラクション、スキル、ツールによって構成可能です。一貫したインターフェースを通じて確立されたハネスを実行し、それぞれを独立して設定し、統合層を変更せずに互換性を保ちながら置き換えが可能です。
内部では、この抽象化は v1 アダプタ仕様、ブリッジサポート、セッションの作成と再開のための拡張されたサンドボックスセッションプリミティブで構成されています。ハネスセッションは一時停止(パージ)して再開でき、個々のターンも実行中に中断して再開することが可能です。
HarnessAgent は AI SDK の Agent インターフェースを実装しているため、その generate および stream 戻り値は既存の AI SDK 統合と完全に互換性があり、useChat() と新しい TUI(テキストユーザーインターフェース)も追加の配線なしで動作します。
AI SDK ハネスの詳細についてはこちらをご覧ください。
エージェントの観測
本番環境でのエージェントの振る舞いを理解することは困難です。AI SDK 7 では、観測可能性(オバザビリティ)がエージェント構築における第一級の要素となりました。
テレメトリー
AI SDK 7 は、単一の拡張可能な統合システムを中心にテレメトリを刷新しました。generateText や streamText の呼び出しごとにライフサイクルコールバックを接続するのではなく、アプリケーション起動時に一度だけテレメトリを登録します。
この再設計には以下が含まれます:
サードパーティプロバイダー統合用の専用テレメトリインターフェース
AI SDK 全関数に対する単一の登録による包括的なカバレッジ
最新の GenAI セマンティック規約を使用したオプションの OpenTelemetry 統合(OpenTelemetry)
Node.js トレーシングチャネルサポート
観測性(Observability)統合:Datadog、Langfuse、Braintrust、Raindrop、Sentry、Laminar、Langsmith。
トレースは now、AI オペレーションの完全な形状を捉えます。これには、ルート生成、各モデル呼び出し、個々のステップ、ツール実行、埋め込み(embeddings)、再ランク付け(reranking)、使用状況、エラー、および選択されたランタイムまたはツールのコンテキストが含まれます。
詳細は AI SDK テレメトリドキュメントをご覧ください。
Node.js トレーシングチャネル
AI SDK 7 は、node:diagnostics_channel を介して Node.js トレーシングチャネルのサポートを追加しました。SDK は generateText、streamText、モデル呼び出し、ツール実行、埋め込み(embeddings)、再ランク付け(reranking)に対して、ai:telemetry チャンネルで構造化されたテレメトリイベントを出力します。
観測性プロバイダーは、そのインストルメンテーションパッケージを通じて一度だけ購読し、AI SDK のアクティビティを自動的にトレースに変換できます。これにより、ストリーミングレスポンスやツール呼び出し全体で非同期コンテキストが保持されます。
詳細はトレーシングチャネルドキュメントをご覧ください。
パフォーマンス統計
AI SDK 7 は、モデル出力、ストリーミング動作、ツール実行に関するステップごとのパフォーマンス統計機能を追加しました。これにより、「モデルが応答を開始するまでにどれくらい時間がかかったか?」「トークンはどのくらいの速度で到着したか?」「どのツールが最も時間を要したか?」といった質問に回答できるようになります。
パフォーマンス統計の詳細については、こちらをご覧ください。
ライフサイクルイベント
本番環境のエージェントでは、状態の記録、課金処理、デバッグのすべてが、実行、ステップ、ツールの開始と終了を正確に把握できるライフサイクルフックを必要とします。AI SDK 7 では、モデル呼び出し、エージェント、ツール、その他の関数全体でコールバックが一貫して発火するように改良され、各イベントの開始時刻、使用されたモデル、トークン数、完了方法などを観測できるようになりました。
詳細は「ライフサイクルコールバック」ドキュメントをご覧ください。
プロバイダー非依存リアルタイムサポート
リアルタイムモデル API は強力ですが、各プロバイダーはセッション、オーディオ、ツール、ブラウザ認証の扱い方をそれぞれ異なっています。
AI SDK 7 では、直接ブラウザ上の WebSocket セッションを対象とした実験的なプロバイダー非依存リアルタイムサポートを追加しました。この SDK は、サーバーが作成した一時的トークンのサポート、OpenAI、Google、xAI 向けのプロバイダー実装、そして UIMessage[] を返す React リアルタイムフックをサポートしています。
リアルタイムセッションではオーディオの文字起こしとクライアント主導のツール呼び出しに対応しているため、UI を特定のプロバイダーのイベント形式に縛られることなく、音声エージェントや共同コパイロット、低遅延のインタラクティブインターフェースを構築できます。
AI Gateway は、gateway.experimental_realtime() を通じて正規化されたリアルタイムセッションもサポートしており、WebSocket サブプロトコル認証、モデルクエリ選択、検証済みプロバイダーオプションが含まれます。
リアルタイムに関する詳細はこちらをご覧ください。
動画生成
AI アプリケーションはテキストや画像の領域を超えて拡大しています。AI SDK 7 では、fal、Google AI Studio、Google Vertex、Replicate の各プロバイダー向けの実装を含む実験的な generateVideo サポートが導入されました。
AI SDK 7 における動画生成では、動画固有のモデル解像度を使用し、デフォルトのプロバイダーを介した文字列ベースのモデル検索をサポートしており、設定可能なサイズ制限と中止機能を含む安全なバウンドされたダウンロード処理も含まれています。
動画生成に関する詳細はこちらをご覧ください。
はじめに
1 つのコマンドで AI SDK 7 をインストールできます。
AI SDK 7 の始め方
完全な変更履歴を確認する
v7 へのマイグレーション
コミュニティに参加する
貢献者
AI SDK 7 は、Vercel のコアチーム(Gregor, Lars, Felix, Aayush, Josh, Nico)と素晴らしい貢献者コミュニティの共同作業の結果です。
0xr3ngar, 31Carlton7, A-Vamshi, Abdulwadood-zawity, abhicris, adithya-tako, AhmadYasser1, ahmedrowaihi, allenzhou101, anaclumos, arnaugomez, auscaster, AVtheking, B-Step62, bb220, ben-vargas, benyebai, bittere, blurrah, bolaabanjo, boylec, BrianHung, BrianP8701, chenxin-yan, christian-bromann, Christian-Sidak, cipher416, CloudFaye, codewarnab, codicecustode, codylittle, cristiandrei1234, csidak, ctate, cyphercodes, defrex, dflynn15, dinmukhamedm, dnukumamras, DongSeonYoo, dukex, edawerd, EdwardIrby, edwardwc, ellis-driscoll, embedder-dev, etairl, EurFelux, eyueldk, fahe1em1, Falven, fran3cc, gdborton, genmin, geraint0923, Ghitahouir, GidianB, grant0417, gsdv, guillemwilly, hank9999, harpreetarora, haydenbleasel, he-yufeng, heiwen, hkd987, hntrl, http-samc, i5d6, ismaelrumzan, Jaaneek, jaderiverstokes, jakobhoeg, Jaksenc, jarod, jaydeep-pipaliya, jeremyphilemon, jerilynzheng, jerome-benoit, jferrettiboke, jlsandri, JoanLaRosa, joaopedroassad, JohnnyHBon, josh-williams, jovanwongzixi, JulesGuesnon, Kage18, kagura-agent, kairosci, kaizen403, karthik-idikuda, kimchnn, kkawamu1, kkdawkins, leog25, leothorp, liaoliaojun, lihuimingxs, Mahendradeokar, MarcACard, marcusschiesser, markmcd, max-programming, MaxwellCalkin, mclenhard, MehediH, Melkeydev, michael-han-dev, michaelcummings12, Mmartinrusso, monadoid, montyanderson, more-by-more, mrpaaradox, msullivan, muniter, muraliavarma, murataslan1, mvanhorn, myprototypewhat, Nezz, nicoloboschi, nielskaspers, Nutlope, nwalters512, ohansFavour, ousugo, pablof7z, Pash10g, patrikdevlin, paulelliotco, pavel-y-ivanov, PierreLeGuen, posva, Pranav-Wadhwa, privatenumber, quuu, R-Taneja, raphaeleidus, reynkonig, Ricardo-M-L, richardsolomou, robechun, rubdos, samjbobb, SamyPesse, seojcarlos, shaper, shrey150, shubham-021, shujanislam, ShyamSathish005, sleitor, Subr1ata, syeddhasnainn, sylviezhang37, szymonrybczak, t-mdo, techwraith, theQuert, thestonechat, timvucina-soniox, tomdale, tresorama, tsuzaki430, turisanapo, Und3rf10w, undo76, ushiromiya-lion, visyat, wong2, Xiang-CH, xlianghang, zapagenrevdale, Zawwarsami16, zirkelc, zxuhan.
GitHub における皆様からのフィードバック、バグ報告、プルリクエストは、今回のリリースの形成に不可欠な役割を果たしました。これらの新機能を使って皆様がどのようなものを作り出すか、私たちも大変楽しみにしています!
続きを読む
原文を表示
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.
Develop agents
Building well-behaved agents requires fine-grained control over model reasoning, tool context, and file handling.
Reasoning 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.
Learn more in the reasoning documentation.
Tool 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.
Learn more about Tool Context
Runtime 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.
Learn more about Runtime Context.
Provider 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.
Learn more about Provider File Uploads
Provider 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.
Learn more about Provider Skill Uploads.
MCP 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.
Start building your first MCP App with AI SDK today.
TUI
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.
Learn more about creating your own terminal agent.
Run agents
As agents become more autonomous and longer running, the need for approvals, durability, sandboxing, and robustness increases.
Tool 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.
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.
WorkflowAgent (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.
Timeouts
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.
Learn more about timeouts.
Sandbox 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.
Integrate 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.
HarnessAgent
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.
Learn more about AI SDK Harnesses.
Observe agents
Understanding how your agents behave in production is challenging. AI SDK 7 makes observability a first-class part of building agents.
Telemetry
AI SDK 7 revamps telemetry around a single, extensible integration system. Instead of wiring lifecycle callbacks into every generateText or streamText call, register telemetry once at application startup:
The redesign includes:
Dedicated telemetry interfaces for 3rd-party provider integration
Global coverage of all AI SDK functions with a single registration
Optional OpenTelemetry integration using the latest GenAI semantic conventions
Node.js tracing channel support
Observability integrations: Datadog, Langfuse, Braintrust, Raindrop, Sentry, Laminar, Langsmith.
Traces now capture the full shape of an AI operation, including the root generation, each model call, individual steps, tool executions, embeddings, reranking, usage, errors, and selected runtime or tool context.
You can find more details in the AI SDK Telemetry documentation.
Node.js tracing channel
AI SDK 7 adds support for Node.js tracing channels via node:diagnostics_channel. The SDK emits structured telemetry events on the ai:telemetry channel for generateText, streamText, model calls, tool executions, embeddings, and reranking.
An observability provider can subscribe once via its instrumentation package and automatically convert AI SDK activity into traces, preserving async context across streaming responses and tool calls.
You can learn more in the tracing channel documentation.
Performance statistics
AI SDK 7 adds per-step performance statistics for model output, streaming behavior, and tool execution. You can answer questions like: How long did it take the model to start responding? How fast did tokens arrive? Which tool took the most time?
Learn more about performance statistics.
Lifecycle events
Production agents need lifecycle hooks because recording state, billing, and debugging all depend on knowing exactly when runs, steps, and tools start and finish. AI SDK 7 makes callbacks fire consistently across model calls, agents, tools, and other functions, so you can observe when each started, which model ran, how many tokens it used, and how it finished.
You can find more details in the Lifecycle Callbacks documentation.
Provider-agnostic realtime support
Realtime model APIs are powerful, but each provider exposes sessions, audio, tools, and browser authentication differently.
AI SDK 7 adds experimental provider-agnostic realtime support for direct browser WebSocket sessions. The SDK supports server-created ephemeral tokens, provider implementations for OpenAI, Google, and xAI, and a React realtime hook that returns UIMessage[].
Realtime sessions support audio transcription and client-driven tool calling, so you can build voice agents, collaborative copilots, and low-latency interactive interfaces without binding your UI to one provider's event format.
AI Gateway also supports normalized realtime sessions through gateway.experimental_realtime(), including WebSocket subprotocol auth, model query selection, and validated provider options.
Learn more about realtime.
Video generation
AI applications are expanding beyond text and images. AI SDK 7 introduces experimental generateVideo support with provider implementations for fal, Google AI Studio, Google Vertex, and Replicate.
Video generation in AI SDK 7 uses video-specific model resolution, supports string-based model lookup through the default provider, and includes safer bounded download handling with configurable size limits and abort support.
Learn more about generating video.
Getting started
Install AI SDK 7 with one command.
Get started with AI SDK 7
Check out the full changelog
Migrate to v7
Join the community
Contributors
AI SDK 7 is the result of the combined work of our core team at Vercel (Gregor, Lars, Felix, Aayush, Josh, Nico) and our amazing community of contributors:
0xr3ngar, 31Carlton7, A-Vamshi, Abdulwadood-zawity, abhicris, adithya-tako, AhmadYasser1, ahmedrowaihi, allenzhou101, anaclumos, arnaugomez, auscaster, AVtheking, B-Step62, bb220, ben-vargas, benyebai, bittere, blurrah, bolaabanjo, boylec, BrianHung, BrianP8701, chenxin-yan, christian-bromann, Christian-Sidak, cipher416, CloudFaye, codewarnab, codicecustode, codylittle, cristiandrei1234, csidak, ctate, cyphercodes, defrex, dflynn15, dinmukhamedm, dnukumamras, DongSeonYoo, dukex, edawerd, EdwardIrby, edwardwc, ellis-driscoll, embedder-dev, etairl, EurFelux, eyueldk, fahe1em1, Falven, fran3cc, gdborton, genmin, geraint0923, Ghitahouir, GidianB, grant0417, gsdv, guillemwilly, hank9999, harpreetarora, haydenbleasel, he-yufeng, heiwen, hkd987, hntrl, http-samc, i5d6, ismaelrumzan, Jaaneek, jaderiverstokes, jakobhoeg, Jaksenc, jarod, jaydeep-pipaliya, jeremyphilemon, jerilynzheng, jerome-benoit, jferrettiboke, jlsandri, JoanLaRosa, joaopedroassad, JohnnyHBon, josh-williams, jovanwongzixi, JulesGuesnon, Kage18, kagura-agent, kairosci, kaizen403, karthik-idikuda, kimchnn, kkawamu1, kkdawkins, leog25, leothorp, liaoliaojun, lihuimingxs, Mahendradeokar, MarcACard, marcusschiesser, markmcd, max-programming, MaxwellCalkin, mclenhard, MehediH, Melkeydev, michael-han-dev, michaelcummings12, Mmartinrusso, monadoid, montyanderson, more-by-more, mrpaaradox, msullivan, muniter, muraliavarma, murataslan1, mvanhorn, myprototypewhat, Nezz, nicoloboschi, nielskaspers, Nutlope, nwalters512, ohansFavour, ousugo, pablof7z, Pash10g, patrikdevlin, paulelliotco, pavel-y-ivanov, PierreLeGuen, posva, Pranav-Wadhwa, privatenumber, quuu, R-Taneja, raphaeleidus, reynkonig, Ricardo-M-L, richardsolomou, robechun, rubdos, samjbobb, SamyPesse, seojcarlos, shaper, shrey150, shubham-021, shujanislam, ShyamSathish005, sleitor, Subr1ata, syeddhasnainn, sylviezhang37, szymonrybczak, t-mdo, techwraith, theQuert, thestonechat, timvucina-soniox, tomdale, tresorama, tsuzaki430, turisanapo, Und3rf10w, undo76, ushiromiya-lion, visyat, wong2, Xiang-CH, xlianghang, zapagenrevdale, Zawwarsami16, zirkelc, zxuhan.
Your feedback, bug reports, and pull requests on GitHub have been instrumental in shaping this release. We're excited to see what you'll build with these new capabilities!
Read more
関連記事
テキスト、画像、音声、動画を処理する 5 つのオープンソース・オムニ AI モデル
KDnuggets は、テキスト、画像、音声、動画のすべてのメディアタイプを処理できる 5 つの主要なオープンソース型オムニ AI モデルを紹介した。
2026 年に AI エンジニアになるためのロードマップ
KDnuggets が、2026 年までに AI エンジニアとして活躍するための学習ロードマップを提示している。
AI #174:あなた自身こそが重要
Zvi氏の記事では、Fable の復旧見込みやNY-12選挙の結果に加え、GLM-5.2 が新世代の最良オープンモデルとなったと報告しています。ただしコストが高いため、ローカル実行が必要なエージェント用途に限定される可能性があります。
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み