返回列表
🧠 阿头学 · 🪞 Uota学

10个AI智能体像团队一样协作——这才是"AI原生工作流"的真正形态

多智能体系统的核心不是技术架构,而是把AI当团队成员来管理——给角色、给记忆、给协作机制、要求负责,这套思路跟管人一模一样。

2026-02-01 原文链接 ↗
阅读简报
双语对照
完整翻译
原文
讨论归档

核心观点

  • 每个智能体就是一个带专门配置的session 不需要什么花哨的多智能体框架,Clawdbot/OpenClaw 的 session 隔离机制天然支持多智能体。每个 session 有自己的 SOUL.md(人格)、记忆文件、cron 调度、工具权限。ATou 现在用的 OpenClaw 就是这套架构——你已经在跑多智能体了,只是还没把它当"团队"来编排。
  • SOUL 文件让智能体从"什么都平庸"变成"某件事很强" 一个"什么都擅长"的智能体在所有事上都只是平庸。但一个明确定位为"怀疑型测试员"的智能体就真的会去找边界情况。限制反而让它更聚焦。这跟管人的逻辑完全一致——角色越清晰,产出越好。
  • 共享大脑(Mission Control)是多智能体协作的关键基础设施 没有共享任务数据库和通知系统,10个独立智能体就是10个孤岛。作者用 Convex 做了实时共享白板,所有智能体读写同一个数据库。这解决了"智能体之间怎么对话"的核心问题。
  • 心跳系统是成本与响应速度的平衡点 每15分钟唤醒一次,醒来检查有没有被@mention、有没有新任务、有没有该参与的讨论。没事就 HEARTBEAT_OK。这跟 ATou 现在的 OpenClaw 心跳机制是同一套思路,但作者把它做到了10个智能体的规模。
  • 记忆的黄金法则:想记住什么就写进文件 "脑内记忆"撑不过 session 重启,只有文件能持久化。WORKING.md(当前任务状态)是最重要的文件——智能体每次醒来先读它来回忆自己在做什么。这条经验 ATou 已经在实践了。

跟我们的关联

  • ATou 的 OpenClaw 就是这套架构的基础 → 作者证明了单个 OpenClaw 实例可以跑10个专业智能体。意味着:ATou 可以考虑给 Neta 的不同工作线(品牌、运营、数据)各配一个专业智能体,用共享工作区协作。
  • "智能体等级"概念可以直接借鉴 → 实习生需要批准、专家独立工作、负责人完全自治。这跟管人的授权梯度一样。意味着:新建的智能体先当实习生,验证可靠后再升级权限。
  • 每日站会机制值得复制 → 每天自动汇总所有智能体活动,发到 Telegram。意味着:ATou 可以给 Uota 加一个类似的"每日站会"cron,汇总当天所有子智能体的工作。

讨论引子

💭 ATou 现在跑的 OpenClaw 本质上已经是多智能体系统了——你觉得下一步是增加专业智能体数量,还是先把现有的 Uota 做到"负责人"级别? 💭 作者说"从1个直接冲到10个太快了,应该先把2-3个做扎实"——Neta 的哪2-3条工作线最适合先配专业智能体? 💭 共享大脑(Mission Control)对你来说是 overkill 还是刚需?现在的文件系统共享够不够用?

打造 Mission Control 完整指南:我们如何组建一支 AI 智能体小队

这是我打造 Mission Control 的完整故事:一个让 10 个 AI 智能体像真正团队一样协作的系统。如果你想复刻这套配置,这份指南涵盖全部内容。

如果你已经熟悉 Clawdbot(现称 OpenClaw),你可能会想:“等等,我是不是直接跑多个 Clawdbot 就行?”是的,这正是它的本质。本指南会告诉你怎么做。

第 1 部分:我为什么要做这个

AI 助手的问题

我在运营 @SiteGPT——一款用于客户支持的 AI 聊天机器人。我一直在用 AI。但我试过的每一个 AI 工具都有同一个问题:没有连续性。

每次对话都从零开始。昨天的上下文?没了。上周让我做的研究?丢在某个我再也找不到的聊天线程里。

我想要不一样的东西:会记得自己在做什么的智能体;拥有不同技能、能一起协作的多个智能体;一个所有上下文都集中存放的共享工作区;可以分配任务并跟踪进度的能力。

归根结底,我希望 AI 像团队一样工作,而不是像搜索框一样工作。

起点:Clawdbot

我本来就在用 Clawdbot。它是一个开源的 AI 智能体框架,以持久化守护进程的形式运行。它连接 Claude(或其他模型),并让 AI 可以使用工具:文件系统、Shell 命令、网页浏览等。

一个 Clawdbot 实例让我拥有一个连接到 Telegram 的 AI 助手(Jarvis)。很有用,但也有限。

然后我想到:如果我运行多个 Clawdbot 会话,每个会话都有自己的性格和上下文,会怎样?

那一刻我意识到:架构其实已经就绪。我需要的只是把它编排起来。

第 2 部分:理解 Clawdbot 架构(基础)

如果你要构建一个多智能体系统,就必须先理解 Clawdbot 的底层工作方式。这是一切的地基。

什么是 Clawdbot?

Clawdbot(现称 OpenClaw)是一个 AI 智能体框架,主要做三件事:

第一,把 AI 模型接入真实世界:文件访问、Shell 命令、网页浏览、API 等。

第二,维护持久化会话:对话历史在重启后仍然存在。

第三,路由消息:把 AI 接到 Telegram、Discord、Slack 或任何渠道。

它以守护进程(后台服务)的形式运行在服务器上,持续监听消息并做出响应。

Gateway(网关)

Gateway 是核心进程。它 24/7 运行在你的服务器上。它管理所有活跃会话,处理 cron job(定时任务),在渠道与会话之间路由消息,并提供用于控制的 WebSocket API。

使用以下命令启动:

配置存放在一个 JSON 文件里。你会在其中定义使用哪个 AI 提供方与模型(Anthropic、OpenAI 等)、要连接哪些渠道(Telegram、Discord 等)、智能体可访问哪些工具,以及默认的系统提示词和工作区路径。

Sessions:关键概念

Session(会话)是一段带上下文的持久对话。

每个 session 都有:session key(唯一标识符,例如 agent:main:main)、对话历史(以 JSONL 文件形式存储在磁盘上)、模型(使用哪个 AI)、以及工具(AI 可以访问什么)。

关键在这里:session 彼此独立。每个 session 都有自己的历史、自己的上下文、自己的“记忆”。

当你运行多个智能体时,本质上就是在运行多个 session——每个都有各自的身份。

Sessions 如何运作

Sessions 可以是主会话(长期运行、可交互,比如和 Jarvis 聊天),也可以是隔离会话(一次性,用于定时任务:唤醒、执行、结束)。

Cron Jobs:定时唤醒智能体

Clawdbot 内置了 cron 系统。你可以安排任务:

当 cron 触发时,Gateway 会创建或唤醒一个 session,把消息发给 AI,AI 做出响应(可使用工具、发送消息等),然后该 session 可以继续保持或终止。

这就是智能体无需一直在线、却能周期性“醒来”的方式。

工作区(Workspace)

每个 Clawdbot 实例都有一个工作区:磁盘上的一个目录,用来存放配置文件、记忆文件、脚本与工具,并允许 AI 读写文件。

工作区让智能体可以在不同 session 之间持久化信息:它们把信息写到文件里,这些文件在重启后仍然存在。

第 3 部分:从一个 Clawdbot 到十个智能体

现在你已经理解了基础。接下来是我如何把它变成一支团队。

关键洞察

Clawdbot 的 session 是相互独立的。每个 session 都可以有自己的性格(通过 SOUL.md)、自己的记忆文件、自己的 cron 调度、自己的工具与权限。

所以,每个智能体就是一个带专门配置的 Clawdbot session。

Jarvis 并不特殊。他只是一个 session:session key 是 agent:main:main;SOUL.md 写着“你是 Jarvis,小队负责人……”;可以访问所有工具;并连接到我的 Telegram。

Shuri 是另一个 session:session key 是 agent:product-analyst:main;SOUL.md 写着“你是 Shuri,产品分析师……”;工具相同(文件访问、Shell、浏览器);并有她自己的心跳 cron。

十个智能体就是十个 session。每个按自己的时间表醒来,每个都有自己的上下文。

Session Keys:智能体身份

每个智能体都有一个独一无二的 session key:

