NewAgents Just Need APIs — Benchmarking three ways to give AI agents web access: read the writeup →
blog/use-cases
Use cases · · 6 min read

OpenClaw Use Case: Monitor Hacker News for Mentions of Your Product

Connect agent-data to OpenClaw, write a prompt for determining if a post is relevant, and schedule a recurring job to send alerts only when a thread actually matters.

Posted

If you build for technical users, the Hacker News post that matters most to you is rarely the one sitting at the top of the front page. It's usually a smaller thread where someone names your product, compares you to a competitor, or describes the exact problem you solve. Collecting Hacker News posts is easy. The harder part is turning a noisy, fast-moving feed into a small number of alerts worth interrupting someone for.

agent-data exposes Hacker News as a structured monitoring API. When connected to OpenClaw, you get something that behaves like a real monitor: it carries state between runs, screens items using lightweight metadata, only digs deeper when something looks promising, and stays quiet when nothing relevant turns up.

This post walks through the pattern end-to-end: writing the prompt, what OpenClaw sends you when something matches, what the agent does under the hood, and how to put the whole thing on a schedule. The worked example uses Acme Inc. as a placeholder company so the post stays illustrative.

Setup: install agent-data (if you haven't already)

If you've already got agent-data connected to OpenClaw, skip ahead. If not, the shortest path is one command:

npx -y agent-data init

That installs the CLI and walks you through API-key setup so you can access the Hacker News endpoint. You can also have OpenClaw walk you through the setup flow directly.

What you see: prompts and briefing output

From your side, this is a natural-language prompt that defines what counts as relevant:

Use agent-data to monitor Hacker News for mentions of Acme Inc. Also flag threads where people describe the problem Acme Inc. solves, ask for tools in this category, or present cases where a thoughtful founder response would add value. If nothing relevant appears, send a short note indicating that there was no news. If something matters, send me a concise briefing with links, engagement, summary, and suggested action.

A few useful variations:

Own-brand watch:

Use agent-data to monitor Hacker News for direct mentions of Acme Inc. Alert me only for direct mentions, product comparisons, or high-signal recommendation threads.

Category watch:

Use agent-data to monitor Hacker News for threads where people compare tools in Acme Inc.'s category, ask for recommendations, or discuss launches, pricing changes, and major criticism in the space.

Demand-signal watch:

Use agent-data to watch Hacker News for people describing brittle scraping pipelines, rate limits, unreliable browser workflows, or trouble getting live external data into AI agents. Send only the threads that look commercially meaningful.

When something matches, the briefing OpenClaw sends back is highly relevant and informative by design, including thread link, title, basic engagement context (points, comments), a one-paragraph summary, and a suggested action or comment angle. When nothing matches, it stays silent.

On the seed pull I ran during testing, the agent saw 25 items. Most of those wouldn't deserve an alert for a hypothetical Acme Inc. (unsurprisingly, not many people were discussing "Acme" today). But that's the design: the workflow isn't "send me everything related to this broad category," it's "review new posts and only send something if it is worth acting on."

What the agent sees: feed, checkpoints, and selective enrichment

This section is more of an under-the-hood look. You don't need to read it to use the workflow, but it's useful for debugging when something doesn't behave the way you expect.

OpenClaw first searches the library for the right endpoint and reads its docs:

$ agent-data search "Hacker News monitoring"
$ agent-data docs [Social Media API UUID]

Route slugs include get-feed, get-detail, and get-linked-content. The get-feed route accepts both a page_token for paginating through the current snapshot and a since_token for incremental polling.

The first run is a seed pull:

$ agent-data call [Social Media API UUID] get-feed \
  --source hacker_news \
  --page_size 25

That returned 25 items with has_more=true, result_direction="desc", a next_page_token, and a next_since_token. The first call gives the agent both a page cursor for going deeper within the current snapshot and a checkpoint token for the next incremental run.

Paginating through the same snapshot uses page_token:

$ agent-data call [Social Media API UUID] get-feed \
  --page_token <next_page_token from previous response>

That returned another 25 items, again with has_more=true.

Incremental polling uses since_token:

$ agent-data call [Social Media API UUID] get-feed \
  --since_token <next_since_token from seed pull>

Run immediately after the seed pull, this returned 0 items, has_more=false, and a fresh empty-state next_since_token. The empty response is one of the more important findings in this exercise: the agent can cheaply ask "what's new since the last successful run?" and get a clean no-op when nothing has changed. That's what makes hourly polling cheap.

For items that pass the relevance bar, OpenClaw fetches detail and linked content:

$ agent-data call [Social Media API UUID] get-detail --item_id <id>
$ agent-data call [Social Media API UUID] get-linked-content --item_id <id>

Detail fetches return author metadata, engagement context, and linked-content previews.

The first call usually involves discovery (search → docs → call), but later calls can reuse the path discovery established, so a scheduled job can skip straight to get-feed with the saved since_token.

Run it on a schedule with OpenClaw cron

Scheduling is how this stops being a one-off check and starts running on its own.

openclaw cron add \
  --name "Monitor HN for Acme Inc." \
  --cron "0 9-17 * * 1-5" \
  --tz "UTC" \
  --session isolated \
  --message 'Use agent-data to check Hacker News for new items since the last run. Flag direct mentions of Acme Inc., competitor activity in the same category, and threads describing the problem Acme Inc. solves. If nothing relevant appears, send a short note indicating that there was no news. Otherwise send a concise briefing with links, engagement, summary, and suggested action.' \
  --announce

Two practical notes. First, use an isolated cron job for this kind of recurring workflow. Second, the first run seeds the checkpoint, so expect more items the first time. Later runs poll incrementally with the saved since_token and will usually be quiet.

A few natural follow-ons:

During launch week, use agent-data to check Hacker News every 15 minutes for mentions of Acme Inc. and alert me immediately if a thread starts gaining traction.
Each evening, use agent-data to send me one concise summary of Hacker News threads that describe the problem Acme Inc. solves.
Only interrupt me for direct Acme Inc. mentions, clear category-relevant threads, or high-quality engagement opportunities.

Why agent-data instead of keyword alerts or browser automation?

A reasonable question — couldn't OpenClaw just subscribe to a keyword alert or drive the Hacker News front page with browser automation?

Keyword alerts are the most common alternative, but they're generally very noisy. They don't carry context between runs, and they only match the terms you give them. That misses the more useful signals — threads where someone describes your problem space without naming your company, or where the conversation in your category is shifting in a way that's commercially relevant.

Browser automation can fill the gap, but it's generally slow, expensive, and flaky. The agent pays for a screenshot at every step, which adds up fast when the job is running on a schedule. And it can only act on what the page is currently rendering, so anything below the fold — like the rest of a paginated list of posts — requires another turn.

agent-data handles both problems.

Other monitoring use cases for OpenClaw

Category launch monitoring

Instead of watching a named competitor list, you can look for launches, acquisitions, pricing changes, and recurring criticism across your product category.

Use agent-data to monitor Hacker News for launches, pricing changes, acquisitions, major criticism, and recommendation threads in Acme Inc.'s category.

Category demand sensing

Some of the more useful signals come from threads where people say "how is anyone solving this?" before they mention a vendor at all.

Use agent-data to monitor Hacker News for people describing scraping pain, rate limits, brittle browser workflows, or trouble getting live external data into AI agents.

Founder engagement opportunities

The same pattern can surface threads where a helpful technical response would improve the conversation, without the agent suggesting you self-promote.

Use agent-data to surface Hacker News threads where a concise, non-promotional comment about structured external data for agents would genuinely add value.

Launch-week watchtower

During launches, speed and momentum matter more than broad category coverage.

During launch week, use agent-data to check Hacker News every 15 minutes for mentions of Acme Inc. and alert me immediately if a thread is gaining traction.

Multi-source monitoring

Once the pattern works for Hacker News, it can extend to additional sources and merge into one daily briefing rather than separate alerts per channel.

Combine Hacker News with Reddit and other monitoring sources, then send me one merged daily briefing instead of separate alerts.

Turn Hacker News into a selective founder alert feed

If you already use OpenClaw for background tasks, this is one of the cleaner monitoring workflows to add. Define what counts as relevant, seed the checkpoint once, and let the agent quietly review the new Hacker News delta on a schedule.

Full docs: docs.agent-data.dev. OpenClaw docs: docs.openclaw.ai.

Frequently asked.

Does this only catch exact mentions of my product name?

No. This will also cover competitor references, adjacent problem statements, and threads where your product category is clearly relevant even if your company isn't named directly.

How does the first run differ from later runs?

The first run pulls the current feed and saves a checkpoint — the since_token. Later runs use that checkpoint to ask only for items newer than the last successful run, which is what makes hourly polling cheap.

Why not just use keyword alerts?

Keyword matching misses out on context and deeper semantic meaning. It's weaker at selective enrichment, indirect demand detection, and stateful monitoring. An agent equipped with agent-data can catch things a literal keyword match would miss.

Will I get spammed with low-signal threads?

Not if the prompt is sharp. The whole goal is to flag posts only when they are relevant, which means the prompt needs to be specific about what counts and what doesn't.

Can the workflow read the linked page behind a Hacker News post?

Generally, yes. Article pages tend to produce useful previews. Social posts and other thin destinations, however, sometimes return successfully while giving back too little content to be useful.

Related.