Tutorials
TutorialsAI-GENERATED
Cách Xây Dựng Agent AI Với Claude API
6.2K lượt xem5 tháng 4, 20261 phút đọc
T
Thắng Dev
Admin · Thắng Dev Vlog
AI Agent là gì?
Cài đặt project
Code Agent cơ bản
Kết luận
AI Agent tự quyết định hành động dựa trên mục tiêu, sử dụng tools để hoàn thành công việc phức tạp.
Với Claude API, bạn có thể xây dựng hệ thống tự động hóa mạnh mẽ với multi-agent và memory layer.
npm init -y npm install @anthropic-ai/sdk dotenv import Anthropic from "@anthropic-ai/sdk"; const client = new Anthropic(); async function runAgent(userGoal: string) { const response = await client.messages.create({ model: "claude-opus-4-5", max_tokens: 4096, messages: [{ role: "user", content: userGoal }] }); return response; }