Back to Blog
Technical AI SEO · P5

How AI Agents Optimize Internal Linking (and Pass Self-Authority to Money Pages)

An AI agent reads your site graph every night, scores every URL for commercial intent, and rewrites in-content anchors so earned authority flows to the pages you actually sell from. The live WebFlur playbook.

AI agents optimizing internal linking — node-link graph of blog pages passing self-authority to money pages, by WebFlur

AI agents optimize internal linking by reading your sitemap every night, scoring each URL for commercial intent, building a directed graph of in-content links, flagging money pages with too few inbound blog links, and rewriting anchor text through a human-approval gate. WebFlur runs this pattern live on webflur.com and lastridefuneral.in through an Agent2Agent (A2A — the open protocol that lets AI agents talk to each other, see a2a-protocol.org) worker. In our September 2026 audit of 40 Series-B+ B2B sites, 7 had money pages receiving zero in-content links from the blog corpus — agents close that gap in minutes, not quarters.

In July 2026 a Delhi-NCR B2B logistics SaaS — 80 people, 240 published blog posts, two commercial money pages (pricing and a free-trial signup) — came to us with the same complaint every mid-stage B2B eventually hits. Their blog corpus was ranking fine. The money pages were not. When we crawled their in-content anchors (not nav, not footer — the DOM scope matters) we found that of 240 blog posts, exactly four linked to pricing and zero linked to the trial page. The money pages were orphan-adjacent — sitting in the nav, invisible to the content graph.

This is why we built the self-authority internal linking worker. It runs as a scheduled job on the A2A infrastructure — the same Agent2Agent worker that WebFlur ships at /.well-known/agent-card.json — and it reads the host's own sitemap, scores every URL, and proposes anchor rewrites through a GitHub pull request. We shipped it on webflur.com in August 2026, then rolled the same pattern onto lastridefuneral.in (a 350-URL funeral services site in Delhi NCR with similar money-page starvation). Both sites now have agents that re-audit the graph nightly.

Below is how it works, how to build your own, and when it is honestly overkill. The technical AI SEO pillar is where this piece sits — internal linking is one of the oldest ranking signals Google documents, but the agentic version is new. The A2A endpoint is the infrastructure the worker runs on; if your site has not shipped entity-level schema yet, the agent will have a weaker signal to score URLs by — wire that first.

WebFlur audit — 40 Series-B+ B2B sites, September 2026
7 of 40

Seventeen percent of audited sites had at least one commercial money page (pricing, demo signup, product tier) receiving zero in-content internal links from their blog corpus. Average blog corpus size: 180 posts. The agent-first fix routes 3 to 5 contextually relevant anchors into each starving money page within one PR cycle. Source: WebFlur audit, Sep 2026, 40 Series-B+ B2B SaaS and services sites (Delhi-NCR, Bengaluru, New York, London), in-content anchor extraction via headless Chromium.

How does an AI agent actually find internal link opportunities on your site?

An AI agent finds link opportunities by pulling your sitemap, scoring every URL for commercial intent with an LLM, building a directed graph of in-content links, flagging money pages with fewer than three inbound blog links as starving, and returning candidate anchor phrases from blog bodies that pass a cosine-similarity (a math measure of how semantically close two phrases are, 0 to 1) threshold against each starving target. The whole loop runs in under 20 minutes on a 400-page site.

Here is what the agent actually looks at. It ignores nav links, footer links, and sidebar modules — those are site-wide signals Google already discounts. It only reads in-content anchors (links inside the <article> or main body wrapper), because that is the DOM scope where PageRank — Google's original authority-flow algorithm, see Wikipedia on PageRank — still concentrates. Then it builds a flat adjacency list: each row is source_url, target_url, anchor_text, surrounding_sentence. That table is the full internal link graph.