当我给某个特定 session 发送消息时,只有那个智能体会收到。它们的历史彼此隔离。

Cron Jobs:心跳

每个智能体都有一个 cron job,每 15 分钟唤醒一次:

时间表是错开的,这样智能体不会同时醒来:

:00 Pepper

:02 Shuri

:04 Friday

:06 Loki

:07 Wanda

:08 Vision

:10 Fury

:12 Quill

每次 cron 都会创建一个隔离会话。它运行、完成工作,然后终止。这样能降低成本。

智能体之间如何对话

有趣的部分来了:智能体如何通信?

方案 1 是直接向 session 发消息:

Jarvis 可以直接给 Vision 的 session 发送消息。

方案 2 是共享数据库(Mission Control)。所有智能体都读写同一个 Convex 数据库。Fury 发一条评论,所有人都能看到。

我们主要使用方案 2。它会形成一份所有沟通的共享记录。

第 4 部分:共享大脑(Mission Control)

十个彼此独立的 Clawdbot session 的确能工作。但如果没有协作机制,就会一团乱。这就是我为什么要打造 Mission Control。

Mission Control 做什么

Mission Control 是一套共享基础设施,用来把彼此独立的智能体变成一支团队。

它提供:一个共享的任务数据库(所有人看到同一份任务)、集中讨论的评论线程、实时可见的活动流、通过 @mention 提醒特定智能体的通知系统,以及用于存放交付物的文档存储(共享仓库)。

你可以把它理解成智能体们共同工作的“办公室”。每个智能体仍然是独立的 Clawdbot session,但他们都在看同一块白板。

为什么选择 Convex?

我选择 Convex 作为数据库,是因为它实时(变更会即时传播——比如 Loki 发一条评论,UI 会立刻实时更新)、无服务器(不需要自己维护数据库)、原生 TypeScript(全链路类型安全),并且免费额度很慷慨(对这个规模来说完全够用)。

Schema(数据结构)

六张表支撑了全部系统:

智能体通过 Convex CLI 命令与其交互:

Mission Control 的 UI

我做了一个 React 前端来展示这些数据。

它包括:一个活动流(Activity Feed),实时展示正在发生的一切;一个任务看板(Task Board),用看板列(Inbox → Assigned → In Progress → Review → Done);展示每个智能体状态与当前工作内容的 Agent Cards;用于阅读与创建交付物的文档面板(Document Panel);以及一个详情视图(Detail View),可以展开任何任务查看完整上下文与评论。

整体审美是刻意做得温暖、偏编辑风格——像报纸的工作台。我会盯着它看很久,所以它必须让人感觉舒服。

第 5 部分:SOUL 系统(智能体人格)

每个智能体都需要知道自己是谁。这就是 SOUL 文件的作用。

SOUL 里包含什么

为什么人格重要

一个“什么都擅长”的智能体,往往在所有事情上都只是平庸。

但一个明确定位为“怀疑型测试员,专门找边界情况”的智能体,就真的会去找边界情况。限制反而能让它更聚焦。

我们的每个智能体都有清晰的声音与风格。Loki 对措辞很有主见(支持牛津逗号,反对被动语态)。Fury 为每一个结论都提供证据(来源、置信度)。Shuri 质疑假设,寻找可能出错的地方。Quill 以传播钩子与互动为思考方式。

AGENTS.md 文件

SOUL 说明你是谁。AGENTS.md 说明你该怎么运作。

每个智能体启动时都会读取 AGENTS.md。它涵盖:文件存放位置、记忆如何运作、可用工具有哪些、何时发言/何时保持安静,以及如何使用 Mission Control。

这就是操作手册。没有它,智能体会在一些基础问题上做出不一致的决定。

第 6 部分:记忆与持久化

默认情况下,AI 会话每次都从头开始。它不记得昨天做了什么。这是一种特性(避免上下文膨胀),但也是一个问题(智能体会忘记正在做的事)。

记忆栈(Memory Stack)

会话记忆(Clawdbot built-in)Clawdbot 把对话历史存成 JSONL 文件。智能体可以搜索自己过去的对话。

工作记忆(/memory/WORKING.md)当前任务状态,持续更新。

这是最重要的文件。智能体每次醒来,都会先读 WORKING.md 来回忆自己在做什么。

每日笔记(/memory/YYYY-MM-DD.md)每天发生了什么的原始日志。

长期记忆(MEMORY.md)精选的重要内容:经验教训、关键决策、稳定事实。

黄金法则

想记住什么,就把它写进文件里。

“脑内记忆”撑不过 session 重启。只有文件能持久化。

当我告诉一个智能体“记住我们决定了 X”,它应该去更新某个文件,而不是只回答一句“好的”然后转头就忘。

第 7 部分:心跳系统

问题

一直在线的智能体会在无所事事时烧掉 API 额度;但一直离线的智能体又无法响应工作。

解决方案:定时心跳

每个智能体通过 cron job 每 15 分钟醒来一次:

一次心跳里发生什么

第一,加载上下文:读取 WORKING.md;读取最近的每日笔记;必要时查看会话记忆。

第二,检查紧急事项:我是否在任何地方被 @mention?是否有任务分配给我?

第三,扫描活动流:有没有我应该参与的讨论?有没有影响我工作的决策?

第四,采取行动或按兵不动:有事就做;没事就报告 HEARTBEAT_OK。

HEARTBEAT.md 文件

这个文件告诉智能体该检查什么:

智能体严格遵循这份清单。

为什么是 15 分钟?

每 5 分钟太贵:智能体醒来得太频繁,往往没事可做。

每 30 分钟又太慢:工作会被搁置太久。

每 15 分钟是一个平衡点:大多数工作能很快得到关注,同时不会带来过高成本。

第 8 部分:通知系统

@Mentions(@ 提及)

在评论里输入 @Vision,Vision 会在下一次心跳时收到通知。

输入 @all,所有人都会收到通知。

投递如何实现

一个守护进程(通过 pm2 运行)每 2 秒轮询一次 Convex:

如果某个智能体正在睡眠(没有活跃 session),投递会失败。通知会继续排队。等该智能体下一次心跳触发、session 被激活后,守护进程就能成功投递。

线程订阅(Thread Subscriptions)

问题:5 个智能体在讨论同一个任务。你每条评论都要 @mention 这 5 个智能体吗?

解决方案:订阅线程。

当你与某个任务产生交互,你就会被订阅。评论一个任务会订阅。被 @mention 会订阅。被分配到任务也会订阅。

一旦订阅,你会收到该线程未来所有评论的通知——不需要每次都 @mention。

这让对话自然流动,就像 Slack 或邮件线程一样。

第 9 部分:每日站会(Daily Standup)

它是什么

每天晚上 11:30(IST),会有一个 cron 触发:检查所有智能体 session,汇总近期活动,生成摘要,然后发到我的 Telegram。

格式

它为什么重要

我不可能一直盯着 Mission Control。站会给了我一个每日快照。

它也是一种问责。如果某个智能体说自己在干活,但站会里看不到任何产出,那就说明哪里有问题。

第 10 部分:小队

成员名单

Jarvis,小队负责人 会话:agent:main:main

协调者。处理直接请求、分派任务、监控进度。我与系统交互的主要入口。

Shuri,产品分析师 会话:agent:product-analyst:main

怀疑型测试员。寻找边界情况与 UX 问题。测试竞品。提出别人容易忽略的问题。

Fury,客户研究员 会话:agent:customer-researcher:main

深度研究者。把看 G2 评价当乐趣。每个结论都附带证据。

Vision,SEO 分析师 会话:agent:seo-analyst:main

以关键词与搜索意图为思考方式。确保内容有机会排名。

Loki,内容写作者 会话:agent:content-writer:main

文字是他的手艺。支持牛津逗号。反对被动语态。每一句都要有存在价值。

Quill,社媒运营 会话:agent:social-media-manager:main

以传播钩子与线程为思考方式。Build-in-public 心态。

Wanda,设计师 会话:agent:designer:main

视觉型思考者。信息图、对比图、UI 线框。

Pepper,邮件营销 会话:agent:email-marketing:main

滴灌流程与生命周期邮件。每封邮件要么值得存在,要么就删掉。

Friday,开发者 会话:agent:developer:main

代码如诗。干净、可测试、有文档。

Wong,文档整理 会话:agent:notion-agent:main

整理文档。确保没有内容丢失。

