# Trang 3.1: AI Agents - Các đặc vụ chuyên gia và cơ chế định tuyến thông minh (Intelligent Routing).

## 1. Agent là gì?

**Agent** là một "nhân cách AI chuyên gia" được cấu hình sẵn với kiến thức sâu, công cụ và hành vi riêng biệt cho một lĩnh vực cụ thể trong phát triển phần mềm.

Hãy hình dung Agent như một chuyên viên tư vấn: thay vì hỏi một người biết tất cả một cách chung chung, bạn đang nói chuyện trực tiếp với **kiến trúc sư Frontend**, **chuyên gia bảo mật**, hay **kỹ sư kiểm thử** tùy theo từng vấn đề.

---

## 2. Hệ thống Định tuyến thông minh (Intelligent Routing)

### Cơ chế hoạt động

Điểm đặc biệt quan trọng nhất: **bạn không cần phải gọi tên Agent thủ công**. Hệ thống sẽ tự động phân tích yêu cầu của bạn và kích hoạt (các) Agent phù hợp nhất.

```html
Yêu cầu của bạn
│
▼
Hệ thống phân tích (Silent Analysis)
│
▼
Phát hiện lĩnh vực (Frontend? Backend? Security?...)
│
▼
Chọn Agent chuyên gia tương ứng
│
▼
Thông báo cho bạn Agent đang được dùng:
🤖 Đang áp dụng kiến thức của @[agent-name]...
│
▼
Trả lời ở cấp độ chuyên gia
```

### Ví dụ thực tế

<div class="my-4 rounded-lg overflow-hidden border border-gray-500/20 [&_thead_tr:first-child_th:first-child]:border-t-0 [&_thead_tr:first-child_th:first-child]:border-l-0 [&_thead_tr:first-child_th:last-child]:border-t-0 [&_thead_tr:first-child_th:last-child]:border-r-0 [&_tbody_tr:last-child_td:first-child]:border-b-0 [&_tbody_tr:last-child_td:first-child]:border-l-0 [&_tbody_tr:last-child_td:last-child]:border-b-0 [&_tbody_tr:last-child_td:last-child]:border-r-0 [&_thead_tr:first-child_th]:border-t-0 [&_tbody_tr:last-child_td]:border-b-0 [&_th:first-child]:border-l-0 [&_td:first-child]:border-l-0 [&_th:last-child]:border-r-0 [&_td:last-child]:border-r-0" id="bkmrk-y%C3%AAu-c%E1%BA%A7u-c%E1%BB%A7a-b%E1%BA%A1n-agen"><table class="min-w-full border-separate border-spacing-0"><thead><tr><th class="bg-gray-500/20 px-3 py-2 text-left font-medium leading-snug border border-gray-500/20">Yêu cầu của bạn</th><th class="bg-gray-500/20 px-3 py-2 text-left font-medium leading-snug border border-gray-500/20">Agent được kích hoạt</th></tr></thead><tbody><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">"Thêm xác thực JWT vào API"</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`@security-auditor` + `@backend-specialist`</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">"Sửa lỗi nút dark mode bị lệch màu"</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`@frontend-specialist`</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">"Login trả về lỗi 500 ngẫu nhiên"</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`@debugger`</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">"Thiết kế schema cho bảng users và orders"</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`@database-architect`</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">"Viết unit test cho service xác thực"</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`@test-engineer`</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">"Tối ưu tốc độ tải trang"</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`@performance-optimizer`</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">"Lập kế hoạch tính năng thanh toán"</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`@project-planner`</td></tr></tbody></table>

</div>### Ghi đè thủ công (Override)

Nếu bạn muốn buộc sử dụng một Agent cụ thể, chỉ cần đề cập tên trong yêu cầu:

<div class="relative whitespace-pre-wrap word-break-all my-2 rounded-lg bg-list-hover-subtle border border-gray-500/20" id="bkmrk-%22d%C3%B9ng-security-audit" node="[object Object]"><div class="min-h-7 relative box-border flex flex-row items-center justify-between rounded-t border-b border-gray-500/20 px-2 py-0.5"><div class="font-sans text-sm text-ide-text-color opacity-60">  
</div><div class="flex flex-row gap-2 justify-end"></div></div><div class="p-3"><div class="w-full h-full text-xs cursor-text"><div class="code-block"><div class="code-line" data-line-end="1" data-line-number="1" data-line-start="1"><div class="line-content"><span class="mtk1">"Dùng security-auditor để review toàn bộ phần auth của tôi"</span></div></div><div class="code-line" data-line-end="2" data-line-number="2" data-line-start="2"><div class="line-content"><span class="mtk1">"Nhờ debugger phân tích lỗi này theo quy trình 4 bước"</span></div></div></div></div></div></div>---

