Bỏ qua để đến Nội dung

GoClaw: Multi-Agent AI Gateway — Hướng Dẫn Cài Đặt & Ứng Dụng Cho Doanh Nghiệp

Triển khai AI agents kết nối Telegram, Discord, Slack, knowledge graph và 20+ LLM chỉ với một binary 25MB

Bạn cần một AI agent xử lý Telegram, tìm kiếm web, chạy shell, nhớ lịch sử — nhưng mỗi thứ lại là một công cụ riêng, cần vài ngày cấu hình, và vẫn không nói chuyện được với nhau.

GoClaw giải quyết tất cả trong một binary 25 MB — không cần runtime, không cần cấu hình phức tạp, production-ready ngay từ ngày đầu.

GoClaw là gì?

GoClaw là một multi-agent AI gateway viết bằng Go — kết nối hơn 20 LLM provider (Anthropic, OpenAI, DeepSeek, Gemini...) với công cụ, kênh nhắn tin, và dữ liệu của doanh nghiệp bạn. Toàn bộ hệ thống được đóng gói thành một file nhị phân duy nhất (~25 MB), khởi động dưới 1 giây, không phụ thuộc Node.js hay Python runtime.

GoClaw là phiên bản Go của dự án OpenClaw — được tối ưu hóa cho production với multi-tenant PostgreSQL, knowledge graph, và bảo mật cấp enterprise mà phiên bản gốc không có.

🤖

20+ LLM Providers

Anthropic, OpenAI, DeepSeek, Gemini, Groq, Ollama và nhiều hơn.

💬

7 Kênh Nhắn Tin

Telegram, Discord, Slack, Zalo, WhatsApp, Feishu.

🏢

Multi-Tenant

PostgreSQL cô lập hoàn toàn theo tenant, RBAC, mã hóa AES-256.

🧠

3-Tier Memory

Working → Episodic → Semantic knowledge graph với pgvector.

Cài Đặt GoClaw

Có 3 cách cài đặt tùy theo nhu cầu:

🐳

Docker Compose

Khuyến nghị cho production. Auto-migrate, auto-seed.

  • PostgreSQL + pgvector tích hợp sẵn
  • Thêm browser/OTEL/Redis theo flag
  • Health check tại /health

⬇️

Desktop Lite

Dành cho cá nhân/thử nghiệm. SQLite, không cần setup.

  • Native app macOS/Windows (~30 MB)
  • Tối đa 5 agents, 1 team
  • Auto-update từ GitHub Releases

① Cài từ Source (Go 1.26+)

# Clone nhánh stable
git clone -b main https://github.com/nextlevelbuilder/goclaw.git && cd goclaw

# Build binary
make build

# Wizard setup tương tác (tạo .env.local + schema DB)
./goclaw onboard

# Chạy
source .env.local && ./goclaw

# Dashboard: http://localhost:18790

② Cài qua Docker Compose (Khuyến nghị)

# Tạo file .env với secrets tự động
chmod +x prepare-env.sh && ./prepare-env.sh

# Thêm API key vào .env (ít nhất 1 provider)
echo "GOCLAW_ANTHROPIC_API_KEY=sk-ant-..." >> .env

# Khởi động (auto build, migrate, seed)
make up

# Tùy chọn: thêm browser automation, OTEL tracing, Redis
make up WITH_BROWSER=1 WITH_OTEL=1 WITH_REDIS=1

⚠️ Yêu cầu: Go 1.26+ (build từ source) hoặc Docker (compose). PostgreSQL 18 + pgvector. Tối thiểu 2GB RAM cho Docker Compose.

③ Desktop Lite (macOS / Windows)

# macOS
curl -fsSL https://raw.githubusercontent.com/nextlevelbuilder/goclaw/main/scripts/install-lite.sh | bash

# Windows PowerShell
irm https://raw.githubusercontent.com/nextlevelbuilder/goclaw/main/scripts/install-lite.ps1 | iex

Pipeline Agent 8 Giai Đoạn