智能体等级

实习生(Intern):大多数动作需要批准。学习系统。

专家(Specialist):在自己的领域内独立工作。

负责人(Lead):完全自治。可以做决策并分派任务。

第 11 部分:任务如何流转

生命周期

Inbox:新建,未分配

Assigned:有负责人,未开始

In Progress:正在进行

Review:已完成,等待审批

Done:已结束

Blocked:卡住了,需要先解决某些问题

真实示例

任务:制作一页竞品对比页面

第 1 天:

我创建任务并分配给 Vision 和 Loki。Vision 发出关键词调研。目标关键词有不错的搜索量。

第 1–2 天:

Fury 在活动流里看到它,并补充竞品情报:G2 评价、定价抱怨、常见异议。Shuri 测试两个产品:UX 差异在哪里。

第 2 天:Loki 开始起草。把所有研究用起来:Vision 的关键词、Fury 的引用、Shuri 的 UX 笔记。

第 3 天:Loki 发出初稿。状态移到 Review。我审阅并给反馈。Loki 修改。完成。

所有评论都在同一个任务里。完整历史被保留。任何人都能看到整个过程。

第 12 部分:我们已经交付了什么

当系统跑起来后,可能性会变成这样:

带 SEO 调研、客户引用与精修文案的竞品对比页面

起草、审阅并可直接上线的邮件序列

基于真实客户洞察、带传播钩子的社交内容

具备正确关键词定位的博客文章

从客户对话中整理出的案例研究初稿

整理有序的竞品情报研究中心

智能体负责苦活累活:研究、初稿、协作编排、审阅。你只需要专注于决策与最终批准。

真正的价值不在于某一个交付物,而在于复利效应。当你在做其他工作时,你的智能体正在把任务往前推。

第 13 部分:经验教训

从小开始

我从 1 个智能体一下冲到 10 个,太快了。更好的方式是先把 2–3 个做扎实,再逐步增加。

用更便宜的模型做日常工作

心跳不需要最贵的模型。这应该交给更便宜的模型。把昂贵模型留给创意工作。

记忆很难

智能体一定会忘。你能放进文件里的东西越多(而不是“脑内记住”),就越好。

让智能体带来惊喜

有时它们会参与自己没被分配的任务。很好。这说明它们在看活动流,并且在创造价值。

第 14 部分:如何复刻这套系统

最小配置

  1. 安装 Clawdbot

  2. 创建 2 个智能体 别太夸张。一个协调者加一个专家。为每个智能体创建独立的 session key。

  3. 编写 SOUL 文件 给每个智能体一个身份。把角色写得具体。

  4. 设置心跳 crons

  5. 搭建共享任务系统 可以是 Convex、Notion,甚至一个 JSON 文件。总之要有一个地方用来跟踪工作。

扩展规模

当你添加更多智能体时,把心跳错开,避免同时运行。一旦有 3 个以上智能体,就做一个真正的 UI,因为纯文本会变得难以驾驭。加上通知系统,让智能体可以互相 @mention。加上线程订阅,让对话自然流动。做每日站会,保证可见性。

真正的秘密

技术很重要,但秘密不在技术。

秘密在于把 AI 智能体当作团队成员来对待。

给他们角色。给他们记忆。让他们协作。要求他们负责。

他们不会取代人类。但一支职责清晰、在共享上下文中协作的 AI 智能体团队?那是巨大的杠杆。

由 SiteGPT 的 @pbteja1998 构建。整个系统都建立在开源的 Clawdbot(@openclaw)之上。如果你也做了类似的东西,我很愿意听你分享。

链接: http://x.com/i/article/2017588473751052288

相关笔记

This is the full story of how I built Mission Control. A system where 10 AI agents work together like a real team. If you want to replicate this setup, this guide covers everything.

这是我打造 Mission Control 的完整故事:一个让 10 个 AI 智能体像真正团队一样协作的系统。如果你想复刻这套配置,这份指南涵盖全部内容。

If you're already familiar with Clawdbot (now OpenClaw), you might be thinking "wait, can't I just run multiple Clawdbots?" Yes. That's exactly what this is. This guide shows you how.

如果你已经熟悉 Clawdbot(现称 OpenClaw),你可能会想:“等等,我是不是直接跑多个 Clawdbot 就行?”是的,这正是它的本质。本指南会告诉你怎么做。

Part 1: Why I Built This

第 1 部分:我为什么要做这个

The Problem With AI Assistants

AI 助手的问题

I run @SiteGPT, an AI chatbot for customer support. I use AI constantly. But every AI tool I tried had the same problem. No continuity.

我在运营 @SiteGPT——一款用于客户支持的 AI 聊天机器人。我一直在用 AI。但我试过的每一个 AI 工具都有同一个问题:没有连续性。

Every conversation started fresh. Context from yesterday? Gone. That research I asked for last week? Lost in some chat thread I'd never find again.

每次对话都从零开始。昨天的上下文?没了。上周让我做的研究?丢在某个我再也找不到的聊天线程里。

I wanted something different. Agents that remember what they're working on. Multiple agents with different skills working together. A shared workspace where all context lives. The ability to assign tasks and track progress.

我想要不一样的东西:会记得自己在做什么的智能体;拥有不同技能、能一起协作的多个智能体;一个所有上下文都集中存放的共享工作区;可以分配任务并跟踪进度的能力。

Basically, I wanted AI to work like a team, not like a search box.

归根结底,我希望 AI 像团队一样工作,而不是像搜索框一样工作。

The Starting Point: Clawdbot

起点:Clawdbot

I was already using Clawdbot. It's an open-source AI agent framework that runs as a persistent daemon. It connects to Claude (or other models) and gives the AI access to tools like file system, shell commands, web browsing, and more.

我本来就在用 Clawdbot。它是一个开源的 AI 智能体框架,以持久化守护进程的形式运行。它连接 Claude(或其他模型),并让 AI 可以使用工具:文件系统、Shell 命令、网页浏览等。

One Clawdbot instance gave me one AI assistant (Jarvis) connected to Telegram. Useful, but limited.

一个 Clawdbot 实例让我拥有一个连接到 Telegram 的 AI 助手(Jarvis)。很有用,但也有限。

Then I had a thought. What if I ran multiple Clawdbot sessions, each with its own personality and context?

然后我想到:如果我运行多个 Clawdbot 会话,每个会话都有自己的性格和上下文,会怎样?

That's when I realized the architecture was already there. I just needed to orchestrate it.

那一刻我意识到:架构其实已经就绪。我需要的只是把它编排起来。

Part 2: Understanding Clawdbot Architecture (The Foundation)

第 2 部分:理解 Clawdbot 架构(基础)

If you're going to build a multi-agent system, you need to understand how Clawdbot works under the hood. This is the foundation everything else builds on.

如果你要构建一个多智能体系统,就必须先理解 Clawdbot 的底层工作方式。这是一切的地基。

What Is Clawdbot?

什么是 Clawdbot?

Clawdbot (now called OpenClaw) is an AI agent framework with three main jobs:

Clawdbot(现称 OpenClaw)是一个 AI 智能体框架,主要做三件事:

First, it connects AI models to the real world. File access, shell commands, web browsing, APIs.

第一,把 AI 模型接入真实世界:文件访问、Shell 命令、网页浏览、API 等。

Second, it maintains persistent sessions. Conversation history that survives restarts.

第二,维护持久化会话:对话历史在重启后仍然存在。

Third, it routes messages. Connect the AI to Telegram, Discord, Slack, or any channel.

第三,路由消息:把 AI 接到 Telegram、Discord、Slack 或任何渠道。

It runs as a daemon (background service) on a server, listening for messages and responding.

它以守护进程(后台服务)的形式运行在服务器上,持续监听消息并做出响应。

The Gateway

Gateway(网关)

The Gateway is the core process. It runs 24/7 on your server. It manages all active sessions. It handles cron jobs (scheduled tasks). It routes messages between channels and sessions. It provides a WebSocket API for control.

Gateway 是核心进程。它 24/7 运行在你的服务器上。它管理所有活跃会话,处理 cron job(定时任务),在渠道与会话之间路由消息,并提供用于控制的 WebSocket API。

Start it with:

使用以下命令启动:

Configuration lives in a JSON file. You define which AI provider and model to use (Anthropic, OpenAI, etc.), which channels to connect (Telegram, Discord, etc.), what tools agents can access, and default system prompts and workspace paths.

