codecamp

OpenClaw 智能体引导流程(Agent Bootstrapping)- 首次运行初始化指南

引导流程(Bootstrapping)是智能体首次运行时执行的初始化仪式,用于准备智能体工作区并收集身份信息。它在新手引导(onboarding)完成后,智能体首次启动时触发。

引导流程的作用

智能体首次运行时,OpenClaw会对工作区(默认路径:~/.openclaw/workspace)执行以下引导操作:

  1. 生成初始文件:AGENTS.mdBOOTSTRAP.mdIDENTITY.mdUSER.md
  2. 执行简短问答流程(每次一个问题)
  3. 将身份信息和偏好设置写入IDENTITY.mdUSER.mdSOUL.md
  4. 完成后删除BOOTSTRAP.md,确保引导流程只运行一次

运行位置

引导流程始终在网关主机(gateway host)上执行。如果macOS应用连接到远程网关,工作区和引导文件将存储在该远程机器上。

💡当网关运行在其他机器时,需在网关主机上编辑工作区文件(例如:user@gateway-host:~/.openclaw/workspace)。

OpenClaw 中的 OAuth:令牌交换、存储和多账户模式
OpenClaw 聊天的会话管理规则、键和持久化
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

OpenClaw 消息渠道

OpenClaw 工具

OpenClaw 模型

OpenClaw 平台

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }