OpsBot · 生产运维安全执行平台

会记忆、会思考、
敢动手的生产运维大脑

运维最大的浪费,不是事故,而是昨天的经验今天用不上。
OpsBot 把"干活"和"记经验、用经验"焊成一个闭环——让 AI 像资深运维那样带着经验干活,并在严格的安全框架下执行。

学→ 存→ 治→ 取→ 用
卷首

OpsBot 到底不一样在哪

市面上绝大多数"AI 运维助手",说穿了就是个听话的执行器——你说一句,它做一件,做完转头就忘。聪明、勤快、反应快,但永远是个第一天上岗的实习生:你昨天手把手教过的坑,它今天照样替你再踩一遍。

OpsBot 走的是另一条路。它把"干活"和"记经验、用经验"焊成一个闭环,而且这个闭环从 2026 年 8 月起跨过了运维和开发两个岗位——同一个员工,既排障发版,也读码改码:

学 → 存 → 治 → 取 → 用 边干边学经验 → 把经验存成能用的资产 → 主动治理知识污染 → 干活前先取出相关经验 → 在生产安全框架下用它执行。

五环咬死,缺一不可,合起来就是一个真正的运维大脑。上篇逐环讲它怎么转、凭什么靠得住;中篇讲它怎么把运维和开发两个岗位干在一个人身上、权限却不合一;下篇把话挑明:为什么那些通用 Agent 框架(OpenClaw、Hermes、Codex、Claude Code)再怎么装插件,也补不齐这个闭环。

整套系统只有一条贯穿始终的设计原则,一句话就能说清:

聪明的事交给 AI,出不得错的事用代码管死。

该判断的(这是什么活、这条命令危不危险)让 AI 去想,它比规则聪明;该守死的(不可逆操作必须审批、删数据必须先备份)用代码兜底,一步都不让步。

上篇 · OpsBot 如何成为"运维大脑"
第一章 · 定位

从执行器,到带经验干活的资深运维

OpsBot 不是聊天机器人,不是个人助理,不是代码生成工具。它是一个生产环境运维安全执行平台——团队每个人通过聊天窗口(Slack / Mattermost / Telegram)与它交互,它在严格的权限与安全框架下执行运维操作,并且把每一次操作的经验沉淀下来、在下一次需要时主动调出来用。

知识,正散落在三个最不可靠的地方

一个十年经验的资深运维,值钱的从来不是他打字快,而是他脑子里装着这套系统所有的坑、所有的约定、所有"上次是这么解决的"。而今天,这些最宝贵的运维知识,正散落在三处:

  • 沉睡在公司的文档系统、Confluence、Wiki 里——写下时认真,三个月后没人记得它在哪,搜也搜不到。
  • 只活在某一个资深老员工的脑子里——他在,团队就稳;他休假、他跳槽,整个团队瞬间回到"新手村"。
  • 散在无数条聊天记录和工单里——发生过,但再也拼不回来。

OpsBot 把这三处的知识,统一收拢进它自己的大脑:结构化、持久化、永不遗忘,并且越用越聪明。

这意味着一件对任何组织都至关重要的事——经验第一次真正属于公司,而不是属于某个人。即使核心员工离职,他也再带不走这些沉淀下来的知识和教训。 团队的运维能力,不再随人员流动而起伏。

"健忘的实习生" vs "带经验的专家"

设想同一个场景:半年前你部署一个 web 应用时发现,"它所在集群的 ingress controller 是 0.48 版,必须用 pathType: Prefix 而不是 ImplementationSpecific,否则路由不生效"。

  • 健忘的实习生(通用 Agent):半年后再给这个应用配 ingress,它早已忘了这件事(会话重置了、记忆被压缩了、或它根本没想起来去查),于是用默认配置 → 生产故障。
  • 带经验的专家(OpsBot):半年后你一提这个应用的 ingress,相关经验在它动手前就被自动调出,它直接用正确配置。

这就是"执行器"和"运维大脑"的差别。而做到后者靠的不是某个单点功能,是下面五个环节缺一不可的闭环——任何一环断了,"带经验干活"就不成立。

