NuxtNuxt

Nuxt + AI Readiness

Nuxt's universal rendering is great for AI, but missing llms.txt and structured data leave your app invisible. Here's how to fix it.

Step-by-step guides

Why Nuxt Apps Need AI Optimization

Nuxt 3 with Nitro provides excellent SSR by default, but most apps still lack the files and metadata AI agents need to discover and understand your content.

No llms.txt

AI models can't get a structured overview of your site without llms.txt — Nuxt doesn't generate it by default.

Missing nuxt-llms module

The community nuxt-llms module builds llms.txt from the sections you configure and from runtime hooks such as Nuxt Content, but most apps don't have it installed.

SPA mode pages

Pages using routeRules with SPA mode or ssr: false are invisible to AI crawlers.

No agent discovery files

If your app runs an A2A agent, agent-card.json and .well-known/ endpoints aren't set up, so other agents can't discover it.

What w2agent Generates

After auditing your Nuxt app, w2agent generates Nitro-native files:

server/routes/llms.txt.ts

Alternative to public/llms.txt for generated content: a Nitro cached event handler with 1hr SWR cache that sets a text/plain content type. Use one of the two, not both.

server/middleware/content-negotiation.ts

Redirects AI agents requesting text/markdown at root to /index.md (with Vary: Accept), and text/plain to /llms.txt.

server/routes/index.md.ts

Serves your llms.txt content as text/markdown at /index.md, the markdown version of your homepage.

public/llms.txt

The static option, served directly by Nitro and works on any hosting. If both exist, this file wins over the server route at the same path.

server/routes/.well-known/agent-card.json.ts

Cached A2A agent card handler — generated only when you provide your A2A endpoint (--a2a-endpoint).

Example: Nitro cached handler for llms.txt

// server/routes/llms.txt.ts
import { defineCachedEventHandler, setResponseHeader } from "#imports";

export default defineCachedEventHandler(
  async (event) => {
    setResponseHeader(event, "Content-Type", "text/plain; charset=utf-8");
    return "# My Site\n\n> AI-ready content\n";
  },
  { swr: true, maxAge: 3600 },
);

Nuxt-Specific Checks

CheckWhat It Tests
SEO module detectionChecks if @nuxtjs/seo is installed for automatic sitemap, robots.txt, and meta tag generation.
LLMs module detectionDetects the community nuxt-llms module, which generates llms.txt from the sections and hooks you configure.
Schema.org coverageValidates JSON-LD structured data across pages, including @nuxtjs/schema-org usage.
SSR rendering verificationEnsures pages are server-rendered, not SPA-only — AI crawlers need pre-rendered HTML.

Step-by-Step Integration

CLI coming soon — run the web audit

1

Generate files

Run the web audit, open the Manual Fixes tab, click Generate, and download the files for your platform.

Score your Nuxt site now

Get your free w2agent score and generate the files your site needs.

Get Your Score

CLI coming soon — run the web audit