跳到主要内容Skip to main content
← Frameworks

Vercel AI SDK 7Vercel AI SDK 7

VercelVercel
开源Open source TypeScriptTypeScript Agent框架Agent framework 多模型Multiple models HarnessHarness partial lifecycle: active 核验Checked 2026-11-03

AI SDK 7 是 TypeScript/JS 的 agent 应用工具箱:统一的模型调用、工具调用与流式输出, 新增 HarnessAgent 后还能把 Claude Code、Codex、Pi 等既有 agent 运行时当成可切换后端。

跨大类对照:Cursor。

A TypeScript/JS agent toolkit: unified model and tool calls plus streaming, and with HarnessAgent it can treat Claude Code, Codex, Pi and other runtimes as switchable backends.

适合与不适合When to use it, when not to

适合:TypeScript/JS 团队自建 agent 应用,想保留业务代码、只切换模型或 harness。 不适合:要成品 agent(看 coding/chat 类产品);要 Python 生态(看 LangGraph、Agno)。

Fits TypeScript/JS teams building agent apps who want to switch models or harnesses without rewriting business code. Does not fit turnkey agents (see coding/chat products) or Python ecosystems (see LangGraph/Agno).

中文生态China availability 国产 / 国内可直接用 / 备案状态 · 快照domestic / direct access / CAC filing · snapshot 2026-11-03

出品属地Origin
国外出品foreign-made Vercel(美国)。Vercel (US).
国内使用Direct access
大陆可直连direct OK vercel.com 大陆直连未核验;官方文档与 npm 包通常可经镜像获取。Direct reachability from mainland not verified; official docs and npm packages are usually available through mirrors.
备案状态CAC filing
未见于备案名单not in filing list:未见于网信办公示名单(2026-11-03 检索);开源库未面向大陆公众提供服务,备案不适用。Not in the CAC public registry (searched 2026-11-03); the open-source library does not serve the mainland public, so filing does not apply.

备案信息以网信办《生成式人工智能服务已备案信息》公示名单为准(按批次滚动更新,本站只抄编号不解读);「大陆可直连」是本站从大陆网络直连实测的结果,不是厂商承诺。GitHub 类站点当日实测有波动,口径写在依据里。Filing status is quoted from the CAC public registry (updated batch by batch; this site copies the number and does not interpret it). "Direct access" is this site's own reachability measurement from a mainland network, not a vendor promise. GitHub-hosted sites fluctuated on the measurement day — the note says so.

固定坐标系Fixed coordinate system

8 个维度dimensions, 与同分区其他对象逐项可比each comparable item by item against others in the same section.

模型与开放条件Model & openness

通过 provider 包接多家模型供应商;模型切换在应用代码里完成。 AI SDK 7 新增 HarnessAgent,可把既有 agent harness 当成可切换运行时(官方 changelog)。

Connects to multiple model providers through provider packages; model switching happens in application code. AI SDK 7 adds HarnessAgent, which treats existing agent harnesses as switchable runtimes (official changelog).

运行位置Where it runs

TypeScript/JavaScript 库,运行在你的 Node/边缘/浏览器应用里;harness adapters 负责驱动 Claude Code、Codex、Pi 等外部 agent 运行时,sandbox 由适配器提供(官方示例用 Vercel Sandbox)。

A TypeScript/JavaScript library running inside your Node, edge or browser app; harness adapters drive external agent runtimes such as Claude Code, Codex and Pi, with sandboxes supplied by the adapter (the official example uses Vercel Sandbox).

本地文件Local files

文件访问取决于 harness 与 sandbox:官方示例通过 createVercelSandbox 提供隔离文件系统; 本地文件访问能力未逐条核验。

File access depends on the harness and sandbox: the official example uses createVercelSandbox for an isolated filesystem; local-file access not verified item by item.

关机后的任务Tasks after shutdown

库本身不提供任务队列;长任务是否能在后台继续,取决于所选 harness 与 sandbox 的运行时。

The library ships no task queue; whether long tasks continue in the background depends on the chosen harness and sandbox runtime.

工具与扩展Tools & extensions

工具调用是核心抽象;官方 changelog 展示 HarnessAgent 与 sandbox 组合。 MCP 接入未逐条核验。

