Skip to main content

The Research & Monitoring Loop

Not every loop writes code. This recipe builds a scheduled research loop: a system that watches a topic, a set of sources, or a metric on a schedule, checks what's new, and delivers a short digest — without you running the search each time. It's a great second loop because the stakes are low (it produces a draft for you to read, not an irreversible action) while still teaching scheduling, verification, and state.

info

This content was developed with AI assistance and is regularly reviewed for accuracy.

What You'll Accomplish

  • Define a watch — the topic, sources, and question the loop answers each run
  • Schedule the loop so it runs on its own
  • Verify and cite so the digest is trustworthy, not hallucinated
  • Track state so each run reports what's new, not the same thing twice
  • Bound it with cost limits and a sane cadence

Prerequisites

  • An AI tool with web search or research capability (e.g. a chat assistant with browsing, or a research agent)
  • Somewhere to receive the digest (email, a doc, a chat channel) and somewhere to store state (a file or note)
  • Familiarity with Anatomy of an Agent Loop and Loop Guardrails & Safety
  • 45-60 minutes to set up and run once

The Recipe

Step 1: Define the watch

Goal: Make the loop's job specific enough to verify.

Action: Write down exactly what the loop tracks and what question it answers each run. Vague watches produce vague, unfalsifiable digests.

Watch: New developments in EU AI Act enforcement.
Sources: official EU sources, three named industry trackers, major tech press.
Question each run: "What changed in the last 24 hours that a compliance lead
would need to know? If nothing material changed, say so."

That last sentence is important — explicitly allow "nothing changed." Otherwise the loop will manufacture news to fill the digest.

Checkpoint: You can read your watch definition and know exactly what a good digest looks like.

Step 2: Write the run prompt

Goal: Turn the watch into the instruction the loop sends the agent each run.

Action: Write a prompt that asks for a short, sourced, deduplicated digest.

Search for developments about [watch topic] from the last 24 hours.
For each item that materially changed:
- One-sentence summary
- Why it matters
- A link to the primary source

Rules:
- Only include items with a verifiable source link. No source, no item.
- Skip anything already in the "previously reported" list below.
- If nothing material is new, reply exactly: "No material updates."

Previously reported:
[the running list from memory]

Checkpoint: The prompt demands sources, allows an empty result, and references prior state.

Step 3: Add verification

Goal: Keep the digest honest.

Action: The biggest risk in a research loop is hallucinated citations — confident summaries linking to sources that don't say what's claimed (or don't exist). Mitigate it:

  • Require a primary-source link for every item; drop items without one.
  • Have the loop fetch and quote a line from each source rather than describing it from memory.
  • Spot-check the first few digests yourself before trusting the loop's accuracy.

For anything high-stakes, treat the digest as leads to verify, not settled fact — the same rule the AI Research Assistant playbook applies to one-off research.

Checkpoint: Every item in a sample digest has a working link that actually supports the claim.

Step 4: Track state so it reports only what's new

Goal: Avoid a daily digest that repeats yesterday's news.

Action: Keep a running list of what's already been reported (the loop's memory). Each run, pass that list in and have the loop exclude anything already covered, then append the new items. A simple file or note works fine.

Checkpoint: Two consecutive runs don't repeat the same item.

Step 5: Schedule it and set limits

Goal: Let it run on a cadence that fits the topic, without runaway cost.

Action: Pick a cadence that matches how fast the topic actually moves — daily for fast-moving news, weekly for slow domains. Over-frequent runs cost more and produce thinner digests. Then set stop conditions:

ConditionExample
CadenceOnce per weekday at 7am
BudgetSkip the run if it would exceed the daily usage cap
Quiet success"No material updates" is a valid, complete run — don't retry it
EscalationIf sources conflict on something important, flag it for a human

Checkpoint: The loop runs on a schedule and has a cost ceiling.

Step 6: Run once, then let it ride

Goal: Confirm quality before you stop reading every word.

Action: Trigger one run manually and read the digest critically: Are the links real? Is anything padded? Is the "nothing new" path working? Tune the prompt, then enable the schedule. Keep skimming the first week of digests before you trust it in the background.

Checkpoint: You've reviewed at least one digest end to end and the schedule is live.

Common Pitfalls

  • No "nothing changed" escape hatch. A loop forced to produce news will invent it. Always allow an empty result.
  • Trusting citations blindly. Require and spot-check source links; hallucinated references are the top failure mode here.
  • No state. Without a "previously reported" list, every digest repeats itself.
  • Wrong cadence. Running hourly on a weekly topic wastes money and dilutes value.
  • Treating the digest as fact. For decisions that matter, verify the primary sources yourself.

Key Takeaways

  • A research/monitoring loop watches a topic on a schedule and delivers a deduplicated, sourced digest.
  • Define the watch precisely and explicitly allow "nothing changed."
  • Verification (real, supporting source links) is what keeps the loop honest.
  • Track state so each run reports only what's new.
  • Match the cadence to the topic and cap the cost.

Next Steps

Combine what you've learned: revisit The Overnight Coding Loop for a verifiable-work loop, or return to the Loop Engineering overview to plan the loop that fits a real task you have now.