Giới thiệu Series
Xây dựng AI Agent Platform từ Zero là series thực chiến giúp bạn hiểu và tự xây dựng được một AI Agent Platform hoàn chỉnh — không phải chatbot đơn giản, mà là một platform cấp enterprise với multi-LLM, RAG, workflow automation, multi-tenant RBAC, plugin system và nhiều hơn nữa.
Toàn bộ series dựa trên mã nguồn thực tế của xClaw — open-source AI Agent Platform đang chạy production, viết bằng TypeScript.
🎯 Mục tiêu: Sau khi hoàn thành, bạn có thể tự xây dựng AI Agent Platform cho riêng mình — hoặc contribute vào xClaw.
Bạn sẽ học được gì?
Phần 1: Kiến trúc & Nền tảng Monorepo
- Bài 1: Tổng quan kiến trúc — tại sao cần platform, dual-database design
- Bài 2: Setup TypeScript monorepo với npm workspaces và project references
- Bài 3: Dual-database — PostgreSQL (Drizzle ORM) + MongoDB + Redis
- Bài 4: API Gateway với Hono — routes, middleware, JWT auth, OAuth2
Phần 2: LLM Engine & Agent Core
- Bài 5: LLM Router — Adapter Pattern cho 10 LLM providers với fallback chains
- Bài 6: Tool Registry — đăng ký, quản lý và thực thi tools
- Bài 7: Agent class — vòng lặp tool-calling hoàn chỉnh, memory, RAG context
- Bài 8: Streaming responses — AsyncGenerator, EventBus, Server-Sent Events
Phần 3: RAG Pipeline & Knowledge Base
- Bài 9: Document Processor — chunking strategies, metadata extraction
- Bài 10: Embedding & Vector Store — cosine similarity, batch processing
- Bài 11: RAG Engine — retrieval, reranking, collections, web crawler
Phần 4: Workflow Engine & Automation
- Bài 12: Workflow Engine — 16 node types, handler pattern, edge traversal
- Bài 13: Validation, execution, sandboxed code, template resolution
Phần 5: Skills, Domains & Plugin System
- Bài 14: Skill System — defineSkill, SkillManager, RL-based selection
- Bài 15: Domain Packs — 13 lĩnh vực, domain-specific prompts & tools
- Bài 16: Plugin architecture, MCP Protocol, Skill Hub marketplace
Phần 6: Multi-tenant, RBAC & Channels
- Bài 17: Multi-tenant RBAC — roles, permissions, tenant isolation
- Bài 18: Chat Channels — Telegram, Discord, Slack, Zalo, WebChat
Phần 7: Frontend, Monitoring & Production
- Bài 19: React frontend — Chat UI, Workflow Builder, Dashboard
- Bài 20: Monitoring, audit logs, Docker deploy, Nginx SSL
Yêu cầu
- TypeScript/JavaScript cơ bản (ES2022+, async/await, generators)
- Node.js ≥ 20
- Docker & Docker Compose
- Hiểu biết cơ bản về REST API, SQL, NoSQL
- Đã từng dùng qua ChatGPT hoặc Claude API (có thì tốt, không bắt buộc)
Source Code
Toàn bộ source code tham khảo:
git clone --recurse-submodules https://github.com/xdev-asia-labs/xClaw.git
cd xClaw
cp .env.example .env
docker compose up --build
GitHub: github.com/xdev-asia-labs/xClaw License: MIT