图 1 · 运维大脑的五环闭环
flowchart LR
    L["学
自学习飞轮"] --> S["存
实体收敛"] S --> Z["治
知识防污染"] Z --> Q["取
orient 调取经验"] Q --> Y["用
生产安全执行"] Y -.每次执行产生新经验.-> L style Q fill:#d8eae8,stroke:#1f6b6b,stroke-width:2px style Z fill:#f6edd6,stroke:#a8780a,stroke-width:2px style S fill:#f3e3e0,stroke:#b8362a,stroke-width:2px
第二章 · 学

自学习飞轮

经验长在人脑里,人一走就清零。
OpsBot 把经验长在系统里。

OpsBot 不需要你专门"教"它。它在每一次干活的过程中自动学习,把有价值的东西沉淀进知识库。这套自学习由六个机制协同:

机制触发时机学什么
Auto-Reflect每次工具执行后(异步)状态变化、用户反馈、操作经验
失败→成功闭环提炼任务成功结束时"这样做失败了,换那样成功了"的避坑经验(见第四章)
Feedback 检测识别到用户纠正"不是 dev 是 uat"、"以后都用 X" 等规则(附用户身份)
确定性资源台账创建资源/部署服务成功后(hook 确定性捕获)bot 亲手创建的云资源与服务器长期服务:位置/版本/用途,并提醒沉淀凭证
Learning Orchestrator主动深度学习某项目多轮 plan→collect→ask→analyze→update
Verify Action验证旧知识仍准确时刷新"最后验证时间",标记知识新鲜度
图 1 · 自学习飞轮 — 六机制协同喂养知识库
轮子一直在转 · ①②③④⑥ 全自动后台 · ⑤ 用户触发深度学习

学得多,更要学得干净

所有学习产物都不会直接写库,而是统一经过一道写入门控(5 步流水线:模板校验 → 自动补全 → 别名标准化 → 冲突去重 → 写入),并辅以:

  • content_hash 去重:内容未变化时跳过写入,不产生无意义副本;
  • Contextual Retrieval:写入时由模型生成一段语义前缀,增强后续语义检索的准确性;
  • 凭证守卫:双层拦截,防止 token / 密码被误存进知识库;
  • 来源保护:人工录入和种子知识受保护,不被自动学习覆盖。

学习是飞轮的"输入"。但光会学还不够——学来的东西怎么存,决定了它将来取不取得出来。

第三章 · 存

实体驱动的知识收敛

在资深运维的脑子里,"web" 是一个有身份的对象。
在大多数 AI 的知识库里,"web" 是散落在几十条记录里的幽灵。

普通 AI 的通病:认不出"这几条说的是同一个东西"

普通 AI 助手的知识库有两个看似无关、实则同根的毛病:

  • 同一个东西,越记越乱:同一个 web 服务,部署时记一条、改了副本记一条、再改一次又记一条——三条互不相干的记录越堆越多,回头没人知道哪条才是最新的。
  • 同一个东西,信息散落:一个服务的各项信息(对外域名、所在集群、相关配置)散落在好几条记录里,AI 要用时得东拼西凑,还可能拼错。

两个毛病一个根:它认不出"这几条记录其实都在讲同一个对象"。记的时候认不出,就越堆越乱;用的时候认不出,就串不起来。OpsBot 从根上解决了这件事。

解法:让"实体"成为知识库的一等公民

我们为每一条知识引入一个稳定的身份标识 entity_id,格式为 {对象}@{项目}:{环境},例如 web@shop:prod。

  • 写入收敛:写入 web@shop:prod 的状态时,先检索该实体是否已有记录——有则更新同一条(始终最新),而不是新建。三次操作收敛成一条,而非堆成三条。
  • 读取串联:调取 backend-p0@media:prod 的经验时,所有挂在这个实体上的散落知识被一起召回,AI 不再需要拼凑。

怎么保证"同一个实体永远算出同一个 id"

这件事不能靠碰运气。entity_id 由三层防线锁死:

图 2 · entity_id 三层防线
flowchart TD
    A["① 模型推理语义
从内容认出'这讲的是 web'"] --> B["② 代码确定性规范化
'Web服务'/'prod 的 web'/'web'
统一收敛为 web@shop:prod"] B --> C["③ 写入前实体检索
命中已有实体 → 收敛到同一条"] style A fill:#d8eae8,stroke:#1f6b6b,stroke-width:2px style B fill:#f6edd6,stroke:#a8780a,stroke-width:2px style C fill:#f3e3e0,stroke:#b8362a,stroke-width:2px

这正是那条原则的落地:认实体靠 AI 的语义判断,定格式靠代码的死规矩。 不让脆弱的正则去猜"这是不是 web",也不让飘忽的模型去拍板最终的 id 长什么样——各干各擅长的。

此外,两类知识区别对待,对应资深运维的真实心智模型:

  • 状态类知识(现在几个副本、什么镜像)→ 永远更新同一条,始终最新;
  • 经验类知识(某次踩坑、为什么迁移)→ 才追加新条,不丢历史。

环境进入 entity_id(prod / dev / uat 算作独立实体),符合"生产和测试是两回事"的运维直觉。全程 fail-open:实体识别一旦异常,自动降级回原有流程,绝不阻塞写入。

一条知识的一生:写 · 读 · 更 · 删

OpsBot 对知识的每一次读写都走确定性管线,而不是随手 INSERT / SELECT——下面这条流动的光点,就是一条知识在管线里走完的一生:

图 3 · 知识 CRUD 生命周期
Write · 写入五步门控

模板校验 → 补全 → 别名标准化 → 冲突去重 → 写入;content_hash 去重、凭证守卫拦 token/密码。

Read · 读取混合检索

feedback/troubleshooting 优先 → 关键词+向量广召回 → 按 project 图扩展 → Jina 精排 top-5。

Update · 更新实体收敛

同一 entity_id 的状态更新同一条、始终最新;经验类才追加新条、保留历史。

Delete · 删除来源保护

种子/人工录入受保护、不被自动删;过时知识超 7 天标"未验证"提示复核。

第四章 · 治

知识库防污染(Anti-Pollution)

一个只写不读的知识库,时间久了不是资产,是垃圾场。
而垃圾会淹没真正的宝藏。

这不是理论推演,是一次真实的生产审计

我们对生产知识库做了一次审计,结果触目惊心:

1636
总知识条数
82%
是排障记录
1243
条是"失败流水账"
(占全库 76%)
99%
永远标记"活跃故障"

这些"失败流水账"是系统在每次工具失败时自动写下的——参数写错、网络抖动、权限不足,每失败一次就记一条。它们大多是临时性失败(一次性的、早已不复存在),却被当作"活跃故障"反复召回;它们持续稀释检索质量,让真正有价值的经验被淹没在噪音里。

关键洞见:失败本身不值钱,"失败→成功"才值钱

问题的本质不是"记太多",而是"记错了东西"。一次工具失败本身没有复用价值——参数写错、网络抖一下,记下来对下次毫无帮助。真正值钱的是"踩了坑、又怎么绕出来"的完整经过:比如"直接连数据库连不上,因为这个容器里没装客户端、默认连的是本机;指定了远程地址之后就通了"。这种"坑在哪、正确做法是什么"的避坑经验,才是下次干同类活时真正想要的。

OpsBot 的做法:源头不记流水账,只沉淀闭环经验

  • 新产生的:OpsBot 不会一失败就记一条。失败信息只临时留在当前这次对话里;等任务真正成功完成时,它回头看整个操作过程,识别出"这类操作先踩了坑、后来怎么解决的",提炼成一条避坑经验存下来,标记为"已解决"。没有圆满结局的失败,不留痕。
  • 已堆积的:对历史上积压的流水账,用一套分步骤的流程浓缩清理——按操作类型归类,让模型把每一类提炼成少数几条精华经验,其余清除。

清理是分步的,删除那一刀必须人来拍板

清理存量是要从生产库里真删数据,删错了找不回来。所以我们没有让系统"自己看着办、直接清",而是拆成三步,把"删不删"的决定权牢牢留在人手里:

  1. 第一步(系统做,只看不动):系统把成千上万条失败记录按工具归类,让模型把每一类浓缩成几条真正有价值的避坑经验,然后生成一份清单——「这些精华建议保留,这些旧记录建议删除」。这一步全程只读,一条数据都不会动。
  2. 第二步(人来拍板):上面那份清单交到你手上。你看过、确认没问题,才进入下一步。你不点头,系统就停在这里,绝不会自己往下删。(你也可以先让系统"空跑"一遍演示效果,只打印不执行,看清楚了再来真的。)
  3. 第三步(系统执行,但先留后路):得到你的确认后,系统先把所有要删的记录完整备份到文件,然后才执行删除。万一事后发现删错了,照着备份能一条条找回来。

一句话:系统只负责把方案准备好,删除这一刀始终由人来下,而且下刀前一定先留好备份。

至于被保留下来的"失败→成功"精华经验,会被标记成"已解决"——这样它不会再混进"当前活跃故障"的列表去骚扰人,但你下次干同类活时,它照样能被检索到。它的身份从"一条没完没了的报错",变成了"一条随时可查的避坑笔记"。

知识库干净了,下一章讲 OpsBot 怎么在干活前主动把这些经验调出来用——一边净化、一边调用,知识库才真正成了越用越值钱的资产,而不是越堆越脏的垃圾场。

第五章 · 取

orient — 干活前,先回忆

知识库里存了再多经验,干活前不调出来用,等于没存。
OpsBot 最与众不同的地方,就是它动手前一定先回忆。

普通 AI 助手有个通病:你一发指令,它立刻就动手,哪怕知识库里明明躺着一条"这个坑上次就栽过"的经验,它也想不起来去翻。于是同样的错误,换个时间又犯一遍。

OpsBot 不这样。它内置了一个叫 orient(侦察) 的环节——任何变更类操作,它在真正动手之前,一定先像老师傅那样把这件事在脑子里过一遍:这是什么活?以前对它做过什么、踩过什么坑?正确的路子是什么?想清楚了,才动手。

图 3 · 干活前的侦察:想清楚才动手
flowchart TD
    A["① 这是什么活?
涉及哪个对象?
我得先搞清楚什么?"] --> B["② 翻经验
把这件事相关的
历史经验都调出来"] B --> C{"③ 够不够动手?
还有没搞清的吗?"} C -->|还不够| B C -->|够了| D["④ 出一份行动前简报
这活归谁管、
踩过什么坑、最短正确路径"] style A fill:#d8eae8,stroke:#1f6b6b,stroke-width:2px style D fill:#f3e3e0,stroke:#b8362a,stroke-width:2px

最关键的是第 ③ 步会反复追问:如果发现还有没搞清的地方,它会回头再翻一轮经验,直到心里有底才停(当然有次数上限,不会没完没了)。这一步保证它不是"草草搜一下就开干",而是真的把功课做足。

侦察完,它给自己写一份行动前简报——这不是"仅供参考"的资料,而是这次操作的行动依据:和临时的直觉冲突时,以简报里沉淀下来的经验为准。

这对你意味着什么

  • 踩过的坑不再重复踩:上次怎么栽的、后来怎么解决的,下次干同类活时它自己先想起来。
  • 新人也能干老手的活:团队最资深那个人脑子里的经验,OpsBot 替所有人记着、用着。
  • 稳,不蛮干:动手前先想清楚归属和正确路径,而不是上来就试、试错了再回滚。

一个诚实的说明:因为多了"先想一遍"这个环节,OpsBot 的回复会比"上来就干"的助手略慢几秒。这是我们故意的——老师傅也要先想三秒再动手,想清楚了少出事,比快几秒重要得多。

第六章 · 智能检索

让经验穿透症状,直达根因

用户报的是症状("Redis 报错了"),
知识库存的是根因("NFS 宕机导致 PVC I/O error")。
中间隔着一条因果链。

检索若只会按字面匹配,就跨不过这条鸿沟。OpsBot 的检索管线用四个机制让经验穿透症状直达根因:

  • 查询扩展:把"Redis 报错"扩展成"Redis 存储故障 PVC"、"中间件存储异常"等多个搜索角度,多路召回;
  • 项目操作上下文注入:做事前自动注入该项目的"活跃故障"和"操作关键信息"(如正确的数据库凭证 key、连接方式),放在提示词末尾(模型对末尾信息遵从度更高);
  • 因果索引:一条"NFS 故障"知识标注它影响 redis / sso / mysql;用户查 redis 时,能顺着影响关系命中 NFS 根因;
  • 知识生命周期:故障解决后(经用户确认)标记为"已解决",不再当作活跃故障注入。

这套检索是层层递进的:先捞出最相关的反馈和避坑经验,再从多个角度广撒网召回候选,顺着项目关联把相关知识带出来,最后做一轮精排,留下最相关的几条。任何一步出问题都安全降级、绝不影响正常使用。它是 orient 能在干活前调出准确经验的底层支撑。

第七章 · 用

生产安全执行框架

会记忆、会思考之后,最后一道关:
敢不敢让它动手?生产环境的答案必须是——在足够的安全框架下,敢。

命令安全:AI 判断风险,代码兜底兜住

OpsBot 在执行任何一条命令之前,都会先让一个专门的模型判断这条命令到底有多危险(安全 / 只读 / 变更 / 危险)。它不是去匹配几个危险关键词,而是真正读懂这条命令:它会不会改动东西、改了能不能撤销、影响多大范围。判断完,才决定是直接执行,还是必须先找人审批。

这一点很关键,因为危险往往藏在细节里。同样是一条扩缩容命令,把副本数设成 3 是正常扩容,设成 0 就等于把整个服务停掉;find / -delete 看着平平无奇,跑起来能把整台机器清空。靠死板的关键词规则根本分不清这些——只有真正读懂命令意图的模型才分得清。

这个思路和业界最强的 Agent(Claude Code)一致:给够上下文和原则,让 AI 自己判断,而不是用一张黑名单去框它。但运维和写代码不一样——这是生产环境、没人盯着、出了事没法撤销。所以 OpsBot 在 AI 判断之外,又压了一道代码兜底:万一模型判断失败,一律按"危险"处理、强制走审批;就算 AI 把一条高风险命令误判成安全的,最坏也只是多弹一次审批,绝不可能跳过审批直接执行。一句话——AI 负责把风险看准,代码负责"看不准时也绝不出事"。

为了确认这道防线真的扛得住,我们用 82 条对抗性测试反复攻击它,覆盖了直接的危险命令、各种话术诱导、伪装绕过等多个攻击角度。

其余安全支柱

  • 跨用户审批:A 发起危险操作,必须由具备权限的 B 审批(管理员不能审批自己的操作)。审批状态持久化,服务重启也不丢。
  • 四维 RBAC:权限精确到 用户 × 工具 × 环境,prod / uat / dev 独立隔离,角色分层(admin ⊃ ops ⊃ dev ⊃ viewer),即时变更无需重启。
  • 可插拔的安全规则(借鉴 Claude Code):每一条安全规则都是独立的一块,新增一条规则就是加一块、不动其它,下线一条就是拿掉一块。安全策略随业务演进,改起来又快又稳,不会牵一发动全身。
  • 关键操作不让 AI 自由发挥:安全扫描、故障诊断、发布验证这类复杂流程,走的是代码写死的固定流水线,AI 只决定"要不要做这件事",不决定"具体怎么一步步做"——从根上杜绝了 AI 自由编排时常见的跳步、调错工具、参数拼错。
  • 凭证安全通道:密码一律私信直发给请求者,不经过 AI、不出现在群聊里,杜绝被无意间泄露或回显。
  • 完整审计:每一次操作都被完整记录、可按任意维度追溯查询,满足合规审计要求。
触达机制 · Station

一条安全通道,连进每一个隔离的生产环境

你要让一个 AI 直接动手操作生产环境,可生产环境往往锁在客户的内网、IDC、隔离机房里——它怎么够得着?够着了,又怎么保证安全?

OpsBot 的中枢(大脑)跑在它自己的环境里,本身碰不到你的隔离生产网络。跨越这道鸿沟的,是驻点(Station)——中枢伸进你网络的"手脚"。

中枢是大脑,驻点是手脚

驻点是一个部署在你目标环境内部的轻量执行体(集群里的一个 Pod,或网络里的一台机器)。它只带一身运维 CLI(kubectl / mysql / psql / redis-cli / curl / helm),不含任何业务逻辑、不做任何决策、不保管任何密钥——所有"思考"都在中枢,驻点只负责"在环境里落地这一下"。中枢要操作某个隔离环境时,经驻点下达一次性命令、把结果取回;环境内的 K8s、数据库、日志、内网 API,全部由该环境的驻点代为触达。

为什么是驻点,而不是直连或拉一张大 VPN

  • ① 一条通道,告别逐端口加白。传统做法要让运维系统碰到你内网的每个服务——K8s API、每个数据库、每个内网 API、监控——就得为每个端口、每个 IP 在防火墙上开一条白名单:口子越开越多,维护越来越烦,攻击面越来越大。驻点把这一切收敛成一条通道,要开的口子从 N 个变成 1 个。
  • ② 零入站,一个对外端口都不用开(针对 K8s 集群)。驻点是一个不暴露任何对外端口的普通 Pod,中枢经集群本就有的 K8s API 用 kubectl exec「钻进去」下命令——你的防火墙一个入站口子都不用为它开。这正是安全团队最在意的:不引入新的入站攻击面。
  • ③ 一个 OpsBot,管得了天南海北的多个隔离网络。不同客户、地区、机房(北京、香港、英国、美国……)互不相通也没关系,每个网络一个驻点分别触达。私有 IP 跨网络常撞段(都用 10.x / 192.168.x),而"中枢 + 多驻点"模型认的是"哪个驻点"不是"哪个 IP",比硬拉一张大 VPN / overlay 干净得多。
  • ④ 你的密钥,永远不落在环境里。私钥、密码、Token 全锁在中枢的加密凭证库;用时经标准输入临时注入、用完即焚,驻点自身一个密钥都不存。哪怕驻点被攻破,攻击者也拿不到任何凭证——因为那里压根没有。
  • ⑤ 哑执行机,轻到可以随时重建。零业务逻辑、零状态,就是一身工具加一条通道:部署快、审计简单、出问题删了重建。

落地只有三个前提:① 至少部署一个驻点——每个想让 OpsBot 操作的隔离网络 / 环境至少放一个;② 部署在那个网络内部(集群里的 Pod,或网络内一台机器),它才够得着该环境的 K8s / 数据库 / 内网服务;③ 能和 OpsBot 中枢通讯——二选一:中枢能访问该集群的 K8s API(走 k8s-exec,零入站、最安全),或开一条受限 SSH 通道(限定来源 IP)让中枢连入(用于 API 都够不着的纯内网 / IDC)。接入新环境 = 部署一个新驻点,OpsBot 本体一行都不用改。

第八章 · 工程成熟度

让产品能规模化交付的底层功夫

  • 一套代码,三个平台:Slack、Mattermost、Telegram 通过统一的聊天适配层支撑,业务逻辑零 IM 依赖。新增平台只需实现一个适配器,不碰业务代码。
  • 多租户一致性铁律:同一套代码部署给不同客户,除明确标注的客户独有接入外,所有行为、配置、凭证来源完全一致——禁止因部署位置不同而写分支逻辑。这保证了规模化交付时的质量一致性。
  • 渐进式上下文压缩:四级渐进策略管理超长对话,旧的工具结果先归档再压缩、需要时可原文取回,不做有损丢弃;压缩后恢复环境与项目上下文。
  • 工具体系:自有工具定义框架,默认 fail-closed(保守),自动发现注册,结果统一截断预算,工具过多时按相关性懒加载。
中篇 · 一个员工,两个岗位
第九章 · 干活

一条 MR 的一生:在运维和开发之间穿梭八步

人力团队里,运维和开发之间有四个交接点。
每个交接点都在等人、丢信息。
OpsBot 一个人从头干到尾,线不断。

OpsBot 从 2026 年 8 月起多了一个岗位:开发工程师。它能读客户仓库、改代码、开 MR、做 review、盯 CI、按仓库惯例把修复晋级到生产。但真正值钱的不是"又会一样",而是两个岗位长在同一个员工身上——下面这条线,是它每天在客户生产环境里真实走的路:一个报错从 thread 进来,最后变成一条被验证过的发布和一条写进知识库的经验。往下滚动,看它在两条泳道之间怎么走、每一步靠哪道门兜底。

图 9 · 一条任务线,两条泳道
运维 OPS 开发 DEV 知识库 KB · 两岗共用 ① 人在这里等 ② 发哪个分支? ③ 没人回头看 ④ 复盘没人读 1报错进来 2定位到代码 3改码 4MR + review 5盯 CI 6晋级 uat/main 7发布门 8验证 · 沉淀
OpsBot 一条线走完人力团队:两个人各走一段交接点:等人 / 丢信息
往下滚动,线会跟着亮。
运维泳道

报错进 thread

同事贴一段报错、一个构建链接,或者一句"后台打不开了"。OpsBot 读 Loki / OpenSearch 日志、看 pod 状态、翻 thread 里的附件——这一步和一个资深运维做的事一样。

这一步的门只读操作,直接执行;连日志后端都按客户登记的来选,不推销、不猜。
跨到开发泳道

定位到代码

日志指向一个接口,OpsBot 不会停在"请开发看一下"。它把仓库快照拉进工作区,grep 到那个 handler,亲读代码块边界——不信注释,注释只是作者的主张。侦察侧链同时把"最近 24 小时谁发了什么"摆在旁边:事故真凶常常就是刚发的版。

这一步的门读客户代码需要 developer 及以上角色;未注册和 viewer 连读都不行。
人力交接点 ① · 运维有日志,开发有代码,各看一半
开发泳道

改码,或者交给编码子代理

小改动直接暂存编辑;大改动委派给编码子代理(Opus,单实例长任务)。所有编辑都在中枢容器的工作区里,静态检查随手做,提交前不产生任何外部副作用。

这一步的门客户仓库代码是不可信输入,中枢永远不执行它(不跑测试、不装依赖);子代理只有读和暂存,提交这一步它没有权限。commit 的作者是下指令的人,不是机器人。
开发泳道

开 MR,做 review

提交到 feature 分支、开 MR。review 时攒齐发现一次批量发行内评论,再单发一份 HTML 评审报告;仓库画像(分支惯例、feature 不跑 CI、哪些合并炸过)从知识库里带出来,越审越熟。

这一步的门受审批机器人管辖的仓库,只能走 MR——直写保护分支、直接 play 部署 job 都会被挡回来。
开发泳道

盯 CI,红了修到绿

"我一直盯着它"对一个 AI 来说本来是句空话——一轮对话结束它就不在了。所以盯 CI 做成了事件驱动:pipeline 到终态就把 OpsBot 叫醒,失败读 job 日志修到绿,成功接着走下一步。中途不刷屏。

这一步的门CI 门禁绝不绕过:关"流水线必须成功"、删挡路的 manual job、改 CI 文件,三条等价路径全部强制审批。
跨回运维泳道

cherry-pick 晋级 uat → main

修复合进 dev 之后,按这个仓库自己的惯例 cherry-pick 到 uat、再提 MR 到 main——一条龙做完,不摆"整支合并还是半截"的多选题给用户。惯例不知道就问一句,然后记住。

这一步的门整支合并是重大变更,只有用户明确要求才做;往 main 写 commit 强制审批,卡片归 dev_admin。
人力交接点 ② · 开发说"合了",运维不知道该发哪个分支
运维泳道

生产发布门

用户拍板"上线",OpsBot 的动作是发起发布让审批卡确认,不是自己改完再汇报。release_commit、kubectl apply、argocd sync 到生产,换哪个工具都一样被拦。

这一步的门生产发布强制审批,与请求人角色无关;批了"写 main"不等于批了"上线",两张卡。
运维泳道 → 知识库

回读验证,经验写进知识库

发布后回读对账,pipeline 终态直接唤醒接着做后续步骤。整轮查了什么、结论是什么,和 remember_knowledge 同一轮写进知识库;调查型任务跑了八步以上却零沉淀,系统会自己把它叫回来补记。

这一步的门只有成功调用了知识库写入才许说"已记录";写进去的东西下次第 ② 步定位时就在手边。
人力交接点 ③④ · 发完没人回头看 · 复盘文档开发不读
第十章 · 为什么

为什么是一个 AI,而不是两个人

运维和开发本来就是同一条价值链上的两段。把它们分给两个人,不是因为这样更好,而是因为一个人装不下两套经验。OpsBot 装得下——而且装在同一个知识库里。

交接点人力团队(两个人)OpsBot(一个员工)
报错 → 定位HANDOFF 01
运维手里有日志和拓扑,开发手里有代码,两边各看一半,来回问;线上排查常常卡在"等开发上线"。
同一个 thread 里既读日志又读代码。侦察侧链自动带上最近 24 小时变更快照,定位时代码、发布记录、集群状态一起看。
修好 → 发布HANDOFF 02
开发说"合了",运维不知道该发哪个分支、要不要先 cherry-pick 到 uat;发错分支是最常见的事故。
同一个人接着干:cherry-pick 晋级、开 MR、盯 CI、到发布门,中间零工单。仓库的晋级惯例记在知识库里,不用每次问。
发布 → 验证HANDOFF 03
发完没人回头看,"发布成功"等于"部署记录是绿的";出问题是下一个事故。
"已发布"的唯一判据是 deploy job 真成功;发布后回读逐字段对账,pipeline 终态直接唤醒 OpsBot 做后续步骤。
事故 → 经验HANDOFF 04
运维复盘写在文档里,开发下次 review 时根本不知道;开发踩过的坑,运维排障时也想不到去看代码。
一个知识库两边共用。运维事故("dev→uat 整支合并炸过三次数据库迁移")直接变成下次代码 review 的规则;代码事实("后台只实现了 55/77 个端点")直接挡住"三环境全切"的运维决策。
一人两岗
不是一人两权
让一个人同时兼运维和开发,是危险的权力集中:改代码的人自己发生产,没人拦。
权限跟着发起人走,不跟着机器人走。developer 发起的代码卡只有 dev_admin 能批;生产发布无论谁下令必过人手;开发者要运维内部实现物(pipeline 脚本、网关配置)直接被挡。两双手,一套审批——权力分离是代码焊死的。
成本结构
一个资深运维 + 一个资深开发的用工成本,8 小时在线,交接靠会议和工单,离职带走经验。
一个订阅。7×24 在线、多个任务并行、不用交接、不会离职——经验长在系统里,不长在人脑里。

两个岗位合到一个员工身上,省掉的不是一份工资,是四个交接点。

每个交接点丢掉的信息,都是下一次事故的种子。

第十一章 · 治理

两岗合一,权限不合一

机器人有两双手,但每一格看的是谁在下令。点一行,看这个角色在 OpsBot 面前能做什么、哪些要弹卡、卡归谁批。

发起人角色 读代码改代码feature 分支写 main审 MR 查凭证生产运维写操作发生产看运维内部实现物
viewer观察者 硬拒硬拒硬拒硬拒 硬拒硬拒硬拒硬拒
developer开发者 直接直接卡 → dev_admin直接 卡 → admin卡 → admin卡 → admin硬拒
dev_admin开发侧管理员 直接直接卡 → dev_admin直接 · 审批人 卡 → admin卡 → admin卡 → admin硬拒
ops运维 直接直接卡 → dev_admin直接 直接直接卡 → admin可以
admin运维管理员 直接直接卡 → dev_admin直接 直接直接卡 → 另一位 admin可以
直接 立即执行 卡 → 谁 弹审批卡,只有标注的角色能点 硬拒 不弹卡、不执行,说明原因
developer · 开发者

在自己的应用仓库里读、改、审都直接做;往 main 写、发生产、查凭证、动生产环境全部弹卡——代码类卡归 dev_admin,运维类卡归 admin。想要 pipeline 脚本、网关配置这类运维内部实现物:流程可以讲,原文不给。

三条不随角色松动的规则

  • 生产发布必过人手。无论谁下令,release_commit、生产 kubectl apply、argocd sync 都要另一个人点批准。
  • 代码卡只归 dev_admin。运维管理员批不了代码,开发者也批不了自己的——审批人和发起人永远是两个人。
  • 流程可以讲,内部实现物不给。开发者问"发版是怎么走的",OpsBot 讲流程;要 pipeline 脚本原文、网关配置、凭证——不管库里有没有,都不给。

这三条不是 prompt 里的建议,是审批链上的代码。AI 判断"这是什么活、危不危险",代码守死"谁能批、谁不能看"。

下篇 · OpsBot vs 通用 Agent 框架
第十二章 · 对比对象

"我用通用框架加插件,是不是也能拼出来?"

答案是:拼不出来。因为缺的不是某个功能,而是整个闭环——尤其是"记忆"和"生产安全"这两块地基。

这一点在 OpsBot 也开始写代码之后反而更清楚了:Codex 和 Claude Code 写代码的本事很强,OpsBot 的编码能力就是站在它们这一代模型的肩上。差别不在"会不会写",而在写完之后——它们不知道你的生产长什么样(没有拓扑、凭证、发布记录的记忆),也没有人在它们上面焊一道"谁能发、发错谁来拦"的门。

框架定位平台支持
OpenClaw本地优先个人 AI 助理多聊天平台
Hermes Agent自进化通用 Agent多聊天平台
OpenAI Codex异步代码生成 AgentAPI / CLI / Web
Claude Code交互式编程助手 CLI终端 / IDE
第十三章 · 核心差距

差距在哪

13.1 知识会遗忘 vs 永不遗忘且会收敛(最根本的差距)

维度OpsBotOpenClawHermesCodex / Claude Code
存储数据库持久化记忆文件会话文件 + 记忆库无持久知识
生命周期永久保留会话定期重置;文件有上限会话按空闲重置;去重淘汰会话结束即消失
半年后还在?✓ 在⚠ 不确定⚠ 不确定✗ 不在
同一实体多次操作✓ 收敛成一条✗ 堆积/覆盖✗ 堆积/误删—
注入确定性干活前强制 orient 调取依赖 AI 主动召回依赖 AI 主动召回无

这是所有差距的根。 通用 Agent 的记忆是"尽力而为"——可能在、可能不在、可能被误删。运维场景不接受"可能":一条半年前的关键配置忘了,就是一次生产事故。OpsBot 不仅永久保留,还通过实体收敛保证"同一个对象只有一条最新记录",通过 orient 保证"干活前一定调出来"。

13.2 知识库会自净 vs 越积越脏

维度OpsBot通用 Agent
失败记录只记"失败→成功"闭环经验要么不记,要么记成噪音
污染治理主动审计 + 浓缩清理无机制
检索质量持续净化,精华不被淹没噪音累积,质量衰减

13.3 跨用户审批 vs 自我确认

维度OpsBotOpenClawHermesCodex / Claude Code
模型A 请求 → B 审批同一用户确认同一用户确认无
审批人约束必须管理员 + 环境权限任何人任何人无
持久化数据库,重启不丢内存暂停内存暂停无

13.4 命令安全:AI 推理 + 审批兜底 vs 关键词或全凭自觉

维度OpsBot通用 Agent
风险判断模型推理可逆性与影响范围关键词黑白名单 或 全凭 AI 自觉
上下文感知✓ 分得清 replicas=3 与 0✗ 字面匹配
失败兜底分类失败一律按危险处理无
对抗测试82 条覆盖多攻击维度—

13.5 RBAC、审计、后台任务

维度OpsBot通用 Agent
权限粒度用户 × 工具 × 环境,角色分层Agent 级或用户级 allow/deny
审计结构化记录,任意维度可追溯查询会话日志或无
后台任务fire-and-forget + 完成主动推送请求-响应,用户得等或自己查

13.6 写完代码谁来发、发错谁来拦

维度OpsBotCodex / Claude Code
改完代码之后同一个员工接着 cherry-pick 晋级、开 MR、盯 CI、走发布门、回读验证交回给人;发布是另一个人的另一套工具
知道生产长什么样?✓ 拓扑、凭证、发布记录、事故史都在知识库里✗ 只看得到仓库
写 main / 发生产强制审批,与角色无关;代码卡归 dev_admin,运维卡归 admin本地权限即全部权限
绕过 CI 门禁关门禁 / 删 manual job / 改 CI 文件三条路全拦无此概念
commit 归属作者 = 下指令的人,可审计作者 = 运行它的账号
第十四章 · 结论

为什么它们补不齐

  • OpenClaw + 插件:平台与插件生态强,但知识会随会话重置丢失、无跨用户审批、无 per-user RBAC、无确定性经验调取、无知识污染治理。
  • Hermes Agent + 插件:自进化能力强,但审批是单用户模式、防护机制防 AI 循环不防人("用户 A 不能用某工具"做不到)、记忆去重会误删细节、无结构化审计。
  • 服务器跑 Codex:写代码很强,但定位是异步代码生成——非实时交互、无聊天集成、沙箱隔离无法直连生产基础设施、无多用户权限。代码写完就到头了,发布、验证、沉淀这后半段它不在场。
  • 服务器跑 Claude Code:交互式编程助手,无持久运维知识、无跨用户审批、无 RBAC、无后台任务。它的安全哲学我们学习并采纳了,OpsBot 的编码能力也是同一代模型;但它本身不是为"多人协作、生产无人值守、事故不可逆"的运维场景设计的——它没有"两岗合一、权限不合一"这层东西。

共同的结论:它们都是优秀的通用工具,但运维场景的两块地基——永不遗忘且会收敛的知识、生产级的多人安全框架——不是加几个插件能补的,那需要从数据模型到执行流程的整体设计。

卷尾
卷尾

一句话的设计哲学

前面讲的每一处设计,拆开看是不同的功能,合起来其实只在贯彻同一句话:

聪明的事交给 AI,
出不得错的事用代码管死。
  • 认实体:AI 看懂"这讲的是 web",代码定死 id 的格式。
  • 判命令:AI 看懂这条命令危不危险,代码守死"高风险必审批"。
  • 干活前侦察:AI 决定回忆什么,代码守死"一定先侦察、但绝不因侦察失败卡住干活"。
  • 清知识:AI 提炼哪些该留,代码守死"删之前必须先备份、不可逆必须人来点头"。

道理很朴素:AI 已经比任何死规则都聪明,就别用规则去框它的脑子;但 AI 偶尔会犯错,而生产环境的某些错误一次都犯不起——这些地方,就用最笨、最确定的代码焊死。

这就是 OpsBot 和"又一个 AI 脚本"的区别:它会记、会想、敢动手,而且在每一个要命的地方,都靠得住。

OpsBot · Secure Execution Platform for Production Operations

The Ops Brain That Remembers,
Reasons, and Dares to Act

The biggest waste in ops isn't the outage — it's that yesterday's hard-won lesson is nowhere to be found today.
OpsBot fuses doing the work with capturing and reusing experience into a single closed loop — so the AI works with experience like a senior engineer, executing inside a strict safety framework.

Learn→ Store→ Govern→ Retrieve→ Act
Prologue

What Actually Sets OpsBot Apart

Most "AI ops assistants" on the market are, beneath the marketing, simply obedient executors — you say something, they do one thing, and the moment it's done they forget it. Smart, diligent, quick to respond, but forever an intern on day one: the pitfall you walked them through yesterday, they will lead you straight back into today.

OpsBot takes a different path. It fuses doing the work and capturing and reusing experience into a single closed loop:

Learn → Store → Govern → Retrieve → Act Learn from every job as it happens → Store that experience as a usable asset → actively Govern against knowledge pollution → Retrieve the relevant experience before acting → Act on it inside a production-grade safety framework.

Five links, locked together, none optional. Together they make a real ops brain. Part One walks through each link — how it turns, and why you can trust it. Part Two states it plainly: why general-purpose agent frameworks (OpenClaw, Hermes, Codex, Claude Code), no matter how many plugins you add, cannot close this loop.

The whole system rests on a single design principle, and one sentence captures it:

Let the AI handle what takes judgment; let code lock down what can't go wrong.

The calls that need reasoning (what kind of job is this? is this command dangerous?) go to the AI — it's smarter than any rule. The lines that must hold (irreversible actions require approval; deleting data requires a backup first) are enforced in code, with no exceptions.

Part One · How OpsBot Becomes an Ops Brain
Chapter 1 · Positioning

From Executor to a Senior Engineer Who Works With Experience

OpsBot is not a chatbot, not a personal assistant, not a code generator. It is a secure execution platform for production operations — everyone on the team interacts with it through a chat window (Slack / Mattermost / Telegram), it executes ops actions inside a strict permission and safety framework, and it sediments the experience from every action and proactively pulls it back out the next time it's needed.

Your Knowledge Is Scattered Across the Three Least Reliable Places

What makes a senior ops engineer valuable was never how fast they type. It's everything in their head: every pitfall in the system, every unwritten convention, every "here's how we fixed it last time." And today, that most valuable knowledge is scattered across three places:

  • Asleep in your docs, Confluence, and wikis — written down with care, then impossible to find three months later.
  • Living only in one senior engineer's head — the team runs smoothly while they are there; the moment they take leave or move on, everyone is back to square one.
  • Buried in endless chat threads and tickets — it happened, but it can never be pieced back together.

OpsBot pulls all three into a brain of its own: structured, persistent, never forgotten — and sharper the more you use it.

That delivers something every organization should care about: for the first time, the experience belongs to the company, not to one person. Even when a key engineer leaves, they can no longer walk out the door with it. Your team's operational capability no longer rises and falls with staff turnover.

"The Forgetful Intern" vs. "The Engineer Who Remembers"

Picture the same scenario. Six months ago, while deploying a web app, you discovered: "the ingress controller on its cluster is version 0.48 — you have to use pathType: Prefix, not ImplementationSpecific, or routing breaks."

  • The forgetful intern (a general-purpose agent): Six months later, asked to configure ingress for that same app, it has long forgotten this (the session reset, the memory got compressed, or it simply never thought to check). It uses the default config → production incident.
  • The engineer who remembers (OpsBot): Six months later, the moment you mention ingress for that app, the relevant lesson is surfaced automatically before it acts. It applies the correct config from the start.

That's the difference between an "executor" and an "ops brain." And getting to the latter isn't down to any single feature — it's the closed loop below, where every one of the five links is indispensable. Break any one, and "working with experience" falls apart.

Figure 1 · The Five-Link Closed Loop of an Ops Brain
flowchart LR
    L["Learn
self-learning flywheel"] --> S["Store
entity convergence"] S --> Z["Govern
anti-pollution"] Z --> Q["Retrieve
orient: recall first"] Q --> Y["Act
secure execution"] Y -.every action yields new experience.-> L style Q fill:#d8eae8,stroke:#1f6b6b,stroke-width:2px style Z fill:#f6edd6,stroke:#a8780a,stroke-width:2px style S fill:#f3e3e0,stroke:#b8362a,stroke-width:2px
Chapter 2 · Learn

The Self-Learning Flywheel

Experience lives in human heads, and resets to zero when a person leaves.
OpsBot keeps experience in the system.

You don't have to "train" OpsBot. It learns automatically in the course of every job, sedimenting what matters into its knowledge base. Six mechanisms work in concert:

MechanismWhen it firesWhat it learns
Auto-ReflectAfter every tool call (async)State changes, user feedback, operational experience
Failure→Success distillationWhen a task completes successfullyThe "tried this, it failed; switched, it worked" lesson (see Chapter 4)
Feedback detectionWhen it spots a user correctionRules like "not dev, it's uat" or "always use X from now on" (tagged to the user)
Deterministic resource ledgerAfter creating a resource / deploying a service (hook-captured)Cloud resources and long-lived server services the bot itself created: location/version/purpose, plus credential persistence prompts
Learning OrchestratorDeliberate deep-dive on a projectMulti-round plan→collect→ask→analyze→update
Verify ActionWhen it confirms old knowledge still holdsRefreshes the "last verified" timestamp, tracking freshness
Figure 1 · The Self-Learning Flywheel — six mechanisms feeding one knowledge base
The wheel never stops · ①②③④⑥ fully automatic · ⑤ user-triggered deep-dive

Learning More Matters Less Than Learning Clean

Nothing writes to the store directly. Everything flows through one write gate (a 5-step pipeline: template validation → auto-completion → alias normalization → conflict dedup → write), backed by:

  • content_hash dedup: skips the write when nothing has changed, so no pointless duplicates pile up;
  • Contextual Retrieval: at write time, the model generates a short semantic prefix that sharpens later semantic search;
  • Credential guard: a dual-layer block that keeps tokens and passwords from ever being stored as knowledge by mistake;
  • Source protection: human-entered and seed knowledge are protected and never overwritten by automated learning.

Learning is the flywheel's input. But learning alone isn't enough — how you store what you learn decides whether you can ever get it back out.

Chapter 3 · Store

Entity-Driven Knowledge Convergence

In a senior engineer's head, "web" is an object with an identity.
In most AI knowledge bases, "web" is a ghost scattered across dozens of records.

The Common AI Failing: Not Recognizing "These Describe the Same Thing"

A typical AI assistant's knowledge base has two problems that look unrelated but share one root:

  • One thing, recorded into a mess: the same web service gets one record at deploy time, another when its replicas change, another when they change again — three unrelated records piling up, and later nobody knows which one is current.
  • One thing, information scattered: a single service's details (its public domain, its cluster, its related config) end up across several records, so when the AI needs them it has to stitch them together — and may stitch them wrong.

Both problems, one root: it can't recognize that "these records are all about the same object." It can't recognize that at write time, so the records pile up; it can't recognize it at read time, so they never connect. OpsBot fixes this at the root.

The Fix: Make "Entity" a First-Class Citizen of the Knowledge Base

Every piece of knowledge carries a stable identity, entity_id, in the form {object}@{project}:{environment} — for example, web@shop:prod.

  • Convergence on write: when writing a state fact about web@shop:prod, the system first checks whether that entity already has a record — if so, it updates that same record (always current) instead of creating a new one. Three operations converge into one record, not three.
  • Connection on read: when retrieving experience for backend-p0@media:prod, every scattered piece of knowledge attached to that entity is recalled together. The AI no longer has to piece anything together.

How We Guarantee "the Same Entity Always Resolves to the Same ID"

This can't be left to chance. entity_id is locked down by three lines of defense:

Figure 2 · entity_id's Three Lines of Defense
flowchart TD
    A["1. Model reasons the semantics
recognizes 'this is about web'
from the content"] --> B["2. Code normalizes deterministically
'Web service' / 'the web in prod' / 'web'
all converge to web@shop:prod"] B --> C["3. Entity lookup before write
match an existing entity, converge to one record"] style A fill:#d8eae8,stroke:#1f6b6b,stroke-width:2px style B fill:#f6edd6,stroke:#a8780a,stroke-width:2px style C fill:#f3e3e0,stroke:#b8362a,stroke-width:2px

This is the core principle in action: recognizing the entity relies on the AI's semantic judgment; fixing the format relies on the iron rules of code. We don't make brittle pattern-matching guess "is this web?", and we don't let a fickle model have the final word on what the ID looks like — each does what it's best at.

Two classes of knowledge are also handled differently, mirroring how a senior engineer actually thinks:

  • State knowledge (how many replicas now, which image) → always updates the same record, always current;
  • Experience knowledge (a pitfall once hit, why a migration happened) → appends a new record, keeping the history.

The environment is part of entity_id (prod / dev / uat count as distinct entities), matching the operational instinct that "prod and test are different worlds." The whole path is fail-open: if entity recognition ever misbehaves, it degrades gracefully back to the original flow and never blocks a write.

The Life of One Piece of Knowledge: Write · Read · Update · Delete

Every read and write goes through a deterministic pipeline, not a casual INSERT / SELECT. The traveling dot below is a single piece of knowledge living out its whole life in that pipeline:

Figure 3 · The Knowledge CRUD Lifecycle
Write5-Step Gate

validate → complete → normalize aliases → dedup conflicts → write; content_hash dedup, credential guard blocks tokens/passwords.

ReadHybrid Retrieval

feedback/troubleshooting first → keyword + vector recall → graph-expand by project → Jina rerank to top-5.

UpdateEntity Convergence

state facts for one entity_id update the same record, always current; experience appends a new record, keeping history.

DeleteSource Protection

seed / human-entered knowledge is protected from auto-deletion; stale knowledge past 7 days is flagged "unverified" for review.

Chapter 4 · Govern

Anti-Pollution for the Knowledge Base

A knowledge base that's only written to and never read becomes, over time, not an asset but a landfill.
And garbage buries the treasure.

This Isn't a Thought Experiment — It's a Real Production Audit

We ran an audit on a production knowledge base. The result was sobering:

1,636
total knowledge entries
82%
were troubleshooting records
1,243
were "failure logs"
(76% of the entire base)
99%
marked "active incident" forever

These "failure logs" were written automatically by the system every time a tool call failed — a bad argument, a network blip, a permission gap; one record per failure. Most are transient failures (one-off, long since gone), yet they get recalled again and again as "active incidents"; and they continuously dilute search quality, burying genuinely valuable experience under noise.

The Key Insight: Failure Itself Is Worthless — "Failure→Success" Is What's Valuable

The real problem isn't "recording too much," it's "recording the wrong thing." A single tool failure has no reuse value — a typo'd argument, a network hiccup; recording it does nothing for next time. What's actually valuable is the full arc of "hit a wall, then found the way around it": for example, "couldn't connect to the database directly, because this container has no client installed and defaults to localhost; once I pointed it at the remote host, it worked." That lesson — where the pitfall is, and what the right move is — is what you actually want next time you do a similar job.

How OpsBot Does It: No Failure Logs at the Source, Only Distilled Lessons

  • For new work: OpsBot doesn't log a record on every failure. Failure details stay only in the current conversation; when the task actually completes successfully, it looks back over the whole sequence, recognizes "this kind of operation hit a wall and here's how it was resolved," distills that into one avoid-the-pitfall lesson, and marks it "resolved." A failure with no resolution leaves no trace.
  • For the existing backlog: for the failure logs already piled up, a step-by-step process condenses and cleans them — grouping by operation type, having the model distill each group into a handful of high-value lessons, and clearing the rest.

Cleanup Happens in Stages — and the Cut Itself Is Always a Human's Call

Cleaning the backlog means actually deleting data from a production base, and a wrong delete can't be undone. So we don't let the system "figure it out and just clean up." We split it into three stages, keeping the "delete or not" decision firmly in human hands:

  1. Stage 1 (system works, look but don't touch): the system groups thousands of failure records by tool, has the model condense each group into a few genuinely valuable lessons, then produces a list — "keep these distilled lessons, delete these old records." This stage is entirely read-only; not a single record is touched.
  2. Stage 2 (a human makes the call): that list lands in your hands. Only once you've reviewed it and confirmed it's sound does anything move forward. Without your go-ahead, the system stops right here — it will never delete on its own. (You can also have the system "dry-run" first to preview the effect — print only, execute nothing — then run it for real once you've seen it clearly.)
  3. Stage 3 (system executes, but leaves a way back): once you've confirmed, the system first backs up every record to be deleted to a file, then performs the delete. If you later find something was deleted in error, you can restore it from the backup, one by one.

In one sentence: the system only prepares the plan; the cut is always made by a human, and a backup is always taken before the cut.

As for the "failure→success" lessons kept in Stage 2 — they are marked "resolved," so they no longer surface in the list of "currently active incidents" to distract anyone, yet they remain retrievable the next time you do a similar job. Their status shifts from "an error that never ends" to "a pitfall note you can consult any time."

With the knowledge base clean, the next chapter covers how OpsBot proactively pulls these lessons out before it acts — purifying and retrieving in tandem is what finally turns the knowledge base into an asset that grows more valuable the more you use it, instead of a dump that just grows dirtier.

Chapter 5 · Retrieve

orient — Recall Before You Act

No matter how much experience the knowledge base holds, if it isn't pulled out before the work begins, it might as well not be stored.
What sets OpsBot apart most: it always recalls before it acts.

A typical AI assistant has a common failing: you give an instruction and it acts on it immediately — even when a lesson reading "we already fell into this exact pit last time" is sitting right there in the knowledge base, it never thinks to look. So the same mistake gets made again, just at a different time.

OpsBot doesn't work that way. It has a built-in step called orient — before any change-class operation, it always runs through the job in its head first, the way a seasoned engineer would: what kind of job is this? what have I done to it before, and what pitfalls did I hit? what's the right approach? Only once that's clear does it act.

Figure 3 · Reconnaissance Before Acting: Think It Through First
flowchart TD
    A["1. What kind of job is this?
which object does it touch?
what do I nail down first?"] --> B["2. Pull the experience
retrieve all the history
relevant to this job"] B --> C{"3. Enough to act on?
anything still unclear?"} C -->|not yet| B C -->|good to go| D["4. Produce a pre-action brief
who owns this, what pitfalls
were hit, the shortest correct path"] style A fill:#d8eae8,stroke:#1f6b6b,stroke-width:2px style D fill:#f3e3e0,stroke:#b8362a,stroke-width:2px

The crucial part is that Step 3 keeps probing: if something is still unclear, it loops back and retrieves another round of experience, stopping only when it is genuinely confident (with a round limit, of course — it will not loop indefinitely). This step ensures it doesn't run a cursory search and start acting — it does the groundwork properly.

Once reconnaissance is complete, it writes itself a pre-action brief — not a "for your reference" note, but the authoritative basis for the operation: wherever it conflicts with a momentary instinct, the experience distilled into the brief prevails.

What This Means for You

  • Pitfalls don't get hit twice: how it went wrong last time and how it was solved — it remembers on its own the next time it does a similar job.
  • Newcomers can do a veteran's work: the experience in your most senior person's head, OpsBot keeps and uses on everyone's behalf.
  • Steady, not reckless: it thinks through ownership and the correct path before acting, rather than attempting blindly and rolling back when it fails.

An honest note: because of this "think it through first" step, OpsBot replies a few seconds slower than an assistant that acts immediately. This is deliberate. A seasoned engineer, too, pauses to think before acting — and getting it right with fewer mistakes matters far more than saving a few seconds.

Chapter 6 · Intelligent Retrieval

Letting Experience Cut Through Symptoms to the Root Cause

What the user reports is a symptom ("Redis is throwing errors").
What the knowledge base stores is the root cause ("the NFS server went down, causing I/O errors on every PVC").
A chain of causation sits between them.

A retrieval system that only matches text literally can't bridge that gap. OpsBot's retrieval pipeline uses four mechanisms to let experience cut through the symptom straight to the root cause:

  • Query expansion: expands "Redis errors" into several search angles — "Redis storage failure PVC," "middleware storage anomaly," and more — for multi-path recall;
  • Project context injection: before acting, it automatically injects the project's "active incidents" and "key operational facts" (such as the correct database credential key and connection method), placed at the end of the prompt (models follow end-of-prompt information more closely);
  • Causal indexing: a piece of "NFS failure" knowledge is tagged as affecting redis / sso / mysql; so a query about redis can follow the impact link and hit the NFS root cause;
  • Knowledge lifecycle: once an incident is resolved (confirmed by the user), it's marked "resolved" and no longer injected as an active incident.

The retrieval is layered and progressive: first surface the most relevant feedback and pitfall lessons, then cast a wide net from multiple angles to recall candidates, follow project relationships to bring in related knowledge, and finally re-rank to keep just the most relevant few. If any step fails, it degrades safely and never disrupts normal use. This is the foundation that lets orient pull accurate experience before the work begins.

Chapter 7 · Act

The Secure Production Execution Framework

Once it can remember and reason, one final gate remains:
dare you let it act? In production, the answer has to be — yes, inside a sufficient safety framework.

Command Safety: The AI Judges the Risk, Code Catches What It Misses

Before executing any command, OpsBot first has a dedicated model judge how dangerous the command really is (safe / read / mutate / danger). It doesn't match a handful of dangerous keywords — it actually reads the command: will it change anything? if it does, can that be undone? how wide is the blast radius? Only then does it decide whether to execute directly or require human approval first.

This matters, because danger usually hides in the details. The same scale command is a routine scale-up at 3 replicas but, at 0, effectively shuts the entire service down; find / -delete appears entirely harmless yet can erase an entire machine when it runs. Rigid keyword rules cannot tell these apart — only a model that genuinely reads the command's intent can.

This approach aligns with the industry's strongest agent (Claude Code): give it enough context and principles and let the AI judge for itself, rather than constraining it with a blocklist. But ops is not coding — this is production, it runs unattended, and a mistake cannot be undone. So beyond the AI's judgment, OpsBot adds a layer of code as a backstop: should the model fail to classify a command, it is treated as "danger" and forced through approval; and even if the AI misjudges a high-risk command as safe, the worst case is one additional approval prompt — it can never skip approval and execute directly. In short: the AI is responsible for reading the risk correctly; code is responsible for ensuring nothing harmful happens even when that reading is wrong.

To confirm this line of defense actually holds, we attacked it repeatedly with 82 adversarial tests, covering direct dangerous commands, all kinds of persuasion tactics, disguised bypasses, and several other angles of attack.

The Other Pillars of Safety

  • Cross-user approval: when A initiates a dangerous operation, it must be approved by an authorized B (an admin cannot approve their own operation). Approval state is persisted and survives a service restart.
  • Four-dimensional RBAC: permissions are precise to user × tool × environment, with prod / uat / dev isolated independently and roles layered (admin ⊃ ops ⊃ dev ⊃ viewer); changes take effect immediately with no restart.
  • Pluggable safety rules (inspired by Claude Code): every safety rule is an independent block — adding a rule means adding a block without touching the rest, retiring one means removing a block. Safety policy evolves with the business: changes are fast and safe, with no ripple effects.
  • No free improvisation on critical operations: complex workflows like security scans, fault diagnosis, and release verification run on a fixed pipeline locked down in code — the AI only decides "whether to do this," not "how to do it step by step" — eliminating at the root the skipped steps, wrong tools, and malformed arguments that come with free-form orchestration.
  • Secure credential channel: passwords are sent directly to the requester via DM — never through the AI, never in the group chat — so they can't be leaked or echoed by accident.
  • Complete audit trail: every operation is fully recorded and traceable along any dimension, meeting compliance audit requirements.
Reach · Station

One Secure Channel Into Every Isolated Production Environment

You want an AI to act directly on production — but production is usually locked inside the customer's internal network, IDC, or an isolated data center. How does it even reach in? And once it can, how do you keep it secure?

OpsBot's hub (the brain) runs in its own environment and cannot touch your isolated production networks by itself. What bridges that gap is the Station — the hub's "hands and feet" reaching into your network.

The hub is the brain; the station is the hands and feet

A station is a lightweight executor deployed inside your target environment (a Pod in the cluster, or a machine on the network). It carries nothing but ops CLIs (kubectl / mysql / psql / redis-cli / curl / helm) — no business logic, no decisions, no secrets at rest. All the "thinking" stays in the hub; the station only lands the action inside the environment. K8s, databases, logs, internal APIs — all reached via that environment's station.

Why a station, not a direct connection or one big VPN

  • ① One channel, no more port-by-port allowlisting. Letting an ops system touch every service in your network means a firewall entry for every port and IP — more holes, harder to maintain, bigger attack surface. The station collapses it all into one channel: holes drop from N to 1.
  • ② Zero inbound — not a single exposed port (for K8s clusters). The station is an ordinary Pod that exposes no external port; the hub uses the cluster's existing K8s API to kubectl exec in — your firewall needs zero inbound openings. No new inbound attack surface.
  • ③ One OpsBot, managing many isolated networks worldwide. Customers, regions, data centers that can't reach each other — one station per network, reached through its own station. Private IPs collide across networks (10.x / 192.168.x); the "hub + many stations" model routes by which station, not which IP — far cleaner than one big VPN / overlay.
  • ④ Your keys never live inside the environment. Private keys, passwords, tokens stay in the hub's encrypted vault; injected over stdin at use time and discarded immediately. The station persists not a single secret at rest. Its cluster access is deliberately scoped — broad read plus a minimal write set, never cluster-admin — so a compromised station can observe but cannot seize control, and there are no stored credentials on it to exfiltrate.
  • ⑤ A dumb executor, light enough to rebuild any time. Zero business logic, zero state — just tools and a channel: fast to deploy, simple to audit, delete-and-recreate if anything goes wrong.

Onboarding takes only three prerequisites: ① at least one station per isolated network/environment you want OpsBot to operate; ② deploy it inside that network (a Pod in the cluster, or a machine on the network) so it can reach that environment's K8s / databases / internal services; ③ let it talk to the hub — either the hub can reach the cluster's K8s API (k8s-exec, zero inbound, most secure), or open a restricted SSH channel (source-IP-limited) for pure internal networks / IDCs. Onboarding a new environment = deploying a new station; not a line of OpsBot itself changes.

Chapter 8 · Engineering Maturity

The Foundational Work That Makes It Deliverable at Scale

  • One codebase, three platforms: Slack, Mattermost, and Telegram are supported through a unified chat-adapter layer, with zero IM dependency in the business logic. Adding a platform means implementing one adapter, without touching business code.
  • The iron law of multi-tenant consistency: the same codebase deployed for different customers behaves identically — same behavior, same config, same credential sources — except for explicitly flagged customer-specific integrations. Branching logic based on where it's deployed is forbidden. This guarantees consistent quality at delivery scale.
  • Progressive context compaction: a four-tier strategy manages very long conversations; old tool results are archived before compression and can be retrieved verbatim on demand, so nothing is lost, and environment and project context are restored afterward.
  • Tooling system: a first-party tool-definition framework, fail-closed by default (conservative), with auto-discovery and registration, a unified result-truncation budget, and relevance-based lazy loading when there are too many tools.
Part Two · One Employee, Two Roles
Chapter 9 · Doing the Work

The Life of One Merge Request: Eight Steps Across Ops and Dev

In a human team there are four handoffs between ops and dev.
Every handoff waits on someone and loses information.
OpsBot walks the whole line alone — unbroken.

Since August 2026 OpsBot has held a second job: software engineer. It reads customer repositories, edits code, opens merge requests, reviews them, watches CI, and promotes fixes to production the way each repository is used to. But the real value isn't "one more skill" — it's that both roles live in the same employee. The line below is the path it actually walks in customer production every day: an error comes in on a thread and leaves as a verified release and a lesson written to the knowledge base. Scroll to follow it across the two lanes and see which gate holds each step.

Figure 9 · One task line, two lanes
OPS DEV KNOWLEDGE BASE · SHARED BY BOTH ① waiting on dev ② which branch? ③ nobody checks ④ nobody reads it 1Error in 2Find the code 3Edit 4MR + review 5Watch CI 6Promote 7Release gate 8Verify · record
OpsBot walks it in one lineHuman team: two people, one segment eachHandoff: waiting / information lost
Scroll — the line lights up as you go.
Ops lane

An error lands on the thread

A colleague pastes a stack trace, a build link, or just "the admin panel is down." OpsBot reads Loki / OpenSearch logs, checks pod status, opens the thread's attachments — exactly what a senior ops engineer would do.

The gate hereRead-only, runs immediately. Even the log backend is picked from what the customer registered — never pitched, never guessed.
Crossing into the dev lane

Find the code

The log points at an endpoint. OpsBot doesn't stop at "could a developer take a look?" It pulls a repository snapshot into its workspace, greps to the handler, and reads the code block boundaries itself — comments are only the author's claim. Meanwhile the recon sidecar lays "who deployed what in the last 24 hours" beside it: the culprit is very often the release that just went out.

The gate hereReading customer code requires the developer role or above; unregistered users and viewers can't even read.
Human handoff ① · ops has the logs, dev has the code, each sees half
Dev lane

Edit it — or delegate to the coding sub-agent

Small changes are staged directly; larger ones go to a coding sub-agent (Opus, single long-running instance). Every edit lives in the hub container's workspace, static checks run as it goes, and nothing has an external side effect before commit.

The gate hereCustomer repository code is untrusted input — the hub never executes it (no test runs, no dependency installs). The sub-agent can only read and stage; committing is a permission it doesn't have. The commit author is the person who gave the instruction, not the bot.
Dev lane

Open the MR, run the review

Commit to a feature branch and open a merge request. On review, findings are gathered and posted as inline comments in a single batch, followed by one HTML review report. The repository profile — branch conventions, feature branches that skip CI, merges that blew up before — comes from the knowledge base, so every review is sharper than the last.

The gate hereRepositories governed by the MR approval bot can only be changed through MRs — writing straight to a protected branch or playing a deploy job directly is pushed back.
Dev lane

Watch CI, fix red until green

"I'll keep an eye on it" is an empty promise for an AI — once a turn ends, it's gone. So watching CI is event-driven: when the pipeline reaches a final state OpsBot is woken; on failure it reads the job log and fixes until green, on success it moves to the next step. No chatter in between.

The gate hereCI gates are never bypassed: disabling "pipeline must succeed," deleting a blocking manual job, or editing the CI file — all three equivalent paths require approval.
Back into the ops lane

Cherry-pick promotion: uat → main

Once the fix is in dev, it's cherry-picked to uat and then proposed to main via MR — by this repository's own convention, end to end, without handing the user a multiple-choice between "merge the whole branch" and "half a fix." If the convention isn't known, it asks once, then remembers.

The gate hereMerging a whole branch is a major change done only on explicit request; writing a commit to main requires approval, and the card goes to dev_admin.
Human handoff ② · dev says "merged," ops doesn't know which branch to ship
Ops lane

The production release gate

When the user says "ship it," OpsBot's move is to initiate the release and let the approval card confirm it — not to finish quietly and report afterwards. release_commit, kubectl apply, argocd sync to production: whichever tool it reaches for, it's stopped the same way.

The gate hereProduction releases require approval regardless of the requester's role; approving "write to main" does not approve "go live" — two separate cards.
Ops lane → knowledge base

Verify, then write the lesson down

After release it reads the deployment back and reconciles field by field; the pipeline's final state wakes it to run the follow-up steps. What it investigated and what it concluded are written to the knowledge base in the same turn as the answer via remember_knowledge; an investigation that ran eight or more steps with nothing recorded gets called back by the system to write it down.

The gate here"Recorded" may only be claimed after a successful knowledge-base write; what goes in is right at hand at step ② next time.
Human handoffs ③④ · nobody checks after release · devs never read the post-mortem
Chapter 10 · Why

Why One AI, Not Two People

Ops and dev were always two segments of the same value chain. They're split between two people not because that's better, but because one head can't hold both bodies of experience. OpsBot can — and it holds them in one knowledge base.

HandoffHuman team (two people)OpsBot (one employee)
Error → DiagnosisHANDOFF 01
Ops has the logs and the topology, dev has the code; each sees half and they go back and forth. Live troubleshooting stalls on "waiting for a developer."
Reads logs and code in the same thread. The recon sidecar brings a 24-hour change snapshot automatically, so code, release history and cluster state are on the table together.
Fix → ReleaseHANDOFF 02
Dev says "merged"; ops doesn't know which branch to ship or whether to cherry-pick to uat first. Shipping the wrong branch is the most common incident there is.
The same employee keeps going: cherry-pick promotion, MR, CI watch, release gate — zero tickets in between. The repository's promotion convention lives in the knowledge base, so it isn't asked twice.
Release → VerificationHANDOFF 03
Nobody looks back after shipping; "release succeeded" means "the deployment record is green." Anything wrong becomes the next incident.
The only proof of "released" is a genuinely successful deploy job; after release it reads back and reconciles field by field, and the pipeline's final state wakes OpsBot to run the follow-ups.
Incident → LessonHANDOFF 04
Ops writes the post-mortem in a doc the developer never sees at the next review; the pitfalls dev hit never occur to ops while troubleshooting.
One knowledge base, shared. An ops incident ("merging dev→uat wholesale broke the database migration three times") becomes a code-review rule; a code fact ("the backend implements only 55 of 77 endpoints") blocks the ops decision to "switch all three environments."
Two roles,
not two sets of power
One person doing both ops and dev is a dangerous concentration of power: whoever changes the code ships it to production, and nobody stops them.
Permissions follow the requester, not the bot. A developer's code card can only be approved by a dev_admin; a production release passes through a human no matter who ordered it; a developer asking for ops internals (pipeline scripts, gateway config) is refused. Two pairs of hands, one approval chain — separation of powers welded in code.
Cost structure
The fully loaded cost of a senior ops engineer plus a senior developer, eight hours a day, handoffs by meeting and ticket, and the experience walks out the door with them.
One subscription. Around the clock, several tasks in parallel, no handoffs, no resignations — the experience lives in the system, not in someone's head.

Fold two roles into one employee and what you save isn't a salary — it's four handoffs.

Every piece of information a handoff drops is the seed of the next incident.

Chapter 11 · Governance

Two Roles in One Employee — Not One Set of Permissions

The bot has two pairs of hands, but every cell below is decided by who is giving the order. Click a row to see what that role can do through OpsBot, what raises a card, and who gets to approve it.

Requester role Read codeEdit codefeature branchWrite to mainReview MR View credentialsProd opswrite operationsRelease to prodSee opsinternals
viewerobserver refusedrefusedrefusedrefused refusedrefusedrefusedrefused
developerdeveloper directdirectcard → dev_admindirect card → admincard → admincard → adminrefused
dev_admindevelopment lead directdirectcard → dev_admindirect · approver card → admincard → admincard → adminrefused
opsoperations directdirectcard → dev_admindirect directdirectcard → adminallowed
adminops administrator directdirectcard → dev_admindirect directdirectcard → another adminallowed
direct runs immediately card → who raises an approval card only the named role can click refused no card, no execution, reason given
developer

Reads, edits and reviews their own application repositories directly; writing to main, releasing to production, viewing credentials and touching production all raise a card — code cards go to dev_admin, ops cards to admin. Asking for ops internals such as pipeline scripts or gateway config: the process can be explained, the source is not handed over.

Three Rules That Don't Loosen With Role

  • Production releases pass through a human. Whoever gives the order, release_commit, production kubectl apply and argocd sync need another person's approval.
  • Code cards go to dev_admin only. Ops administrators can't approve code, and developers can't approve their own — approver and requester are always two different people.
  • The process can be explained; the internals are not handed over. A developer asking "how does a release work?" gets the process. Asking for pipeline source, gateway config or credentials gets a refusal — whether or not it's in the knowledge base.

These three aren't suggestions in a prompt. They're code on the approval chain. The AI judges "what is this job and how dangerous is it"; code holds the line on "who may approve and who may not see."

Part Three · OpsBot vs. General-Purpose Agent Frameworks
Chapter 12 · The Contenders

"Couldn't I Just Stitch This Together With a General Framework + Plugins?"

The answer is: no, you can't. Because what's missing isn't a feature — it's the whole loop, and especially its two foundations: memory and production safety.

That became even clearer once OpsBot started writing code itself. Codex and Claude Code are very good at writing code — OpsBot's coding ability stands on the same generation of models. The difference isn't whether they can write; it's what happens after. They don't know what your production looks like (no memory of topology, credentials or release history), and nobody has welded a gate onto them that decides who may ship and who catches a bad release.

FrameworkPositioningPlatform support
OpenClawLocal-first personal AI assistantMultiple chat platforms
Hermes AgentSelf-evolving general-purpose agentMultiple chat platforms
OpenAI CodexAsynchronous code-generation agentAPI / CLI / Web
Claude CodeInteractive coding assistant CLITerminal / IDE
Chapter 13 · The Core Gaps

Where the Gaps Are

13.1 Knowledge That Forgets vs. Knowledge That Never Forgets and Converges

DimensionOpsBotOpenClawHermesCodex / Claude Code
StorageDatabase-persistedMemory fileSession files + memory storeNo persistent knowledge
LifecycleKept foreverSessions reset; files cappedReset on idle; deduped & evictedGone at session end
Still there in 6 months?✓ Yes⚠ Uncertain⚠ Uncertain✗ No
Multiple actions, same entity✓ Converged into one✗ Pile up / overwrite✗ Pile up / lost—
Injection determinismForced orient before actingRelies on AI recallRelies on AI recallNone

This is the root of every other gap. A general-purpose agent's memory is "best effort" — it might be there, might not, might have been deleted by mistake. Ops doesn't accept "might": one forgotten critical config from six months ago is a production incident. OpsBot not only keeps knowledge forever, it uses entity convergence to guarantee "one current record per object" and orient to guarantee "it's always pulled out before the work begins."

13.2 A Self-Cleaning Knowledge Base vs. One That Only Gets Dirtier

DimensionOpsBotGeneral-purpose agent
Failure recordsOnly "failure→success" lessonsEither nothing, or recorded as noise
Pollution governanceActive audit + condense-and-cleanNone
Search qualityContinuously purified; valuable knowledge isn't buriedNoise accumulates; quality decays

13.3 Cross-User Approval vs. Self-Confirmation

DimensionOpsBotOpenClawHermesCodex / Claude Code
ModelA requests → B approvesSame user confirmsSame user confirmsNone
Approver constraintAdmin + environment permissionAnyoneAnyoneNone
PersistenceDatabase; survives restartIn-memory pauseIn-memory pauseNone

13.4 Command Safety: AI Reasoning + Approval Backstop vs. Keywords or Self-Restraint

DimensionOpsBotGeneral-purpose agent
Risk judgmentModel reasons reversibility & blast radiusKeyword blocklist, or pure self-restraint
Context awareness✓ Tells replicas=3 from 0✗ Literal matching
Failure backstopFailed classification → treated as dangerNone
Adversarial testing82 tests across attack dimensions—

13.5 RBAC, Audit, Background Tasks

DimensionOpsBotGeneral-purpose agent
Permission granularityUser × tool × environment, layered rolesAgent-level or user-level allow/deny
AuditStructured records, traceable any dimensionSession logs, or none
Background tasksFire-and-forget + proactive pushRequest-response; user waits or checks

13.6 Who Ships the Code, and Who Catches a Bad Release

DimensionOpsBotCodex / Claude Code
After the code changeThe same employee cherry-picks, opens the MR, watches CI, passes the release gate, reads back and verifiesHands back to a human; releasing is someone else's job with someone else's tools
Knows what production looks like?✓ Topology, credentials, release history and incident history live in the knowledge base✗ Sees only the repository
Writing to main / releasing to prodMandatory approval regardless of role; code cards go to dev_admin, ops cards to adminLocal permissions are all the permissions there are
Bypassing CI gatesAll three paths blocked: disabling the gate, deleting the manual job, editing the CI fileNo such concept
Commit attributionAuthor = the person who gave the order, auditableAuthor = whatever account runs it
Chapter 14 · Conclusion

Why None of Them Can Close the Gap

  • OpenClaw + plugins: strong platform and plugin ecosystem, but knowledge is lost to session resets, with no cross-user approval, no per-user RBAC, no deterministic experience retrieval, and no knowledge-pollution governance.
  • Hermes Agent + plugins: strong self-evolution, but approval is single-user, its safeguards guard against AI loops rather than people ("user A may not use a given tool" isn't possible), memory dedup deletes details by mistake, and there's no structured audit.
  • Codex on a server: strong at writing code, but positioned for asynchronous code generation — not real-time interaction, no chat integration, sandbox isolation that can't reach production infrastructure directly, and no multi-user permissions. It stops where the code ends; releasing, verifying and recording the lesson happen without it.
  • Claude Code on a server: an interactive coding assistant — no persistent ops knowledge, no cross-user approval, no RBAC, no background tasks. We learned from and adopted its safety philosophy, and OpsBot's coding runs on the same generation of models; but it itself was never designed for the ops reality of "many people collaborating, production running unattended, incidents irreversible" — it has no layer that says "two roles in one employee, but not one set of permissions."

The shared conclusion: they're all excellent general-purpose tools, but the two foundations of ops — knowledge that never forgets and converges, and a production-grade multi-user safety framework — can't be bolted on with a few plugins. They require holistic design, from the data model all the way to the execution flow.

Epilogue
Epilogue

The Design Philosophy, in One Sentence

Every piece of design above, taken apart, is a different feature. Taken together, they all serve a single sentence:

Let the AI handle what takes judgment;
let code lock down what can't go wrong.
  • Recognizing entities: the AI understands "this is about web"; code fixes the format of the ID.
  • Judging commands: the AI understands whether a command is dangerous; code holds the line that "high risk must be approved."
  • Reconnoitering before acting: the AI decides what to recall; code holds the line that "always orient first — but never let a failed recall block the work."
  • Cleaning knowledge: the AI distills what's worth keeping; code holds the line that "back up before deleting, and the irreversible needs a human's nod."

The reasoning is simple: the AI is already smarter than any rigid rule, so don't confine its judgment with rules; but the AI does occasionally err, and some mistakes in production cannot be afforded even once — so in those places, you lock it down with the simplest, most deterministic code there is.

That is the difference between OpsBot and "yet another AI script": it remembers, it reasons, it dares to act — and in every place that matters, it holds up.