From there, the agent walks every URL marked as commercial intent (score = 2 on a 0-2 scale) and counts how many blog posts link in. Any money page under 3 inbound in-content links lands in the starving list. Those are the only targets the agent proposes rewrites for. We do not touch pages that already have 10+ inbound links — adding more is diminishing returns and risks over-optimised anchor profiles.

What is self-authority internal linking and why does it beat manual link building?

Self-authority internal linking is the pattern where an AI agent re-reads your own site every night, measures which pages have earned the most inbound external authority (via backlinks and AI citations), and rewrites in-content anchors on your lower-authority pages so that earned authority flows to the commercial pages you actually want ranking. It beats manual link building because the agent sees the full graph in minutes, re-runs on every publish, and never gets bored of a 400-page site.

The important shift is "self". Classic internal linking advice assumes you build authority through external backlinks and then distribute it inside the site. Self-authority flips the frame: your blog corpus is already earning its own authority — AI citations from Perplexity, inbound links from Reddit threads, GEO signals that compound. Instead of waiting for a backlink campaign, you use the authority your blog has already earned and funnel it inward.

We ship this live on both webflur.com and lastridefuneral.in through the same A2A worker. On lastridefuneral.in the agent runs nightly — it scores every ghat (cremation ground) page and every service page, measures which blog posts have earned the most Google impressions, and quietly adds in-content links from those earners into the commercial service pages. The pattern raised the pricing-page internal link count from 4 to 31 in six weeks. Rankings on the money pages followed, not instantly, but inside two months.

Key insight — why self-authority matters

The agent is not inventing authority. It is redistributing what you already earned. If your blog has 180 posts and 20 of them pull real Perplexity and ChatGPT citations, those 20 are your donors. Manual link audits miss which 20 — agents measure them in a cron job. The difference between a site that converts and one that just publishes is almost always which page captures the final click. Self-authority internal linking is how you make that page the one you choose, not the one that happened to earn backlinks first.

How do you build an automated internal linking tool in n8n or LangChain?

Build it in seven steps: pull sitemap, score every URL for commercial intent, crawl in-content anchors into a directed graph, flag starving money pages, pass blog bodies through an LLM to generate candidate anchor phrases, gate every anchor behind a cosine-similarity threshold of 0.72, and open a GitHub pull request for human review. In n8n the whole pipeline is 12 nodes; in LangChain it is roughly 180 lines of Python.

  1. Pull your sitemap and build a URL inventory. Start plain: fetch sitemap.xml, flatten every URL into a flat list, and drop paginated or tag-archive URLs. Store as CSV or SQLite with four columns — URL, title, meta description, path depth. Skip this and your agent has no inventory, so it will hallucinate anchor targets that do not exist.
  2. Score every URL for commercial intent. Pass each URL + title + meta into Claude Sonnet or GPT-4o with a scoring rubric — 0 for info or blog content, 1 for mid-funnel comparison, 2 for commercial money page (pricing, demo, contact, product tier). Cache the score to SQLite so you only pay the LLM cost once per URL. Skip this and the agent dilutes authority across the whole site instead of concentrating it.
  3. Crawl in-content anchors and build a directed graph. Crawl every URL via headless Chromium (Puppeteer or Playwright works). Extract only anchors inside the main content wrapper — nav, footer, sidebar, and related-posts modules are site-wide signals Google already discounts and must be excluded. Store adjacency as source_url, target_url, anchor_text, surrounding_sentence in SQLite. Skip the DOM-scope filter and your graph treats footer links as content links, which breaks every downstream score.
  4. Compute inbound link counts, flag the starving money pages. For every URL with commercial-intent score 2, count inbound in-content links from blog pages (score 0). Flag anything under 3 inbound links as starving. These are the only targets the agent will touch. Skip this gate and the agent spends LLM budget rewriting anchors into pages that already rank — wasted spend, diminishing returns.
  5. Find link opportunities — pass blog bodies through an LLM. For each starving money page, build a prompt with the page's title plus one-sentence description, then feed each blog post body chunk-by-chunk (not whole — context windows blow up) into Claude Sonnet. Ask for a JSON list of candidate anchors: exact phrase in the blog, surrounding sentence, confidence 0 to 1. Skip the chunking and you lose half your candidates to context-window overflow.
  6. Validate anchor relevance with a cosine-similarity gate. Before accepting any anchor, embed the anchor phrase + surrounding sentence (use OpenAI text-embedding-3-small or Voyage) and embed the target page's title + H1. Cosine similarity must exceed 0.72 — our tested floor from the September 2026 audit. Below 0.72 the link reads as spam to humans and to Google's SpamBrain. Skip this gate and your agent inserts off-topic links that tank user trust and may trigger a manual penalty.
  7. Open a GitHub pull request — never auto-merge. Have the agent open a PR with one commit per blog post, diff view, and a human review required. Never let the agent push to main. The 1-in-50 anchor that is grammatically right but tonally off is why. Skip this human-in-the-loop step and a single bad rewrite can poison a top-ranking page for weeks.

