No description
  • Python 98.8%
  • Shell 1.2%
Find a file
2026-10-20 05:21:06 +08:00
.gitignore feat: initialize ai news pipeline 2026-07-06 01:25:18 +08:00
ai_common.py feat: archive and tag AI news digests 2026-07-08 23:41:43 +08:00
check_sources.py feat: initialize ai news pipeline 2026-07-06 01:25:18 +08:00
convert_brief.py feat: initialize ai news pipeline 2026-07-06 01:25:18 +08:00
cron_daily_docx.sh feat: improve AI news filtering and daily archive 2026-10-14 06:19:13 +08:00
cron_pipeline.sh feat: improve AI news filtering and daily archive 2026-10-14 06:19:13 +08:00
event_dedup.py feat: support manual event-aware digest rewrites 2026-07-17 23:19:55 +08:00
fetch_ai_intel.py feat: use TypeSafe Jev for typed importance scoring and front-stage filtering 2026-10-20 02:16:29 +08:00
fetch_article_content.py feat: add saved AI intel queue 2026-07-08 23:48:55 +08:00
generate_brief_from_db.py fix: ensure Jev evaluation is populated before brief generation 2026-10-20 05:00:20 +08:00
generate_daily_docx.py feat: improve AI news filtering and daily archive 2026-10-14 06:19:13 +08:00
jev_evaluator.py feat: use Jev region_focus choice to accurately classify domestic vs international tech news 2026-10-20 02:43:20 +08:00
maintain_db.py feat: archive and tag AI news digests 2026-07-08 23:41:43 +08:00
migrate_content_schema.py feat: initialize ai news pipeline 2026-07-06 01:25:18 +08:00
prune_db_with_jev.py feat: add Jev-driven high-concurrency database pruner 2026-10-20 05:21:06 +08:00
publish_to_telegraph.py feat: use TypeSafe Jev for front-stage filtering, tagging, and opportunity targeting to reduce LLM dependency 2026-10-20 02:30:53 +08:00
README.md feat: support configurable AI enrichment providers 2026-07-23 18:37:36 +08:00
saved_ai_intel.py refactor: remove saved queue CLI 2026-07-09 22:54:12 +08:00
search_ai_intel.py feat: archive and tag AI news digests 2026-07-08 23:41:43 +08:00
send_telegram.py feat: deduplicate Telegram news by event 2026-07-17 21:10:38 +08:00
sources.yml feat: improve AI news filtering and daily archive 2026-10-14 06:19:13 +08:00
tag_article_content.py feat: use TypeSafe Jev for front-stage filtering, tagging, and opportunity targeting to reduce LLM dependency 2026-10-20 02:30:53 +08:00
tg_save_listener.py refactor: remove saved queue CLI 2026-07-09 22:54:12 +08:00
translate_article_content.py feat: support configurable AI enrichment providers 2026-07-23 18:37:36 +08:00

AI News Pipeline

Automated AI intelligence/news pipeline for Hermes Agent.

Main pipeline

  1. fetch_ai_intel.py — fetch sources, dedupe, score, write SQLite and output/latest_items.json.
  2. publish_to_telegraph.py — enrich with the configured OpenAI-compatible AI provider, publish Telegraph full page.
  3. generate_brief_from_db.py — generate Telegram brief from latest_items.json or DB test source.
  4. send_telegram.py — send Telegram HTML messages.
  5. search_ai_intel.py — search archived items by keyword/tag/tool/skill.
  6. saved_ai_intel.py — saved/research queue library with source mirroring helpers.
  7. tg_save_listener.py — Telegram /save <id> and /saved [query/status] command listener for the X News bot.
  8. event_dedup.py — event-level Telegram selection: merges cross-source coverage, selects the strongest source, and applies a 72-hour resend cooldown.

Event-level push deduplication

Telegram delivery clusters related coverage by product/topic before any LLM enrichment. The archive and Telegraph page retain all source articles; Telegram gets one representative selected by source category, editorial importance, relevance, and available context. A delivered event stays quiet for 72 hours. It may appear again only for a distinct actionable update type such as API availability, pricing, weights, benchmark, or security news.

Saved / later research queue

Telegram briefs include compact #<id> prefixes on each visible item. The Telegram bot command menu exposes /save, /saved, /item, /done, /todo, and /unsave:

/save 392 later: product idea
/saved
/saved mcp
/saved inbox
/item 392
/done 392 已研究
/todo 392
/unsave 392

/save writes saved_items, then best-effort runs targeted mirroring: fetch_article_content.py --item-id, tag_article_content.py --item-id, and optionally translate_article_content.py --item-id internally when enabled.

After full-text archiving, tag_article_content.py calls deepseek-v4-flash on the archived article Markdown/text and writes 8-16 search tags (for example agent, mcp, tool, skill, coding, vendor/product names, Chinese aliases). Rows that already have tags are skipped and are not re-tagged. Short-summary enrichment (title_cn, summary_cn, importance) remains cached separately so Telegraph and Telegram generation do not translate/summarize the same batch twice.

Quick search:

cd ~/.hermes/scripts/ai-news
.venv/bin/python3 search_ai_intel.py skill
.venv/bin/python3 search_ai_intel.py --tag tool --since-days 30

Backfill old rows / rebuild search index:

.venv/bin/python3 maintain_db.py --backfill-tags --rebuild-search

Local secrets

Secrets are intentionally not committed. Create local config files as needed:

  • ai_model_config.json: { "base_url": "https://…/v1", "model": "…", "api_key": "…", "reasoning_effort": "high" } (OpenAI-compatible provider; optional reasoning_effort)
  • deepseek_config.json: legacy fallback { "api_key": "…" }
  • telegram_bot.json
  • telegraph_config.json
  • s3_config.json

Or set DEEPSEEK_API_KEY / DEEPSEEK_KEY in the environment.