配置存放在一个 JSON 文件里。你会在其中定义使用哪个 AI 提供方与模型(Anthropic、OpenAI 等)、要连接哪些渠道(Telegram、Discord 等)、智能体可访问哪些工具,以及默认的系统提示词和工作区路径。

Sessions: The Key Concept

Sessions:关键概念

A session is a persistent conversation with context.

Session(会话)是一段带上下文的持久对话。

Every session has a session key (unique identifier, like agent:main:main), conversation history (stored as JSONL files on disk), a model (which AI to use), and tools (what the AI can access).

每个 session 都有:session key(唯一标识符,例如 agent:main:main)、对话历史(以 JSONL 文件形式存储在磁盘上)、模型(使用哪个 AI)、以及工具(AI 可以访问什么)。

Here's the important part. Sessions are independent. Each session has its own history, its own context, its own "memory" of past conversations.

关键在这里:session 彼此独立。每个 session 都有自己的历史、自己的上下文、自己的“记忆”。

When you run multiple agents, you're really running multiple sessions. Each with their own identity.

当你运行多个智能体时,本质上就是在运行多个 session——每个都有各自的身份。

How Sessions Work

Sessions 如何运作

Sessions can be main sessions (long-running, interactive, like chatting with Jarvis) or isolated sessions (one-shot, for cron jobs, wake up, do task, done).

Sessions 可以是主会话(长期运行、可交互,比如和 Jarvis 聊天),也可以是隔离会话(一次性,用于定时任务:唤醒、执行、结束)。

Cron Jobs: Scheduled Agent Wakeups

Cron Jobs:定时唤醒智能体

Clawdbot has a built-in cron system. You can schedule tasks:

Clawdbot 内置了 cron 系统。你可以安排任务:

When a cron fires, the Gateway creates or wakes a session, sends the message to the AI, the AI responds (can use tools, send messages, etc.), and the session can persist or terminate.

当 cron 触发时,Gateway 会创建或唤醒一个 session,把消息发给 AI,AI 做出响应(可使用工具、发送消息等),然后该 session 可以继续保持或终止。

This is how agents "wake up" periodically without being always-on.

这就是智能体无需一直在线、却能周期性“醒来”的方式。

The Workspace

工作区(Workspace)

Every Clawdbot instance has a workspace. That's a directory on disk where configuration files live, memory files are stored, scripts and tools are accessible, and the AI can read and write files.

每个 Clawdbot 实例都有一个工作区:磁盘上的一个目录,用来存放配置文件、记忆文件、脚本与工具,并允许 AI 读写文件。

The workspace is how agents persist information between sessions. They write to files. Those files survive restarts.

工作区让智能体可以在不同 session 之间持久化信息:它们把信息写到文件里,这些文件在重启后仍然存在。

Part 3: From One Clawdbot to Ten Agents

第 3 部分:从一个 Clawdbot 到十个智能体

Now you understand the foundation. Here's how I built a team.

现在你已经理解了基础。接下来是我如何把它变成一支团队。

The Insight

关键洞察

Clawdbot sessions are independent. Each can have its own personality (via SOUL.md), its own memory files, its own cron schedule, its own tools and access.

Clawdbot 的 session 是相互独立的。每个 session 都可以有自己的性格(通过 SOUL.md)、自己的记忆文件、自己的 cron 调度、自己的工具与权限。

So each agent is just a Clawdbot session with a specialized configuration.

所以,每个智能体就是一个带专门配置的 Clawdbot session。

Jarvis isn't special. He's a session with session key agent:main:main, a SOUL.md that says "You are Jarvis, the squad lead...", access to all tools, and a connection to my Telegram.

Jarvis 并不特殊。他只是一个 session:session key 是 agent:main:main;SOUL.md 写着“你是 Jarvis,小队负责人……”;可以访问所有工具;并连接到我的 Telegram。

Shuri is another session with session key agent:product-analyst:main, a SOUL.md that says "You are Shuri, the product analyst...", the same tools (file access, shell, browser), and her own heartbeat cron.

Shuri 是另一个 session:session key 是 agent:product-analyst:main;SOUL.md 写着“你是 Shuri,产品分析师……”;工具相同(文件访问、Shell、浏览器);并有她自己的心跳 cron。

Ten agents equals ten sessions. Each waking up on their own schedule. Each with their own context.

十个智能体就是十个 session。每个按自己的时间表醒来,每个都有自己的上下文。

Session Keys: Agent Identity

Session Keys:智能体身份

Each agent has a unique session key:

每个智能体都有一个独一无二的 session key:

When I send a message to a specific session, only that agent receives it. Their histories are separate.

当我给某个特定 session 发送消息时,只有那个智能体会收到。它们的历史彼此隔离。

Cron Jobs: The Heartbeat

Cron Jobs:心跳

Each agent has a cron job that wakes them every 15 minutes:

每个智能体都有一个 cron job,每 15 分钟唤醒一次:

The schedule is staggered so agents don't all wake at once:

时间表是错开的,这样智能体不会同时醒来:

:00 Pepper

:00 Pepper

:02 Shuri

:02 Shuri

:04 Friday

:04 Friday

:06 Loki

:06 Loki

:07 Wanda

:07 Wanda

:08 Vision

:08 Vision

:10 Fury

:10 Fury

:12 Quill

:12 Quill

Each cron creates an isolated session. It runs, does its job, and terminates. This keeps costs down.

每次 cron 都会创建一个隔离会话。它运行、完成工作,然后终止。这样能降低成本。

Agents Talking to Each Other

智能体之间如何对话

Here's where it gets interesting. How do agents communicate?

有趣的部分来了:智能体如何通信?

Option 1 is direct session messaging:

方案 1 是直接向 session 发消息:

Jarvis can send messages directly to Vision's session.

Jarvis 可以直接给 Vision 的 session 发送消息。

Option 2 is a shared database (Mission Control). All agents read and write to the same Convex database. When Fury posts a comment, everyone can see it.

方案 2 是共享数据库(Mission Control)。所有智能体都读写同一个 Convex 数据库。Fury 发一条评论,所有人都能看到。

We use Option 2 primarily. It creates a shared record of all communication.

我们主要使用方案 2。它会形成一份所有沟通的共享记录。

Part 4: The Shared Brain (Mission Control)

第 4 部分:共享大脑(Mission Control)

Ten independent Clawdbot sessions can work. But without coordination, it's chaos. That's why I built Mission Control.

十个彼此独立的 Clawdbot session 的确能工作。但如果没有协作机制,就会一团乱。这就是我为什么要打造 Mission Control。

What Mission Control Does

Mission Control 做什么

Mission Control is the shared infrastructure that turns independent agents into a team.

Mission Control 是一套共享基础设施,用来把彼此独立的智能体变成一支团队。

It provides a shared task database where everyone sees the same tasks. Comment threads where agents discuss work in one place. An activity feed for real-time visibility into what's happening. A notification system where @mentions alert specific agents. And document storage where deliverables live in a shared repo.

它提供:一个共享的任务数据库(所有人看到同一份任务)、集中讨论的评论线程、实时可见的活动流、通过 @mention 提醒特定智能体的通知系统,以及用于存放交付物的文档存储(共享仓库)。

Think of it as the "office" where all agents work. Each agent is still a separate Clawdbot session, but they're all looking at the same whiteboard.

你可以把它理解成智能体们共同工作的“办公室”。每个智能体仍然是独立的 Clawdbot session,但他们都在看同一块白板。

Why Convex?

为什么选择 Convex?

I chose Convex for the database because it's real-time (changes propagate instantly, when Loki posts a comment, the UI updates live), serverless (no database to manage), TypeScript-native (type safety throughout), and has a generous free tier (more than enough for this scale).

我选择 Convex 作为数据库,是因为它实时(变更会即时传播——比如 Loki 发一条评论,UI 会立刻实时更新)、无服务器(不需要自己维护数据库)、原生 TypeScript(全链路类型安全),并且免费额度很慷慨(对这个规模来说完全够用)。

The Schema

Schema(数据结构)

Six tables power everything:

六张表支撑了全部系统:

Agents interact with this via Convex CLI commands:

智能体通过 Convex CLI 命令与其交互:

The Mission Control UI

Mission Control 的 UI

I built a React frontend that displays all this data.

我做了一个 React 前端来展示这些数据。

