OpenClaw 与 General Agents:90 分钟速成课
6 个场景,从零到 Personal AI Employee
OpenClaw 是你的 Personal AI Employee:一个开源 assistant,运行在你自己的 laptop 上,并通过你已经使用的 messaging apps 回复你(WhatsApp、Telegram、Discord、Slack、iMessage 等)。
它是证明 AI Employees 真实存在、确实可用、并且人们真正想要它们的项目。OpenClaw 在 2026 年成为增长最快的开源项目,发布最初几个月就在 GitHub 上获得数十万 stars。Jensen Huang 在 GTC 2026 上称它为「the next ChatGPT」;NVIDIA 也在其上构建了 NemoClaw。
90 分钟结束时,你会拥有一个运行在手机上的 AI Employee:它能回答消息,使用 tools 和 external services,按你的方式定制自己,按照自己的 schedule 工作,并且留在你的 laptop 上。它不是你要主动访问的 chatbot,而是你可以委派工作的 worker。
这门速成课如何运作。 你下载一个很小的文件夹,把它交给你的 general agent(Claude Code、OpenCode、Cowork 或 OpenCowork 都可以;它们都会从 folder context 自动导入 AGENTS.md),然后走完六个场景。agent 会读取文件夹,安装并运行 OpenClaw,连接你的手机,加入新 skills,定制它的大脑,并安排一个不需要你也能运行的任务。你负责指挥;agent 负责工作;OpenClaw 成为你的 Personal AI Employee。
下面六个场景与具体 agent 无关:每一句「把这段粘贴给你的 agent」在各工具中都相同。唯一差异是启动步骤:CLI agents(Claude Code、OpenCode)从解压文件夹里的 terminal 启动;desktop agents(Cowork、OpenCowork)通过在 app 中打开文件夹启动。选择你已经安装的那个即可。zip 里的 brief 对四者都一样。
阅读路径 · 前置要求 · 深入版本(点击展开)
阅读路径(六个场景 + 一个每月习惯):
- 安装并聊天,在 local dashboard 中完成。约 15 分钟。
- 从手机配对一个 channel(WhatsApp / Telegram / Discord)。约 15 分钟。
- 委派真实工作,观察 agent loop。约 10 分钟。
- 让它像你一样说话并记住你,并把 identity 备份到 GitHub。约 15 分钟。
- 扩展它,加入一个 skill 和一个 external tool。约 15 分钟。
- 让它自己行动,安排一个代表你运行的 cron job(或 heartbeat)。约 15 分钟。
- **(每月一次,不是今天)**运行 audit。到时候约 10 分钟。
每个场景都以可运行的成功状态结束。如果一次坐完 90 分钟太多,可以分成多次;state 会在中间保留。一个可选 appendix 覆盖 Google Workspace;voice、multi-agent safety 和 ACP-spawn dev finale 会指向第 56 章。
前置要求(本页默认你已经具备三件事):
- 已安装 Claude Code 或 OpenCode。 任意一个都可以。如果两个都没有,请先完成 Agentic Coding 速成课。
- 你已经完成 Agentic Coding 速成课。 你能批准 tool calls、阅读 agent output,并识别 agent 什么时候卡住。本页会依赖这些动作,不再重新解释。
- Node.js 22.16 或更高版本(推荐 Node 24)。在 terminal 中运行
node --version。低于v22.16时,从 nodejs.org/en/download 安装当前版本;如果你要求,general agent 会带你走完。
想要更耐心的版本? 第 56 章:认识你的 Personal AI Employee 用 17 节课讲同一套材料,并加入 voice、multi-agent、security 和 deployment。如果这里任何地方感觉太快,跳到第 56 章对应 lesson,之后再回来。
协作模式
这一页由三个 actors 共同完成。下图把关系具体化:
之后,每个场景都使用同一个五步节奏:
- 你向 general agent 粘贴一句话。 这是 brief,不是 script。你描述想要什么,而不是列举步骤。
- 你的 agent 查阅
AGENTS.md。 它已经在 context 里:文件夹中的CLAUDE.md会在 session start 自动导入它,所以不需要 fetch step。agent 会提出 plan,命名准备运行的 commands,并标出 decision points(哪个 channel、哪个 skill、要记住什么)。在第一个 destructive command 之前,它会询问你。 - 你批准并观察。 agent 运行 install commands、设置 configuration、重启 background service、观察 live log output,并把看到的东西告诉你。碰到已知 gotcha 时,它会识别 pattern 并应用文档中的 fix。
- agent 在 seam 处停下。 有些动作只有你能做:访问
aistudio.google.com获取 Gemini key,用手机扫描 QR,点击 Google OAuth screens,或听 voice note。agent 会命名这个 seam,然后等待你完成。 - 出现一个可观察结果时,场景结束。 dashboard 中出现真实 reply。手机发出的消息收到 reply。文件出现在 disk 上。每个场景都会说明要观察什么。
就这么简单。agent 做 agent 擅长的事:install、configure、debug、restart、verify、recover。你做只有你能做的事:decide、approve,并处理绑定到你手机或账户的动作。这个节奏(描述目标、拿到 plan、批准、执行并在每一步验证)和 2026 年 AI Prompting 速成课 中教授的 prompting pattern 是同一个;下面每个场景都使用两段短 paste prompts,而不是一整墙指令,让你真正体验这个节奏。
如果任何地方出问题,你不需要知道 CLI commands 或 error codes。把这段粘贴给你的 agent:
Something didn't work. Read the gateway log, tell me in plain language what you see, and propose a fix I can approve.
agent 会读取 log,命名它看到的问题,并提出 fix。你批准即可。这就是本速成课每个场景的 recovery loop。
每个场景都有预算时间(显示在 H2 中)。如果耗时超过预算的两倍(例如 15 分钟场景超过 30 分钟),把 agent 拉回并粘贴:"What's blocking us, in one sentence? Let's re-plan from there." 超过预算后还在原地打转,通常说明 agent 正在 improvising;重新锚定 plan 就能修复。
你将下载的文件夹只有两个文件:AGENTS.md(约 600 行的 operational reference,供任何 general agent 做 OpenClaw 工作时使用)和 CLAUDE.md(一行:@AGENTS.md,告诉 Claude Code 自动导入 brief)。这就是整个环境。一个文件加一个一行索引,就是你交给 agent 的完整「skill」。
随便解压到哪里。在解压文件夹中打开 terminal。启动你的 general agent:
cd openclaw-with-general-agents
claude
现在,agent 已经加载了 brief。我们会一次走一个场景;每个场景都以可运行的成功状态结束,再进入下一个。这个 brief 假设你使用的是能力足够的 general agent(Claude Code,或运行 Claude Sonnet/Opus、GPT-5、Gemini 2.5 Pro 的 OpenCode)。更旧或更小的 models 在较长场景中会漂移;如果场景 1 的第一份 plan 看起来模糊、泛泛而谈,而不是具体到你的机器,那就是继续之前应切换到更强 model 的信号。
场景 1 之前:确认 agent 已加载 brief(约 30 秒)
一句 paste 就能告诉你 CLAUDE.md 是否完成了工作,把 AGENTS.md 拉进 agent 的 context:
What can you do for OpenClaw?
如果 reply 命名了具体 OpenClaw 工作(install probes、channels、brain files、skills、MCP servers、schedules、monthly audit),说明已加载,可以进入场景 1。如果它听起来像通用 AI 能力介绍,没有 OpenClaw-specific details,说明 import 没有触发:关闭 agent,确认你位于解压后的 openclaw-with-general-agents/ 文件夹内,再重新启动。
AGENTS.md 里到底有什么(agent 正在读取的文件)你永远不需要自己读这个文件;这正是它的意义。但知道它的形状,会帮助你问出更好的问题(例如「walk me through the gotchas section」可行,是因为这个 section 存在)。brief 按顺序覆盖:
PART 1 :: PRINCIPLES (apply everywhere)
Versions checked against
Source of truth, in order ← live docs > this file > the gateway log
Critical: discover before you act ← table of 17 doc-URL pointers
Working pattern (every task) ← read → propose → ask → execute → verify
Safety rails (non-negotiable)
Secrets discipline
PART 2 :: OPERATIONS (by task type)
Install & onboard ← the probe + onboard + paid-default gotcha
Configure ← config CLI + human-path vs agent-path table
Diagnose & recover ← the 5 most common failures and their fixes
Channels (WhatsApp / Telegram / Discord + the TTY constraint)
Memory & brain ← 3 layers, brain files, cross-channel proof
Skills (via ClawHub) · Plugins · MCP servers
The activation dance ← exists → disabled → enabled → configured
Automation (heartbeats + cron + 3 hook flavors)
Multi-agent · ACP · Safety & security
When you don't know what to do ← three-layer fallback
Tone ← how to talk to you
如果稍后某个 section 变得相关,可以让 agent 先带你过一遍再行动,例如:"walk me through the Channels section of AGENTS.md before we pair WhatsApp"。这份 brief 的写法,就是为了让 agent 能从中自我引导。
场景 1:安装 Employee 并让它聊天(约 15 分钟)
目标:OpenClaw 在你的 laptop 上运行,Gemini 设置为 free tier,并且你在 dashboard 中说 hi 时能得到回复。三段短 paste prompts:先要求 plan,再批准执行,最后验证。
1a. 安装与配置
第一段 prompt:描述你想要什么,并要求 plan。
I'd like to get OpenClaw running on my laptop and chatting back through Gemini's free tier. Before you touch anything, walk me through your plan in plain language: what you'll check first, what you'll change, and where you'll need me to step in.
agent 会读取 AGENTS.md,查看你的机器,并提出 plan。它会标出两处需要你介入:从 aistudio.google.com/app/api-keys 获取免费的 Gemini API key,以及在它修改系统前确认。阅读 plan。如果合理,就继续。如果感觉不对,直接追问。问 "why are you doing that?",agent 会解释或调整。
第二段 prompt:批准并让它运行。
Plan looks good. Go ahead step by step, and tell me what you see at each step. When you need my Gemini key, pause and tell me how to give it to you safely.
agent 会停下并索要 key。访问 aistudio.google.com/app/api-keys,创建一个(免费,无需 credit card),然后按 agent 给出的 safe-handling instruction 处理。它应该优先让你在 terminal 中设置 environment variable,而不是把 key 粘贴进 chat。
**1a 完成条件:**agent 报告 OpenClaw 已安装、已配置,并且 Gemini key 已就位。
1b. 端到端验证并打开 dashboard
第三段 prompt:先端到端验证,再交给 dashboard。
Now do your own end-to-end check first (a quick "hi" through the gateway from the command line, the way your brief describes), then open the dashboard for me so I can try it from the browser too.
**场景 1 完成条件:**agent 自己的 CLI check 收到真实回复,并且它在 browser 中为你打开的 dashboard 也会在你输入 hi 后回复。dashboard footer 应显示 google/gemini-2.5-flash 为 active model。如果显示其他 model(尤其是 pro-preview model),告诉 agent,它会在产生费用前把你切到 free tier。
在底层,OpenClaw 现在是在你的 laptop 上运行的三部分系统,由一个登录后自动启动的 background service 协调:
后面的场景会逐一认识这些部分。现在只需要知道:它已经安装,并且正在回复。
场景 2:从手机配对一个 channel(约 15 分钟)
目标:从手机向你的 AI Employee 发送 hi,并收到回复。
把这段粘贴给 agent:
The model answers in the dashboard. Now I'd like to talk to my AI Employee from my phone. Walk me through pairing WhatsApp (preferred), or fall back to Telegram or Discord if WhatsApp is too much friction where I live. Explain your plan and any setup I need to do on my end before you start.
agent 会告诉你它推荐哪条路径以及原因。对于 WhatsApp,它应建议使用带第二个号码的 WhatsApp Business,而不是个人账号(底层 library 非官方,Meta 可能 ban personal accounts)。对于 Telegram,它会带你去 BotFather。对于 Discord,它会带你进入 Developer Portal,并打开需要开启的三个 privacy intents。
**agent 不能替你做的一件事:**login step 使用一个小型 terminal-based UI 来显示 QR code 或 token prompt;当 agent 通过自己的 shell tool 运行它时,这个 UI 无法正确渲染。因此某个时刻 agent 会停下,让你在同一个文件夹中打开一个新的 terminal window,并自己运行 login command。用手机扫描 QR(WhatsApp Business → Settings → Linked Devices → Link a Device),或粘贴你从 BotFather / Developer Portal 拿到的 bot token。完成后告诉 agent "linked"。
**场景完成条件:**你从手机向绑定号码发送 hi,并收到真实回复。
如果你还希望 AI Employee 在 WhatsApp group chats 中工作(不只是 one-on-one),告诉 agent:
Open the AI Employee up for group chats too. Walk me through what changes and how I add it to a test group.
你的手机现在是进入 laptop 上 OpenClaw service 的 authenticated path。这个 pairing 是你的手机刚授予的真实 trust。把它当作 credential 对待:不要分享 pairing files,不要 commit 到 public repo;如果 laptop 丢失,请从手机撤销设备(WhatsApp Business → Linked Devices,或 Telegram / Discord 的对应设置)。
场景 3:委派真实工作并观察 loop(约 10 分钟)
概念。 把「AI Employee」与 chatbot 区分开的,是 agent loop:真实任务进入,agent 判断需要哪些 tools(web fetch、calendar、file read 等),调用它们,读取结果,并形成 answer。在你看到 loop 对真实任务运行之前,「agent」听起来像 marketing;看过一次后,你就能说出 AI Employee 每次回复时实际在做什么。
把这段粘贴给 agent:
The channel works. Let's prove this is more than a chatbot. I'd like to send a task from my phone that needs the agent to actually go do something. Set up a live view of the gateway log so I can watch the agent loop happen in real time, then tell me when you're ready for me to send the task.
agent 会打开(或让你打开)一个 side terminal,实时 stream gateway log。准备好后,从手机发一个你现实中真的会委派的任务。选择真实生活中的任务,不要选 tutorial demo。适合第一次尝试的任务形状:
- Research lookup:"What does <a competitor or vendor I care about> charge for their entry plan, and what's included? Give me a one-paragraph summary plus the source URL."
- Web fetch and analyze:"Read this article URL I'll paste and tell me the three claims that most affect <my role or my industry>, with one sentence on whether each is well-supported."
- Structured task:"Look at my last five outgoing emails in <a folder or label I name>; tell me which one most needs a follow-up and what the follow-up should say."
关键是:这类任务 ChatGPT 通常会拒绝或做得很差。它需要 agent 获取真实数据、推理并产出结构化内容。你的 AI Employee 会 fetch、reason、answer。
在 log stream 中,你会看到大约六行依次滚动:
- 一条 inbound message 到达你的 channel。
- 一次 model call:agent loop 把 message 发给 Gemini,并询问该做什么。
- 一次 tool call:agent 调用任务所需 tool(web fetch、file read、calendar lookup)。
- 一条 tool result:tool 返回的内容 chunk。
- 第二次 model call:loop 把 result 发回 Gemini,并要求 summarize。
- 一条 outbound message:reply 回到你的 channel。
**场景完成条件:**你看到了这六行形状滚过,并且 reply 到达你的手机。这个形状就是 loop。后面添加的任何东西(new skill、external tool、scheduled task),只是在同一个 loop 中增加更多 tools 或 triggers。
场景 4:让它像你一样说话并记住你(约 15 分钟)
AI Employee 的行为来自 workspace 中的一组 Markdown files,位置是 ~/.openclaw/workspace/。全新安装会带有其中几个文件;本场景会触碰你第一天最可能定制的三个文件(SOUL.md、IDENTITY.md、USER.md),再创建第四个文件(MEMORY.md,只有 agent 首次写入后才会存在)。其余文件(AGENTS.md,用于 agent 自身操作规则,与 zip 中 companion AGENTS.md 不同;TOOLS.md 用于 tool policy;HEARTBEAT.md 用于 ambient routine)在 Ch56 Lesson 4: Customize Your Employee's Brain 中讲解。

