From 51ecbace4c3836b76fc037f0780d8ef7c3d69318 Mon Sep 17 00:00:00 2001 From: Leonard Date: Sat, 20 Jun 2026 14:07:30 +0000 Subject: [PATCH] =?UTF-8?q?docs:=20add=20daily=20brief=20implementation=20?= =?UTF-8?q?notes=20=E2=80=94=20context-from=20chaining,=20cost=20breakdown?= =?UTF-8?q?,=20prev=20state?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../notes/daily-brief-implementation.md | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 hermes-automation/notes/daily-brief-implementation.md diff --git a/hermes-automation/notes/daily-brief-implementation.md b/hermes-automation/notes/daily-brief-implementation.md new file mode 100644 index 0000000..61a2600 --- /dev/null +++ b/hermes-automation/notes/daily-brief-implementation.md @@ -0,0 +1,42 @@ +# Daily Brief — Implementation Notes + +## Architecture: context-from Chaining + +The daily brief uses a **no-agent script → agent curation** pipeline: + +``` +┌──────────────────────────────┐ +│ cron: 0 15 * * * │ +│ script: collector.sh │ ← no-agent, free public APIs +├──────────────────────────────┤ +│ Script stdout → agent │ ← injected as prompt context +│ context │ +├──────────────────────────────┤ +│ Agent: curates → formats │ ← lightweight LLM pass only +│ → delivers to Telegram │ +└──────────────────────────────┘ +``` + +## Cost Breakdown + +| Stage | Token Cost | Frequency | +|-------|-----------|-----------| +| Script fetch (shell) | $0 | 1x per tick | +| Agent curation | Full model | 1x per tick | +| **Total vs old approach** | **~90% cheaper** | Old: agent had to web search + X search (both failing) | + +## Sources (Free, No API Key) + +| Source | Endpoint | Reliability | +|--------|----------|-------------| +| Weather | `wttr.in/Placerville,CA` | 99.9% | +| Hacker News | Firebase API (v0) | 99.9% | +| GitHub Trending | `api.github.com/search/repositories` | 99% (unauthed rate limit: 60/hr — fine for daily) | + +## Previous State (Before June 20) + +The old prompt instructed the agent to use web_search and x_search tools to gather data. Both were failing silently — Firecrawl was unconfigured and xAI credits were exhausted. The brief was returning `[SILENT]` every run (zero useful output for weeks). + +## Key Insight + +The **script + context_from** pattern from the masterclass turned a dead cron job into a working one in <5 minutes, with zero ongoing API costs. The script does the heavy lifting (API calls, parsing), and the agent only does the lightweight curation pass. \ No newline at end of file