Agent SDK란
Anthropic이 공식 제공하는 에이전트 구축 프레임워크입니다. 도구 사용, 멀티 턴, 핸드오프를 쉽게 구현합니다.
기본 에이전트
import { Agent, tool } from "@anthropic-ai/agent-sdk";
const searchTool = tool({
name: "web_search",
description: "웹 검색을 수행합니다",
schema: z.object({ query: z.string() }),
execute: async ({ query }) => await search(query),
});
const agent = new Agent({
model: "claude-sonnet-4-20250514",
tools: [searchTool],
instructions: "사용자 질문에 답하는 리서치 에이전트입니다.",
});
const result = await agent.run("2025년 AI 트렌드를 조사해줘");
댓글 0