## 3. Checklist bắt buộc trước khi AI viết code

Trước khi thực hiện bất kỳ tác vụ code hoặc thiết kế nào, AI **bắt buộc** phải hoàn thành checklist sau:

<div class="my-4 rounded-lg overflow-hidden border border-gray-500/20 [&_thead_tr:first-child_th:first-child]:border-t-0 [&_thead_tr:first-child_th:first-child]:border-l-0 [&_thead_tr:first-child_th:last-child]:border-t-0 [&_thead_tr:first-child_th:last-child]:border-r-0 [&_tbody_tr:last-child_td:first-child]:border-b-0 [&_tbody_tr:last-child_td:first-child]:border-l-0 [&_tbody_tr:last-child_td:last-child]:border-b-0 [&_tbody_tr:last-child_td:last-child]:border-r-0 [&_thead_tr:first-child_th]:border-t-0 [&_tbody_tr:last-child_td]:border-b-0 [&_th:first-child]:border-l-0 [&_td:first-child]:border-l-0 [&_th:last-child]:border-r-0 [&_td:last-child]:border-r-0" id="bkmrk-b%C6%B0%E1%BB%9Bc-ki%E1%BB%83m-tra-n%E1%BA%BFu-ch"><table class="min-w-full border-separate border-spacing-0"><thead><tr><th class="bg-gray-500/20 px-3 py-2 text-left font-medium leading-snug border border-gray-500/20">Bước</th><th class="bg-gray-500/20 px-3 py-2 text-left font-medium leading-snug border border-gray-500/20">Kiểm tra</th><th class="bg-gray-500/20 px-3 py-2 text-left font-medium leading-snug border border-gray-500/20">Nếu chưa làm</th></tr></thead><tbody><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">1</td><td class="px-3 py-2 leading-snug border border-gray-500/20">Đã xác định đúng Agent cho lĩnh vực này chưa?</td><td class="px-3 py-2 leading-snug border border-gray-500/20">→ Dừng lại. Phân tích lại lĩnh vực yêu cầu.</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">2</td><td class="px-3 py-2 leading-snug border border-gray-500/20">Đã đọc file cấu hình của Agent chưa?</td><td class="px-3 py-2 leading-snug border border-gray-500/20">→ Dừng lại. Mở và đọc `.agent/agents/{agent}.md`</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">3</td><td class="px-3 py-2 leading-snug border border-gray-500/20">Đã thông báo Agent đang dùng cho người dùng chưa?</td><td class="px-3 py-2 leading-snug border border-gray-500/20">→ Dừng lại. Thêm thông báo `🤖 Đang áp dụng @[agent]...`</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">4</td><td class="px-3 py-2 leading-snug border border-gray-500/20">Đã tải các Skills cần thiết từ frontmatter chưa?</td><td class="px-3 py-2 leading-snug border border-gray-500/20">→ Dừng lại. Kiểm tra trường `skills:` và đọc chúng.</td></tr></tbody></table>

</div>---

## 4. Danh sách đầy đủ 20 Agents

### Nhóm Quản lý &amp; Điều phối

