# AI SEO Audit

Runs a deterministic AI-SEO audit on a page through context.dev — scoring ~30 checks across six categories into a 0–100 total, returning failing checks and an agent-ready fix prompt.

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown variants are available by appending `.md` to any URL or sending an `Accept: text/markdown` header. An agent skill is available at [/.well-known/agent-skills/site-skill.md](/.well-known/agent-skills/site-skill.md).



<DocsBaseSwitcher base="langgraph" agent="ai-seo-audit" />

<AgentPreview
  agent="ai-seo-audit"
  framework="langgraph"
  inputFields="[
  {
    name: &#x22;url&#x22;,
    label: &#x22;Page URL&#x22;,
    placeholder: &#x22;https://example.com/blog/how-it-works&#x22;,
    type: &#x22;text&#x22;,
  },
]"
/>

## Summary [#summary]

The **AI SEO Audit Agent** evaluates a page for how readable it is to AI answer
engines — ChatGPT, Claude, and Perplexity — rather than classic blue-link
search. It fetches the page through context.dev (never touching the site
directly), then runs a **deterministic rubric** of \~30 checks across six
categories to a 0–100 total. The model doesn't eyeball the score — `audit_page`
computes it in `lib/rules.ts`, so the same page always yields the same
result. The agent presents the breakdown, lists the failing checks by impact,
and returns an **agent-ready fix prompt** you can paste straight into a coding
agent. Reach for it when you want a page to get cited by AI assistants.

## Installation [#installation]

<CodeTabs>
  <TabsList>
    <TabsTrigger value="cli">
      Command
    </TabsTrigger>

    <TabsTrigger value="manual">
      Manual
    </TabsTrigger>
  </TabsList>

  <TabsContent value="cli">
    ```bash
    npx shadcn@latest add @agentcn/langgraph/ai-seo-audit
    ```
  </TabsContent>

  <TabsContent value="manual">
    <Steps>
      <Step>
        Install the following dependencies:
      </Step>

      ```bash
      npm install @dawn-ai/sdk
      ```

      <Step>
        Copy and paste the following agent route files into your project.
      </Step>

      <ComponentSource src="registry/langgraph/ai-seo-audit/index.ts" title="index.ts" />

      <ComponentSource src="registry/langgraph/ai-seo-audit/instructions.md" title="instructions.md" />

      <ComponentSource src="registry/langgraph/ai-seo-audit/lib/agent-fix-prompt.ts" title="lib/agent-fix-prompt.ts" />

      <ComponentSource src="registry/langgraph/ai-seo-audit/lib/audit-types.ts" title="lib/audit-types.ts" />

      <ComponentSource src="registry/langgraph/ai-seo-audit/lib/audit.ts" title="lib/audit.ts" />

      <ComponentSource src="registry/langgraph/ai-seo-audit/lib/rules.ts" title="lib/rules.ts" />

      <ComponentSource src="registry/langgraph/ai-seo-audit/lib/url.ts" title="lib/url.ts" />

      <ComponentSource src="registry/langgraph/ai-seo-audit/skills/seo-audit/SKILL.md" title="skills/seo-audit/SKILL.md" />

      <ComponentSource src="registry/langgraph/ai-seo-audit/tools/audit_page.ts" title="tools/audit_page.ts" />

      <Step>
        Run `dawn check` after copying so route and tool metadata are regenerated.
        `dawn dev`, `dawn build`, and `dawn verify` also run the same discovery path.
      </Step>
    </Steps>
  </TabsContent>
</CodeTabs>

## Composition [#composition]

```text
├── index.ts
├── instructions.md
├── lib/agent-fix-prompt.ts
├── lib/audit-types.ts
├── lib/audit.ts
├── lib/rules.ts
├── lib/url.ts
├── skills/seo-audit/SKILL.md
├── tools/audit_page.ts
```

## Customization [#customization]

* Edit `index.ts` to change the model, description, or system prompt.
* Add route-local tools under `tools/`; tool input and output types are inferred from TypeScript.
* Run `dawn verify` before deploying generated LangGraph artifacts.
