Files
agent-park/docs/n8n/frontier-signals-workflow.md
T

5.1 KiB
Raw Blame History

Frontier Signals Workflow

Goal

Aggregate frontier discussions from multiple platforms, keep only AI Agent-related signals via AI filtering, and ingest into POST /api/webhook/signals.

Workflow

  • Workflow name: 前沿信号聚合(多源+AI Agent过滤)
  • Workflow ID: bAxNZKGq2ApUUiw9
  • Status: active
  • Trigger: every 4 hours (Schedule Trigger)
  • Activated at: 2026-02-23

Source Research (Endpoints + Extracted Elements)

Source Endpoint Node Type Extracted Elements
Hacker News https://hacker-news.firebaseio.com/v0/topstories.json + .../item/{id}.json HTTP Request title, url, text, score, descendants, time
GitHub https://api.github.com/search/issues HTTP Request title, html_url, body, comments, reactions, labels, updated_at
arXiv https://export.arxiv.org/api/query?... RSS Read title, link, content/contentSnippet, pubDate/isoDate, categories
Reddit https://www.reddit.com/r/LocalLLaMA/new.json?limit=40 HTTP Request title, permalink, selftext/url, ups, num_comments, created_utc
Product Hunt https://www.producthunt.com/feed RSS Read title, link, content/contentSnippet, published/updated
Hugging Face https://huggingface.co/blog/feed.xml RSS Read title, link, content/contentSnippet, published/updated

Why These Nodes

  • Schedule Trigger: periodic ingestion
  • HTTP Request / RSS Read: source fetching with stable machine-readable endpoints
  • Code: per-source normalization and schema-safe cleanup
  • Merge (append): multi-source union
  • Remove Duplicates: source + sourceUrl dedupe before/after AI
  • Limit: cap candidate volume before AI
  • LLM Chain + Structured Output Parser: relevance filtering + structured sections
  • If: keep only shouldKeep=true
  • HTTP Request (POST): write to /api/webhook/signals

Target Contract Mapping

The workflow emits payload compatible with SignalWebhookPayloadSchema:

  • apiKey: manually configured in node 构建 Webhook Payload
  • signals[]:
    • source -> one of:
      • hacker_news
      • github
      • arxiv
      • hugging_face
      • reddit
      • product_hunt
    • sourceUrl, title, summary, topic, tags, sections, engagement, hotScore, isHot, publishedAt, isActive

Sections are constrained to:

  • style: focus | debate | evidence | action | risk
  • max 6 sections, max 6 items per section

AI Filtering Policy

The AI node does not score ideas by novelty/reliability/feasibility. It only decides whether a signal is about AI Agent topics and then structures content for reading efficiency.

  • Keep (shouldKeep=true) if discussion is materially agent-related
  • Drop (shouldKeep=false) if clearly unrelated to AI Agent
  • Drop low-discussion or low-value question items (shouldKeep=false)
  • If information is insufficient, default to drop

High-Heat GateAI 前硬过滤)

筛掉占位候选 节点会在 AI 前做硬性筛选,减少低价值输入:

  • source-level minimum engagement:
    • hacker_news >= 35
    • github >= 8
    • reddit >= 25
  • source-level freshness window:
    • hacker_news <= 72h
    • github <= 168h
    • reddit/arxiv/hugging_face/product_hunt <= 120h
  • low-value question filtering:
    • 求助型单问题 + 短摘要 + 低互动,直接丢弃
  • per-source candidate capAI 前限流):
    • hacker_news 6, github 6, reddit 6, arxiv 4, hugging_face 4, product_hunt 4
  • strict keyword gate for low-discussion sources:
    • arxiv/hugging_face/product_hunt 必须命中 agent 相关关键词(如 agent, agentic, multi-agent, tool calling, mcp, 智能体)才进入 AI

HOT 判定(流程内)

清洗并映射入库字段 Code 节点会基于互动量 + 时间新鲜度计算:

  • hotScore0-100
  • isHot:布尔值,用于页面 HOT 标签与排序优先

该判定只衡量讨论热度,不评价观点对错或质量。

DB 升级(新增 HOT 字段)

由于当前仓库默认忽略 prisma/migrations/*_* 目录,建议在数据库手动执行一次:

ALTER TABLE "signals"
ADD COLUMN IF NOT EXISTS "hotScore" INTEGER NOT NULL DEFAULT 0,
ADD COLUMN IF NOT EXISTS "isHot" BOOLEAN NOT NULL DEFAULT false;

CREATE INDEX IF NOT EXISTS "idx_signal_hot_score" ON "signals"("hotScore");
CREATE INDEX IF NOT EXISTS "idx_signal_active_hot_sort" ON "signals"("isActive", "isHot", "hotScore", "publishedAt");

Manual Configuration (No Env)

This workflow is intentionally configured without $env usage.

  • Node 构建 Webhook Payload:
    • set apiKey to your real webhook key (replace placeholder string)
  • Node 发送到 Signals Webhook:
    • set the target URL to your actual API base (current default is https://agentpark.fun/api/webhook/signals)

Notes

  • Reddit source uses JSON API with explicit User-Agent headers to reduce 403 blocking risk.
  • n8n_test_workflow cannot trigger schedule-only workflows via API; runtime verification should be done by waiting for scheduled execution or manual run in n8n UI.