How to Do SEO with AI (Live Demo)

AI agents can build pages, optimize content, wire schema, update navs, and push sitemaps—fast. But speed without the right constraints will tank crawlability, indexing, and rankings. Here’s a practical live-demo flow you can copy, including guardrails and prompts.

Core idea

Use AI as a production line with a human in the loop:

  1. Generate or refactor pages.

  2. Make them pure HTML or pre-rendered so crawlers and LLM retrievers can read them.

  3. Optimize with NLP coverage, internal links, and schema.

  4. Ship minimal viable content (MVC), then iterate.

Step 0 — Guardrails (don’t skip)

  • Crawlability first: JS-heavy, client-rendered pages often look blank to crawlers/LLMs. Favor static HTML / SSG or SSR.

  • Conversion to static: If an agent IDE outputs JS-heavy pages, convert to a static framework (e.g., Astro-style) or export to pure HTML before you ship.

  • Human review: Agents hallucinate. Treat every draft as a first draft, then edit.

Step 1 — Spin up your agent workspace

Use an agent-enabled IDE to create a new page (or refactor an existing one).

Prompt (planner):
“Plan the tasks to create a commercial landing page about [topic]. Include: file path, title tag, meta description, H1/H2 outline, internal link targets, schema type, and where it will link from the primary nav.”

Prompt (builder):
“Execute the plan. Create the page at /products/[slug] with semantic HTML, no blocking JS. Add title/meta/H1, table of contents, FAQs, and a CTA block. Output as pure HTML (no client-side rendering).”

Step 2 — Generate an SEO-sound first draft

Run the topic through an AI content optimizer to extract entities/terms competitors cover (NLP coverage). Feed that into your agent.

Prompt (optimizer → IDE):
“Using these entities and FAQs, revise the draft for topical completeness while keeping it concise: [paste NLP terms/FAQs]. Do not stuff keywords. Keep reading grade ≤ 9.”

Quick checks:

  • Keyword (or head phrase) appears in title, meta, H1, slug, first paragraph.

  • One H1, logical H2/H3, descriptive alt text, scannable formatting.

Step 3 — Wire technical SEO with agents

Have the agent create/validate the essentials.

Schema (plan → build):

  • Plan: “Recommend schema types for this page and why.”

  • Build: “Add [Course/Product/Organization/FAQ] schema as JSON-LD on /products/[slug]. Validate output.”

Sitemaps & robots:

  • “Regenerate sitemap.xml and sitemap_index.xml including the new URL.”

  • “Update robots.txt to reference the sitemap. Ensure no accidental disallow.”

Custom 404 & nav/linking:

  • “Add a friendly /404 page.”

  • “Insert a primary-nav item that links to /products/[slug].”

  • “Add 5 contextual internal links from relevant pages to this URL with natural anchors.”

Step 4 — Convert to static HTML (if needed)

If your IDE outputs JS-rendered pages:

Prompt:
“Refactor the site to static HTML / SSG. Remove client-side rendering. Ensure full content is present in the page source. Keep design and routes identical.”

Smoke test:

  • View page source: can you see the actual text?

  • Run a headless fetch (or your crawler). Content must be in the response body without executing JS.

Step 5 — QA and performance

  • Lighthouse/CWV: Aim for LCP < 2.5s, INP < 200ms, CLS < 0.1 (mobile).

  • Accessibility: Landmarks, labels, color contrast.

  • Indexability: 200 status, canonical correct, not blocked by robots/meta, in sitemap, internally linked, depth ≤ 3.

Step 6 — Ship MVC, then iterate

Publish the minimal viable page to get crawled and indexed quickly. Plan improvements as tickets:

  • Add testimonials, comparisons, and interactive elements.

  • Expand FAQs based on search queries and support tickets.

  • Improve visuals, tables, and examples.

Step 7 — Scale with agents

Once one page works, multiply it:

Internal linking at scale:
“Find pages about [cluster] lacking links to /products/[slug]. Insert one contextual link per page in a semantically relevant sentence.”

Content refreshes:
“Identify pages ranking positions 2–15. For each, fetch NLP gaps, add 3–10 internal links, tighten title for CTR, and re-generate meta descriptions with a benefit + proof + CTA.”

New cluster build-outs:
“From Search Console, list queries where we rank 50–100 with non-ideal URLs. Propose new intent-correct pages (commercial/info/local). Create outlines + first drafts for the top 10.”

Citation/rag coverage:
“For topic [X], enumerate common citation sources in AI chat results (glossaries, benchmarks, docs, reputable lists). Produce an outreach list and a pitch angle for inclusion.”

What you’ll see in a live demo

  1. Create a commercial landing page via agent planner/builder.

  2. Pull NLP entities → revise the draft → validate on-page.

  3. Auto-add schema, regenerate sitemap, update robots, wire internal links.

  4. Convert to static HTML; verify content shows in page source.

  5. Run Lighthouse; fix obvious issues (fonts, images, defer non-critical JS).

  6. Publish MVC; submit URL in Search Console; set a 14-day iteration plan.

Where AI agents shine (and where they don’t)

Great for

  • Repetitive ops: scaffolding pages, wiring schema, sitemaps, nav, internal links.

  • First-draft generation and NLP-guided content upgrades.

  • Bulk checks and small, consistent fixes across many URLs.

Use caution

  • E-commerce and complex apps: data models, cart flows, and templates get tricky; keep a human dev in the loop.

  • Compliance/E-E-A-T-heavy topics: require expert review, citations, and source evidence.

  • Anything JS-dependent for content: convert to static/SSR first.

Copy-paste prompt pack

Planner (page):
“Plan a semantically correct landing page for [topic]. Output: route, slug, title, meta description (≤ 155 chars), H1, H2/H3 outline, FAQs, internal link sources/targets, schema types.”

Builder (page):
“Create /pages/[slug].html with pure HTML. Insert the planned title/meta/H1, outline, and FAQs. Include a CTA. No client-side rendering.”

Optimizer handoff:
“Revise /pages/[slug].html using these entities and FAQs for topical completeness, without keyword stuffing: [paste list]. Keep reading grade ≤ 9.”

Technical bundle:
“Generate JSON-LD for [schema type] and inject into /pages/[slug].html. Rebuild sitemaps, update robots.txt, add 5 contextual internal links to this page from relevant URLs.”

Static conversion:
“Refactor all pages to static HTML; remove client-side rendering. Ensure full text is visible in the page source. Preserve styles and routes.”

The mindset that makes this work

  • Treat each page like a product: ship a good v1, instrument it, iterate.

  • Keep the site crawlable and fast; HTML first.

  • Let agents handle the grunt work; keep humans on strategy, truth, and taste.

AI SEOFrancesca Tabor