<div class="my-4 rounded-lg overflow-hidden border border-gray-500/20 [&_thead_tr:first-child_th:first-child]:border-t-0 [&_thead_tr:first-child_th:first-child]:border-l-0 [&_thead_tr:first-child_th:last-child]:border-t-0 [&_thead_tr:first-child_th:last-child]:border-r-0 [&_tbody_tr:last-child_td:first-child]:border-b-0 [&_tbody_tr:last-child_td:first-child]:border-l-0 [&_tbody_tr:last-child_td:last-child]:border-b-0 [&_tbody_tr:last-child_td:last-child]:border-r-0 [&_thead_tr:first-child_th]:border-t-0 [&_tbody_tr:last-child_td]:border-b-0 [&_th:first-child]:border-l-0 [&_td:first-child]:border-l-0 [&_th:last-child]:border-r-0 [&_td:last-child]:border-r-0" id="bkmrk-agent-chuy%C3%AAn-m%C3%B4n-ski"><table class="min-w-full border-separate border-spacing-0"><thead><tr><th class="bg-gray-500/20 px-3 py-2 text-left font-medium leading-snug border border-gray-500/20">Agent</th><th class="bg-gray-500/20 px-3 py-2 text-left font-medium leading-snug border border-gray-500/20">Chuyên môn</th><th class="bg-gray-500/20 px-3 py-2 text-left font-medium leading-snug border border-gray-500/20">Skills sử dụng</th></tr></thead><tbody><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">`orchestrator`</td><td class="px-3 py-2 leading-snug border border-gray-500/20">Điều phối nhiều Agent làm việc song song cho tác vụ phức tạp</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`parallel-agents`, `behavioral-modes`</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">`project-planner`</td><td class="px-3 py-2 leading-snug border border-gray-500/20">Khám phá yêu cầu, lập kế hoạch và phân rã công việc</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`brainstorming`, `plan-writing`, `architecture`</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">`product-manager`</td><td class="px-3 py-2 leading-snug border border-gray-500/20">Yêu cầu nghiệp vụ, user stories</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`plan-writing`, `brainstorming`</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">`product-owner`</td><td class="px-3 py-2 leading-snug border border-gray-500/20">Chiến lược sản phẩm, quản lý backlog, định nghĩa MVP</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`plan-writing`, `brainstorming`</td></tr></tbody></table>

</div>### Nhóm Phát triển

<div class="my-4 rounded-lg overflow-hidden border border-gray-500/20 [&_thead_tr:first-child_th:first-child]:border-t-0 [&_thead_tr:first-child_th:first-child]:border-l-0 [&_thead_tr:first-child_th:last-child]:border-t-0 [&_thead_tr:first-child_th:last-child]:border-r-0 [&_tbody_tr:last-child_td:first-child]:border-b-0 [&_tbody_tr:last-child_td:first-child]:border-l-0 [&_tbody_tr:last-child_td:last-child]:border-b-0 [&_tbody_tr:last-child_td:last-child]:border-r-0 [&_thead_tr:first-child_th]:border-t-0 [&_tbody_tr:last-child_td]:border-b-0 [&_th:first-child]:border-l-0 [&_td:first-child]:border-l-0 [&_th:last-child]:border-r-0 [&_td:last-child]:border-r-0" id="bkmrk-agent-chuy%C3%AAn-m%C3%B4n-ski-1"><table class="min-w-full border-separate border-spacing-0"><thead><tr><th class="bg-gray-500/20 px-3 py-2 text-left font-medium leading-snug border border-gray-500/20">Agent</th><th class="bg-gray-500/20 px-3 py-2 text-left font-medium leading-snug border border-gray-500/20">Chuyên môn</th><th class="bg-gray-500/20 px-3 py-2 text-left font-medium leading-snug border border-gray-500/20">Skills sử dụng</th></tr></thead><tbody><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">`frontend-specialist`</td><td class="px-3 py-2 leading-snug border border-gray-500/20">Giao diện Web (React, Next.js, Tailwind CSS)</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`react-best-practices`, `frontend-design`, `tailwind-patterns`, `web-design-guidelines`</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">`backend-specialist`</td><td class="px-3 py-2 leading-snug border border-gray-500/20">API, Business Logic, máy chủ</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`api-patterns`, `nodejs-best-practices`, `database-design`</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">`database-architect`</td><td class="px-3 py-2 leading-snug border border-gray-500/20">Thiết kế schema, SQL, tối ưu truy vấn</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`database-design`, `prisma-expert`</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">`mobile-developer`</td><td class="px-3 py-2 leading-snug border border-gray-500/20">iOS, Android, React Native, Flutter</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`mobile-design`</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">`game-developer`</td><td class="px-3 py-2 leading-snug border border-gray-500/20">Logic game, cơ học trò chơi</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`game-development`</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">`devops-engineer`</td><td class="px-3 py-2 leading-snug border border-gray-500/20">CI/CD, Docker, hạ tầng cloud</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`deployment-procedures`, `docker-expert`</td></tr></tbody></table>