How do you pass PageRank from blog pages to commercial money pages using AI?

You add in-content anchors from your highest-authority blog pages (the ones with the most inbound external backlinks and AI citations) to your money pages — one or two per blog, inside the first 60% of the body, with topically-aligned anchor text. An AI agent automates every step: it ranks blog pages by inbound authority, picks the top-5 as donors, finds the most relevant sentences, and proposes anchor rewrites. PageRank — Google's original authority-flow algorithm, now one of hundreds of ranking signals — still concentrates in the first half of the body copy.

Here is the practical checklist the WebFlur worker runs on every nightly job. Follow it manually on a small site; let the agent do it on a large one.

PageRank-to-money-pages checklist — what the agent enforces
  • Pick donor pages by earned authority first. Rank blog posts by inbound backlinks + AI citations (ChatGPT, Perplexity, Claude). The top 5 to 10 are your donors. Skip this and you donate authority from the wrong pages.
  • Place anchors inside the first 60% of body copy. Google's own internal linking documentation hints at positional weighting; the agent enforces a hard position cap. Links in the footer or the last paragraph pass less equity.
  • Use topically-aligned anchor text, not "click here". The anchor phrase must share noun phrases with the target page's H1. The agent's cosine-similarity gate catches violations.
  • Cap at 2 links per donor, per target. More than 2 inbound links from the same donor dilutes the signal and reads as unnatural. The agent enforces this cap per PR.
  • Spread donations across money pages. If you have 3 money pages, donors should rotate — not every donor pointing at pricing. The agent keeps a running tally and balances automatically.
  • Never auto-rewrite anchors that already exist. If a blog post already links to a target, the agent must leave the existing anchor alone. Rewriting earned anchors breaks tracking and risks losing position.
  • Honour nofollow rules on sponsored or UGC content. If a blog post has rel="sponsored" (paid links) or rel="ugc" (user-generated content — forum / comment links), exclude it from the donor pool. Those pages do not pass authority anyway.
  • Open one PR per donor, not one giant PR. Small atomic PRs make human review possible. A single 200-file PR gets rubber-stamped and defeats the review gate.
  • Log every rewrite with a reason string. The agent writes reason: "Donor blog ranked #4 for 'ai citations', target money page starved at 2 inbound" into the commit body. Future audits need the trail.
  • Re-run the audit 7 days after merge. If a merged anchor underperforms (CTR < 0.5% in GSC after 7 days), the agent proposes a reversion. Nothing is permanent — everything is measured.

If you want to see how your own site's internal link graph scores right now — which money pages are starving, which blogs are donors — our AI Readiness Score tool runs a lightweight version of this audit in about 30 seconds. The upstream engine is the same A2A worker; the public tool returns the first-pass orphan report. The same discovery pattern — which engine actually cites which page — is covered in how Perplexity, Claude and ChatGPT decide who to cite.

Manual internal linking vs AI-driven vs agentic — which is right for your site size?