Mỗi lần agent xử lý yêu cầu, GoClaw chạy đủ 8 giai đoạn sau:

Agent Loop Pipeline

1. Context Injection
2. History Loading (Episodic)
3. Prompt Assembly (4-mode)
4. Extended Thinking
5-6. Tool Calling & Execution
7. Memory Update
8. Summarization
✅ Auto-compress long sessions

Ứng Dụng GoClaw Vào Doanh Nghiệp

🎧 1. Tự Động Hóa Customer Support

Kết nối bot Telegram/Slack/Zalo với Knowledge Vault chứa FAQ, tài liệu sản phẩm. Agent nhớ lịch sử từng khách hàng qua 3-tier memory. Trường hợp phức tạp → tự động chuyển cho agent chuyên gia qua team orchestration.

🔧 2. Internal Tools & DevOps Automation

Agent thực thi shell commands, quản lý infrastructure, chạy CI/CD pipelines. Custom tools API cho phép tạo tool mới từ shell script ngay trong runtime — không cần deploy lại. Cron scheduling cho maintenance jobs định kỳ.

👥 3. Multi-Department Coordination

Agent Teams cho phép nhiều AI agent làm việc song song: Sales agent nghiên cứu → Proposal agent soạn báo giá → Review agent kiểm tra. Shared task board + mailbox hệ thống giữa các agent.

📚 4. Knowledge Management

Knowledge Vault với hybrid search (full-text + pgvector semantic). LLM tự động trích xuất entities, tạo knowledge graph có thể traverse. Wikilinks [[bidirectional]] giữa các tài liệu. Phù hợp để xây internal wiki có thể chat.

☁️ 5. SaaS Backend / Multi-Tenant AI

Multi-tenant PostgreSQL cô lập hoàn toàn theo tenant. Mỗi khách hàng có workspace riêng, API key riêng với RBAC scopes. Secrets mã hóa AES-256-GCM. Phù hợp xây AI SaaS hoặc triển khai cho nhiều phòng ban.

Tạo Custom Tool Trong Runtime

Không cần deploy lại — tạo tool mới bằng một API call:

POST /v1/tools/custom
{
  "name": "dns_lookup",
  "description": "Tra cứu DNS records",
  "parameters": {
    "properties": {
      "domain": { "type": "string" },
      "record_type": { "enum": ["A", "MX", "CNAME", "TXT"] }
    }
  },
  "command": "dig +short {{.record_type}} {{.domain}}",
  "timeout_seconds": 10
}

So Sánh Lite vs Standard

Tính năng Desktop Lite Standard (Server) ✨
Số lượng agents Tối đa 5 ✅ Không giới hạn
Database SQLite (local) ✅ PostgreSQL
Memory Search FTS5 text only ✅ pgvector semantic
Kênh nhắn tin ✅ 7 kênh
Knowledge Graph ✅ Full + visualization
Multi-tenancy ✅ RBAC + isolated

🔐 Bảo Mật 5 Lớp

GoClaw áp dụng bảo mật theo chiều sâu — không phải chỉ một điểm kiểm soát:

Layer 1: Gateway Auth

Token-based hoặc browser pairing

Layer 2: Global Policy

Allow/deny tools ở mức toàn hệ thống

Layer 3: Per-Agent

Cấu hình permissions riêng từng agent

Layer 4-5: Channel + Owner

Giới hạn theo nền tảng + owner-only workspace

Kèm theo: AES-256-GCM encryption, credential scrubbing tự động, SSRF protection, rate limiting, prompt injection detection.

💡 Lưu ý License: GoClaw dùng CC BY-NC 4.0 — có thể sử dụng, chỉnh sửa, phân phối tự do; nhưng cần xin phép bằng văn bản cho mục đích thương mại. Liên hệ tác giả trước khi triển khai trong sản phẩm thương mại.


Bài viết được thực hiện bởi team Loc Nguyen Data — chuyên tư vấn và triển khai giải pháp AI/Data cho doanh nghiệp.