</div>### Nhóm Chất lượng &amp; Bảo mật

<div class="my-4 rounded-lg overflow-hidden border border-gray-500/20 [&_thead_tr:first-child_th:first-child]:border-t-0 [&_thead_tr:first-child_th:first-child]:border-l-0 [&_thead_tr:first-child_th:last-child]:border-t-0 [&_thead_tr:first-child_th:last-child]:border-r-0 [&_tbody_tr:last-child_td:first-child]:border-b-0 [&_tbody_tr:last-child_td:first-child]:border-l-0 [&_tbody_tr:last-child_td:last-child]:border-b-0 [&_tbody_tr:last-child_td:last-child]:border-r-0 [&_thead_tr:first-child_th]:border-t-0 [&_tbody_tr:last-child_td]:border-b-0 [&_th:first-child]:border-l-0 [&_td:first-child]:border-l-0 [&_th:last-child]:border-r-0 [&_td:last-child]:border-r-0" id="bkmrk-agent-chuy%C3%AAn-m%C3%B4n-ski-2"><table class="min-w-full border-separate border-spacing-0"><thead><tr><th class="bg-gray-500/20 px-3 py-2 text-left font-medium leading-snug border border-gray-500/20">Agent</th><th class="bg-gray-500/20 px-3 py-2 text-left font-medium leading-snug border border-gray-500/20">Chuyên môn</th><th class="bg-gray-500/20 px-3 py-2 text-left font-medium leading-snug border border-gray-500/20">Skills sử dụng</th></tr></thead><tbody><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">`security-auditor`</td><td class="px-3 py-2 leading-snug border border-gray-500/20">Kiểm tra bảo mật, tuân thủ OWASP</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`vulnerability-scanner`, `red-team-tactics`</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">`penetration-tester`</td><td class="px-3 py-2 leading-snug border border-gray-500/20">Bảo mật tấn công (Offensive Security)</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`red-team-tactics`</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">`test-engineer`</td><td class="px-3 py-2 leading-snug border border-gray-500/20">Chiến lược kiểm thử toàn diện</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`testing-patterns`, `tdd-workflow`, `webapp-testing`</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">`qa-automation-engineer`</td><td class="px-3 py-2 leading-snug border border-gray-500/20">Kiểm thử E2E và CI Pipeline</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`webapp-testing`, `testing-patterns`</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">`debugger`</td><td class="px-3 py-2 leading-snug border border-gray-500/20">Phân tích nguyên nhân gốc rễ của lỗi</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`systematic-debugging`</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">`performance-optimizer`</td><td class="px-3 py-2 leading-snug border border-gray-500/20">Tối ưu hiệu năng và Core Web Vitals</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`performance-profiling`</td></tr></tbody></table>

</div>### Nhóm Chuyên biệt

<div class="my-4 rounded-lg overflow-hidden border border-gray-500/20 [&_thead_tr:first-child_th:first-child]:border-t-0 [&_thead_tr:first-child_th:first-child]:border-l-0 [&_thead_tr:first-child_th:last-child]:border-t-0 [&_thead_tr:first-child_th:last-child]:border-r-0 [&_tbody_tr:last-child_td:first-child]:border-b-0 [&_tbody_tr:last-child_td:first-child]:border-l-0 [&_tbody_tr:last-child_td:last-child]:border-b-0 [&_tbody_tr:last-child_td:last-child]:border-r-0 [&_thead_tr:first-child_th]:border-t-0 [&_tbody_tr:last-child_td]:border-b-0 [&_th:first-child]:border-l-0 [&_td:first-child]:border-l-0 [&_th:last-child]:border-r-0 [&_td:last-child]:border-r-0" id="bkmrk-agent-chuy%C3%AAn-m%C3%B4n-ski-3"><table class="min-w-full border-separate border-spacing-0"><thead><tr><th class="bg-gray-500/20 px-3 py-2 text-left font-medium leading-snug border border-gray-500/20">Agent</th><th class="bg-gray-500/20 px-3 py-2 text-left font-medium leading-snug border border-gray-500/20">Chuyên môn</th><th class="bg-gray-500/20 px-3 py-2 text-left font-medium leading-snug border border-gray-500/20">Skills sử dụng</th></tr></thead><tbody><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">`seo-specialist`</td><td class="px-3 py-2 leading-snug border border-gray-500/20">Xếp hạng tìm kiếm, khả năng hiển thị (SEO + GEO)</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`seo-fundamentals`, `geo-fundamentals`</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">`documentation-writer`</td><td class="px-3 py-2 leading-snug border border-gray-500/20">Hướng dẫn sử dụng, tài liệu kỹ thuật</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`documentation-templates`</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">`code-archaeologist`</td><td class="px-3 py-2 leading-snug border border-gray-500/20">Phân tích và tái cấu trúc code cũ (Legacy code)</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`clean-code`, `code-review-checklist`</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">`explorer-agent`</td><td class="px-3 py-2 leading-snug border border-gray-500/20">Khám phá và phân tích codebase hiện có</td><td class="px-3 py-2 leading-snug border border-gray-500/20">*(không có skill cố định, dùng ngữ cảnh)*</td></tr></tbody></table>

