{"slug": "ai-sdk-7", "title": "AI SDK 7", "summary": "Vercel released AI SDK 7, a major update to its TypeScript SDK for building AI applications, adding production-grade features for agent development, including reasoning control, tool context, runtime context, file and skill uploads, and MCP support. The SDK, which powers Vercel's open-source agent framework Eve, now supports agent harness integration, observability, and provider-agnostic real-time and video generation capabilities.", "body_md": "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](https://vercel.com/eve), Vercel's open-source agent framework, is built on.\n\nAI SDK 7 adds production depth for agent work across five areas:\n\n**Develop agents** with reasoning control, tool and runtime context, provider files and skills support, MCP Apps, and a terminal UI.\n\n**Run agents** with tool approvals, durability (`WorkflowAgent`\n\n), timeouts, and sandbox support.\n\n**Integrate any agent harness,** such as Codex, Claude Code, Deep Agents, OpenCode, or Pi.\n\n**Observe agents** with telemetry, Node.js tracing channel, lifecycle events, and performance statistics.\n\n**Go beyond text agents** with provider-agnostic real-time support and video generation.\n\nBuilding well-behaved agents requires fine-grained control over model reasoning, tool context, and file handling.\n\nMost frontier models support configurable reasoning, but every provider API exposes it differently.\n\nAI SDK 7 standardizes this with a `reasoning`\n\noption for `generateText`\n\nand `streamText`\n\n. 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.\n\nLearn more in the [reasoning documentation](https://ai-sdk.dev/docs/ai-sdk-core/reasoning).\n\nTools 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.\n\nAI 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.\n\nLearn more about [Tool Context](https://ai-sdk.dev/docs/ai-sdk-core/runtime-and-tool-context#tool-context)\n\nFor more complex agentic loops, you often need variables that you can access and modify in `prepareStep`\n\nto adjust prompts, model selection, and more.\n\nAI 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`\n\nand share those agents with that internal logic.\n\nLearn more about [Runtime Context](https://ai-sdk.dev/docs/ai-sdk-core/runtime-and-tool-context).\n\nMany 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.\n\nAI SDK 7 adds a top-level `uploadFile`\n\nAPI 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.\n\n`uploadFile`\n\ncan be used with any providers that offer a file uploading endpoint. The function returns a provider reference object that is portable across providers.\n\nLearn more about [Provider File Uploads](https://ai-sdk.dev/docs/ai-sdk-core/file-uploads)\n\nSending skills inline on every request to provider-managed container environments has the same overhead problem as sending files inline.\n\nAI SDK 7 adds a top-level `uploadSkill`\n\nAPI that lets you upload a skill once and then use a reference to it in subsequent inference calls. Similar to `uploadFile`\n\n, the function returns a provider reference object.\n\nLearn more about [Provider Skill Uploads](https://ai-sdk.dev/docs/ai-sdk-core/skill-uploads).\n\nMCP 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.\n\nAI 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.\n\nThis 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.\n\nStart building your first [MCP App with AI SDK](https://ai-sdk.dev/docs/ai-sdk-core/mcp-apps) today.\n\nWhen 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:\n\nThe TUI is interactive, supports reasoning and tools, and renders markdown as formatted text.\n\nLearn more about [creating your own terminal agent](https://ai-sdk.dev/docs/ai-sdk-harnesses/terminal-ui).\n\nAs agents become more autonomous and longer running, the need for approvals, durability, sandboxing, and robustness increases.\n\nAI SDK 7 supports agent-level tool approvals that can be automatic or involve a human in the loop, with these approval types:\n\nSimple `user-approval`\n\nfor particular tools.\n\nTool approval function for a particular tool that can auto-approve, auto-deny, or forward to user approval.\n\nGeneric catch-all tool approval functions.\n\nTool approvals are defined on `ToolLoopAgent`\n\n, `generateText`\n\n, and `streamText`\n\n, because the usage scenario of a particular tool drives the need for approvals.\n\nFor 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.\n\nWhen 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`\n\nand `WorkflowAgent`\n\nfor durable, resumable agent execution that survives process restarts, deploys, interruptions, and delayed approvals.\n\n`WorkflowAgent`\n\nsupports workflow-based streaming, tools, approvals, callbacks, `prepareCall`\n\n, and provider model serialization across workflow step boundaries. It also supports typed runtime context for shared agent state and stable telemetry.\n\nCallbacks 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`\n\nconversion can preserve raw outputs for UI and callbacks.\n\nLearn how to [build an agent with WorkflowAgent](https://ai-sdk.dev/docs/agents/workflow-agent).\n\nAgents 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.\n\nAI 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`\n\n, and abort reasons propagate through stream and UI protocols.\n\nLearn more about [timeouts](https://ai-sdk.dev/docs/ai-sdk-core/settings#timeout).\n\nAgents 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`\n\nabstraction 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.\n\nSandboxed environments, such as [Vercel Sandbox](https://vercel.com/sandbox), are ideal for this purpose.\n\nAgent 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.\n\nAI SDK 7 introduces experimental harness abstractions and `HarnessAgent`\n\n: 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.\n\nUnder 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.\n\n`HarnessAgent`\n\nimplements AI SDK's `Agent`\n\ninterface, so its `generate`\n\nand `stream`\n\nreturn values are fully compatible with existing AI SDK integrations, and `useChat()`\n\nand the new TUI work without any additional wiring.\n\nLearn more about [AI SDK Harnesses](https://ai-sdk.dev/v7/docs/ai-sdk-harnesses).\n\nUnderstanding how your agents behave in production is challenging. AI SDK 7 makes observability a first-class part of building agents.\n\nAI SDK 7 revamps telemetry around a single, extensible integration system. Instead of wiring lifecycle callbacks into every `generateText`\n\nor `streamText`\n\ncall, register telemetry once at application startup:\n\nThe redesign includes:\n\nDedicated telemetry interfaces for 3rd-party provider integration\n\nGlobal coverage of all AI SDK functions with a single registration\n\nOptional OpenTelemetry integration using the latest GenAI semantic conventions\n\nNode.js tracing channel support\n\nObservability integrations: Datadog, Langfuse, Braintrust, Raindrop, Sentry, Laminar, Langsmith.\n\nTraces 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.\n\nYou can find more details in the [AI SDK Telemetry documentation](https://ai-sdk.dev/docs/ai-sdk-core/telemetry).\n\nAI SDK 7 adds support for Node.js tracing channels via `node:diagnostics_channel`\n\n. The SDK emits structured telemetry events on the `ai:telemetry`\n\nchannel for `generateText`\n\n, `streamText`\n\n, model calls, tool executions, embeddings, and reranking.\n\nAn 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.\n\nYou can learn more in the [tracing channel documentation](https://ai-sdk.dev/docs/ai-sdk-core/telemetry#tracing-channel).\n\nAI 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?\n\nLearn more about [performance statistics](https://ai-sdk.dev/docs/ai-sdk-core/generating-text).\n\nProduction 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.\n\nYou can find more details in the [Lifecycle Callbacks documentation](https://ai-sdk.dev/docs/ai-sdk-core/lifecycle-callbacks).\n\nRealtime model APIs are powerful, but each provider exposes sessions, audio, tools, and browser authentication differently.\n\nAI 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[]`\n\n.\n\nRealtime 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.\n\nAI Gateway also supports normalized realtime sessions through `gateway.experimental_realtime()`\n\n, including WebSocket subprotocol auth, model query selection, and validated provider options.\n\nLearn more about [realtime](https://ai-sdk.dev/docs/ai-sdk-core/realtime).\n\nAI applications are expanding beyond text and images. AI SDK 7 introduces experimental `generateVideo`\n\nsupport with provider implementations for fal, Google AI Studio, Google Vertex, and Replicate.\n\nVideo 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.\n\nLearn more about [generating video](https://ai-sdk.dev/docs/reference/ai-sdk-core/generate-video#experimental_generatevideo).\n\nInstall AI SDK 7 with one command.\n\nAI 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:\n\n[0xr3ngar](https://github.com/0xr3ngar), [31Carlton7](https://github.com/31Carlton7), [A-Vamshi](https://github.com/A-Vamshi), [Abdulwadood-zawity](https://github.com/Abdulwadood-zawity), [abhicris](https://github.com/abhicris), [adithya-tako](https://github.com/adithya-tako), [AhmadYasser1](https://github.com/AhmadYasser1), [ahmedrowaihi](https://github.com/ahmedrowaihi), [allenzhou101](https://github.com/allenzhou101), [anaclumos](https://github.com/anaclumos), [arnaugomez](https://github.com/arnaugomez), [auscaster](https://github.com/auscaster), [AVtheking](https://github.com/AVtheking), [B-Step62](https://github.com/B-Step62), [bb220](https://github.com/bb220), [ben-vargas](https://github.com/ben-vargas), [benyebai](https://github.com/benyebai), [bittere](https://github.com/bittere), [blurrah](https://github.com/blurrah), [bolaabanjo](https://github.com/bolaabanjo), [boylec](https://github.com/boylec), [BrianHung](https://github.com/BrianHung), [BrianP8701](https://github.com/BrianP8701), [chenxin-yan](https://github.com/chenxin-yan), [christian-bromann](https://github.com/christian-bromann), [Christian-Sidak](https://github.com/Christian-Sidak), [cipher416](https://github.com/cipher416), [CloudFaye](https://github.com/CloudFaye), [codewarnab](https://github.com/codewarnab), [codicecustode](https://github.com/codicecustode), [codylittle](https://github.com/codylittle), [cristiandrei1234](https://github.com/cristiandrei1234), [csidak](https://github.com/csidak), [ctate](https://github.com/ctate), [cyphercodes](https://github.com/cyphercodes), [defrex](https://github.com/defrex), [dflynn15](https://github.com/dflynn15), [dinmukhamedm](https://github.com/dinmukhamedm), [dnukumamras](https://github.com/dnukumamras), [DongSeonYoo](https://github.com/DongSeonYoo), [dukex](https://github.com/dukex), [edawerd](https://github.com/edawerd), [EdwardIrby](https://github.com/EdwardIrby), [edwardwc](https://github.com/edwardwc), [ellis-driscoll](https://github.com/ellis-driscoll), [embedder-dev](https://github.com/embedder-dev), [etairl](https://github.com/etairl), [EurFelux](https://github.com/EurFelux), [eyueldk](https://github.com/eyueldk), [fahe1em1](https://github.com/fahe1em1), [Falven](https://github.com/Falven), [fran3cc](https://github.com/fran3cc), [gdborton](https://github.com/gdborton), [genmin](https://github.com/genmin), [geraint0923](https://github.com/geraint0923), [Ghitahouir](https://github.com/Ghitahouir), [GidianB](https://github.com/GidianB), [grant0417](https://github.com/grant0417), [gsdv](https://github.com/gsdv), [guillemwilly](https://github.com/guillemwilly), [hank9999](https://github.com/hank9999), [harpreetarora](https://github.com/harpreetarora), [haydenbleasel](https://github.com/haydenbleasel), [he-yufeng](https://github.com/he-yufeng), [heiwen](https://github.com/heiwen), [hkd987](https://github.com/hkd987), [hntrl](https://github.com/hntrl), [http-samc](https://github.com/http-samc), [i5d6](https://github.com/i5d6), [ismaelrumzan](https://github.com/ismaelrumzan), [Jaaneek](https://github.com/Jaaneek), [jaderiverstokes](https://github.com/jaderiverstokes), [jakobhoeg](https://github.com/jakobhoeg), [Jaksenc](https://github.com/Jaksenc), [jarod](https://github.com/jarod), [jaydeep-pipaliya](https://github.com/jaydeep-pipaliya), [jeremyphilemon](https://github.com/jeremyphilemon), [jerilynzheng](https://github.com/jerilynzheng), [jerome-benoit](https://github.com/jerome-benoit), [jferrettiboke](https://github.com/jferrettiboke), [jlsandri](https://github.com/jlsandri), [JoanLaRosa](https://github.com/JoanLaRosa), [joaopedroassad](https://github.com/joaopedroassad), [JohnnyHBon](https://github.com/JohnnyHBon), [josh-williams](https://github.com/josh-williams), [jovanwongzixi](https://github.com/jovanwongzixi), [JulesGuesnon](https://github.com/JulesGuesnon), [Kage18](https://github.com/Kage18), [kagura-agent](https://github.com/kagura-agent), [kairosci](https://github.com/kairosci), [kaizen403](https://github.com/kaizen403), [karthik-idikuda](https://github.com/karthik-idikuda), [kimchnn](https://github.com/kimchnn), [kkawamu1](https://github.com/kkawamu1), [kkdawkins](https://github.com/kkdawkins), [leog25](https://github.com/leog25), [leothorp](https://github.com/leothorp), [liaoliaojun](https://github.com/liaoliaojun), [lihuimingxs](https://github.com/lihuimingxs), [Mahendradeokar](https://github.com/Mahendradeokar), [MarcACard](https://github.com/MarcACard), [marcusschiesser](https://github.com/marcusschiesser), [markmcd](https://github.com/markmcd), [max-programming](https://github.com/max-programming), [MaxwellCalkin](https://github.com/MaxwellCalkin), [mclenhard](https://github.com/mclenhard), [MehediH](https://github.com/MehediH), [Melkeydev](https://github.com/Melkeydev), [michael-han-dev](https://github.com/michael-han-dev), [michaelcummings12](https://github.com/michaelcummings12), [Mmartinrusso](https://github.com/Mmartinrusso), [monadoid](https://github.com/monadoid), [montyanderson](https://github.com/montyanderson), [more-by-more](https://github.com/more-by-more), [mrpaaradox](https://github.com/mrpaaradox), [msullivan](https://github.com/msullivan), [muniter](https://github.com/muniter), [muraliavarma](https://github.com/muraliavarma), [murataslan1](https://github.com/murataslan1), [mvanhorn](https://github.com/mvanhorn), [myprototypewhat](https://github.com/myprototypewhat), [Nezz](https://github.com/Nezz), [nicoloboschi](https://github.com/nicoloboschi), [nielskaspers](https://github.com/nielskaspers), [Nutlope](https://github.com/Nutlope), [nwalters512](https://github.com/nwalters512), [ohansFavour](https://github.com/ohansFavour), [ousugo](https://github.com/ousugo), [pablof7z](https://github.com/pablof7z), [Pash10g](https://github.com/Pash10g), [patrikdevlin](https://github.com/patrikdevlin), [paulelliotco](https://github.com/paulelliotco), [pavel-y-ivanov](https://github.com/pavel-y-ivanov), [PierreLeGuen](https://github.com/PierreLeGuen), [posva](https://github.com/posva), [Pranav-Wadhwa](https://github.com/Pranav-Wadhwa), [privatenumber](https://github.com/privatenumber), [quuu](https://github.com/quuu), [R-Taneja](https://github.com/R-Taneja), [raphaeleidus](https://github.com/raphaeleidus), [reynkonig](https://github.com/reynkonig), [Ricardo-M-L](https://github.com/Ricardo-M-L), [richardsolomou](https://github.com/richardsolomou), [robechun](https://github.com/robechun), [rubdos](https://github.com/rubdos), [samjbobb](https://github.com/samjbobb), [SamyPesse](https://github.com/SamyPesse), [seojcarlos](https://github.com/seojcarlos), [shaper](https://github.com/shaper), [shrey150](https://github.com/shrey150), [shubham-021](https://github.com/shubham-021), [shujanislam](https://github.com/shujanislam), [ShyamSathish005](https://github.com/ShyamSathish005), [sleitor](https://github.com/sleitor), [Subr1ata](https://github.com/Subr1ata), [syeddhasnainn](https://github.com/syeddhasnainn), [sylviezhang37](https://github.com/sylviezhang37), [szymonrybczak](https://github.com/szymonrybczak), [t-mdo](https://github.com/t-mdo), [techwraith](https://github.com/techwraith), [theQuert](https://github.com/theQuert), [thestonechat](https://github.com/thestonechat), [timvucina-soniox](https://github.com/timvucina-soniox), [tomdale](https://github.com/tomdale), [tresorama](https://github.com/tresorama), [tsuzaki430](https://github.com/tsuzaki430), [turisanapo](https://github.com/turisanapo), [Und3rf10w](https://github.com/Und3rf10w), [undo76](https://github.com/undo76), [ushiromiya-lion](https://github.com/ushiromiya-lion), [visyat](https://github.com/visyat), [wong2](https://github.com/wong2), [Xiang-CH](https://github.com/Xiang-CH), [xlianghang](https://github.com/xlianghang), [zapagenrevdale](https://github.com/zapagenrevdale), [Zawwarsami16](https://github.com/Zawwarsami16), [zirkelc](https://github.com/zirkelc), [zxuhan](https://github.com/zxuhan.).\n\nYour 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!", "url": "https://wpnews.pro/news/ai-sdk-7", "canonical_source": "https://vercel.com/blog/ai-sdk-7", "published_at": "2026-06-25 13:00:00+00:00", "updated_at": "2026-06-25 13:14:43.642467+00:00", "lang": "en", "topics": ["ai-tools", "ai-agents", "developer-tools", "large-language-models", "ai-infrastructure"], "entities": ["Vercel", "AI SDK", "Eve", "Codex", "Claude Code", "Deep Agents", "OpenCode", "Pi"], "alternates": {"html": "https://wpnews.pro/news/ai-sdk-7", "markdown": "https://wpnews.pro/news/ai-sdk-7.md", "text": "https://wpnews.pro/news/ai-sdk-7.txt", "jsonld": "https://wpnews.pro/news/ai-sdk-7.jsonld"}}