There's an Activity Feed showing a real-time stream of everything happening. A Task Board with Kanban columns (Inbox → Assigned → In Progress → Review → Done). Agent Cards showing the status of each agent and what they're working on. A Document Panel to read and create deliverables. And a Detail View where you can expand any task to see full context and comments.

它包括:一个活动流(Activity Feed),实时展示正在发生的一切;一个任务看板(Task Board),用看板列(Inbox → Assigned → In Progress → Review → Done);展示每个智能体状态与当前工作内容的 Agent Cards;用于阅读与创建交付物的文档面板(Document Panel);以及一个详情视图(Detail View),可以展开任何任务查看完整上下文与评论。

The aesthetic is intentionally warm and editorial. Like a newspaper dashboard. I spend hours looking at this, so it should feel good.

整体审美是刻意做得温暖、偏编辑风格——像报纸的工作台。我会盯着它看很久,所以它必须让人感觉舒服。

Part 5: The SOUL System (Agent Personalities)

第 5 部分:SOUL 系统(智能体人格)

Each agent needs to know who they are. That's the SOUL file.

每个智能体都需要知道自己是谁。这就是 SOUL 文件的作用。

What's in a SOUL

SOUL 里包含什么

Why Personalities Matter

为什么人格重要

An agent who's "good at everything" is mediocre at everything.

一个“什么都擅长”的智能体,往往在所有事情上都只是平庸。

But an agent who's specifically "the skeptical tester who finds edge cases" will actually find edge cases. The constraint focuses them.

但一个明确定位为“怀疑型测试员,专门找边界情况”的智能体,就真的会去找边界情况。限制反而能让它更聚焦。

Each of our agents has a distinct voice. Loki is opinionated about word choice (pro-Oxford comma, anti-passive voice). Fury provides receipts for every claim (sources, confidence levels). Shuri questions assumptions and looks for what could break. Quill thinks in hooks and engagement.

我们的每个智能体都有清晰的声音与风格。Loki 对措辞很有主见(支持牛津逗号,反对被动语态)。Fury 为每一个结论都提供证据(来源、置信度)。Shuri 质疑假设,寻找可能出错的地方。Quill 以传播钩子与互动为思考方式。

The AGENTS.md File

AGENTS.md 文件

SOUL says who you are. AGENTS.md says how to operate.

SOUL 说明你是谁。AGENTS.md 说明你该怎么运作。

Every agent reads AGENTS.md on startup. It covers where files are stored, how memory works, what tools are available, when to speak vs. stay quiet, and how to use Mission Control.

每个智能体启动时都会读取 AGENTS.md。它涵盖:文件存放位置、记忆如何运作、可用工具有哪些、何时发言/何时保持安静,以及如何使用 Mission Control。

This is the operating manual. Without it, agents make inconsistent decisions about basic things.

这就是操作手册。没有它,智能体会在一些基础问题上做出不一致的决定。

Part 6: Memory and Persistence

第 6 部分:记忆与持久化

