Skip to Content
AgentsLanding Page Writer

Landing Page Writer

[Live] · agent__landing-page-writer · Claude Sonnet 4.6

Writes conversion-optimised landing page copy — from hero headline to FAQ — structured for a specific offer, audience, and page goal, with social proof placeholders drawn from real client data.


Overview

FunctionWrite conversion-optimised landing page copy for a specific offer, audience, and page goal
TypeWorker — Content
ModelClaude Sonnet 4.6
Queueagent__landing-page-writer
Concurrency1
Timeout5 min
Est. cost / task~$0.60
PlanPro+

Triggers

Trigger typeWhenWho initiates
Activity Planner dispatchEnqueued as part of a campaign launch pipeline — typically after a campaign brief is approvedActivity Planner
Rejection re-runDM reviewer rejects; wakeReason: "rejection" re-enqueues with reviewerFeedbackDM reviewer

Input

interface ActivityJobData { activityId: string; tenantId: string; wakeReason?: "rejection"; reviewerFeedback?: string; // only present on rejection re-runs }

The worker reads additional context from the DB at runtime:

  • Activity.label — the page topic/title
  • Activity.inputPayload — optional key/value hints from the activity planner (e.g. target audience, primary CTA)
  • ClientContext.content — tenant background (brand voice, products, audience)
  • AgentConfig.systemPrompt — the prompt template (seeded; editable in manage portal)
  • RAG: top-5 results from search({ agentRole: "landing-page-writer", query: label }) — brand docs, website, published content

Output

The agent returns structured markdown with seven ## section blocks. These are parsed by parseSections() and stored as a sections JSON field on the LandingPage DB record.

## Hero # Main headline (benefit-led, 6–12 words) Subheadline paragraph — expands the headline, 1–2 sentences. ## Problem # Problem section heading Pain point paragraph(s) or bullet list. ## Solution # Solution heading How the product/service solves the problem. ## Features # Features heading - Feature one: benefit framing - Feature two: benefit framing ... ## Social Proof # Testimonials heading - "[TESTIMONIAL: outcome + name + company]" ... ## FAQ ### Question one? Answer one. ### Question two? Answer two. ## CTA # Final CTA headline Supporting copy paragraph. **Meta Title:** <title> **Meta Description:** <description>

The sections are rendered into a self-contained HTML page by renderLandingPageHtml() in packages/common/src/landing-page-html.ts.

Sample output excerpt (actual format)

## Hero # Stop Losing Customers to ChatGPT — Get Found on Every AI Platform AI search engines are answering your customers' questions right now. Leadmetrics' AI Search Optimisation puts your business in front of buyers the moment they ask — on ChatGPT, Gemini, Bing Copilot, and Meta AI. ## Problem # Your Competitors Are Already There - Buyers are skipping Google and asking AI directly — and AI is recommending your competitors - Most businesses have no visibility into what AI says about them - Traditional SEO doesn't translate to AI answer engines ## Features # Everything You Need to Dominate AI Search - GEO Optimisation: Structured content that AI engines extract and cite - AEO Coverage: Question-answer pairs that surface in conversational AI results - Competitor Gap Analysis: See what AI says about your rivals — and how to beat them - Monthly Visibility Reports: Track your AI share of voice across all platforms **Meta Title:** AI Search Optimisation for Indian Businesses | Leadmetrics **Meta Description:** Get your business found on ChatGPT, Gemini, and Bing Copilot. Leadmetrics is India's all-in-one GEO/AEO platform for SMEs and in-house teams.

How It Works

  1. Load activity and context. Reads the Activity record, tenant ClientContext, and the AgentConfig.systemPrompt from the DB. Runs a RAG query using the activity label as the search term.

  2. Build prompt. buildPrompt() concatenates: system prompt → client context → RAG context → input hints → (on rejection) reviewer feedback → output format instructions.

  3. Execute Claude. Calls the Claude adapter with a 5-minute timeout. Progress events are published via SSE as tool calls are made.

  4. Parse output. parseSections() splits the markdown into seven named sections. extractTitle(), extractMetaTitle(), extractMetaDescription(), and slugify() pull page metadata.

  5. Save LandingPage. Creates (or updates, on rejection) a LandingPage record with status: "dm_review". Sets Activity.status = "awaiting_approval".

  6. Notify. Publishes an in-app notification to DM reviewers: "Landing page '[title]' is ready for DM review.".


HTML Rendering

renderLandingPageHtml() in packages/common/src/landing-page-html.ts converts the stored sections into a self-contained HTML file (inline CSS, no CDN, no JS) with seven section renderers:

SectionRendererLayout
herorenderHero()Full-width gradient, centred H1 + subheadline + CTA button
problemrenderProblem()Auto-fill card grid with ✕ icons
solutionrenderSolution()Purple box, full-width
featuresrenderFeatures()Auto-fill card grid with emoji icons
socialProofrenderSocialProof()Quote card grid
faqrenderFaq()Stacked accordion-style items, max-width 700px
ctarenderCta()Full-width gradient, centred H2 + button

Label normalisation: normalizeLabels() runs as a preprocessing step in parse() to handle legacy output where Claude emitted H1: / **H1:** / Subheadline: labels instead of markdown headings. This ensures pages saved before the April 2026 prompt fix still render correctly.


System Prompt

The live system prompt is seeded via packages/db/src/seed.ts and stored in AgentConfig (role: landing-page-writer). It can be edited in the Manage portal under Agents.

Key rules in the prompt:

  • Seven sections in order: Hero → Problem → Solution → Features → Social Proof → FAQ → CTA
  • Use # for the main headline within each section; plain paragraphs for subheadlines
  • Use - bullet points for feature/benefit lists
  • No element labels (**H1:**, **Subheadline:**, **CTA Button:**) — write content directly
  • Benefit-led headlines; “you” language throughout

Skills Injected

Skill filePurpose
landing_page_principles.mdAbove-fold structure, trust signals, CTA hierarchy, conversion optimisation
seo_writing_guide.mdKeyword placement, heading hierarchy, meta descriptions

HITL Gates

GateWhoPlatformTrigger
DM reviewDM reviewerDM portal /landing-pagesAuto on generation; LandingPage.status = "dm_review"
Client approvalClientDashboard /landing-pages/[id]After DM approves; LandingPage.status = "client_review"

Rejection at either gate re-enqueues the worker with wakeReason: "rejection" and the reviewer’s notes. The LandingPage version increments on each revision.


RAG Usage

DatasetQueryWhen used
All datasets for this tenant"[activity.label] landing page"Always — top-5 results injected as knowledge base context

Cost Profile

Avg input tokens~6,000 (system prompt + client context + RAG + hints)
Avg output tokens~1,500 (seven markdown sections)
Est. cost / task~$0.60
Credits charged3 credits (type: landing_page)

Error Handling

ErrorResponse
AgentConfig missing system promptThrows immediately — "No systemPrompt configured for agent role landing-page-writer"
Claude output < 200 charsActivity + Deliverable set to failed; job throws
Claude execution failsActivity + Deliverable set to failed; credits released
RAG fetch failsWarning logged; proceeds without RAG context

© 2026 Leadmetrics — Internal use only