campaign 公告

严重

我们与 openagen/zeroclaw 或 zeroclaw.org 没有任何关联。请仅以官方仓库和经过验证的 ZeroClaw 社交账号作为信息来源。

重要

目前没有启动任何官方募资/投资计划。请忽略冒充行为和非官方声明。

重要

Anthropic OAuth 条款已变更(2026-02-19)。暂时避免使用 Claude Code OAuth 集成,等待政策风险明确。

info 简介

ZeroClaw 是一个用 Rust 构建的快速、轻量、完全自主的 AI 助手基础设施。单个静态二进制在 10 美元的硬件上运行,内存不到 5MB——比基于 Node 的方案少 99%。每个子系统都是 trait:改一行配置就能替换 Provider、频道、工具、记忆后端和隧道。

memory
单一二进制
3.4MB Release 构建,0.8GHz 下 <10ms 冷启动
swap_horiz
Trait 驱动
Provider、Channel、Tool、Memory、Tunnel——全部可替换
shield
默认安全
仅本地网关、配对 OTP、工作区隔离
developer_board
随处部署
ARM、x86、RISC-V——从树莓派到云端

download 安装

ZeroClaw 以单个 Rust 二进制发布。通过 Homebrew、引导脚本或手动源码构建安装。

前置条件: Rust stable 工具链(rustup)、Git、一个 AI Provider API Key(OpenRouter、Anthropic、OpenAI、Ollama 等)

Homebrew(macOS / Linuxbrew)

# macOS / Linuxbrew
brew install zeroclaw

一键引导安装(推荐)

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

手动构建与安装

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"

开发备选:在命令前加 cargo run --release -- 可跳过全局安装。

rocket_launch 快速上手

运行一次 onboard 设置配置,然后开始对话。

# 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

配置位置:~/.zeroclaw/config.toml——由 zeroclaw onboard 自动创建。

terminal 命令

ZeroClaw 是一个单二进制,每个工作流都有对应的子命令。

命令说明
zeroclaw onboard交互式或快速设置——创建配置、设置 API Key
zeroclaw onboard --channels-only仅重新配置频道凭据/白名单
zeroclaw agent对话模式(交互式 REPL 或单条 -m 消息)
zeroclaw gateway启动 Webhook 服务器(默认 127.0.0.1:3000)
zeroclaw daemon启动完整自主长期运行时
zeroclaw status显示完整系统状态
zeroclaw auth status查看当前认证 Profile 和 Token 状态
zeroclaw doctor诊断守护进程/调度器/频道健康状态
zeroclaw channel list列出已配置的频道及状态
zeroclaw channel doctor检查频道健康状态和就绪情况
zeroclaw channel bind-telegram <id>将 Telegram 用户 ID 加入白名单
zeroclaw service install安装用户级后台服务
zeroclaw service start/stop/status管理后台服务生命周期
zeroclaw cron管理定时任务(列出/添加/删除/暂停/恢复)
zeroclaw providers列出支持的 Provider 和别名
zeroclaw models刷新 Provider 模型目录
zeroclaw auth login使用订阅认证 Profile 登录
zeroclaw skills列出/安装/删除 Skill
zeroclaw config schema输出完整配置契约 JSON Schema
zeroclaw migrate openclaw从 OpenClaw 运行时导入数据
zeroclaw integrations info <name>获取集成设置指引
zeroclaw hardwareUSB 发现/检查/信息命令
zeroclaw peripheral管理和刷写硬件外设

smart_toy Agent 模式

zeroclaw agent 命令运行一个可以使用工具、调用记忆和执行任务的 AI 助手。

# 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 网关与守护进程

网关为频道集成提供 Webhook 服务器。守护进程运行完整的自主运行时,包括心跳、定时任务和频道。

# 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: 网关默认绑定 127.0.0.1。使用隧道(Cloudflare、Tailscale、ngrok)对外暴露。

forum 频道

频道让 ZeroClaw 接收和回复来自 Telegram、Discord、Slack、Mattermost、iMessage、Matrix、Signal、WhatsApp、Email、IRC、飞书、钉钉等的消息。所有频道使用默认拒绝的白名单。

# 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

提示:运行 zeroclaw onboard --channels-only 可仅重新配置频道,不影响其他设置。

build 工具

工具是 Agent 在对话中可以调用的能力。所有内置工具默认在沙箱中运行,并限定在工作区范围内。

# 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 记忆系统

零外部依赖的全栈搜索引擎——不需要 Pinecone,不需要 Elasticsearch,不需要 LangChain。

向量数据库
SQLite BLOB + 余弦相似度
关键词搜索
FTS5 + BM25 评分
混合合并
自定义加权合并
缓存
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 配置文件

配置位于 ~/.zeroclaw/config.toml——由 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 AI Provider

ZeroClaw 支持 28+ 内置 Provider,以及任何 OpenAI 兼容或 Anthropic 兼容的自定义端点。

Provider说明
openrouter多模型路由(推荐)
anthropicClaude 模型
openaiGPT 模型
ollama本地或远程 Ollama
geminiGoogle Gemini
custom:https://...任何 OpenAI 兼容端点

运行 zeroclaw providers 列出所有可用 Provider 和别名。

key 环境变量

Provider API Key 和可选覆盖项。

# 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
变量说明
OPENROUTER_API_KEYOpenRouter API Key
ANTHROPIC_API_KEYAnthropic API Key
OPENAI_API_KEYOpenAI API Key
OLLAMA_API_KEYOllama 远程端点 Key
ZEROCLAW_LUCID_CMDlucid 二进制路径
ZEROCLAW_LUCID_BUDGETLucid 记忆预算(默认 200)

shield 安全

ZeroClaw 在每一层都强制执行安全策略,通过了社区安全检查清单的所有项目。

仅本地网关
绑定 127.0.0.1。没有隧道或 allow_public_bind 时拒绝 0.0.0.0
需要配对
启动时生成 6 位 OTP。通过 POST /pair 交换 Bearer Token
文件系统隔离
默认 workspace_only。屏蔽 14 个系统目录 + 4 个敏感点文件
符号链接逃逸检测
规范化 + 解析路径工作区检查
加密密钥
API Key 使用本地密钥文件静态加密
默认拒绝频道
空白名单 = 拒绝所有。"*" = 允许所有(需显式启用)
[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 架构

每个子系统都是 Rust trait——改一行配置就能替换实现,零代码改动。

子系统Trait内置实现
AI 模型Provider28 个内置 + 自定义端点
频道ChannelCLI、Telegram、Discord、Slack、WhatsApp、iMessage、Matrix、Signal、Email、IRC、飞书、钉钉、QQ、Webhook
记忆系统MemorySQLite 混合、PostgreSQL、Lucid、Markdown、无
工具Toolshell、file、memory、cron、git、browser、http、composio、delegate、hardware
可观测性ObserverNoop、Log、Multi
运行时RuntimeAdapterNative、Docker(沙箱)
安全SecurityPolicy配对、沙箱、白名单、速率限制、文件系统隔离
身份IdentityConfigOpenClaw(Markdown)、AIEOS v1.1(JSON)
隧道Tunnel无、Cloudflare、Tailscale、ngrok、自定义
心跳EngineHEARTBEAT.md 周期性任务
列出/安装/删除 SkillLoaderTOML 清单 + SKILL.md 说明
集成Registry9 个分类下 70+ 集成

目前支持 runtime.kind = "native" 和 "docker"。WASM/边缘运行时已在规划中。

api 网关 API

用于频道集成和健康检查的精简 HTTP API。

方法端点说明
GET/health健康检查(始终公开,不泄露密钥)
POST/pair用 OTP(X-Pairing-Code 头)交换 Bearer Token
POST/webhook向 Agent 发送消息(Authorization: Bearer)
GET/POST/whatsappWhatsApp Webhook 验证 + 接收消息
# 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 认证与配对

订阅原生认证 Profile(多账号、静态加密),支持 OpenAI Codex 和 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 开发

标准 Rust 工作流。pre-push Git Hook 自动运行 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 文档中心

面向任务的文档,从官方仓库的文档中心开始。

文档路径
文档中心docs/README.md
统一文档目录docs/SUMMARY.md
命令参考docs/commands-reference.md
配置参考docs/config-reference.md
Provider 参考docs/providers-reference.md
频道参考docs/channels-reference.md
运维手册docs/operations-runbook.md
问题排查docs/troubleshooting.md

准备好运行了吗?

brew install zeroclaw && zeroclaw onboard --interactive