The Project
Everyone is talking about agent loops. An agent loop is an autonomous system you point at a goal, and it keeps thinking, acting, checking its own work, and adjusting until the job is done. Most of the conversation I saw was hypothetical, so I built one.
I already had an SEO agent, built with Claude Code, that was a good candidate. It powered the go-to-market for MissingLinkz, my agent-native UTM tool. Together with a connected content agent it formed a flywheel: a one-directional workflow that researched, wrote, and published SEO and AEO content on autopilot. In three months it produced real organic traction from a brand-new domain. But the SEO agent could not tell me what was working. It just executed a static brief. This project is how I turned that flywheel into a loop that measures, learns, and decides.
Phase 1: The Flywheel
The flywheel was not smart, but it was diligent. I wrote a detailed SEO brief (target keywords from prior research, competitive positioning, audience definition, content priorities) and handed it to the agents. The SEO agent worked from that static brief every week and told the content agent what to write. The content agent took its instructions, wrote and published an article, then waited for the next set. Every day, on autopilot.
Starting from ground zero, no backlinks, no existing content, no paid promotion, the system published 170+ articles in three months and produced these numbers:
| Metric | Number |
|---|---|
| Impressions (3 months) | 16,800 |
| Clicks (3 months) | 103 |
| Average CTR | 0.6% |
| Average position | 9.8 (first page) |
It ranked for the exact developer-intent queries we targeted (utm cli, cli marketing automation, utm mcp), the terms where our ideal buyer is actively searching. It also started getting cited in AI search: the system monitors 14 buyer-intent prompts in Perplexity every week, and citation rate climbed from 0% in week one to 58% by week five, frequently as the first source.
A word of warning: do not publish hundreds of articles a week. Google penalises scaled content abuse, and a new domain needs time to warm up and get indexed. 170 articles over three months is fewer than two a day. Some AI marketing influencers give bad advice about scaling content fast. Many have never actually run the play they are selling.
Why a Flywheel Is Not a Loop
The flywheel moved in one direction: brief, write, publish. It never asked “what is actually working?” because it had no data to answer that question. Two blind spots defined it. First, no real-world performance data: the agent could not see which articles were ranking, getting impressions, or earning clicks. Second, the channels were siloed: the Google data and the Perplexity citation data never met.
Phase 2: Building the Loop
Turning the flywheel into a feedback loop took four changes.
Live performance data. I wired up Google Search Console so the SEO agent pulls live impressions, clicks, CTR, and average position every Sunday, broken out by query, page, country, and device. This is the fresh data a static brief could never provide.
Covering the blind spot. Search Console only shows queries you already rank for. So I plugged in DataForSEO for real difficulty and search volume on candidate keywords, plus competitor ranked-keyword intelligence. High-difficulty terms get deprioritised automatically; low-difficulty, on-intent terms rise to the top.
Cross-channel synthesis. The agent now cross-references SEO data (Search Console, DataForSEO) against LLM citations from Perplexity, turning two separate feeds into a single strategic picture: where you rank and get cited (protect it), where you rank but are not cited (restructure for AI extractability), where you are cited but do not rank (strengthen traditional SEO), and where you are absent (brief new content only if it fits the ICP).
Performance attribution. The agent checks articles published in the last two to four weeks against both data sources: did the target keyword appear, at what position, is the URL getting traffic, was the target prompt cited? That closes the loop. The decision framework changed from “pick the next keyword on the list” to: fix what is broken first, deepen what is working, then fill strategic gaps.
The Loop Proving Itself
It is early days, and I have only run a handful of forced runs to confirm everything is wired up. But the loop already does things the flywheel never could.
It measured its own previous recommendation and found it had not worked yet. The highest-traffic page had plenty of impressions but a 0.7% click-through rate. The agent rewrote the title tag to improve it, checked the next data pull, saw no change, and chose to hold for one more measurement cycle rather than rewrite again. No panic, no overreaction.
It also attributed a win. One monitored prompt had returned no citation for weeks, so the agent briefed a targeted article. Six days after publishing, that article was the primary answer in AI search. The agent logged it as a direct attribution win and used the signal to prioritise similar moves elsewhere. Brief it, publish it, measure it, learn from it. That is the loop.
The Model Split and What It Costs
The flywheel ran everything on Claude Sonnet, which is fast, cheap, and excellent at following instructions. The loop needed more reasoning for the strategy layer, so it now runs two models: Claude Opus 4.8 for the weekly SEO agent (strategic analysis, multi-source data crunching, judgment calls) and Claude Sonnet for the daily content agent (read a brief, write an article, follow the style guide, commit).
All in, the system runs at roughly $45 to $80 a month: strategy on Opus weekly, execution on Sonnet daily, a few dollars of external APIs, with Search Console and GitHub Actions free. For context, a single freelance SEO article costs $200 to $500. This system publishes 170+ articles a quarter, monitors AI citations across 14 prompts weekly, audits pages, tracks competitors, and adjusts its own strategy, for less than the cost of one freelance piece a month.
One honest caveat: publishing on full autopilot suits a solo, bootstrapped project where factual accuracy matters more than a distinctive voice. For a personal brand or company blog, keep a human in the loop before anything goes live. The judgment the loop is starting to show, restraint, patience, and attribution, is the interesting part. Throughput was never the hard bit.