Files
sxbh.ltd/dream-series-1.html
Hermes CI FixandHermes AI e1a9b25afa init: sxbh.ltd 官网初始提交
- nginx 安全加固 (CSP, HSTS, 缓存策略)
- 共享 style.css
- 138个页面全部接入

Co-authored-by: Hermes AI <agent@hermes>
2026-07-11 17:29:24 +08:00

101 lines
5.2 KiB
HTML

<!DOCTYPE html>
<html lang="zh-CN">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>系列一:当AI开始写日记 — Hermes Agent梦境模式实战 | 博海技术</title>
<style>
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;background:#f5f6f7;color:#2c3e50;line-height:1.9}
.container{max-width:780px;margin:0 auto;padding:0 20px}
.header{background:linear-gradient(135deg,#0f172a,#1e293b);padding:36px 0;text-align:center}
.header h1{font-size:24px;font-weight:700;color:#fff;line-height:1.4}
.header .meta{color:#94a3b8;font-size:13px;margin-top:10px}
.header .meta span{margin:0 8px}
.content{background:#fff;padding:30px 0}
.content h2{font-size:20px;font-weight:700;margin:28px 0 12px;padding-bottom:6px;border-bottom:2px solid #e2e8f0}
.content h3{font-size:16px;font-weight:600;margin:20px 0 8px;color:#0f172a}
.content p{font-size:15px;margin-bottom:12px;color:#334155}
.content ul{padding-left:20px;margin-bottom:12px;font-size:15px;color:#334155}
.content li{margin-bottom:4px}
.code{background:#1e2a35;border-radius:6px;padding:12px 16px;margin:10px 0;overflow-x:auto;font-family:monospace;font-size:13px;line-height:1.5;color:#e2e8f0}
.code .cm{color:#6b7280}.code .kw{color:#818cf8}.code .str{color:#34d399}
table{width:100%;border-collapse:collapse;margin:12px 0;font-size:14px}
td,th{padding:8px 12px;text-align:left;border-bottom:1px solid #e2e8f0}
th{background:#0f172a;color:#fff;font-weight:600}
tr:nth-child(even){background:#f8fafc}
.quote{background:#f0f9ff;border-left:3px solid #38bdf8;padding:10px 16px;margin:12px 0;border-radius:0 6px 6px 0;font-size:14px}
.footer{background:#0f172a;color:#94a3b8;text-align:center;padding:20px 0;font-size:12px}
.tag{display:inline-block;background:rgba(56,189,248,.12);color:#38bdf8;padding:3px 12px;border-radius:12px;font-size:12px;margin-top:8px}
</style>
<link rel="stylesheet" href="/style.css">
</head>
<body>
<div class="header">
<div class="container">
<h1>系列一:当AI开始写日记<br>Hermes Agent 梦境模式实战</h1>
<div class="meta"><span>📅 2026-06-26</span><span>🏷️ Hermes Agent · 自进化AI</span><span>⏱ 4分钟</span></div>
<span class="tag">🔬 实战案例</span>
</div>
</div>
<div class="content">
<div class="container">
<h2>一、为什么需要"梦境"?</h2>
<p>大多数AI是"事件驱动"的——你喊它,它干活;你不理它,它就静静待着。</p>
<p>但如果你希望Agent越来越了解你的习惯、记住自己的错误、不再重复踩坑呢?你需要一个能<strong>自我复盘</strong>的机制。</p>
<p>这就是"梦境模式"——不是科幻概念,而是基于 Hermes Agent 已有架构(SQLite + FTS5会话存储 + cronjob 系统 + Skill 体系)组合出的一个工程方案。</p>
<h2>二、核心架构</h2>
<p>梦境模式由三部分组成:</p>
<ul>
<li><strong>数据源</strong> — Hermes 自动记录所有历史对话,全文索引</li>
<li><strong>触发器</strong> — cronjob 每日凌晨3点自动启动</li>
<li><strong>分析引擎</strong> — Agent 读取近期 Session,识别错误模式和优化机会</li>
</ul>
<p>实现起来非常简单,利用 Hermes 内置的 cronjob 系统:</p>
<div class="code"><span class="cm"># 每日凌晨3点:Agent自动复盘</span><br>
cronjob:<br>
&nbsp;&nbsp;schedule: <span class="str">"0 3 * * *"</span><br>
&nbsp;&nbsp;prompt: 分析过去48小时的Session记录<br>
&nbsp;&nbsp;deliver: origin</div>
<h2>三、Phase 1:复盘报告(只读)</h2>
<p>第一阶段零风险——Agent 只读不写。</p>
<p>运行时它会:</p>
<ul>
<li><code>session_search()</code> 浏览近期活跃的会话</li>
<li>深入阅读2-3个关键Session</li>
<li>识别三类模式:<strong>错误模式</strong>(重复失败的操作)、<strong>优化机会</strong>(可以做得更好的地方)、<strong>原则对齐</strong>(是否偏离用户风格)</li>
<li>输出结构化 JSON 报告到本地目录</li>
</ul>
<h2>四、第一次复盘发现了什么?</h2>
<table>
<tr><th>严重度</th><th>错误模式</th><th>根因</th></tr>
<tr><td>🔴 High</td><td>web_search反复调用但不存在</td><td>系统配置未启用,但Agent不知道</td></tr>
<tr><td>🟡 Medium</td><td>头条反爬导致大量无效尝试</td><td>JS混淆无法直接爬取</td></tr>
<tr><td>🟡 Medium</td><td>Nginx编辑正则转义错</td><td>Python转义与nginx不兼容</td></tr>
<tr><td>🟢 Low</td><td>浏览器Console变量冲突</td><td>反复注入同一let变量</td></tr>
</table>
<div class="quote"><strong>💡 价值:</strong> web_search 的问题存在已久,但从未被系统化地识别过。梦境报告让它从"隐性摩擦"变成了"可跟踪、可量化的改进项"。</div>
<h2>五、效果</h2>
<p>整个 Phase 1 用了不到30分钟搭建完毕。第二天的报告会自动追踪前一天的问题是否已修复。</p>
<p>下一篇(系列二)我们来讲:<strong>如何让梦境从"只复盘"进化到"自动修bug"</strong>——Phase 2 的 Skill 补丁生成机制和 Phase 3 的高置信度自动执行。</p>
</div>
</div>
<div class="footer">博海技术管理 · 2026-06-26</div>
</body>
</html>