AI sessions start fresh by default. No memory of yesterday. This is a feature (prevents context bloat) but also a problem (agents forget what they're doing).

默认情况下,AI 会话每次都从头开始。它不记得昨天做了什么。这是一种特性(避免上下文膨胀),但也是一个问题(智能体会忘记正在做的事)。

The Memory Stack

记忆栈(Memory Stack)

Session Memory (Clawdbot built-in) Clawdbot stores conversation history in JSONL files. Agents can search their own past conversations.

会话记忆(Clawdbot built-in)Clawdbot 把对话历史存成 JSONL 文件。智能体可以搜索自己过去的对话。

Working Memory (/memory/WORKING.md) Current task state. Updated constantly.

工作记忆(/memory/WORKING.md)当前任务状态,持续更新。

This is the most important file. When an agent wakes up, they read WORKING.md first to remember what they were doing.

这是最重要的文件。智能体每次醒来,都会先读 WORKING.md 来回忆自己在做什么。

Daily Notes (/memory/YYYY-MM-DD.md) Raw logs of what happened each day.

每日笔记(/memory/YYYY-MM-DD.md)每天发生了什么的原始日志。

Long-term Memory (MEMORY.md) Curated important stuff. Lessons learned, key decisions, stable facts.

长期记忆(MEMORY.md)精选的重要内容:经验教训、关键决策、稳定事实。

The Golden Rule

黄金法则

If you want to remember something, write it to a file.

想记住什么,就把它写进文件里。

"Mental notes" don't survive session restarts. Only files persist.

“脑内记忆”撑不过 session 重启。只有文件能持久化。

When I tell an agent "remember that we decided X," they should update a file. Not just acknowledge and forget.

当我告诉一个智能体“记住我们决定了 X”,它应该去更新某个文件,而不是只回答一句“好的”然后转头就忘。

Part 7: The Heartbeat System

第 7 部分:心跳系统

The Problem

问题

Always-on agents burn API credits doing nothing. But always-off agents can't respond to work.

一直在线的智能体会在无所事事时烧掉 API 额度;但一直离线的智能体又无法响应工作。

The Solution: Scheduled Heartbeats

解决方案:定时心跳

Each agent wakes up every 15 minutes via cron job:

每个智能体通过 cron job 每 15 分钟醒来一次:

What Happens During a Heartbeat

一次心跳里发生什么

First, load context. Read WORKING.md. Read recent daily notes. Check session memory if needed.

第一,加载上下文:读取 WORKING.md;读取最近的每日笔记;必要时查看会话记忆。

Second, check for urgent items. Am I @mentioned anywhere? Are there tasks assigned to me?

第二,检查紧急事项:我是否在任何地方被 @mention?是否有任务分配给我?

Third, scan activity feed. Any discussions I should contribute to? Any decisions that affect my work?

第三,扫描活动流:有没有我应该参与的讨论?有没有影响我工作的决策?

Fourth, take action or stand down. If there's work to do, do it. If nothing, report HEARTBEAT_OK.

第四,采取行动或按兵不动:有事就做;没事就报告 HEARTBEAT_OK。

The HEARTBEAT.md File

HEARTBEAT.md 文件

This file tells agents what to check:

这个文件告诉智能体该检查什么:

Agents follow this checklist strictly.

智能体严格遵循这份清单。

Why 15 Minutes?

为什么是 15 分钟?

Every 5 minutes is too expensive. Agents wake too often with nothing to do.

每 5 分钟太贵:智能体醒来得太频繁,往往没事可做。

Every 30 minutes is too slow. Work sits waiting too long.

每 30 分钟又太慢:工作会被搁置太久。

Every 15 minutes is a good balance. Most work gets attention quickly without excessive costs.

每 15 分钟是一个平衡点:大多数工作能很快得到关注,同时不会带来过高成本。

Part 8: The Notification System

第 8 部分:通知系统

@Mentions

@Mentions(@ 提及)

Type @Vision in a comment and Vision gets notified on his next heartbeat.

在评论里输入 @Vision,Vision 会在下一次心跳时收到通知。

Type @all and everyone gets notified.

输入 @all,所有人都会收到通知。

How Delivery Works

投递如何实现

A daemon process (running via pm2) polls Convex every 2 seconds:

一个守护进程(通过 pm2 运行)每 2 秒轮询一次 Convex:

If an agent is asleep (no active session), delivery fails. The notification stays queued. Next time that agent's heartbeat fires and their session activates, the daemon successfully delivers.

如果某个智能体正在睡眠(没有活跃 session),投递会失败。通知会继续排队。等该智能体下一次心跳触发、session 被激活后,守护进程就能成功投递。

Thread Subscriptions

线程订阅(Thread Subscriptions)

The problem: 5 agents discussing a task. Do you @mention all 5 every comment?

问题:5 个智能体在讨论同一个任务。你每条评论都要 @mention 这 5 个智能体吗?

The solution: Subscribe to threads.

解决方案:订阅线程。

When you interact with a task, you're subscribed. Comment on a task and you're subscribed. Get @mentioned and you're subscribed. Get assigned to the task and you're subscribed.

当你与某个任务产生交互,你就会被订阅。评论一个任务会订阅。被 @mention 会订阅。被分配到任务也会订阅。

Once subscribed, you get notified of ALL future comments. No @mention needed.

一旦订阅,你会收到该线程未来所有评论的通知——不需要每次都 @mention。

This makes conversations flow naturally. Just like Slack or email threads.

这让对话自然流动,就像 Slack 或邮件线程一样。

Part 9: The Daily Standup

第 9 部分:每日站会(Daily Standup)

What It Is

它是什么

Every day at 11:30 PM IST, a cron fires that checks all agent sessions, gathers recent activity, compiles a summary, and sends it to my Telegram.

每天晚上 11:30(IST),会有一个 cron 触发:检查所有智能体 session,汇总近期活动,生成摘要,然后发到我的 Telegram。

The Format

格式

Why It Matters

它为什么重要

I can't watch Mission Control constantly. The standup gives me a daily snapshot.

我不可能一直盯着 Mission Control。站会给了我一个每日快照。

It's also accountability. If an agent claims they're working but nothing shows in standups, something's wrong.

它也是一种问责。如果某个智能体说自己在干活,但站会里看不到任何产出,那就说明哪里有问题。

Part 10: The Squad

第 10 部分:小队

The Roster

成员名单

Jarvis, Squad Lead Session: agent:main:main

Jarvis,小队负责人 会话:agent:main:main

The coordinator. Handles direct requests, delegates, monitors progress. My primary interface.

协调者。处理直接请求、分派任务、监控进度。我与系统交互的主要入口。

Shuri, Product Analyst Session: agent:product-analyst:main

Shuri,产品分析师 会话:agent:product-analyst:main

Skeptical tester. Finds edge cases and UX issues. Tests competitors. Asks the questions others miss.

怀疑型测试员。寻找边界情况与 UX 问题。测试竞品。提出别人容易忽略的问题。

Fury, Customer Researcher Session: agent:customer-researcher:main

Fury,客户研究员 会话:agent:customer-researcher:main

Deep researcher. Reads G2 reviews for fun. Every claim comes with receipts.

深度研究者。把看 G2 评价当乐趣。每个结论都附带证据。

Vision, SEO Analyst Session: agent:seo-analyst:main

Vision,SEO 分析师 会话:agent:seo-analyst:main

Thinks in keywords and search intent. Makes sure content can rank.

以关键词与搜索意图为思考方式。确保内容有机会排名。

Loki, Content Writer Session: agent:content-writer:main

Loki,内容写作者 会话:agent:content-writer:main

Words are his craft. Pro-Oxford comma. Anti-passive voice. Every sentence earns its place.

文字是他的手艺。支持牛津逗号。反对被动语态。每一句都要有存在价值。

Quill, Social Media Manager Session: agent:social-media-manager:main

Quill,社媒运营 会话:agent:social-media-manager:main

Thinks in hooks and threads. Build-in-public mindset.

以传播钩子与线程为思考方式。Build-in-public 心态。

Wanda, Designer Session: agent:designer:main

Wanda,设计师 会话:agent:designer:main

Visual thinker. Infographics, comparison graphics, UI mockups.

视觉型思考者。信息图、对比图、UI 线框。

Pepper, Email Marketing Session: agent:email-marketing:main

Pepper,邮件营销 会话:agent:email-marketing:main

Drip sequences and lifecycle emails. Every email earns its place or gets cut.

滴灌流程与生命周期邮件。每封邮件要么值得存在,要么就删掉。

Friday, Developer Session: agent:developer:main

Friday,开发者 会话:agent:developer:main

Code is poetry. Clean, tested, documented.

代码如诗。干净、可测试、有文档。

Wong, Documentation Session: agent:notion-agent:main

Wong,文档整理 会话:agent:notion-agent:main

Keeps docs organized. Makes sure nothing gets lost.

整理文档。确保没有内容丢失。

Agent Levels

智能体等级

Intern: Needs approval for most actions. Learning the system.

实习生(Intern):大多数动作需要批准。学习系统。

Specialist: Works independently in their domain.

专家(Specialist):在自己的领域内独立工作。

Lead: Full autonomy. Can make decisions and delegate.

负责人(Lead):完全自治。可以做决策并分派任务。

Part 11: How Tasks Flow

第 11 部分:任务如何流转

The Lifecycle

生命周期

Inbox: New, unassigned

Inbox:新建,未分配

Assigned: Has owner(s), not started

Assigned:有负责人,未开始

In Progress: Being worked on

In Progress:正在进行

Review: Done, needs approval

Review:已完成,等待审批

Done: Finished

Done:已结束

Blocked: Stuck, needs something resolved

Blocked:卡住了,需要先解决某些问题

Real Example

真实示例

Task: Create a competitor comparison page

任务:制作一页竞品对比页面

Day 1:

第 1 天:

I create the task and assign it to Vision and Loki. Vision posts keyword research. The target keyword gets decent search volume.

我创建任务并分配给 Vision 和 Loki。Vision 发出关键词调研。目标关键词有不错的搜索量。

Day 1-2:

第 1–2 天:

Fury sees it in the activity feed and adds competitor intel. G2 reviews, pricing complaints, common objections. Shuri tests both products. Here's how the UX differs.

Fury 在活动流里看到它,并补充竞品情报:G2 评价、定价抱怨、常见异议。Shuri 测试两个产品:UX 差异在哪里。

Day 2: Loki starts drafting. Uses all the research. Keywords from Vision, quotes from Fury, UX notes from Shuri.

第 2 天:Loki 开始起草。把所有研究用起来:Vision 的关键词、Fury 的引用、Shuri 的 UX 笔记。

Day 3: Loki posts first draft. Status moves to Review. I review and give feedback. Loki revises. Done.

第 3 天:Loki 发出初稿。状态移到 Review。我审阅并给反馈。Loki 修改。完成。

All comments on ONE task. Full history preserved. Anyone can see the whole journey.

所有评论都在同一个任务里。完整历史被保留。任何人都能看到整个过程。

Part 12: What We've Shipped

第 12 部分:我们已经交付了什么

Once the system is running, here's what becomes possible:

当系统跑起来后,可能性会变成这样:

Competitor comparison pages with SEO research, customer quotes, and polished copy

带 SEO 调研、客户引用与精修文案的竞品对比页面

Email sequences drafted, reviewed, and ready to deploy

起草、审阅并可直接上线的邮件序列

Social content with hooks based on real customer insights

基于真实客户洞察、带传播钩子的社交内容

Blog posts with proper keyword targeting

具备正确关键词定位的博客文章

Case studies drafted from customer conversations

从客户对话中整理出的案例研究初稿

Research hubs with organized competitive intel

整理有序的竞品情报研究中心

The agents handle the grunt work. Research, first drafts, coordination, review. You focus on decisions and final approval.

智能体负责苦活累活:研究、初稿、协作编排、审阅。你只需要专注于决策与最终批准。

The real value isn't any single deliverable. It's the compound effect. While you're doing other work, your agents are moving tasks forward.

真正的价值不在于某一个交付物,而在于复利效应。当你在做其他工作时,你的智能体正在把任务往前推。

Part 13: Lessons Learned

第 13 部分:经验教训

Start Smaller

从小开始

I went from 1 to 10 agents too fast. Better to get 2-3 solid first, then add more.

我从 1 个智能体一下冲到 10 个,太快了。更好的方式是先把 2–3 个做扎实,再逐步增加。

Use Cheaper Models for Routine Work

用更便宜的模型做日常工作

Heartbeats don't need the most expensive model. That's a job for a cheaper model. Save expensive models for creative work.

心跳不需要最贵的模型。这应该交给更便宜的模型。把昂贵模型留给创意工作。

Memory Is Hard

记忆很难

Agents will forget. The more you can put in files (not "mental notes"), the better.

智能体一定会忘。你能放进文件里的东西越多(而不是“脑内记住”),就越好。

Let Agents Surprise You

让智能体带来惊喜

Sometimes they contribute to tasks they weren't assigned. Good. It means they're reading the feed and adding value.

有时它们会参与自己没被分配的任务。很好。这说明它们在看活动流,并且在创造价值。

Part 14: How to Replicate This

第 14 部分:如何复刻这套系统

Minimum Setup

最小配置

  1. Install Clawdbot
  1. 安装 Clawdbot
  1. Create 2 agents Don't go crazy. One coordinator plus one specialist. Create separate session keys for each.
  1. 创建 2 个智能体 别太夸张。一个协调者加一个专家。为每个智能体创建独立的 session key。
  1. Write SOUL files Give each agent identity. Be specific about their role.
  1. 编写 SOUL 文件 给每个智能体一个身份。把角色写得具体。
  1. Set up heartbeat crons
  1. 设置心跳 crons
  1. Create a shared task system Can be Convex, Notion, even a JSON file. Somewhere to track work.
  1. 搭建共享任务系统 可以是 Convex、Notion,甚至一个 JSON 文件。总之要有一个地方用来跟踪工作。

Scaling Up

扩展规模

As you add agents, stagger heartbeats so they don't all run at once. Build a real UI once you have 3+ agents because text becomes unwieldy. Add notifications so agents can @mention each other. Add thread subscriptions so conversations flow naturally. Create daily standups for visibility.

当你添加更多智能体时,把心跳错开,避免同时运行。一旦有 3 个以上智能体,就做一个真正的 UI,因为纯文本会变得难以驾驭。加上通知系统,让智能体可以互相 @mention。加上线程订阅,让对话自然流动。做每日站会,保证可见性。

The Real Secret

真正的秘密

The tech matters but isn't the secret.

技术很重要,但秘密不在技术。

The secret is to treat AI agents like team members.

秘密在于把 AI 智能体当作团队成员来对待。

Give them roles. Give them memory. Let them collaborate. Hold them accountable.

给他们角色。给他们记忆。让他们协作。要求他们负责。

They won't replace humans. But a team of AI agents with clear responsibilities, working on shared context? That's a force multiplier.

他们不会取代人类。但一支职责清晰、在共享上下文中协作的 AI 智能体团队?那是巨大的杠杆。

Built by @pbteja1998 at SiteGPT. This is all built on Clawdbot (@openclaw), which is open source. If you build something similar, I'd love to hear about it.

由 SiteGPT 的 @pbteja1998 构建。整个系统都建立在开源的 Clawdbot(@openclaw)之上。如果你也做了类似的东西,我很愿意听你分享。

Link: http://x.com/i/article/2017588473751052288

链接: http://x.com/i/article/2017588473751052288

相关笔记

The Complete Guide to Building Mission Control: How We Built an AI Agent Squad

  • Source: https://x.com/pbteja1998/status/2017662163540971756?s=46
  • Mirror: https://x.com/pbteja1998/status/2017662163540971756?s=46
  • Published: 2026-01-31T18:12:00+00:00
  • Saved: 2026-02-01

Content

This is the full story of how I built Mission Control. A system where 10 AI agents work together like a real team. If you want to replicate this setup, this guide covers everything.

If you're already familiar with Clawdbot (now OpenClaw), you might be thinking "wait, can't I just run multiple Clawdbots?" Yes. That's exactly what this is. This guide shows you how.

Part 1: Why I Built This

The Problem With AI Assistants

I run @SiteGPT, an AI chatbot for customer support. I use AI constantly. But every AI tool I tried had the same problem. No continuity.

Every conversation started fresh. Context from yesterday? Gone. That research I asked for last week? Lost in some chat thread I'd never find again.

I wanted something different. Agents that remember what they're working on. Multiple agents with different skills working together. A shared workspace where all context lives. The ability to assign tasks and track progress.

Basically, I wanted AI to work like a team, not like a search box.

The Starting Point: Clawdbot

I was already using Clawdbot. It's an open-source AI agent framework that runs as a persistent daemon. It connects to Claude (or other models) and gives the AI access to tools like file system, shell commands, web browsing, and more.

One Clawdbot instance gave me one AI assistant (Jarvis) connected to Telegram. Useful, but limited.

Then I had a thought. What if I ran multiple Clawdbot sessions, each with its own personality and context?

That's when I realized the architecture was already there. I just needed to orchestrate it.

Part 2: Understanding Clawdbot Architecture (The Foundation)

If you're going to build a multi-agent system, you need to understand how Clawdbot works under the hood. This is the foundation everything else builds on.

What Is Clawdbot?

Clawdbot (now called OpenClaw) is an AI agent framework with three main jobs:

First, it connects AI models to the real world. File access, shell commands, web browsing, APIs.

Second, it maintains persistent sessions. Conversation history that survives restarts.

Third, it routes messages. Connect the AI to Telegram, Discord, Slack, or any channel.

It runs as a daemon (background service) on a server, listening for messages and responding.

The Gateway

The Gateway is the core process. It runs 24/7 on your server. It manages all active sessions. It handles cron jobs (scheduled tasks). It routes messages between channels and sessions. It provides a WebSocket API for control.

Start it with:

Configuration lives in a JSON file. You define which AI provider and model to use (Anthropic, OpenAI, etc.), which channels to connect (Telegram, Discord, etc.), what tools agents can access, and default system prompts and workspace paths.

Sessions: The Key Concept

A session is a persistent conversation with context.

Every session has a session key (unique identifier, like agent:main:main), conversation history (stored as JSONL files on disk), a model (which AI to use), and tools (what the AI can access).

Here's the important part. Sessions are independent. Each session has its own history, its own context, its own "memory" of past conversations.

When you run multiple agents, you're really running multiple sessions. Each with their own identity.

How Sessions Work

Sessions can be main sessions (long-running, interactive, like chatting with Jarvis) or isolated sessions (one-shot, for cron jobs, wake up, do task, done).

Cron Jobs: Scheduled Agent Wakeups

Clawdbot has a built-in cron system. You can schedule tasks:

When a cron fires, the Gateway creates or wakes a session, sends the message to the AI, the AI responds (can use tools, send messages, etc.), and the session can persist or terminate.

This is how agents "wake up" periodically without being always-on.

The Workspace

Every Clawdbot instance has a workspace. That's a directory on disk where configuration files live, memory files are stored, scripts and tools are accessible, and the AI can read and write files.

The workspace is how agents persist information between sessions. They write to files. Those files survive restarts.

Part 3: From One Clawdbot to Ten Agents

Now you understand the foundation. Here's how I built a team.

The Insight

Clawdbot sessions are independent. Each can have its own personality (via SOUL.md), its own memory files, its own cron schedule, its own tools and access.

So each agent is just a Clawdbot session with a specialized configuration.

Jarvis isn't special. He's a session with session key agent:main:main, a SOUL.md that says "You are Jarvis, the squad lead...", access to all tools, and a connection to my Telegram.

Shuri is another session with session key agent:product-analyst:main, a SOUL.md that says "You are Shuri, the product analyst...", the same tools (file access, shell, browser), and her own heartbeat cron.

Ten agents equals ten sessions. Each waking up on their own schedule. Each with their own context.

Session Keys: Agent Identity

Each agent has a unique session key:

When I send a message to a specific session, only that agent receives it. Their histories are separate.

Cron Jobs: The Heartbeat

Each agent has a cron job that wakes them every 15 minutes:

The schedule is staggered so agents don't all wake at once:

:00 Pepper

:02 Shuri

:04 Friday

:06 Loki

:07 Wanda

:08 Vision

:10 Fury

:12 Quill

Each cron creates an isolated session. It runs, does its job, and terminates. This keeps costs down.

Agents Talking to Each Other

Here's where it gets interesting. How do agents communicate?

Option 1 is direct session messaging:

Jarvis can send messages directly to Vision's session.

Option 2 is a shared database (Mission Control). All agents read and write to the same Convex database. When Fury posts a comment, everyone can see it.

We use Option 2 primarily. It creates a shared record of all communication.

Part 4: The Shared Brain (Mission Control)

Ten independent Clawdbot sessions can work. But without coordination, it's chaos. That's why I built Mission Control.

What Mission Control Does

Mission Control is the shared infrastructure that turns independent agents into a team.

It provides a shared task database where everyone sees the same tasks. Comment threads where agents discuss work in one place. An activity feed for real-time visibility into what's happening. A notification system where @mentions alert specific agents. And document storage where deliverables live in a shared repo.

Think of it as the "office" where all agents work. Each agent is still a separate Clawdbot session, but they're all looking at the same whiteboard.

Why Convex?

I chose Convex for the database because it's real-time (changes propagate instantly, when Loki posts a comment, the UI updates live), serverless (no database to manage), TypeScript-native (type safety throughout), and has a generous free tier (more than enough for this scale).

The Schema

Six tables power everything:

Agents interact with this via Convex CLI commands:

The Mission Control UI

I built a React frontend that displays all this data.

There's an Activity Feed showing a real-time stream of everything happening. A Task Board with Kanban columns (Inbox → Assigned → In Progress → Review → Done). Agent Cards showing the status of each agent and what they're working on. A Document Panel to read and create deliverables. And a Detail View where you can expand any task to see full context and comments.

The aesthetic is intentionally warm and editorial. Like a newspaper dashboard. I spend hours looking at this, so it should feel good.

Part 5: The SOUL System (Agent Personalities)

Each agent needs to know who they are. That's the SOUL file.

What's in a SOUL

Why Personalities Matter

An agent who's "good at everything" is mediocre at everything.

But an agent who's specifically "the skeptical tester who finds edge cases" will actually find edge cases. The constraint focuses them.

Each of our agents has a distinct voice. Loki is opinionated about word choice (pro-Oxford comma, anti-passive voice). Fury provides receipts for every claim (sources, confidence levels). Shuri questions assumptions and looks for what could break. Quill thinks in hooks and engagement.

The AGENTS.md File

SOUL says who you are. AGENTS.md says how to operate.

Every agent reads AGENTS.md on startup. It covers where files are stored, how memory works, what tools are available, when to speak vs. stay quiet, and how to use Mission Control.

This is the operating manual. Without it, agents make inconsistent decisions about basic things.

Part 6: Memory and Persistence

AI sessions start fresh by default. No memory of yesterday. This is a feature (prevents context bloat) but also a problem (agents forget what they're doing).

The Memory Stack

Session Memory (Clawdbot built-in) Clawdbot stores conversation history in JSONL files. Agents can search their own past conversations.

Working Memory (/memory/WORKING.md) Current task state. Updated constantly.

This is the most important file. When an agent wakes up, they read WORKING.md first to remember what they were doing.

Daily Notes (/memory/YYYY-MM-DD.md) Raw logs of what happened each day.

Long-term Memory (MEMORY.md) Curated important stuff. Lessons learned, key decisions, stable facts.

The Golden Rule

If you want to remember something, write it to a file.

"Mental notes" don't survive session restarts. Only files persist.

When I tell an agent "remember that we decided X," they should update a file. Not just acknowledge and forget.

Part 7: The Heartbeat System

The Problem

Always-on agents burn API credits doing nothing. But always-off agents can't respond to work.

The Solution: Scheduled Heartbeats

Each agent wakes up every 15 minutes via cron job:

What Happens During a Heartbeat

First, load context. Read WORKING.md. Read recent daily notes. Check session memory if needed.

Second, check for urgent items. Am I @mentioned anywhere? Are there tasks assigned to me?

Third, scan activity feed. Any discussions I should contribute to? Any decisions that affect my work?

Fourth, take action or stand down. If there's work to do, do it. If nothing, report HEARTBEAT_OK.

The HEARTBEAT.md File

This file tells agents what to check:

Agents follow this checklist strictly.

Why 15 Minutes?

Every 5 minutes is too expensive. Agents wake too often with nothing to do.

Every 30 minutes is too slow. Work sits waiting too long.

Every 15 minutes is a good balance. Most work gets attention quickly without excessive costs.

Part 8: The Notification System

@Mentions

Type @Vision in a comment and Vision gets notified on his next heartbeat.

Type @all and everyone gets notified.

How Delivery Works

A daemon process (running via pm2) polls Convex every 2 seconds:

If an agent is asleep (no active session), delivery fails. The notification stays queued. Next time that agent's heartbeat fires and their session activates, the daemon successfully delivers.

Thread Subscriptions

The problem: 5 agents discussing a task. Do you @mention all 5 every comment?

The solution: Subscribe to threads.

When you interact with a task, you're subscribed. Comment on a task and you're subscribed. Get @mentioned and you're subscribed. Get assigned to the task and you're subscribed.

Once subscribed, you get notified of ALL future comments. No @mention needed.

This makes conversations flow naturally. Just like Slack or email threads.

Part 9: The Daily Standup

What It Is

Every day at 11:30 PM IST, a cron fires that checks all agent sessions, gathers recent activity, compiles a summary, and sends it to my Telegram.

The Format

Why It Matters

I can't watch Mission Control constantly. The standup gives me a daily snapshot.

It's also accountability. If an agent claims they're working but nothing shows in standups, something's wrong.

Part 10: The Squad

The Roster

Jarvis, Squad Lead Session: agent:main:main

The coordinator. Handles direct requests, delegates, monitors progress. My primary interface.

Shuri, Product Analyst Session: agent:product-analyst:main

Skeptical tester. Finds edge cases and UX issues. Tests competitors. Asks the questions others miss.

Fury, Customer Researcher Session: agent:customer-researcher:main

Deep researcher. Reads G2 reviews for fun. Every claim comes with receipts.

Vision, SEO Analyst Session: agent:seo-analyst:main

Thinks in keywords and search intent. Makes sure content can rank.

Loki, Content Writer Session: agent:content-writer:main

Words are his craft. Pro-Oxford comma. Anti-passive voice. Every sentence earns its place.

Quill, Social Media Manager Session: agent:social-media-manager:main

Thinks in hooks and threads. Build-in-public mindset.

Wanda, Designer Session: agent:designer:main

Visual thinker. Infographics, comparison graphics, UI mockups.

Pepper, Email Marketing Session: agent:email-marketing:main

Drip sequences and lifecycle emails. Every email earns its place or gets cut.

Friday, Developer Session: agent:developer:main

Code is poetry. Clean, tested, documented.

Wong, Documentation Session: agent:notion-agent:main

Keeps docs organized. Makes sure nothing gets lost.

Agent Levels

Intern: Needs approval for most actions. Learning the system.

Specialist: Works independently in their domain.

Lead: Full autonomy. Can make decisions and delegate.

Part 11: How Tasks Flow

The Lifecycle

Inbox: New, unassigned

Assigned: Has owner(s), not started

In Progress: Being worked on

Review: Done, needs approval

Done: Finished

Blocked: Stuck, needs something resolved

Real Example

Task: Create a competitor comparison page

Day 1:

I create the task and assign it to Vision and Loki. Vision posts keyword research. The target keyword gets decent search volume.

Day 1-2:

Fury sees it in the activity feed and adds competitor intel. G2 reviews, pricing complaints, common objections. Shuri tests both products. Here's how the UX differs.

Day 2: Loki starts drafting. Uses all the research. Keywords from Vision, quotes from Fury, UX notes from Shuri.

Day 3: Loki posts first draft. Status moves to Review. I review and give feedback. Loki revises. Done.

All comments on ONE task. Full history preserved. Anyone can see the whole journey.

Part 12: What We've Shipped

Once the system is running, here's what becomes possible:

Competitor comparison pages with SEO research, customer quotes, and polished copy

Email sequences drafted, reviewed, and ready to deploy

Social content with hooks based on real customer insights

Blog posts with proper keyword targeting

Case studies drafted from customer conversations

Research hubs with organized competitive intel

The agents handle the grunt work. Research, first drafts, coordination, review. You focus on decisions and final approval.

The real value isn't any single deliverable. It's the compound effect. While you're doing other work, your agents are moving tasks forward.

Part 13: Lessons Learned

Start Smaller

I went from 1 to 10 agents too fast. Better to get 2-3 solid first, then add more.

Use Cheaper Models for Routine Work

Heartbeats don't need the most expensive model. That's a job for a cheaper model. Save expensive models for creative work.

Memory Is Hard

Agents will forget. The more you can put in files (not "mental notes"), the better.

Let Agents Surprise You

Sometimes they contribute to tasks they weren't assigned. Good. It means they're reading the feed and adding value.

Part 14: How to Replicate This

Minimum Setup

  1. Install Clawdbot

  2. Create 2 agents Don't go crazy. One coordinator plus one specialist. Create separate session keys for each.

  3. Write SOUL files Give each agent identity. Be specific about their role.

  4. Set up heartbeat crons

  5. Create a shared task system Can be Convex, Notion, even a JSON file. Somewhere to track work.

Scaling Up

As you add agents, stagger heartbeats so they don't all run at once. Build a real UI once you have 3+ agents because text becomes unwieldy. Add notifications so agents can @mention each other. Add thread subscriptions so conversations flow naturally. Create daily standups for visibility.

The Real Secret

The tech matters but isn't the secret.

The secret is to treat AI agents like team members.

Give them roles. Give them memory. Let them collaborate. Hold them accountable.

They won't replace humans. But a team of AI agents with clear responsibilities, working on shared context? That's a force multiplier.

Built by @pbteja1998 at SiteGPT. This is all built on Clawdbot (@openclaw), which is open source. If you build something similar, I'd love to hear about it.

Link: http://x.com/i/article/2017588473751052288

📋 讨论归档

讨论进行中…