</div>---

## 5. Khi nào nên sử dụng Agent nào?

<div class="my-4 rounded-lg overflow-hidden border border-gray-500/20 [&_thead_tr:first-child_th:first-child]:border-t-0 [&_thead_tr:first-child_th:first-child]:border-l-0 [&_thead_tr:first-child_th:last-child]:border-t-0 [&_thead_tr:first-child_th:last-child]:border-r-0 [&_tbody_tr:last-child_td:first-child]:border-b-0 [&_tbody_tr:last-child_td:first-child]:border-l-0 [&_tbody_tr:last-child_td:last-child]:border-b-0 [&_tbody_tr:last-child_td:last-child]:border-r-0 [&_thead_tr:first-child_th]:border-t-0 [&_tbody_tr:last-child_td]:border-b-0 [&_th:first-child]:border-l-0 [&_td:first-child]:border-l-0 [&_th:last-child]:border-r-0 [&_td:last-child]:border-r-0" id="bkmrk-t%C3%ACnh-hu%E1%BB%91ng-agent-ph%C3%B9"><table class="min-w-full border-separate border-spacing-0"><thead><tr><th class="bg-gray-500/20 px-3 py-2 text-left font-medium leading-snug border border-gray-500/20">Tình huống</th><th class="bg-gray-500/20 px-3 py-2 text-left font-medium leading-snug border border-gray-500/20">Agent phù hợp</th></tr></thead><tbody><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">Bắt đầu dự án mới, chưa biết thiết kế thế nào</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`project-planner` → sau đó `orchestrator`</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">Xây dựng trang web, component UI</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`frontend-specialist`</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">Tạo API endpoint, kết nối database</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`backend-specialist`</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">Thiết kế bảng DB, model dữ liệu</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`database-architect`</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">Phát hiện lỗ hổng bảo mật</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`security-auditor`</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">Ứng dụng bị lỗi không rõ nguyên nhân</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`debugger`</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">Muốn viết test cho code hiện có</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`test-engineer`</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">Trang web tải chậm, điểm Lighthouse thấp</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`performance-optimizer`</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">Cần lên kế hoạch triển khai sản phẩm</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`project-planner` + `devops-engineer`</td></tr><tr><td class="px-3 py-2 leading-snug border border-gray-500/20">Cần phân tích một codebase lạ</td><td class="px-3 py-2 leading-snug border border-gray-500/20">`explorer-agent`</td></tr></tbody></table>

</div>---

## 6. Agents làm việc cùng nhau

Các Agent có thể **phối hợp** để giải quyết các vấn đề phức tạp đa lĩnh vực. Sử dụng Agent `orchestrator` để điều phối:

**Ví dụ:** Xây dựng hệ thống đăng nhập hoàn chỉnh

```html
orchestrator điều phối:
├── database-architect → Thiết kế bảng users
├── backend-specialist → Viết API authentication
├── security-auditor → Review bảo mật, kiểm tra JWT
├── frontend-specialist → Xây dựng form login
└── test-engineer → Viết test cho toàn bộ flow
```

> **Lưu ý thực tế:** AI thực sự xử lý tuần tự (không song song thực sự), nhưng `orchestrator` quản lý ngữ cảnh và đảm bảo mỗi phần được thực hiện đúng bởi "góc nhìn" của Agent chuyên gia tương ứng.