🎯 Learning objectives
Schedule, never post
The only new social tool is buffer_schedule — no post_now exists.
เครื่องมือใหม่ทาง social มีแค่ buffer_schedule ไม่มี post_now
本周唯一新加的社交工具是 buffer_schedule,没有 post_now。
Sentiment monitor loop
A 15-min loop that pings Slack on negative mentions — runs via launchd.
Loop 15 นาทีที่ ping Slack เวลามี mention เชิงลบ รันด้วย launchd
每 15 分钟轮询的回路;遇到负面提及就推送到 Slack — 同样由 launchd 触发。
Capstone integration
One agent.chat() call. Five systems. No cloud LLM.
เรียก agent.chat() ครั้งเดียว ครบ 5 ระบบ ไม่ใช้ cloud LLM
一次 agent.chat(),覆盖五个系统,不用云端 LLM。
🏁 Interactive: trace the capstone flow
An Instagram DM arrives. Click each step to see what Hermes calls — and which tool from which week handles it.
DM Instagram เข้ามา คลิกแต่ละขั้นดูว่า Hermes เรียกอะไร และเครื่องมือสัปดาห์ไหนรับช่วงต่อ
Instagram 私信进来。点击每一步看 Hermes 调了什么、由第几周的工具处理。
📚 Key concepts
🇬🇧 English
Rate limits — Buffer/X/Slack each cap RPM. The FunctionTool catches 429s and backs off; it does not retry instantly.
Schedule-only surface — the agent's only social action is queuing in Buffer. post_now() as a tool does not exist.
Sentiment loop — a separate mentions_brief.py script with its own launchd entry, reusing the same build_agent().
🇹🇭 ไทย
Rate limits — Buffer/X/Slack จำกัด RPM FunctionTool จับ 429 แล้ว back off ไม่รีทรายทันที
schedule-only — action บน social มีแค่ queue ใน Buffer ไม่มี post_now()
Sentiment loop — mentions_brief.py แยก ใช้ build_agent() เดิม
🇨🇳 中文
速率限制 — Buffer/X/Slack 都有 RPM 上限。FunctionTool 捕获 429 后退避,绝不立即重试。
只许排程 — 代理唯一的社交动作是把内容塞进 Buffer 队列。post_now() 工具不存在。
情感回路 — 单独的 mentions_brief.py 复用同一个 build_agent()。
🧪 Hands-on lab
Buffer schedule tool
Slack alert tool
The sentiment monitor — also via launchd
CAPSTONE — capstone.py
⚠️ Capstone constraint
Must run against local Hermes only — ollama serve + hermes3:8b. No proprietary LLM keys allowed. This proves the whole pipeline works without cloud dependencies.
ต้องรันบน Hermes local เท่านั้น — ollama serve + hermes3:8b ห้ามใช้ key LLM เจ้าอื่น พิสูจน์ว่า pipeline ใช้งานได้โดยไม่ต้องพึ่ง cloud
必须只在本地 Hermes 上跑 — ollama serve + hermes3:8b。不允许任何商用 LLM 密钥。这样才能证明整条流水线不依赖云端。
🏆 Capstone rubric (10 pts)
Integration
Chain touches all 5 systems (Social, Support, CRM, Calendar, Email) without crashing.
เชื่อมครบ 5 ระบบ (Social, Support, CRM, Calendar, Email) โดยไม่ crash
链路覆盖 Social/Support/CRM/Calendar/Email 五系统而不崩溃。
Safety / HITL
Every external action lands in Drafts / Buffer-queue / Slack-alert. Nothing sent live.
action ภายนอกทุกอันลงที่ Drafts / Buffer queue / Slack alert ไม่ส่งจริง
所有外部动作都落在 Drafts/Buffer 队列/Slack 提醒,不直接发送。
Business logic
Idempotency in CRM upserts; policy-grounded support answer; conflict re-check before booking.
CRM upsert มี idempotency, ตอบ support อิง policy, เช็คเวลาทับซ้อนก่อนจอง
CRM upsert 幂等;客服答案有政策依据;订单前再次冲突检查。
⚠️ Top gotchas
1. Runaway loops
A sentiment monitor hitting a network error retrying instantly will spam Slack and exhaust Buffer rate limits. Wrap with backoff + a daily cap.
Sentiment monitor เจอ network error แล้วรีทรายทันทีจะ spam Slack + เผา Buffer ห่อด้วย backoff + daily cap
情感监控遇到网络错误立即重试会刷爆 Slack 与 Buffer 限额。加退避和每日上限。
2. Context bloat
Feeding raw daily mentions JSON blows past Hermes' context. Pre-filter to ~20 mentions per run.
ป้อน JSON mention ทั้งวัน = context แตก กรองเหลือ ~20 mention ต่อรอบ
把整天提及的原始 JSON 喂进去会爆上下文。每次预过滤到约 20 条。
3. The "post-now" temptation
Never add a buffer_publish_now tool. Keep the agent's external action surface queue-only / read-only.
อย่าเพิ่ม buffer_publish_now เด็ดขาด ให้ surface เป็น queue-only / read-only
绝不要加 buffer_publish_now。代理的对外动作面只许排程、只许读取。
🌱 What to take forward
🇬🇧 After the course
- Keep the guardrails. No
send_email. Nobuffer_publish_now. Run draft-then-confirm for at least 3 months. - Iterate the prompts and the index, not the output. When Hermes errs, update the responder's system prompt or re-index a clearer policy doc.
- Embrace the reviewer. Every new external action gets an adversarial Hermes checking it before the closer runs.
🇹🇭 หลังจบหลักสูตร
- เก็บ guardrail ไว้ อย่าเพิ่ม
send_emailหรือbuffer_publish_nowใช้ draft-then-confirm อย่างน้อย 3 เดือน - แก้ที่ prompt และ index ไม่ใช่ที่ output Hermes ผิดที่ไหน อัปเดต system prompt หรือ re-index policy doc
- มี reviewer เสมอ action ภายนอกใหม่ทุกอันต้องมี adversarial Hermes เช็คก่อน closer
🇨🇳 课程之后
- 保留护栏。不要加
send_email,不要加buffer_publish_now。至少坚持先草稿后确认 3 个月。 - 修提示词和索引,而不是修产出。Hermes 出错时,更新回复者的系统提示,或重建一份更清晰的策略文档。
- 始终留一个审查者。每加一个新的外部动作,先让一个对抗的 Hermes 把关。