Vercel AI SDK 4.0 发布:支持多 Agent 编排
Vercel AI SDK 4.0 新增多 Agent 编排能力,支持 Agent 间通信和任务分发,与 Next.js 深度集成。
Vercel Blog·2026年4月13日
Vercel AI SDK 4.0
新功能
- 多 Agent 编排:Agent 间可互相调用和传递上下文
- 工具注册表:统一管理 Agent 可用的工具集
- 流式中间件:在流式响应中插入中间处理逻辑
- Edge Runtime 优化:Agent 可跑在 Edge 上,延迟更低
与 Next.js 集成
// app/api/agent/route.ts import { agent } from 'ai'; export const POST = agent({ model: 'gpt-4o', tools: { weather, search, calculator }, });
适用场景
- 在 Next.js 应用中嵌入 Agent 能力
- 构建 AI-first 的 Web 应用
- 边缘计算场景下的低延迟 Agent
对比 OpenClaw:Vercel AI SDK 偏 Web 应用集成,OpenClaw 偏 CLI/自动化场景,互补关系。