campaign Thông báo
Chúng tôi không liên kết với openagen/zeroclaw hoặc zeroclaw.org. Chỉ sử dụng repository chính thức và tài khoản mạng xã hội ZeroClaw đã xác minh làm nguồn tin cậy.
Chưa có chương trình gây quỹ/đầu tư chính thức nào được khởi động. Bỏ qua các nỗ lực mạo danh và tuyên bố không chính thức.
Điều khoản Anthropic OAuth đã thay đổi (2026-02-19). Tạm tránh tích hợp Claude Code OAuth cho đến khi rủi ro chính sách được làm rõ.
info Giới thiệu
ZeroClaw là hạ tầng trợ lý AI tự trị nhanh, nhỏ, hoàn toàn tự động viết bằng Rust. Một binary tĩnh đơn chạy trên phần cứng $10 với <5MB RAM — ít hơn 99% bộ nhớ so với các giải pháp dựa trên Node. Mọi hệ thống con là trait: hoán đổi provider, kênh, công cụ, memory backend và tunnel bằng thay đổi cấu hình.
download Cài đặt
ZeroClaw phân phối dưới dạng binary Rust đơn. Cài qua Homebrew, script bootstrap hoặc build thủ công từ mã nguồn.
Homebrew (macOS / Linuxbrew)
# macOS / Linuxbrew
brew install zeroclaw Bootstrap một click (Khuyến nghị)
git clone https://github.com/zeroclaw-labs/zeroclaw.git
cd zeroclaw
./bootstrap.sh
# With system deps + Rust install on fresh machines
./bootstrap.sh --install-system-deps --install-rust
# With onboarding in the same flow
./bootstrap.sh --onboard --api-key "sk-..." --provider openrouter
# Remote one-liner
curl -fsSL https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/main/scripts/bootstrap.sh | bash Build & cài thủ công
git clone https://github.com/zeroclaw-labs/zeroclaw.git
cd zeroclaw
cargo build --release --locked
cargo install --path . --force --locked
# Ensure ~/.cargo/bin is in PATH
export PATH="$HOME/.cargo/bin:$PATH" Fallback dev: thêm tiền tố cargo run --release -- trước lệnh để bỏ qua cài global.
rocket_launch Bắt đầu nhanh
Chạy onboarding một lần để thiết lập cấu hình, sau đó bắt đầu chat.
# Interactive onboarding wizard
zeroclaw onboard --interactive
# Or quick setup (no prompts)
zeroclaw onboard --api-key sk-... --provider openrouter --model "openrouter/auto"
# Quickly repair channels/allowlists only
zeroclaw onboard --channels-only
# Chat with the agent
zeroclaw agent -m "Hello, ZeroClaw!"
# Interactive mode
zeroclaw agent
# Start gateway + daemon
zeroclaw gateway
zeroclaw daemon
# Check status
zeroclaw status
zeroclaw doctor
zeroclaw channel doctor
# Bind Telegram identity into allowlist
zeroclaw channel bind-telegram 123456789
# Service + migration helpers
zeroclaw service install
zeroclaw config schema
zeroclaw migrate openclaw --dry-run
zeroclaw migrate openclaw Vị trí cấu hình: ~/.zeroclaw/config.toml — được tạo tự động bởi zeroclaw onboard.
terminal Lệnh
ZeroClaw là binary đơn với subcommand cho mọi quy trình.
| Lệnh | Mô tả |
|---|---|
zeroclaw onboard | Thiết lập tương tác hoặc nhanh — tạo cấu hình, đặt API key |
zeroclaw onboard --channels-only | Chỉ cấu hình lại thông tin xác thực/allowlist kênh |
zeroclaw agent | Chế độ chat (REPL tương tác hoặc tin nhắn đơn -m) |
zeroclaw gateway | Khởi động webhook server (mặc định 127.0.0.1:3000) |
zeroclaw daemon | Khởi động runtime tự trị chạy dài đầy đủ |
zeroclaw status | Hiển thị trạng thái hệ thống đầy đủ |
zeroclaw auth status | Kiểm tra profile xác thực và trạng thái token đang hoạt động |
zeroclaw doctor | Chẩn đoán daemon/scheduler/độ mới kênh |
zeroclaw channel list | Liệt kê kênh đã cấu hình và trạng thái |
zeroclaw channel doctor | Kiểm tra sức khỏe và sẵn sàng kênh |
zeroclaw channel bind-telegram <id> | Ủy quyền Telegram user ID vào allowlist |
zeroclaw service install | Cài dịch vụ nền cấp người dùng |
zeroclaw service start/stop/status | Quản lý vòng đời dịch vụ nền |
zeroclaw cron | Quản lý tác vụ theo lịch (list/add/remove/pause/resume) |
zeroclaw providers | Liệt kê provider và alias được hỗ trợ |
zeroclaw models | Làm mới danh mục model provider |
zeroclaw auth login | Đăng nhập với profile xác thực subscription |
zeroclaw skills | Liệt kê/cài/gỡ skill |
zeroclaw config schema | In JSON Schema hợp đồng cấu hình đầy đủ |
zeroclaw migrate openclaw | Import dữ liệu từ OpenClaw runtime |
zeroclaw integrations info <name> | Nhận hướng dẫn thiết lập tích hợp |
zeroclaw hardware | Lệnh USB discover/introspect/info |
zeroclaw peripheral | Quản lý và flash thiết bị ngoại vi phần cứng |
smart_toy Chế độ Agent
Lệnh zeroclaw agent chạy trợ lý AI có thể sử dụng công cụ, gọi lại bộ nhớ và thực thi tác vụ.
# Single message
zeroclaw agent -m "List files in the current directory"
# Interactive REPL
zeroclaw agent
# Use a specific provider/model
zeroclaw agent --provider anthropic --model claude-sonnet-4-6 -m "Hello"
# Use a subscription auth profile
zeroclaw agent --provider openai-codex --auth-profile openai-codex:work -m "Hello" dns Gateway & Daemon
Gateway mở webhook server cho tích hợp kênh. Daemon chạy runtime tự trị đầy đủ bao gồm heartbeat, cron và kênh.
# Start the gateway (webhook server, default 127.0.0.1:3000)
zeroclaw gateway
zeroclaw gateway --port 0 # random port (security hardened)
# Start full autonomous runtime
zeroclaw daemon
# Manage as a background service
zeroclaw service install
zeroclaw service status forum Kênh
Kênh cho phép ZeroClaw nhận và trả lời tin nhắn từ Telegram, Discord, Slack, Mattermost, iMessage, Matrix, Signal, WhatsApp, Email, IRC, Lark, DingTalk và nhiều hơn. Mọi kênh dùng allowlist deny-by-default.
# Telegram
[channels_config.telegram]
bot_token = "123456:ABC..."
allowed_users = ["your_username"] # or ["*"] for all
# Discord
[channels_config.discord]
bot_token = "..."
allowed_users = ["your-discord-id"]
# Slack
[channels_config.slack]
bot_token = "xoxb-..."
allowed_users = ["UMEMBERID"]
# Start channels via daemon
zeroclaw daemon Mẹo: Chạy zeroclaw onboard --channels-only để cấu hình lại kênh mà không ảnh hưởng cài đặt khác.
build Công cụ
Công cụ là khả năng agent có thể gọi trong hội thoại. Mọi công cụ tích hợp đều được sandbox và giới hạn workspace mặc định.
# Built-in tools:
# shell, file_read, file_write, memory, cron,
# git, http_request, browser (opt-in), composio (opt-in),
# delegate, hardware, screenshot, pushover
# Enable browser tools
[browser]
enabled = true
allowed_domains = ["docs.rs", "github.com"]
# Enable Composio (1000+ OAuth integrations)
[composio]
enabled = true
api_key = "cmp_..." database Hệ thống bộ nhớ
Công cụ tìm kiếm full-stack không phụ thuộc bên ngoài — không Pinecone, không Elasticsearch, không LangChain.
[memory]
backend = "sqlite" # sqlite | lucid | postgres | markdown | none
auto_save = true
embedding_provider = "none" # none | openai | custom:https://...
vector_weight = 0.7
keyword_weight = 0.3
# PostgreSQL remote backend
# [storage.provider.config]
# provider = "postgres"
# db_url = "postgres://user:pass@host:5432/zeroclaw" settings File cấu hình
Cấu hình nằm tại ~/.zeroclaw/config.toml — được tạo bởi zeroclaw onboard.
api_key = "sk-..."
default_provider = "openrouter"
default_model = "anthropic/claude-sonnet-4-6"
default_temperature = 0.7
[memory]
backend = "sqlite"
auto_save = true
[gateway]
port = 3000
host = "127.0.0.1"
require_pairing = true
allow_public_bind = false
[autonomy]
level = "supervised"
workspace_only = true
allowed_commands = ["git", "npm", "cargo", "ls", "cat", "grep"]
[runtime]
kind = "native"
[tunnel]
provider = "none"
[secrets]
encrypt = true model_training Nhà cung cấp AI
ZeroClaw hỗ trợ 28+ provider tích hợp cùng bất kỳ endpoint tùy chỉnh tương thích OpenAI hoặc Anthropic.
| Provider | Mô tả |
|---|---|
openrouter | Router đa model (khuyến nghị) |
anthropic | Các model Claude |
openai | Các model GPT |
ollama | Ollama local hoặc remote |
gemini | Google Gemini |
custom:https://... | Bất kỳ endpoint tương thích OpenAI |
Chạy zeroclaw providers để liệt kê mọi provider và alias có sẵn.
key Biến môi trường
API key provider và override tùy chọn.
# Provider API keys
OPENROUTER_API_KEY=sk-or-v1-...
ANTHROPIC_API_KEY=sk-ant-...
OPENAI_API_KEY=sk-...
# Lucid memory backend
ZEROCLAW_LUCID_CMD=/usr/local/bin/lucid
ZEROCLAW_LUCID_BUDGET=200
# Ollama remote endpoint
OLLAMA_API_KEY=your-key | Biến | Mô tả |
|---|---|
OPENROUTER_API_KEY | API key OpenRouter |
ANTHROPIC_API_KEY | API key Anthropic |
OPENAI_API_KEY | API key OpenAI |
OLLAMA_API_KEY | Key endpoint Ollama remote |
ZEROCLAW_LUCID_CMD | Đường dẫn đến binary lucid |
ZEROCLAW_LUCID_BUDGET | Ngân sách bộ nhớ Lucid (mặc định 200) |
shield Bảo mật
ZeroClaw thực thi bảo mật ở mọi tầng và đạt mọi mục từ checklist bảo mật cộng đồng.
[gateway]
require_pairing = true
allow_public_bind = false # refuse 0.0.0.0 without tunnel
[autonomy]
workspace_only = true # scoped to workspace by default account_tree Kiến trúc
Mọi hệ thống con là Rust trait — hoán đổi triển khai bằng thay đổi cấu hình, không cần sửa code.
| Hệ thống con | Trait | Đi kèm |
|---|---|---|
| Mô hình AI | Provider | 28 tích hợp sẵn + endpoint tùy chỉnh |
| Kênh | Channel | CLI, Telegram, Discord, Slack, WhatsApp, iMessage, Matrix, Signal, Email, IRC, Lark, DingTalk, QQ, Webhook |
| Hệ thống bộ nhớ | Memory | SQLite hybrid, PostgreSQL, Lucid, Markdown, none |
| Công cụ | Tool | shell, file, memory, cron, git, browser, http, composio, delegate, hardware |
| Observability | Observer | Noop, Log, Multi |
| Runtime | RuntimeAdapter | Native, Docker (sandbox) |
| Bảo mật | SecurityPolicy | Pairing, sandbox, allowlist, rate limit, filesystem scoping |
| Identity | IdentityConfig | OpenClaw (markdown), AIEOS v1.1 (JSON) |
| Tunnel | Tunnel | None, Cloudflare, Tailscale, ngrok, Custom |
| Heartbeat | Engine | Tác vụ định kỳ HEARTBEAT.md |
| Liệt kê/cài/gỡ skill | Loader | TOML manifest + hướng dẫn SKILL.md |
| Tích hợp | Registry | 70+ tích hợp trên 9 danh mục |
runtime.kind = "native" và "docker" được hỗ trợ hiện tại. Runtime WASM/edge đang được lên kế hoạch.
api Gateway API
HTTP API tối giản cho tích hợp kênh và kiểm tra sức khỏe.
| Phương thức | Endpoint | Mô tả |
|---|---|---|
GET | /health | Kiểm tra sức khỏe (luôn công khai, không lộ secret) |
POST | /pair | Trao đổi OTP (header X-Pairing-Code) để lấy bearer token |
POST | /webhook | Gửi tin nhắn đến agent (Authorization: Bearer) |
GET/POST | Xác minh webhook WhatsApp + tin nhắn đến |
# Health check (no auth required)
curl http://127.0.0.1:3000/health
# Exchange pairing code for bearer token
curl -X POST http://127.0.0.1:3000/pair \
-H "X-Pairing-Code: 847291"
# Send a message (requires bearer token)
curl -X POST http://127.0.0.1:3000/webhook \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"message": "Hello, ZeroClaw!"}' lock Xác thực & Pairing
Profile xác thực subscription-native (đa tài khoản, mã hóa khi lưu trữ) cho OpenAI Codex và Anthropic.
# OpenAI Codex (device code — recommended for servers)
zeroclaw auth login --provider openai-codex --device-code
# Browser/callback flow
zeroclaw auth login --provider openai-codex --profile default
# Anthropic setup token
zeroclaw auth paste-token --provider anthropic --profile default
# Check / refresh / switch profile
zeroclaw auth status
zeroclaw auth refresh --provider openai-codex --profile default
zeroclaw auth use --provider openai-codex --profile work code Phát triển
Quy trình Rust tiêu chuẩn. Git hook pre-push tự động chạy fmt + clippy + test.
# Dev build
cargo build
# Release build (works on all devices including Raspberry Pi)
cargo build --release
# Run tests
cargo test
# Lint
cargo clippy --locked --all-targets -- -D clippy::correctness
# Format
cargo fmt
# Enable pre-push hook (fmt + clippy + test)
git config core.hooksPath .githooks menu_book Trung tâm tài liệu
Để xem tài liệu hướng dẫn theo tác vụ, bắt đầu từ trung tâm tài liệu trong repository chính thức.
| Tài liệu | Đường dẫn |
|---|---|
| Trung tâm tài liệu | docs/README.md |
| Mục lục tài liệu thống nhất | docs/SUMMARY.md |
| Tham chiếu lệnh | docs/commands-reference.md |
| Tham chiếu cấu hình | docs/config-reference.md |
| Tham chiếu provider | docs/providers-reference.md |
| Tham chiếu kênh | docs/channels-reference.md |
| Sổ tay vận hành | docs/operations-runbook.md |
| Khắc phục sự cố | docs/troubleshooting.md |
Sẵn sàng chạy stack?
brew install zeroclaw && zeroclaw onboard --interactive