campaign Thông báo

Nghiêm trọng

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.

Quan trọng

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.

Quan trọng

Đ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.

memory
Binary đơn
Bản release 3.4MB, cold start <10ms trên 0.8GHz
swap_horiz
Trait-Driven
Provider, Channel, Tool, Memory, Tunnel — tất cả hoán đổi được
shield
Bảo mật mặc định
Gateway chỉ localhost, OTP pairing, workspace scoping
developer_board
Deploy mọi nơi
ARM, x86, RISC-V — Raspberry Pi đến cloud

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.

Yêu cầu trước: Rust stable toolchain (rustup), Git, API key nhà cung cấp AI (OpenRouter, Anthropic, OpenAI, Ollama, v.v.)

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ệnhMô tả
zeroclaw onboardThiết lập tương tác hoặc nhanh — tạo cấu hình, đặt API key
zeroclaw onboard --channels-onlyChỉ cấu hình lại thông tin xác thực/allowlist kênh
zeroclaw agentChế độ chat (REPL tương tác hoặc tin nhắn đơn -m)
zeroclaw gatewayKhởi động webhook server (mặc định 127.0.0.1:3000)
zeroclaw daemonKhởi động runtime tự trị chạy dài đầy đủ
zeroclaw statusHiển thị trạng thái hệ thống đầy đủ
zeroclaw auth statusKiểm tra profile xác thực và trạng thái token đang hoạt động
zeroclaw doctorChẩn đoán daemon/scheduler/độ mới kênh
zeroclaw channel listLiệt kê kênh đã cấu hình và trạng thái
zeroclaw channel doctorKiể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 installCài dịch vụ nền cấp người dùng
zeroclaw service start/stop/statusQuản lý vòng đời dịch vụ nền
zeroclaw cronQuản lý tác vụ theo lịch (list/add/remove/pause/resume)
zeroclaw providersLiệt kê provider và alias được hỗ trợ
zeroclaw modelsLàm mới danh mục model provider
zeroclaw auth loginĐăng nhập với profile xác thực subscription
zeroclaw skillsLiệt kê/cài/gỡ skill
zeroclaw config schemaIn JSON Schema hợp đồng cấu hình đầy đủ
zeroclaw migrate openclawImport 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 hardwareLệnh USB discover/introspect/info
zeroclaw peripheralQuả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
Security: Gateway bind 127.0.0.1 mặc định. Dùng tunnel (Cloudflare, Tailscale, ngrok) để mở ra bên ngoài.

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.

Vector DB
SQLite BLOB + cosine similarity
Tìm kiếm từ khóa
FTS5 + BM25 scoring
Merge lai
Merge có trọng số tùy chỉnh
Cache
Chính sách eviction LRU
[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.

ProviderMô tả
openrouterRouter đa model (khuyến nghị)
anthropicCác model Claude
openaiCác model GPT
ollamaOllama local hoặc remote
geminiGoogle 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ếnMô tả
OPENROUTER_API_KEYAPI key OpenRouter
ANTHROPIC_API_KEYAPI key Anthropic
OPENAI_API_KEYAPI key OpenAI
OLLAMA_API_KEYKey endpoint Ollama remote
ZEROCLAW_LUCID_CMDĐường dẫn đến binary lucid
ZEROCLAW_LUCID_BUDGETNgâ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 chỉ localhost
Bind 127.0.0.1. Từ chối 0.0.0.0 khi không có tunnel hoặc allow_public_bind
Yêu cầu pairing
OTP 6 chữ số khi khởi động. Trao đổi qua POST /pair để lấy bearer token
Giới hạn filesystem
workspace_only mặc định. 14 thư mục hệ thống + 4 dotfile nhạy cảm bị chặn
Phát hiện symlink escape
Canonicalization + kiểm tra workspace đường dẫn đã resolve
Secret mã hóa
API key mã hóa khi lưu trữ với file key local
Kênh deny-by-default
Allowlist trống = từ chối tất cả. "*" = cho phép tất cả (opt-in rõ rà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 conTraitĐi kèm
Mô hình AIProvider28 tích hợp sẵn + endpoint tùy chỉnh
KênhChannelCLI, Telegram, Discord, Slack, WhatsApp, iMessage, Matrix, Signal, Email, IRC, Lark, DingTalk, QQ, Webhook
Hệ thống bộ nhớMemorySQLite hybrid, PostgreSQL, Lucid, Markdown, none
Công cụToolshell, file, memory, cron, git, browser, http, composio, delegate, hardware
ObservabilityObserverNoop, Log, Multi
RuntimeRuntimeAdapterNative, Docker (sandbox)
Bảo mậtSecurityPolicyPairing, sandbox, allowlist, rate limit, filesystem scoping
IdentityIdentityConfigOpenClaw (markdown), AIEOS v1.1 (JSON)
TunnelTunnelNone, Cloudflare, Tailscale, ngrok, Custom
HeartbeatEngineTác vụ định kỳ HEARTBEAT.md
Liệt kê/cài/gỡ skillLoaderTOML manifest + hướng dẫn SKILL.md
Tích hợpRegistry70+ 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ứcEndpointMô tả
GET/healthKiểm tra sức khỏe (luôn công khai, không lộ secret)
POST/pairTrao đổi OTP (header X-Pairing-Code) để lấy bearer token
POST/webhookGửi tin nhắn đến agent (Authorization: Bearer)
GET/POST/whatsappXá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ệudocs/README.md
Mục lục tài liệu thống nhấtdocs/SUMMARY.md
Tham chiếu lệnhdocs/commands-reference.md
Tham chiếu cấu hìnhdocs/config-reference.md
Tham chiếu providerdocs/providers-reference.md
Tham chiếu kênhdocs/channels-reference.md
Sổ tay vận hànhdocs/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