报错进 thread
同事贴一段报错、一个构建链接,或者一句"后台打不开了"。OpsBot 读 Loki / OpenSearch 日志、看 pod 状态、翻 thread 里的附件——这一步和一个资深运维做的事一样。
运维最大的浪费,不是事故,而是昨天的经验今天用不上。
OpsBot 把"干活"和"记经验、用经验"焊成一个闭环——让 AI 像资深运维那样带着经验干活,并在严格的安全框架下执行。
市面上绝大多数"AI 运维助手",说穿了就是个听话的执行器——你说一句,它做一件,做完转头就忘。聪明、勤快、反应快,但永远是个第一天上岗的实习生:你昨天手把手教过的坑,它今天照样替你再踩一遍。
OpsBot 走的是另一条路。它把"干活"和"记经验、用经验"焊成一个闭环,而且这个闭环从 2026 年 8 月起跨过了运维和开发两个岗位——同一个员工,既排障发版,也读码改码:
五环咬死,缺一不可,合起来就是一个真正的运维大脑。上篇逐环讲它怎么转、凭什么靠得住;中篇讲它怎么把运维和开发两个岗位干在一个人身上、权限却不合一;下篇把话挑明:为什么那些通用 Agent 框架(OpenClaw、Hermes、Codex、Claude Code)再怎么装插件,也补不齐这个闭环。
整套系统只有一条贯穿始终的设计原则,一句话就能说清:
聪明的事交给 AI,出不得错的事用代码管死。
该判断的(这是什么活、这条命令危不危险)让 AI 去想,它比规则聪明;该守死的(不可逆操作必须审批、删数据必须先备份)用代码兜底,一步都不让步。
OpsBot 不是聊天机器人,不是个人助理,不是代码生成工具。它是一个生产环境运维安全执行平台——团队每个人通过聊天窗口(Slack / Mattermost / Telegram)与它交互,它在严格的权限与安全框架下执行运维操作,并且把每一次操作的经验沉淀下来、在下一次需要时主动调出来用。
一个十年经验的资深运维,值钱的从来不是他打字快,而是他脑子里装着这套系统所有的坑、所有的约定、所有"上次是这么解决的"。而今天,这些最宝贵的运维知识,正散落在三处:
OpsBot 把这三处的知识,统一收拢进它自己的大脑:结构化、持久化、永不遗忘,并且越用越聪明。
这意味着一件对任何组织都至关重要的事——经验第一次真正属于公司,而不是属于某个人。即使核心员工离职,他也再带不走这些沉淀下来的知识和教训。 团队的运维能力,不再随人员流动而起伏。
设想同一个场景:半年前你部署一个 web 应用时发现,"它所在集群的 ingress controller 是 0.48 版,必须用 pathType: Prefix 而不是 ImplementationSpecific,否则路由不生效"。
这就是"执行器"和"运维大脑"的差别。而做到后者靠的不是某个单点功能,是下面五个环节缺一不可的闭环——任何一环断了,"带经验干活"就不成立。
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 不需要你专门"教"它。它在每一次干活的过程中自动学习,把有价值的东西沉淀进知识库。这套自学习由六个机制协同:
| 机制 | 触发时机 | 学什么 |
|---|---|---|
| Auto-Reflect | 每次工具执行后(异步) | 状态变化、用户反馈、操作经验 |
| 失败→成功闭环提炼 | 任务成功结束时 | "这样做失败了,换那样成功了"的避坑经验(见第四章) |
| Feedback 检测 | 识别到用户纠正 | "不是 dev 是 uat"、"以后都用 X" 等规则(附用户身份) |
| 确定性资源台账 | 创建资源/部署服务成功后(hook 确定性捕获) | bot 亲手创建的云资源与服务器长期服务:位置/版本/用途,并提醒沉淀凭证 |
| Learning Orchestrator | 主动深度学习某项目 | 多轮 plan→collect→ask→analyze→update |
| Verify Action | 验证旧知识仍准确时 | 刷新"最后验证时间",标记知识新鲜度 |
所有学习产物都不会直接写库,而是统一经过一道写入门控(5 步流水线:模板校验 → 自动补全 → 别名标准化 → 冲突去重 → 写入),并辅以:
学习是飞轮的"输入"。但光会学还不够——学来的东西怎么存,决定了它将来取不取得出来。
普通 AI 助手的知识库有两个看似无关、实则同根的毛病:
两个毛病一个根:它认不出"这几条记录其实都在讲同一个对象"。记的时候认不出,就越堆越乱;用的时候认不出,就串不起来。OpsBot 从根上解决了这件事。
我们为每一条知识引入一个稳定的身份标识 entity_id,格式为 {对象}@{项目}:{环境},例如 web@shop:prod。
web@shop:prod 的状态时,先检索该实体是否已有记录——有则更新同一条(始终最新),而不是新建。三次操作收敛成一条,而非堆成三条。backend-p0@media:prod 的经验时,所有挂在这个实体上的散落知识被一起召回,AI 不再需要拼凑。这件事不能靠碰运气。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——下面这条流动的光点,就是一条知识在管线里走完的一生:
模板校验 → 补全 → 别名标准化 → 冲突去重 → 写入;content_hash 去重、凭证守卫拦 token/密码。
feedback/troubleshooting 优先 → 关键词+向量广召回 → 按 project 图扩展 → Jina 精排 top-5。
同一 entity_id 的状态更新同一条、始终最新;经验类才追加新条、保留历史。
种子/人工录入受保护、不被自动删;过时知识超 7 天标"未验证"提示复核。
我们对生产知识库做了一次审计,结果触目惊心:
这些"失败流水账"是系统在每次工具失败时自动写下的——参数写错、网络抖动、权限不足,每失败一次就记一条。它们大多是临时性失败(一次性的、早已不复存在),却被当作"活跃故障"反复召回;它们持续稀释检索质量,让真正有价值的经验被淹没在噪音里。
问题的本质不是"记太多",而是"记错了东西"。一次工具失败本身没有复用价值——参数写错、网络抖一下,记下来对下次毫无帮助。真正值钱的是"踩了坑、又怎么绕出来"的完整经过:比如"直接连数据库连不上,因为这个容器里没装客户端、默认连的是本机;指定了远程地址之后就通了"。这种"坑在哪、正确做法是什么"的避坑经验,才是下次干同类活时真正想要的。
清理存量是要从生产库里真删数据,删错了找不回来。所以我们没有让系统"自己看着办、直接清",而是拆成三步,把"删不删"的决定权牢牢留在人手里:
一句话:系统只负责把方案准备好,删除这一刀始终由人来下,而且下刀前一定先留好备份。
至于被保留下来的"失败→成功"精华经验,会被标记成"已解决"——这样它不会再混进"当前活跃故障"的列表去骚扰人,但你下次干同类活时,它照样能被检索到。它的身份从"一条没完没了的报错",变成了"一条随时可查的避坑笔记"。
知识库干净了,下一章讲 OpsBot 怎么在干活前主动把这些经验调出来用——一边净化、一边调用,知识库才真正成了越用越值钱的资产,而不是越堆越脏的垃圾场。
普通 AI 助手有个通病:你一发指令,它立刻就动手,哪怕知识库里明明躺着一条"这个坑上次就栽过"的经验,它也想不起来去翻。于是同样的错误,换个时间又犯一遍。
OpsBot 不这样。它内置了一个叫 orient(侦察) 的环节——任何变更类操作,它在真正动手之前,一定先像老师傅那样把这件事在脑子里过一遍:这是什么活?以前对它做过什么、踩过什么坑?正确的路子是什么?想清楚了,才动手。
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 的检索管线用四个机制让经验穿透症状直达根因:
这套检索是层层递进的:先捞出最相关的反馈和避坑经验,再从多个角度广撒网召回候选,顺着项目关联把相关知识带出来,最后做一轮精排,留下最相关的几条。任何一步出问题都安全降级、绝不影响正常使用。它是 orient 能在干活前调出准确经验的底层支撑。
OpsBot 在执行任何一条命令之前,都会先让一个专门的模型判断这条命令到底有多危险(安全 / 只读 / 变更 / 危险)。它不是去匹配几个危险关键词,而是真正读懂这条命令:它会不会改动东西、改了能不能撤销、影响多大范围。判断完,才决定是直接执行,还是必须先找人审批。
这一点很关键,因为危险往往藏在细节里。同样是一条扩缩容命令,把副本数设成 3 是正常扩容,设成 0 就等于把整个服务停掉;find / -delete 看着平平无奇,跑起来能把整台机器清空。靠死板的关键词规则根本分不清这些——只有真正读懂命令意图的模型才分得清。
这个思路和业界最强的 Agent(Claude Code)一致:给够上下文和原则,让 AI 自己判断,而不是用一张黑名单去框它。但运维和写代码不一样——这是生产环境、没人盯着、出了事没法撤销。所以 OpsBot 在 AI 判断之外,又压了一道代码兜底:万一模型判断失败,一律按"危险"处理、强制走审批;就算 AI 把一条高风险命令误判成安全的,最坏也只是多弹一次审批,绝不可能跳过审批直接执行。一句话——AI 负责把风险看准,代码负责"看不准时也绝不出事"。
为了确认这道防线真的扛得住,我们用 82 条对抗性测试反复攻击它,覆盖了直接的危险命令、各种话术诱导、伪装绕过等多个攻击角度。
用户 × 工具 × 环境,prod / uat / dev 独立隔离,角色分层(admin ⊃ ops ⊃ dev ⊃ viewer),即时变更无需重启。OpsBot 的中枢(大脑)跑在它自己的环境里,本身碰不到你的隔离生产网络。跨越这道鸿沟的,是驻点(Station)——中枢伸进你网络的"手脚"。
驻点是一个部署在你目标环境内部的轻量执行体(集群里的一个 Pod,或网络里的一台机器)。它只带一身运维 CLI(kubectl / mysql / psql / redis-cli / curl / helm),不含任何业务逻辑、不做任何决策、不保管任何密钥——所有"思考"都在中枢,驻点只负责"在环境里落地这一下"。中枢要操作某个隔离环境时,经驻点下达一次性命令、把结果取回;环境内的 K8s、数据库、日志、内网 API,全部由该环境的驻点代为触达。
kubectl exec「钻进去」下命令——你的防火墙一个入站口子都不用为它开。这正是安全团队最在意的:不引入新的入站攻击面。10.x / 192.168.x),而"中枢 + 多驻点"模型认的是"哪个驻点"不是"哪个 IP",比硬拉一张大 VPN / overlay 干净得多。落地只有三个前提:① 至少部署一个驻点——每个想让 OpsBot 操作的隔离网络 / 环境至少放一个;② 部署在那个网络内部(集群里的 Pod,或网络内一台机器),它才够得着该环境的 K8s / 数据库 / 内网服务;③ 能和 OpsBot 中枢通讯——二选一:中枢能访问该集群的 K8s API(走 k8s-exec,零入站、最安全),或开一条受限 SSH 通道(限定来源 IP)让中枢连入(用于 API 都够不着的纯内网 / IDC)。接入新环境 = 部署一个新驻点,OpsBot 本体一行都不用改。
OpsBot 从 2026 年 8 月起多了一个岗位:开发工程师。它能读客户仓库、改代码、开 MR、做 review、盯 CI、按仓库惯例把修复晋级到生产。但真正值钱的不是"又会一样",而是两个岗位长在同一个员工身上——下面这条线,是它每天在客户生产环境里真实走的路:一个报错从 thread 进来,最后变成一条被验证过的发布和一条写进知识库的经验。往下滚动,看它在两条泳道之间怎么走、每一步靠哪道门兜底。
同事贴一段报错、一个构建链接,或者一句"后台打不开了"。OpsBot 读 Loki / OpenSearch 日志、看 pod 状态、翻 thread 里的附件——这一步和一个资深运维做的事一样。
日志指向一个接口,OpsBot 不会停在"请开发看一下"。它把仓库快照拉进工作区,grep 到那个 handler,亲读代码块边界——不信注释,注释只是作者的主张。侦察侧链同时把"最近 24 小时谁发了什么"摆在旁边:事故真凶常常就是刚发的版。
小改动直接暂存编辑;大改动委派给编码子代理(Opus,单实例长任务)。所有编辑都在中枢容器的工作区里,静态检查随手做,提交前不产生任何外部副作用。
提交到 feature 分支、开 MR。review 时攒齐发现一次批量发行内评论,再单发一份 HTML 评审报告;仓库画像(分支惯例、feature 不跑 CI、哪些合并炸过)从知识库里带出来,越审越熟。
"我一直盯着它"对一个 AI 来说本来是句空话——一轮对话结束它就不在了。所以盯 CI 做成了事件驱动:pipeline 到终态就把 OpsBot 叫醒,失败读 job 日志修到绿,成功接着走下一步。中途不刷屏。
修复合进 dev 之后,按这个仓库自己的惯例 cherry-pick 到 uat、再提 MR 到 main——一条龙做完,不摆"整支合并还是半截"的多选题给用户。惯例不知道就问一句,然后记住。
用户拍板"上线",OpsBot 的动作是发起发布让审批卡确认,不是自己改完再汇报。release_commit、kubectl apply、argocd sync 到生产,换哪个工具都一样被拦。
发布后回读对账,pipeline 终态直接唤醒接着做后续步骤。整轮查了什么、结论是什么,和 remember_knowledge 同一轮写进知识库;调查型任务跑了八步以上却零沉淀,系统会自己把它叫回来补记。
运维和开发本来就是同一条价值链上的两段。把它们分给两个人,不是因为这样更好,而是因为一个人装不下两套经验。OpsBot 装得下——而且装在同一个知识库里。
两个岗位合到一个员工身上,省掉的不是一份工资,是四个交接点。
每个交接点丢掉的信息,都是下一次事故的种子。
机器人有两双手,但每一格看的是谁在下令。点一行,看这个角色在 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 | 可以 |
在自己的应用仓库里读、改、审都直接做;往 main 写、发生产、查凭证、动生产环境全部弹卡——代码类卡归 dev_admin,运维类卡归 admin。想要 pipeline 脚本、网关配置这类运维内部实现物:流程可以讲,原文不给。
release_commit、生产 kubectl apply、argocd sync 都要另一个人点批准。这三条不是 prompt 里的建议,是审批链上的代码。AI 判断"这是什么活、危不危险",代码守死"谁能批、谁不能看"。
答案是:拼不出来。因为缺的不是某个功能,而是整个闭环——尤其是"记忆"和"生产安全"这两块地基。
这一点在 OpsBot 也开始写代码之后反而更清楚了:Codex 和 Claude Code 写代码的本事很强,OpsBot 的编码能力就是站在它们这一代模型的肩上。差别不在"会不会写",而在写完之后——它们不知道你的生产长什么样(没有拓扑、凭证、发布记录的记忆),也没有人在它们上面焊一道"谁能发、发错谁来拦"的门。
| 框架 | 定位 | 平台支持 |
|---|---|---|
| OpenClaw | 本地优先个人 AI 助理 | 多聊天平台 |
| Hermes Agent | 自进化通用 Agent | 多聊天平台 |
| OpenAI Codex | 异步代码生成 Agent | API / CLI / Web |
| Claude Code | 交互式编程助手 CLI | 终端 / IDE |
| 维度 | OpsBot | OpenClaw | Hermes | Codex / Claude Code |
|---|---|---|---|---|
| 存储 | 数据库持久化 | 记忆文件 | 会话文件 + 记忆库 | 无持久知识 |
| 生命周期 | 永久保留 | 会话定期重置;文件有上限 | 会话按空闲重置;去重淘汰 | 会话结束即消失 |
| 半年后还在? | ✓ 在 | ⚠ 不确定 | ⚠ 不确定 | ✗ 不在 |
| 同一实体多次操作 | ✓ 收敛成一条 | ✗ 堆积/覆盖 | ✗ 堆积/误删 | — |
| 注入确定性 | 干活前强制 orient 调取 | 依赖 AI 主动召回 | 依赖 AI 主动召回 | 无 |
这是所有差距的根。 通用 Agent 的记忆是"尽力而为"——可能在、可能不在、可能被误删。运维场景不接受"可能":一条半年前的关键配置忘了,就是一次生产事故。OpsBot 不仅永久保留,还通过实体收敛保证"同一个对象只有一条最新记录",通过 orient 保证"干活前一定调出来"。
| 维度 | OpsBot | 通用 Agent |
|---|---|---|
| 失败记录 | 只记"失败→成功"闭环经验 | 要么不记,要么记成噪音 |
| 污染治理 | 主动审计 + 浓缩清理 | 无机制 |
| 检索质量 | 持续净化,精华不被淹没 | 噪音累积,质量衰减 |
| 维度 | OpsBot | OpenClaw | Hermes | Codex / Claude Code |
|---|---|---|---|---|
| 模型 | A 请求 → B 审批 | 同一用户确认 | 同一用户确认 | 无 |
| 审批人约束 | 必须管理员 + 环境权限 | 任何人 | 任何人 | 无 |
| 持久化 | 数据库,重启不丢 | 内存暂停 | 内存暂停 | 无 |
| 维度 | OpsBot | 通用 Agent |
|---|---|---|
| 风险判断 | 模型推理可逆性与影响范围 | 关键词黑白名单 或 全凭 AI 自觉 |
| 上下文感知 | ✓ 分得清 replicas=3 与 0 | ✗ 字面匹配 |
| 失败兜底 | 分类失败一律按危险处理 | 无 |
| 对抗测试 | 82 条覆盖多攻击维度 | — |
| 维度 | OpsBot | 通用 Agent |
|---|---|---|
| 权限粒度 | 用户 × 工具 × 环境,角色分层 | Agent 级或用户级 allow/deny |
| 审计 | 结构化记录,任意维度可追溯查询 | 会话日志或无 |
| 后台任务 | fire-and-forget + 完成主动推送 | 请求-响应,用户得等或自己查 |
| 维度 | OpsBot | Codex / Claude Code |
|---|---|---|
| 改完代码之后 | 同一个员工接着 cherry-pick 晋级、开 MR、盯 CI、走发布门、回读验证 | 交回给人;发布是另一个人的另一套工具 |
| 知道生产长什么样? | ✓ 拓扑、凭证、发布记录、事故史都在知识库里 | ✗ 只看得到仓库 |
| 写 main / 发生产 | 强制审批,与角色无关;代码卡归 dev_admin,运维卡归 admin | 本地权限即全部权限 |
| 绕过 CI 门禁 | 关门禁 / 删 manual job / 改 CI 文件三条路全拦 | 无此概念 |
| commit 归属 | 作者 = 下指令的人,可审计 | 作者 = 运行它的账号 |
共同的结论:它们都是优秀的通用工具,但运维场景的两块地基——永不遗忘且会收敛的知识、生产级的多人安全框架——不是加几个插件能补的,那需要从数据模型到执行流程的整体设计。
前面讲的每一处设计,拆开看是不同的功能,合起来其实只在贯彻同一句话:
道理很朴素:AI 已经比任何死规则都聪明,就别用规则去框它的脑子;但 AI 偶尔会犯错,而生产环境的某些错误一次都犯不起——这些地方,就用最笨、最确定的代码焊死。
这就是 OpsBot 和"又一个 AI 脚本"的区别:它会记、会想、敢动手,而且在每一个要命的地方,都靠得住。
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.
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:
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.
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.
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:
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.
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."
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.
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
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:
| Mechanism | When it fires | What it learns |
|---|---|---|
| Auto-Reflect | After every tool call (async) | State changes, user feedback, operational experience |
| Failure→Success distillation | When a task completes successfully | The "tried this, it failed; switched, it worked" lesson (see Chapter 4) |
| Feedback detection | When it spots a user correction | Rules like "not dev, it's uat" or "always use X from now on" (tagged to the user) |
| Deterministic resource ledger | After 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 Orchestrator | Deliberate deep-dive on a project | Multi-round plan→collect→ask→analyze→update |
| Verify Action | When it confirms old knowledge still holds | Refreshes the "last verified" timestamp, tracking freshness |
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:
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.
A typical AI assistant's knowledge base has two problems that look unrelated but share one root:
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.
Every piece of knowledge carries a stable identity, entity_id, in the form {object}@{project}:{environment} — for example, web@shop:prod.
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.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.This can't be left to chance. entity_id is locked down by 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:
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.
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:
validate → complete → normalize aliases → dedup conflicts → write; content_hash dedup, credential guard blocks tokens/passwords.
feedback/troubleshooting first → keyword + vector recall → graph-expand by project → Jina rerank to top-5.
state facts for one entity_id update the same record, always current; experience appends a new record, keeping history.
seed / human-entered knowledge is protected from auto-deletion; stale knowledge past 7 days is flagged "unverified" for review.
We ran an audit on a production knowledge base. The result was sobering:
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 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.
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:
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.
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.
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.
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.
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:
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.
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.
user × tool × environment, with prod / uat / dev isolated independently and roles layered (admin ⊃ ops ⊃ dev ⊃ viewer); changes take effect immediately with no restart.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.
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.
kubectl exec in — your firewall needs zero inbound openings. No new inbound attack surface.10.x / 192.168.x); the "hub + many stations" model routes by which station, not which IP — far cleaner than one big VPN / overlay.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.
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.
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 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.
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.
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.
"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.
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.
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.
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.
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.
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.
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 code | Edit codefeature branch | Write to main | Review MR | View credentials | Prod opswrite operations | Release to prod | See opsinternals |
|---|---|---|---|---|---|---|---|---|
| viewerobserver | refused | refused | refused | refused | refused | refused | refused | refused |
| developerdeveloper | direct | direct | card → dev_admin | direct | card → admin | card → admin | card → admin | refused |
| dev_admindevelopment lead | direct | direct | card → dev_admin | direct · approver | card → admin | card → admin | card → admin | refused |
| opsoperations | direct | direct | card → dev_admin | direct | direct | direct | card → admin | allowed |
| adminops administrator | direct | direct | card → dev_admin | direct | direct | direct | card → another admin | allowed |
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.
release_commit, production kubectl apply and argocd sync need another person's approval.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."
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.
| Framework | Positioning | Platform support |
|---|---|---|
| OpenClaw | Local-first personal AI assistant | Multiple chat platforms |
| Hermes Agent | Self-evolving general-purpose agent | Multiple chat platforms |
| OpenAI Codex | Asynchronous code-generation agent | API / CLI / Web |
| Claude Code | Interactive coding assistant CLI | Terminal / IDE |
| Dimension | OpsBot | OpenClaw | Hermes | Codex / Claude Code |
|---|---|---|---|---|
| Storage | Database-persisted | Memory file | Session files + memory store | No persistent knowledge |
| Lifecycle | Kept forever | Sessions reset; files capped | Reset on idle; deduped & evicted | Gone 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 determinism | Forced orient before acting | Relies on AI recall | Relies on AI recall | None |
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."
| Dimension | OpsBot | General-purpose agent |
|---|---|---|
| Failure records | Only "failure→success" lessons | Either nothing, or recorded as noise |
| Pollution governance | Active audit + condense-and-clean | None |
| Search quality | Continuously purified; valuable knowledge isn't buried | Noise accumulates; quality decays |
| Dimension | OpsBot | OpenClaw | Hermes | Codex / Claude Code |
|---|---|---|---|---|
| Model | A requests → B approves | Same user confirms | Same user confirms | None |
| Approver constraint | Admin + environment permission | Anyone | Anyone | None |
| Persistence | Database; survives restart | In-memory pause | In-memory pause | None |
| Dimension | OpsBot | General-purpose agent |
|---|---|---|
| Risk judgment | Model reasons reversibility & blast radius | Keyword blocklist, or pure self-restraint |
| Context awareness | ✓ Tells replicas=3 from 0 | ✗ Literal matching |
| Failure backstop | Failed classification → treated as danger | None |
| Adversarial testing | 82 tests across attack dimensions | — |
| Dimension | OpsBot | General-purpose agent |
|---|---|---|
| Permission granularity | User × tool × environment, layered roles | Agent-level or user-level allow/deny |
| Audit | Structured records, traceable any dimension | Session logs, or none |
| Background tasks | Fire-and-forget + proactive push | Request-response; user waits or checks |
| Dimension | OpsBot | Codex / Claude Code |
|---|---|---|
| After the code change | The same employee cherry-picks, opens the MR, watches CI, passes the release gate, reads back and verifies | Hands 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 prod | Mandatory approval regardless of role; code cards go to dev_admin, ops cards to admin | Local permissions are all the permissions there are |
| Bypassing CI gates | All three paths blocked: disabling the gate, deleting the manual job, editing the CI file | No such concept |
| Commit attribution | Author = the person who gave the order, auditable | Author = whatever account runs it |
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.
Every piece of design above, taken apart, is a different feature. Taken together, they all serve a single sentence:
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.