Tool calling is a core abstraction; the official changelog shows HarnessAgent combined with sandboxes. MCP integration not verified item by item.

上下文与记忆Context & memory

消息历史由应用管理;库本身不内建持久化,需要自己接数据库或会话存储。

Message history is managed by the application; the library has no built-in persistence, so you attach a database or session store yourself.

权限与限制Permissions & limits

BYOK 为主,密钥在应用侧;sandbox 边界由 harness 适配器决定, 官方示例把 Vercel Sandbox 作为隔离层。多租户隔离需自行设计。

Mostly BYOK with keys on the application side; sandbox boundaries come from the harness adapter, and the official example uses Vercel Sandbox as the isolation layer. Multi-tenant isolation is your design.

适合什么任务Best for

适合:TypeScript/JS 团队自建 agent 应用,想在不改业务代码的前提下切换模型或 harness。 不适合:要开箱即用的成品 agent(看 coding/chat 类产品);要 Python 生态(看 LangGraph/Agno)。

Fits TypeScript/JS teams building agent apps who want to switch models or harnesses without rewriting business code. Does not fit turnkey agents (see coding/chat products) or Python ecosystems (see LangGraph/Agno).

头号误解Top misconception

  • 把 HarnessAgent 当成「内置 Claude Code」——它是适配层,仍需相应 harness 与运行环境Treating HarnessAgent as "Claude Code built in" — it is an adapter layer and still needs the harness and runtime
  • 以为换 harness 不用改权限模型——不同 harness 的工具面与沙箱边界不同Assuming switching harness needs no permission changes — different harnesses expose different tools and sandbox boundaries
  • 把库当成托管服务——AI SDK 不替你跑任务队列Treating the library as a hosted service — AI SDK does not run a task queue for you

未知项清单Known unknowns

  • MCP 接入的官方支持状态(未逐条核验)
  • 各 harness 适配器的权限与沙箱差异(未逐条核验)
  • 本地文件访问能力与 Vercel Sandbox 之外的适配器
  • Official support status for MCP integration (not verified item by item)
  • Permission and sandbox differences across harness adapters (not verified item by item)
  • Local-file access and adapters beyond Vercel Sandbox

证据来源Evidence sources

判断可回到以下一手源复核。本站核验日Every judgement can be rechecked against the primary sources below. Verified on 2026-11-03,内容更新日content updated on 2026-11-03。

类型Type名称Name链接Link
changelogVercel · AI SDK 7 is now available(2026 changelog,HarnessAgent 与 harness adapters;2026-11-03 复核官方页)Vercel · AI SDK 7 is now available (2026 changelog, HarnessAgent and harness adapters)https://vercel.com/changelog/ai-sdk-7
docsVercel · Program Claude Code, Codex, Pi and other agent harnesses with AI SDK(2026-06-12)Vercel · Program Claude Code, Codex, Pi and other agent harnesses with AI SDK (2026-06-12)https://vercel.com/changelog/program-agent-harnesses-with-ai-sdk
changelogVercel · Cline is now available in the AI SDK harness layer(2026-08-18)Vercel · Cline is now available in the AI SDK harness layer (2026-08-18)https://vercel.com/changelog/cline-harness-adapter

实测记录Measured runs

本档未跑集成与性能实测;结论只覆盖 API 与官方文档披露的能力面。

This site has not completed integration or performance tests; the conclusions cover the API and capabilities disclosed in official docs only.

相关条目Related entries

  • OpenAI Agents SDKOpenAI Agents SDK同为 agent 应用框架;AI SDK 偏 TS/JS 与多 harnessBoth are agent application frameworks; AI SDK leans TS/JS and multiple harnesses.
  • Claude Agent SDKClaude Agent SDK单一 harness 的编程接口,与 AI SDK 的多 harness 路线对照A programming interface for a single harness, contrasting with AI SDK's multi-harness route.
  • CursorCursor另一层 · AI 编程Other layer · AI coding

本页由This page is generated from the ai-handbook 数据层生成(CC BY 4.0)。data layer (CC BY 4.0). 方法论与坐标系定义见仓库内For the methodology and coordinate definitions, see METHODOLOGY.md.