推荐替代
推荐使用原生国产开源替代:Lingti-Bot
从这里开始
Getting Started(入门指南)
目标:从零到第一次可用聊天。推荐路径:运行向导 `clawdbot onboard`。
概览
最快的首次聊天是直接打开控制台(无需接入渠道):运行 clawdbot dashboard 或在网关主机打开 http://127.0.0.1:18789/。向导会配置模型/认证、网关、渠道、配对策略、工作区与技能,并可安装后台服务。
若使用默认沙盒模式(
agents.defaults.sandbox.mode: "non-main"),群/频道会话将运行在沙盒里。若需要主代理始终运行在宿主机,请在 routing.agents.main.sandbox.mode 中显式设置为 off。{
"routing": {
"agents": {
"main": {
"workspace": "~/clawd",
"sandbox": { "mode": "off" }
}
}
}
}0)前置条件
- Node
>=22 pnpm(可选;从源码构建建议安装)- 建议准备 Brave Search API Key(用于
web_search):clawdbot configure --section web - Windows 需 WSL2(推荐 Ubuntu)
1)安装 CLI(推荐)
curl -fsSL https://clawd.bot/install.sh | bashWindows(PowerShell):
iwr -useb https://clawd.bot/install.ps1 | iex或使用全局安装:
npm install -g clawdbot@latest
pnpm add -g clawdbot@latest2)运行向导并安装服务
clawdbot onboard --install-daemon- 选择本地/远程网关模式
- 认证方式(OpenAI Codex OAuth / API Key;Anthropic 推荐 API Key 或 setup-token)
- 渠道配置(WhatsApp/Telegram/Discord/Mattermost 插件等)
- 后台服务(launchd/systemd/WSL2)
- 网关 token(向导默认生成,即便是 loopback)
认证文件位置(重要)
- OAuth 凭据:
~/.clawdbot/credentials/oauth.json - 授权配置(OAuth + API Key):
~/.clawdbot/agents/<agentId>/agent/auth-profiles.json - 无图形界面服务器建议在本地完成 OAuth,再复制到网关主机
3)启动网关
clawdbot gateway status前台启动(手动):
clawdbot gateway --port 18789 --verbose如果配置了 token,请在控制台设置里填写(
connect.params.auth.token)。Bun 运行网关对 WhatsApp/Telegram 存在已知问题,建议使用 Node。3.5)快速验证(2 分钟)
clawdbot status
clawdbot health
clawdbot security audit --deep4)配对并连接第一个渠道
WhatsApp(二维码登录):
clawdbot channels loginTelegram/Discord/Mattermost 等:向导可写入 token,也可手动配置。
5)DM 安全(配对审批)
首次私聊会返回配对码,需审批后才会响应。详见配对文档。
从源码(开发)
git clone https://github.com/clawdbot/clawdbot.git
cd clawdbot
pnpm install
pnpm ui:build
pnpm build
pnpm clawdbot onboard没有全局安装时,可用
pnpm clawdbot ... 运行命令。7)端到端验证
确认网关、控制台、渠道、配对都可用后,发送一条测试消息。
下一步(可选)
- 向导:
/start/wizard - 配置:
/start/setup - 配对:
/start/pairing - 安全:
/gateway/security
中文交流群
扫码加入中文交流群,分享网关搭建、渠道接入与运维经验。