Under 50 pages, the manual spreadsheet still wins; between 50 and 200 pages, an AI-assisted script (run on demand) is the sweet spot; above 200 pages, an agentic worker (scheduled, autonomous within guardrails) is strictly better. The breakpoint is where a human stops holding the full graph in their head.

Approach Best site size Cadence Human effort Setup cost
Manual spreadsheetUnder 50 pagesQuarterlyHigh (one SEO, one afternoon)Zero
AI-assisted script (on-demand)50 to 200 pagesMonthlyMedium (review suggestions in a notebook)~1 day to build
Agentic worker (scheduled)200+ pagesNightlyLow (review PRs, one hour per week)~1 week to ship
Fully autonomous (no PR gate)Not recommended at any sizeN/ANone — and that's the problemN/A

The gap between AI-assisted and agentic is scheduling plus a GitHub integration. An AI-assisted script runs when you remember to run it; an agent runs when you sleep. For a 400-URL site, that difference compounds — the agent catches a starved money page the day it is published, not the quarter after.

We deliberately do not recommend fully autonomous (no PR gate) at any size. The 1-in-50 bad anchor rule holds whether you have 50 or 5,000 pages. If you want the AI-first content layer that feeds the agent cleaner input, the AI SEO strategy 2026 guide covers the human-in-the-loop pattern end to end.

Sources & further reading

Want to see which money pages are starving for internal links on your site?

Get your AI audit →
Pankaj, Founder of WebFlur
Written by
Pankaj
Founder, WebFlur — AI SEO & Agentic Presence Engineer

Pankaj has spent a decade engineering SEO infrastructure for B2B companies. He ships live Agent2Agent (A2A) workers and self-authority internal linking agents on client sites — the same workers that run on webflur.com and lastridefuneral.in. Runs the WebFlur 45-site B2B citation audit. Connect on LinkedIn.

Frequently asked questions

An AI agent pulls your sitemap.xml, scores every URL for commercial intent, builds a directed graph of in-content links (ignoring nav and footer), and flags any money page with fewer than three inbound blog links as starving. Then it passes blog bodies through an LLM with the starving-page list and returns a ranked JSON of candidate anchor phrases plus a context sentence for a human to approve.
Self-authority internal linking is the pattern where an AI agent re-reads your own site daily, measures which pages have earned the most inbound external authority, and rewrites in-content anchors so that earned authority flows to the commercial pages you actually want ranking. It beats manual link building because the agent sees the full graph in minutes, re-runs on every content publish, and never gets bored of a 400-page site.
Build it in seven steps: pull sitemap, score every URL for commercial intent with an LLM, crawl in-content anchors and build a directed graph, flag starving money pages, pass blog bodies through an LLM to generate candidate anchor phrases, gate every anchor behind a cosine-similarity threshold of 0.72, and have the agent open a GitHub pull request for human review. In n8n the whole pipeline is 12 nodes; in LangChain it is about 180 lines of Python.
You add in-content anchors from high-authority blog pages (the ones with the most inbound external links) to your money pages — one or two per blog, inside the first 60% of the body, with topically-aligned anchor text. An AI agent automates every step: it ranks blog pages by inbound authority, picks the top-5 as donors, finds the most relevant sentences, and proposes anchor rewrites. The donor concept is from Google's own internal linking guidance.
Honestly, no. Under 50 pages the manual spreadsheet still wins — you can hold the full graph in your head, and the LLM and embedding costs of running a daily agent outweigh the gains. The breakpoint is roughly 80 to 120 pages, where a human stops seeing the orphan pages. Above 200 pages an agent is strictly better. Below that, use the free Google Search Console internal links report plus a weekly manual pass.
No — Google penalises irrelevant or manipulative anchors, not the tool that generated them. If every anchor your agent proposes is contextually relevant (cosine-similarity-gated), reads naturally, and is human-approved before merge, Google treats it identically to a human edit. The risk is removing the human review gate — Google's spam systems detect patterns, not authors. Keep the pull-request step and you stay safe.