新代理首次运行设置向导。采访用户,生成定制的工作区文件,搭建内存,安装运维 crons,并推荐配套技能。
使用场景
- 从头设置新的 OpenClaw 代理
- Onboarding 刚安装 OpenClaw 的新用户
- 将代理工作区重置为干净的基础状态
- 有人说 "set up my agent" 或 "help me get started"
不使用场景
- 代理已经配置并运行中(改用
openclaw-guide)
- 用户想要更改一个特定的配置项
- 任务是技能编写(改用
skill-builder)
- 任务是现有代理的安全加固(改用
agent-hardening)
阶段
按顺序运行。每个阶段在继续前确认用户。
阶段 1 — 身份采访
恢复部分设置: 在开始采访前,检查 SOUL.md、USER.md 或 IDENTITY.md 是否已存在。如果存在,向用户展示已配置的内容并询问:“想从上次中断的地方继续、重新开始,还是保留这些并跳到内存设置?”尊重他们的选择。
向用户提出 8 个问题以了解他们是谁以及代理应该做什么。使用 references/interview-guide.md 中的采访指南。根据答案生成:
SOUL.md — 代理身份、个性、语气、边界
USER.md — 人的关键细节
IDENTITY.md — 代理名称、emoji、呈现方式
AGENTS.md — 根据 assets/agents-template.md 定制,原则根据用户的主要工作(Q4)和沟通风格(Q5)量身定制
在写入前向用户展示生成的文件并寻求批准。
阶段 2 — 内存搭建
运行安装脚本创建内存目录结构:
bash {baseDir}/scripts/install.sh
这将创建:
memory/ 目录,包含每日日志结构
MEMORY.md — 持久事实索引
ACTIVE.md — 当前优先级追踪器
memory/FUTURE_INTENTS.md — 承诺和延迟操作
.learnings/ — 错误和学习捕获(agent-memory-loop)
阶段 3 — 运维 Crons
与用户一起审查推荐的 crons。参见 references/cron-recipes.md。
如果 openclaw CLI 不可用: 跳过 cron 安装。改为向用户展示 references/cron-recipes.md 中的推荐 cron 配置,并解释他们可以在 OpenClaw 设置好后稍后安装。继续阶段 4。
如果 openclaw CLI 可用:
始终推荐:
适用时推荐:
只安装用户批准的内容。直接使用 OpenClaw cron 工具。
阶段 4 — 安全基线
浏览 references/security-baseline.md 中的安全检查清单。关键项目:
- 频道访问控制(白名单 vs 开放)
- SOUL.md 中的注入防御规则
- 升级框架(绿/黄/红)
- 子代理的工具限制
阶段 5 — 配套技能
根据用户需求推荐安装这些技能:
如果 ClawHub 可用,通过它安装:
clawhub install
阶段 6 — 验证
设置后,运行快速健康检查:
- 验证所有生成的文件存在且非空
- 验证 crons 已注册且有有效的下次运行时间
- 验证代理能响应基本提示
- 向用户展示所设置内容的摘要
采访原则
- 一次问一个问题——不要一次抛出全部 8 个
- 接受简短答案——从上下文推断合理的默认值
- 在写入前展示你正在生成的内容
- 永远不要在没有用户确认的情况下写入核心文件
- 保持对话语气,不要官僚作风
参考资料
references/interview-guide.md — 8 个身份问题及指导
references/cron-recipes.md — 推荐的 cron 配置
references/security-baseline.md — 新代理的安全检查清单
references/placeholder-map.md — 采访答案 → 模板占位符的完整映射 + 模型推荐
资源(模板)
assets/soul-template.md — 带占位符的 SOUL.md 模板
assets/user-template.md — USER.md 模板
assets/identity-template.md — IDENTITY.md 模板
assets/agents-template.md — AGENTS.md 启动器
assets/heartbeat-template.md — HEARTBEAT.md 启动器
脚本
scripts/install.sh — 创建内存搭建和 .learnings 目录
scripts/verify.sh — 设置后健康检查
First-run setup wizard for new OpenClaw agents. Interviews the user, generates
tailored workspace files, scaffolds memory, installs operational crons, and
recommends companion skills.
Use when
- setting up a new OpenClaw agent from scratch
- onboarding a new user who just installed OpenClaw
- resetting an agent workspace to a clean baseline
- someone says "set up my agent" or "help me get started"
Do not use when
- the agent is already configured and running (use
openclaw-guide instead)
- the user wants to change one specific config setting
- the task is skill authoring (use
skill-builder)
- the task is security hardening of an existing agent (use
agent-hardening)
Phases
Run these in order. Each phase confirms with the user before proceeding.
Phase 1 — Identity Interview
Resuming a partial setup: Before starting the interview, check if any of
SOUL.md, USER.md, or IDENTITY.md already exist. If they do, show the user
what's already configured and ask: "Want to pick up where we left off, start fresh,
or keep these and skip to memory setup?" Respect their choice.
Ask the user 8 questions to understand who they are and what the agent should do.
Use the interview guide at references/interview-guide.md.
From the answers, generate:
SOUL.md — agent identity, personality, tone, boundaries
USER.md — human's key details
IDENTITY.md — agent name, emoji, presentation
AGENTS.md — customized from assets/agents-template.md with principles
tailored to the user's main job (Q4) and communication style (Q5)
Show the user the generated files and ask for approval before writing.
Phase 2 — Memory Scaffolding
Run the install script to create the memory directory structure:
bash {baseDir}/scripts/install.sh
This creates:
memory/ directory with daily log structure
MEMORY.md — durable fact index
ACTIVE.md — current priorities tracker
memory/FUTURE_INTENTS.md — commitments and deferred actions
.learnings/ — error and learning capture (agent-memory-loop)
Phase 3 — Operational Crons
Review recommended crons with the user. See references/cron-recipes.md.
If openclaw CLI is not available: Skip cron installation. Instead, show the user
the recommended cron configs from references/cron-recipes.md and explain they can
install them later once OpenClaw is set up. Proceed to Phase 4.
If openclaw CLI is available:
Always recommend:
- Heartbeat (configurable frequency)
- Workspace backup (daily)
Recommend if applicable:
- Weekly memory consolidation
- Session health watchdog
- Security monitoring
Install only what the user approves. Use the OpenClaw cron tool directly.
Phase 4 — Security Baseline
Walk through the security checklist at references/security-baseline.md.
Key items:
- Channel access controls (allowlist vs open)
- Injection defense rules in SOUL.md
- Escalation framework (green/yellow/red)
- Tool restrictions for sub-agents
Phase 5 — Companion Skills
Recommend installing these skills based on the user's needs:
Install via ClawHub if available:
clawhub install
Phase 6 — Verification
After setup, run a quick health check:
- Verify all generated files exist and are non-empty
- Verify crons are registered and have valid next-run times
- Verify the agent can respond to a basic prompt
- Show the user a summary of everything that was set up
Interview principles
- Ask one question at a time — don't dump all 8 at once
- Accept short answers — infer reasonable defaults from context
- Show what you're generating before writing it
- Never write to core files without user confirmation
- Keep the tone conversational, not bureaucratic
References
references/interview-guide.md — the 8 identity questions with guidance
references/cron-recipes.md — recommended cron configurations
references/security-baseline.md — security checklist for new agents
references/placeholder-map.md — full mapping of interview answers → template placeholders + model recommendations
Assets (templates)
assets/soul-template.md — SOUL.md template with placeholders
assets/user-template.md — USER.md template
assets/identity-template.md — IDENTITY.md template
assets/agents-template.md — AGENTS.md starter
assets/heartbeat-template.md — HEARTBEAT.md starter
Scripts
scripts/install.sh — creates memory scaffolding and .learnings directory
scripts/verify.sh — post-setup health check