Skip to content

ZeroClaw#

ZeroClaw 是一款使用 Rust 编写的高性能 AI 智能体框架,相比其他方案具有更低的资源占用和更快的启动速度。

目录#

特性#

  • Rust 编写:内存安全,性能卓越
  • 超低资源占用:RAM < 5MB
  • 极速启动:< 10ms 启动时间
  • 跨平台支持:Linux、macOS、Windows
  • 小巧二进制:约 8.8MB

性能对比#

Benchmark Snapshot (2026 年 2 月)#

指标 OpenClaw NanoBot PicoClaw ZeroClaw 🦀
语言 TypeScript Python Go Rust
内存占用 > 1GB > 100MB < 10MB < 5MB
启动时间 > 500s > 30s < 1s < 10ms
二进制大小 ~28MB N/A ~8MB ~8.8MB
硬件成本 Mac Mini $599 Linux SBC ~$50 Linux Board $10 任意硬件 $10

安装#

方式一:预编译二进制(推荐)#

# 下载最新版本 (根据平台选择)
# 版本资产:Linux (x86_64, aarch64, armv7), macOS (x86_64, aarch64), Windows (x86_64)

# Linux ARM64
curl -fsSLO https://github.com/zeroclaw-labs/zeroclaw/releases/latest/download/zeroclaw-aarch64-unknown-linux-gnu.tar.gz

# 解压
tar xzf zeroclaw-*.tar.gz

# 安装到 PATH
mkdir -p ~/.cargo/bin
install -m 0755 zeroclaw "$HOME/.cargo/bin/zeroclaw"

# 添加到 PATH (如未自动添加)
export PATH="$HOME/.cargo/bin:$PATH"

# 验证安装
zeroclaw -V

配置#

配置文件位置:~/.config/zeroclaw/config.toml

初始化配置#

zeroclaw onboard

Provider 配置#

阿里百炼需要使用专用的 bailian provider,不能使用通用的 openai 兼容接口。

# 基础配置
api_key = "sk-sp-xxx"
default_provider = "bailian"
default_model = "qwen3.5-plus"
default_temperature = 0.7
provider_timeout_secs = 120

# 模型路由 (可选)
model_routes = []
embedding_routes = []

查看支持的 Provider#

zeroclaw providers

Gateway 配置#

允许外网访问:

[gateway]
port = 42617
host = "0.0.0.0"
require_pairing = true
allow_public_bind = true
配置项 说明 推荐值
port 服务端口 42617
host 绑定地址 0.0.0.0 (外网) / 127.0.0.1 (本地)
require_pairing 需要配对验证 true
allow_public_bind 允许公开绑定 true (外网) / false (本地)

Skills 配置#

[skills]
open_skills_enabled = true
allow_scripts = true
prompt_injection_mode = "full"

[skills.skill_creation]
enabled = true
max_skills = 500
similarity_threshold = 0.85
配置项 说明
open_skills_enabled 启用开放技能
allow_scripts 允许执行脚本
prompt_injection_mode 提示注入模式
max_skills 最大技能数量
similarity_threshold 相似度阈值

安全配置#

[autonomy]
auto_approve = [
    "file_read",
    "memory_recall",
    # "*"  # 谨慎启用全部自动批准
]

[web_fetch]
enabled = false
allowed_domains = ["*"]

⚠️ 安全提示auto_approve = ["*"] 会启用所有操作的自动批准,生产环境慎用。

使用#

基本命令#

# 查看版本
zeroclaw -V

# 启动服务
zeroclaw daemon

# 查看状态
zeroclaw status

常见问题#

当前 zeroclaw 版本:0.5.6

Q1: 无法连接阿里百炼#

原因:使用了错误的 provider 配置

解决

# 确保配置正确
default_provider = "bailian"
# 不要使用 "custom" 或 "openai"

Q2: 端口被占用#

解决:修改 gateway 端口

[gateway]
port = 42618  # 更换其他端口

Q3: 外网无法访问#

检查项: 1. host 是否设置为 0.0.0.0 2. allow_public_bind 是否为 true 3. 防火墙是否开放对应端口 4. 路由器是否配置端口转发

Q4: 技能无法加载#

解决

[skills]
open_skills_enabled = true
allow_scripts = true

检查技能目录权限和配置文件语法。

相关链接#

  • 官方文档:https://www.zeroclawlabs.ai/docs
  • GitHub 仓库:https://github.com/zeroclaw-labs/zeroclaw
  • 下载地址:https://github.com/zeroclaw-labs/zeroclaw/releases