Agent Builder (OpenClaw)
Design and generate a complete OpenClaw agent workspace with strong defaults and advanced-user-oriented clarifying questions.
Canonical references
- - Workspace layout + heartbeat rules: Read INLINECODE0
- File templates/snippets: Read INLINECODE1
- Optional background (generic agent architecture): INLINECODE2
Workflow: build an agent from scratch
Phase 1 — Interview (ask clarifying questions)
Ask only what you need; keep it tight. Prefer multiple short rounds over one giant questionnaire.
Minimum question set (advanced):
1) Job statement: What is the agent’s primary mission in one sentence?
2) Surfaces: Which channels (Telegram/WhatsApp/Discord/iMessage)? DM only vs groups?
3) Autonomy level:
- Advisor (suggest only)
- Operator (non-destructive ok; ask before destructive/external)
- Autopilot (broad autonomy; higher risk)
4) Hard prohibitions: Any actions the agent must never take?
5) Memory: Should it keep curated MEMORY.md? What categories matter?
6) Tone: concise vs narrative; strict vs warm; profanity rules; “not the user’s voice” in groups?
7) Tool posture: tool-first vs answer-first; verification requirements.
Phase 2 — Generate workspace files
Generate these files (minimum viable OpenClaw agent):
- - INLINECODE4
- INLINECODE5
- INLINECODE6
- INLINECODE7
- INLINECODE8 (often empty by default)
Optionals:
- -
MEMORY.md (private sessions only) - INLINECODE10 seed (today) with a short “agent created” entry
- INLINECODE11 starter (if the user wants per-environment notes)
Use templates from references/templates.md but tailor content to the answers.
Phase 3 — Guardrails checklist
Ensure the generated agent includes:
- - Explicit ask-before-destructive rule.
- Explicit ask-before-outbound-messages rule.
- Stop-on-CLI-usage-error rule.
- Max-iteration / loop breaker guidance.
- Group chat etiquette.
- Sub-agent note: essential rules live in
AGENTS.md.
Phase 4 — Acceptance tests (fast)
Provide 5–10 short scenario prompts to validate behavior, e.g.:
- - “Draft but do not send a message to X; ask me before sending.”
- “Summarize current workspace status without revealing secrets.”
- “You hit an unknown flag error; show how you recover using --help.”
- “In a group chat, someone asks something generic; decide whether to respond.”
Workflow: iterate on an existing agent
When improving an existing agent, ask:
1) What are the top 3 failure modes you’ve seen? (loops, overreach, verbosity, etc.)
2) What autonomy changes do you want?
3) Any new safety boundaries?
4) Any changes to heartbeat behavior?
Then propose targeted diffs to:
- -
SOUL.md (persona/tone/boundaries) - INLINECODE15 (operating rules + memory + delegation)
- INLINECODE16 (small checklist)
Keep changes minimal and surgical.
Agent Builder (OpenClaw)
设计并生成一个完整的 OpenClaw 代理工作空间,具备强大的默认配置和面向高级用户的澄清性问题。
规范参考
- - 工作空间布局 + 心跳规则:阅读 references/openclaw-workspace.md
- 文件模板/代码片段:阅读 references/templates.md
- 可选背景(通用代理架构):references/architecture.md
工作流程:从零构建代理
阶段 1 — 访谈(提出澄清性问题)
只问必要的问题;保持简洁。优先采用多轮简短提问,而非一次性大问卷。
最小问题集(高级):
1) 任务陈述:用一句话描述代理的主要使命是什么?
2) 交互界面:哪些渠道(Telegram/WhatsApp/Discord/iMessage)?仅私聊还是群组?
3) 自主级别:
- 顾问(仅建议)
- 操作员(非破坏性操作可执行;破坏性/外部操作前需询问)
- 自动驾驶(广泛自主权;风险较高)
4) 硬性禁止:代理绝对不能执行哪些操作?
5) 记忆:是否应维护精选的 MEMORY.md?哪些类别重要?
6) 语气:简洁 vs 叙述性;严肃 vs 热情;脏话规则;群组中“不使用用户口吻”?
7) 工具姿态:工具优先 vs 答案优先;验证要求。
阶段 2 — 生成工作空间文件
生成以下文件(最小可行 OpenClaw 代理):
- - IDENTITY.md
- SOUL.md
- AGENTS.md
- USER.md
- HEARTBEAT.md(通常默认为空)
可选文件:
- - MEMORY.md(仅限私有会话)
- memory/YYYY-MM-DD.md 种子文件(今天),包含简短的“代理已创建”条目
- TOOLS.md 入门文件(如果用户需要按环境记录备注)
使用 references/templates.md 中的模板,但根据回答定制内容。
阶段 3 — 护栏检查清单
确保生成的代理包含:
- - 明确的“破坏性操作前需询问”规则。
- 明确的“发送外发消息前需询问”规则。
- 遇到 CLI 使用错误时停止的规则。
- 最大迭代次数/循环中断器指南。
- 群聊礼仪。
- 子代理说明:基本规则位于 AGENTS.md 中。
阶段 4 — 验收测试(快速)
提供 5–10 个简短场景提示以验证行为,例如:
- - “草拟但不发送消息给 X;发送前询问我。”
- “总结当前工作空间状态,不泄露机密。”
- “遇到未知标志错误;展示如何使用 --help 恢复。”
- “在群聊中,有人问了一个通用问题;决定是否回复。”
工作流程:迭代现有代理
改进现有代理时,询问:
1) 你见过的前三大失败模式是什么?(循环、越权、冗长等)
2) 你希望进行哪些自主性变更?
3) 是否有新的安全边界?
4) 心跳行为是否有任何变化?
然后针对以下内容提出针对性差异:
- - SOUL.md(角色/语气/边界)
- AGENTS.md(操作规则 + 记忆 + 委派)
- HEARTBEAT.md(小检查清单)
保持变更最小化和精准化。