프레임워크 · Vercel
Vercel AI SDK 한눈에 보기
Vercel의 provider에 종속되지 않는 TypeScript 툴킷입니다. AI SDK 7에서는 ToolLoopAgent가 주요 에이전트 클래스입니다. 도구 루프를 스트리밍 UI 헬퍼와 연결하며, WorkflowAgent는 재시작 후에도 이어지는 실행을 지원합니다.
추천 용도: 도구 루프 에이전트를 스트리밍 UI와 긴밀하게 연결하려는 Next.js 및 웹 개발자
주요 정보
- 관리자
- Vercel
- 언어
- TypeScript
- 라이선스
- Apache-2.0
- 최신 버전
ai 7.0.126· 2026년 9월 30일- 저장소
- vercel/ai
- 호스팅 옵션
- Vercel Functions + Vercel Workflow
Quickstart
패키지를 설치하고 인증 정보를 설정한 다음, 공식 문서에서 가장 간단한 에이전트를 실행하세요. 모델 ID는 문서에서 사용하는 값이며 계정에서 활성화되지 않았을 수 있습니다.
npm install ai zod (inferred; not copied from docs)import { ToolLoopAgent, tool } from 'ai';
import { z } from 'zod';
const weatherAgent = new ToolLoopAgent({
model: "anthropic/claude-sonnet-5.5",
tools: {
weather: tool({
description: 'Get the weather in a location (in Fahrenheit)',
inputSchema: z.object({
location: z.string().describe('The location to get the weather for'),
}),
execute: async ({ location }) => ({
location,
temperature: 72 + Math.floor(Math.random() * 21) - 10,
}),
}),
convertFahrenheitToCelsius: tool({
description: 'Convert temperature from Fahrenheit to Celsius',
inputSchema: z.object({
temperature: z.number().describe('Temperature in Fahrenheit'),
}),
execute: async ({ temperature }) => {
const celsius = Math.round((temperature - 32) * (5 / 9));
return { celsius };
},
}),
},
});
const result = await weatherAgent.generate({
prompt: 'What is the weather in San Francisco in celsius?',
});
console.log(result.text); // agent's final answer
console.log(result.steps); // steps taken by the agent기능
| 모든 모델 | 예 | 모든 provider 패키지 또는 anthropic/claude-sonnet-5.5 같은 AI Gateway 문자열 |
|---|---|---|
| MCP 클라이언트 | 예 | @ai-sdk/mcp 클라이언트 |
| MCP 서버 | 확인되지 않음 | |
| 멀티 에이전트 | 예 | 서브에이전트; HarnessAgent는 Claude Code, Codex 또는 Pi를 실행합니다 |
| 내구성 있는 실행 | 예 | Workflow 5 베타가 필요한 WorkflowAgent |
| 사람의 승인 | 예 | HMAC 서명 승인을 지원하는 toolApproval 및 OPA 정책 |
| 트레이싱 | 확인되지 않음 | |
| Evals | 확인되지 않음 |
최근 변경 사항
- AI SDK 7에서는 ToolLoopAgent를 권장 에이전트 클래스로 지정합니다.
- HarnessAgent는 에이전트로 Claude Code, Codex 또는 Pi를 실행합니다.
- WorkflowAgent (@ai-sdk/workflow)가 Workflow DevKit의 DurableAgent를 대체합니다.
- runtimeContext와 toolsContext가 experimental_context를 대체합니다.