4a. SOUL.md:改变它的声音
Open my OpenClaw workspace and show me
SOUL.md. I want my AI Employee to sound concise, direct, and useful rather than chatty. Propose a small edit first; don't write until I approve.
批准后,agent 会更新 voice。用手机发一个普通问题,确认 reply 风格变化。
4b. IDENTITY.md:给它一个名字
Now show me
IDENTITY.md. Help me give this AI Employee a name and a clear role. Keep it practical: what it is, what it does for me, and what it should refuse.
名字和 role 会让后续 prompts 更稳定。不要把它写成神话设定;写成 job description。
4c. USER.md:教它关于你的信息
Open
USER.mdand help me add the basics it should know about me: my work, tools, communication preferences, timezone, and what not to assume. Show me the proposed edit before writing.
USER.md 是 scheduled jobs 和 skills 的重要 context。写清楚你的实际工作,而不是愿望清单。
4d. MEMORY.md:跨 channels 提交记忆
I want to prove long-term memory works across channels. Add one harmless fact to long-term memory, then ask me to verify it from a different paired channel.
从另一个 channel 问它那个事实。如果答得出来,说明它不是只靠当前 channel cache,而是确实写入了 long-term memory。
4e. 备份你刚构建的 identity
Back up my OpenClaw workspace to a private GitHub repo. Show me exactly what will be committed, exclude secrets and pairing files, and write a one-line recovery instruction into the repo README.
**场景完成条件:**voice、identity、user context 和 one safe memory 都已写入;workspace 已备份;你知道 recovery one-liner 在哪里。现在你的 AI Employee 不只装好了,还开始像你的员工。
场景 5:用一个 skill 和一个 tool 扩展它(约 15 分钟)
概念。 OpenClaw 的扩展与 agentic coding 的扩展很像:先找到能力,再启用,再配置,再重启,然后验证。一个 skill 给它新的 expertise;一个 MCP server 给它新的外部 tool。
5a. 添加一个适合你真实工作的 skill
第一段 prompt:发现适配你的 skills。
Install the
find-skillsskill from skills.sh with Global scope (so it lands in both Claude Code and OpenClaw) and restart the gateway. Oncefind-skillsis available, use it to search skills.sh against myUSER.mdand propose two or three real skills that fit how I work. For each, tell me what its description triggers on (a sharp description fires when it should; a vague one never fires), how I'd verify it actually fired versus a vanilla reply, and which one you'd pick first. Don't install the chosen one yet; I want to pick first.
你会得到一份基于你实际工作的短清单,并带有真实 install URLs。选择一个。
第二段 prompt:同时安装到两个 runtimes,然后验证。
Install [your pick] with Global scope so it lands in both Claude Code's and OpenClaw's skills directories at once, then restart the gateway. Tell me which directories it wrote to so I can see it. List the SKILL.md description back to me so I know exactly what to send from my paired channel to trigger it, and what to watch for in the reply that proves the skill fired versus a vanilla model response.
从你的 paired channel 发送 agent 建议的 test input(meeting transcript、draft email、code snippet,或该 skill 对应的材料)。
**5a 完成条件:**agent 确认 skill 已安装并展示位置;test input 产生带有该 skill 特定格式或 framing 的 reply,而不是 generic answer。如果 skill 没有触发,通常是 description mismatch(你的消息没有触发 skill description)或漏了 restart;粘贴 universal recovery prompt。
5b. 连接一个 external tool(不需要 credentials)
标准 hello-world MCP 是 mcp-server-time:没有 API key,两个 tools(get_current_time、convert_time)。它是「你确实连接了 external tool」的标准证明。注意:MCP 会 silent failure。 misconfigured server 不会在 chat 中报错;agent 只是拿不到 tool。gateway log 是唯一诊断位置。
第一段 prompt:阅读 lesson,配置,验证。
Read https://agentfactory.panaversity.org/chinese/docs/Building-OpenClaw-Apps/meet-your-personal-ai-employee/connect-external-tools so you know the configure-then-restart shape and the Silent Failure pattern. Then set up the
mcp-server-timeexample from the lesson (no API key needed). Show me the plan first, then execute. After the gateway restart, provetimeis registered with 2 tools. If it's missing or shows 0 tools, that's Silent Failure: read the gateway log, tell me in plain language what you see, and propose a fix.
agent 会走读 lesson、运行 commands,并展示 registration list。你要看到的 line:time with 2 tools。没有出现时,agent 负责诊断;你批准 fix。
第二段 prompt:从手机触发 tool,并观察 dashboard badge。
The time MCP is connected. I'll ask a real timezone question from my paired channel. Tail the gateway log live so we can see
get_current_timeinvoked in real time, and tell me what to watch for in the dashboard athttp://127.0.0.1:18789: there should be a tool badge showing the agent used the time MCP rather than guessing from training data.
从手机问一个对你有实际意义的 time question,例如:
- "If I send this proposal to my client in <their city> right now, what's their local time? Is that a reasonable hour to email?"
- "My team in <another timezone> ends their workday in how many hours? Should I wait until tomorrow morning my time?"
- "What's the deadline in <the timezone the deadline is set in> if it's currently 3pm my time?"
**5b 完成条件:**agent 显示 time server 注册了 2 tools;手机发出的真实 time question 返回具体 live time(不是泛泛 timezone rule);dashboard 在 reply 上显示 get_current_time tool badge。badge 证明 agent 调用了 tool,而不是 hallucinating。
**场景 5 完成条件:**5a 和 5b 的 done conditions 都成立。
过程中,agent 会明确命名 activation dance:每个 OpenClaw extension(skills、plugins、MCP servers、channels、hooks)都会走同样四步:exists → disabled by default → enabled → configured (restart)。一旦看见这个 pattern,每个新 feature 就会变得熟悉,而不是第一次尝试就像坏了一样。
把本场景新增的能力写入 USER.md,让下一步 scheduled jobs 知道它们存在。把这段粘贴给 agent:
Add the skill and the MCP tool we just set up to my
USER.mdso when scheduled jobs run they know what's available. Then commit and push the updatedUSER.mdto my backup repo from 4e.
现在,不只是 identity,你的 AI Employee 的 capabilities 也能在 laptop wipe 后恢复。
场景 6:让它自己行动(约 15 分钟)
概念。 到目前为止,是你给 AI Employee 发消息,它回复你。Schedules 会把方向反过来:agent 按 clock 或 interval 行动,不需要 你先发消息。OpenClaw 有三种 proactivity:
- Cron 用于精确时间("every morning at 7am"、"every Monday at 9am"、"at end of day")。这是最常用的;你的真实生活围绕 clock times 运转。
- Heartbeat 用于固定 cadence 的 ambient checks("every 30 minutes scan for urgent unread"、"every 4 hours look at calendar for prep notes")。当 trigger 是「定期检查」而不是「准确在 X 点做」时使用。
- Hooks 用于 event triggers(webhook fires、session resets)。这里不展开;需要时看第 56 章。
本场景有两部分。6a 是快速 heartbeat demo,证明 proactive mechanism 已接好。6b 才是要保留的部分:一个明天真的会服务你的 schedule(通常是 cron job)。不要停在 6a;你禁用的 demo 不是 proactive dimension。每天运行的真实 schedule 才是。
6a. 观察一个 demo heartbeat 触发(然后关闭)
把这段粘贴给 agent:
Schedule a five-minute demo heartbeat with a low-cost task: every five minutes, check the gateway log for errors and post a one-line summary. Once I see one fire in the log, disable just this demo so it doesn't burn my Gemini quota. We'll add a real schedule next.
**完成条件:**log 显示一次 heartbeat-driven tool call,并且 demo 已禁用。观察 log 五分钟是合理的。
6b. 安排一个你真的会保留的任务(cron 或 heartbeat)
你会禁用的 demo 并不能证明 AI Employee 明天会成为你会用的工具。一个真实 schedule 可以。对大多数第一次设置的 keeper 来说,cron 是正确选择:真实工作日围绕 clock times 组织,而不是 check-intervals。
第一段 prompt:基于它对你的了解提出选项。
I'd like to add one real schedule that actually serves me, not a demo I'll forget about. Look at what you know about me from
USER.mdand suggest two or three options I might keep. For each one, tell me what it'd do, when it'd fire, and whether cron (precise time) or heartbeat (ambient interval) is the right primitive. I'll pick one.
agent 会基于你的 USER.md 提供选项(7am summary、Monday morning priorities list、end-of-day check on outstanding commitments、interval calendar scan 等)。选择明天最有用的那个。
第二段 prompt:设置并备份。
Go with the [name your choice]. Set it up, confirm when it'll next fire, and commit the schedule file to my backup repo from 4e so it survives a laptop wipe.
**完成条件:**你选择的 schedule 正在运行,已 commit 到 backup repo,并且 agent 告诉了你下一次触发时间。保持它开启。(如果明天后悔,可以只禁用那个 schedule,不影响其他东西。)
场景 7:你的每月 AI Employee audit(约 10 分钟/月)
概念。 AI Employee 会随时间累积:你安装的 skills、它捕获的 credentials、你连接的 MCP tools、它写下的 memory entries、自主 tool calls 的 logs。每一项新增都是你批准过的小决策;链条会不透明地复合。防御不是安装时保持 vigilance(你无法抓住还不存在的东西),而是在固定 cadence 上做十分钟 review。本场景不属于第一次 90 分钟;它是你在 AI Employee 生命周期中每月做一次的动作。
到时候,把这段粘贴给 agent:
Run my OpenClaw monthly audit. Walk through everything that's been installed, stored, scheduled, or written since the last audit, and flag anything I didn't explicitly approve, anything that looks revealing in memory, and any approval setting that's looser than it should be. Summarize the lot as a single short report I can either approve or trim.
agent 会检查 running inventory(skills、memory entries、approvals、MCP tools、recent tool calls)以及 stored credentials,然后写一份简短 report,说明上次 audit 以来发生了什么变化,以及哪些地方应该 tighten 或 trim。
**完成条件:**你花十分钟 review report,并至少做出一个决定(删除遗忘的 credential、撤销过宽 approval、修剪 stale memory entry、卸载 unused skill)。把下个月的 audit 标到日历上。
为什么这有效
两个东西保持新鲜;一个东西保持耐用。
Fresh #1:本页场景位于 book site。agent 每个 session 都会获取当前版本(你告诉它自己在哪个场景,它会读取相关 section)。
Fresh #2:当前 OpenClaw commands 位于 docs.openclaw.ai/llms.txt,这是完整 docs 的 LLM-friendly index。每次 agent 准备运行自己不确定的 command 时,都会重新读取。OpenClaw 发布很快;这就是 brief 在个别 flags 漂移时仍保持准确的方法。
Durable:AGENTS.md(两文件 zip 中的 operational reference)承载 OpenClaw 是什么、如何浏览 docs、safety rails(没有询问不得 sudo、不要付费 models、不要把 keys 写到 ~/.openclaw/ 之外)、recovery patterns,以及 activation dance。它覆盖完整平台:install、debugging、channels、memory、skills、plugins、MCP、automation、multi-agent、ACP 和 sandboxing。它比本页长,因为它覆盖 general agent 可能被要求对 OpenClaw 做的 everything,而不仅是上面六个场景。文件夹里的内容不会过期,所以下载一次即可复用。
智能不在文件里;智能在你的 general agent 阅读文件并把它们应用到下一个请求上。你没有走完六个互不相干的 demos;你组装了明天会触碰的工具。
现在实际运行着什么
不是六个 demos,而是一个 system。场景 6 之后持久存在的 inventory:
| Artifact | 它实际是什么 | 为什么明天重要 |
|---|---|---|
| Background service | 随 OS 自动启动的 OpenClaw | 关闭 terminal 或 reboot 后,你的 AI Employee 仍然存在 |
| Channel pairing | 你的 phone 与 laptop 之间的一条 trusted link | 你的手机通过这条路径访问 service |
| Workspace files | ~/.openclaw/workspace/ 中的七个 markdown files | AI Employee 的 identity、context、behavior 和 memory |
| GitHub backup | workspace 的 private repo 加一行 recovery instruction | laptop 丢失后 workspace 仍可恢复 |
| One installed skill | 一个来自 ClawHub 的 expertise pack | agent 会自动调用的一项真实 know-how extension |
| One external tool | agent 可以调用的一个 MCP server | 一个 agent 可用的真实 external service |
| One scheduled task | 不需要你也会触发的一个 cron job 或 heartbeat | 一个按 schedule 替你 运行的东西 |
这就是全貌。这些不是走完就禁用的 demos;它们都是明天你会触碰的工具组件。
有了它之后,一个工作日大概会这样:早上 7 点手机响起,收到你选择的 schedule(如果 7am summary 是 keeper,那就是 cron job);上午你回一个快速问题,触发 S5 中的 time MCP 或 skill;下午你让 agent 起草三封邮件回复;晚上你把一个新事实提交到 long-term memory。你完全没有打开 laptop。
如果这些 artifacts 以后有任何丢失(laptop wipe、误删、version upgrade 出错),4e 中的 GitHub repo 加上新 OpenClaw install 和 recovery one-liner,会把你带回这个精确状态。
本速成课假设 AI Employee 只读取你发来的消息。如果你计划连接 public-facing channel(support inbox、contact form,或任何陌生人可以写入的地方),请在这里停下,先阅读 Chapter 56 Lesson 14: Gate Your Agent's Tools 和 Lesson 16: Isolate with NemoClaw。sandboxed-reader pattern 是你防御 prompt injection 的结构性手段(威胁是:隐藏在 email 中的 adversarial instructions 诱骗 AI Employee 代表你采取行动)。Pairing 锁定的是 谁可以写入你的 bot;sandboxing 锁定的是 bot 可以拿读取到的内容做什么。两者都重要。
接下来去哪里
场景 6 之后,你已经拥有一个可工作的 AI Employee:workspace 已定制(voice、identity、它对你的了解、committed memory),workspace 已备份到 GitHub,安装了一个 skill,一个 external tool,以及一个替你触发的 scheduled task。这已经覆盖了大多数人需要的大部分 surface。
如果想要对本页触及的任何主题(或略过的主题)做更耐心的 walkthrough,第 56 章 有 17 节课覆盖完整平台。快速地图如下:
| 你想要…… | 去这里 |
|---|---|
| Voice replies(WhatsApp / Telegram / Discord 上的 audio) | Ch56 L10: Give it a voice |
| Reader-agent pattern(untrusted-email safety、sandboxing) | Ch56 L14: Gate Your Agent's Tools |
| 运行第二个 specialized agent(routing、separate identity) | Ch56 L11: Add a second agent |
AI Employee 召唤 general agents(面向开发者的 /acp spawn choreography finale) | Ch56 L13: Orchestrate other agents |
| Sandboxing modes 和 security hardening | Ch56 L14: Gate Your Agent's Tools, L16: Isolate with NemoClaw |
| 更多 channels(Slack、Matrix、Signal、iMessage、Zalo) | 询问你的 general agent:"Walk me through the <channel> setup using your brief." |
其他内容,你的 AGENTS.md 已经覆盖了平台的大部分。问 general agent:"What does AGENTS.md say about sandboxing?" brief 是 reference;页面只是 tour。
Meta-lesson:解压文件夹中最有价值的东西是 AGENTS.md。找一个晚上从头到尾读一遍,不是为了安装步骤,而是为了文档的 shape:discover-before-act table、human-path-vs-agent-path table、working pattern、gotcha catalog、activation dance。然后为下一个你要交给 general agent 的工具写一份。这个 pattern 可移植:每个具有可学习 surface 的工具,都值得写一个「little skill」。OpenClaw 是早期例子,因为安装过程明显受益于 agent-driven setup;你还会找到其他例子。写出下一个。
Appendix:连接 Google Workspace
先说明框架。 这需要 15 分钟以上的 Google Cloud Platform OAuth screens,而且应使用一个你愿意当成 throwaway 的真实账号。Google consent flows 有时间限制(有些 links 十分钟后过期),且需要大量点击。这是 Google 集成本身的代价;与 OpenClaw 无关,也不会让其他 integration 更容易。
把这段粘贴给 agent:
Connect Google Workspace (Gmail, Calendar, Drive) to my AI Employee. Use a throwaway Google account; walk me through the GCP and OAuth steps with explicit STOP conditions if any consent screen asks for scopes you didn't tell me to grant.
agent 会获取 live Workspace plugin docs,安装 plugin(通常叫 gog 或类似名称;假设前先 verify),在 browser 中打开 OAuth flow,通过 env-var-backed reference 捕获 consent token,并用小 probe 验证(例如 "list my next three calendar events")。
STOP conditions。 任何 quota 或 permission error 在一次 fix attempt 后仍重复。任何迹象显示你被要求授予 agent 没告诉你的 scopes。任何迹象显示 GCP project 自身配置错误(本 appendix 假设使用干净 throwaway account;debug 一个现有 GCP project 的 auth 远超速成课范围)。
指针。 深入 walkthrough 是 Ch56 Lesson 12: Connect Google Workspace。