---
title: "Configuration"
description: "Nuxt configuration reference for Nuxt AI Ready."
canonical_url: "https://nuxtseo.com/docs/ai-ready/api/config"
last_updated: "2026-05-06T21:33:11.388Z"
---

```ts [nuxt.config.ts]
export default defineNuxtConfig({
  aiReady: {
    // options
  }
})
```

## `enabled`

- **Type:** `boolean`
- **Default:** `true`

```ts
aiReady: {
  enabled: process.env.NODE_ENV === 'production'
}
```

## `debug`

- **Type:** `boolean`
- **Default:** `false`

Enable debug logging for module operations.

## `mdreamOptions`

- **Type:** `MdreamOptions`
- **Default:** `{ minimal: true }`

Configure [mdream](https://github.com/harlan-zw/mdream) HTML-to-markdown conversion.

```ts
export default defineNuxtConfig({
  aiReady: {
    mdreamOptions: {
      minimal: true
    }
  }
})
```

## `markdownCacheHeaders`

- **Type:** `{ maxAge?: number, swr?: boolean }`
- **Default:** `{ maxAge: 3600, swr: true }`

Cache settings for runtime markdown endpoints.

<table>
<thead>
  <tr>
    <th>
      Option
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        maxAge
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        3600
      </code>
    </td>
    
    <td>
      Cache duration in seconds
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        swr
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      <code>
        true
      </code>
    </td>
    
    <td>
      Stale-while-revalidate
    </td>
  </tr>
</tbody>
</table>

## `llmsTxt`

- **Type:** `LlmsTxtConfig`
- **Default:** Auto-generated

Configure llms.txt generation.

```ts
export default defineNuxtConfig({
  aiReady: {
    llmsTxt: {
      sections: [
        {
          title: 'API Reference',
          links: [
            { title: 'REST API', href: '/docs/api', description: 'API docs' }
          ]
        },
        {
          title: 'Debug Endpoints',
          optional: true,
          links: [
            { title: 'Debug Route', href: '/__ai-ready-debug', description: 'Internal debugging' }
          ]
        }
      ],
      notes: 'Built with Nuxt AI Ready'
    }
  }
})
```

**LlmsTxtSection:**

<table>
<thead>
  <tr>
    <th>
      Property
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        title
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      Section title
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        description
      </code>
    </td>
    
    <td>
      <code>
        string | string[]
      </code>
    </td>
    
    <td>
      Section description
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        links
      </code>
    </td>
    
    <td>
      <code>
        { title, href, description? }[]
      </code>
    </td>
    
    <td>
      Links in section
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        optional
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      Mark section as optional per llms.txt spec. Optional sections appear under <code>
        ## Optional
      </code>
      
       and LLMs may skip them with shorter context windows.
    </td>
  </tr>
</tbody>
</table>

**LlmsTxtConfig:**

<table>
<thead>
  <tr>
    <th>
      Property
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        sections
      </code>
    </td>
    
    <td>
      <code>
        LlmsTxtSection[]
      </code>
    </td>
    
    <td>
      Custom sections
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        notes
      </code>
    </td>
    
    <td>
      <code>
        string | string[]
      </code>
    </td>
    
    <td>
      Notes at end
    </td>
  </tr>
</tbody>
</table>

## `contentSignal`

- **Type:** `false | { aiTrain?: boolean, search?: boolean, aiInput?: boolean }`
- **Default:** `false`

Content Signal directives for robots.txt. See [Content Signals guide](/docs/ai-ready/guides/content-signals).

```ts
export default defineNuxtConfig({
  aiReady: {
    contentSignal: {
      aiTrain: false, // Block training
      search: true, // Allow search indexing
      aiInput: true, // Allow RAG/grounding
    }
  }
})
```

## `mcp`

- **Type:** `{ tools?: boolean, resources?: boolean }`
- **Default:** `{ tools: true, resources: true }`

Control MCP features when `@nuxtjs/mcp-toolkit` installed.

```ts
export default defineNuxtConfig({
  aiReady: {
    mcp: {
      tools: true, // list_pages, search_pages
      resources: true, // pages resource
    }
  }
})
```

See [MCP guide](/docs/ai-ready/guides/mcp) for tool/resource details.

## `llmsTxtCacheSeconds`

- **Type:** `number`
- **Default:** `600` (10 minutes)

Cache duration for llms.txt route handlers. Uses stale-while-revalidate.

```ts
export default defineNuxtConfig({
  aiReady: {
    llmsTxtCacheSeconds: 3600 // 1 hour
  }
})
```

## `database`

- **Type:** `{ type?: string, filename?: string, bindingName?: string, url?: string, authToken?: string }`
- **Default:** `{ type: 'sqlite', filename: '.data/ai-ready/pages.db' }`

Configure the [SQLite](https://sqlite.org) database for page storage. The module auto-detects the best connector based on runtime.

<table>
<thead>
  <tr>
    <th>
      Option
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        type
      </code>
    </td>
    
    <td>
      <code>
        'sqlite' | 'd1' | 'libsql'
      </code>
    </td>
    
    <td>
      <code>
        'sqlite'
      </code>
    </td>
    
    <td>
      Database type
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        filename
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <code>
        '.data/ai-ready/pages.db'
      </code>
    </td>
    
    <td>
      SQLite file path
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        bindingName
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <code>
        'AI_READY_DB'
      </code>
    </td>
    
    <td>
      D1 binding name
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        url
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      LibSQL/Turso URL
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        authToken
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      LibSQL/Turso auth token
    </td>
  </tr>
</tbody>
</table>

<code-group>

```ts [Default (SQLite)]
export default defineNuxtConfig({
  aiReady: {
    database: {
      filename: '.data/ai-ready/pages.db'
    }
  }
})
```

```ts [Cloudflare D1]
export default defineNuxtConfig({
  aiReady: {
    database: {
      type: 'd1',
      bindingName: 'AI_READY_DB'
    }
  }
})
```

```ts [Turso/LibSQL]
export default defineNuxtConfig({
  aiReady: {
    database: {
      type: 'libsql',
      url: process.env.TURSO_URL,
      authToken: process.env.TURSO_AUTH_TOKEN
    }
  }
})
```

</code-group>

**SQLite connector auto-detection:**

<table>
<thead>
  <tr>
    <th>
      Runtime
    </th>
    
    <th>
      Connector
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <a href="https://bun.sh" rel="nofollow">
        Bun
      </a>
    </td>
    
    <td>
      <code>
        bun:sqlite
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <a href="https://nodejs.org" rel="nofollow">
        Node.js
      </a>
      
       22.5+
    </td>
    
    <td>
      <code>
        node:sqlite
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Node.js <22.5
    </td>
    
    <td>
      <code>
        better-sqlite3
      </code>
    </td>
  </tr>
</tbody>
</table>

For serverless deployments, the module generates a compressed dump at build time that's restored on cold start.

**Table naming:**

All tables are prefixed with `ai_ready_` to avoid conflicts with existing database tables:

- `ai_ready_pages` - Main pages table
- `ai_ready_pages_fts` - FTS5 full-text search index
- `_ai_ready_info` - Schema version tracking

This allows safe use with existing D1/LibSQL databases without risk of overwriting user tables.

## `cron`

- **Type:** `boolean`
- **Default:** `false`

Enable scheduled cron task that runs every minute. When enabled, it automatically enables `runtimeSync` for background indexing and runs IndexNow sync if you configure `indexNow`.

```ts
export default defineNuxtConfig({
  aiReady: {
    cron: true
  }
})
```

## `indexNow`

- **Type:** `boolean | string`
- **Default:** `false`

Enable IndexNow for instant search engine notifications to Bing, Yandex, Naver, and Seznam.

```ts
export default defineNuxtConfig({
  aiReady: {
    indexNow: true
  }
})
```

A stable key is derived from your site URL. You can also provide a custom string if needed.

When enabled:

- Key verification route registered at `/{key}.txt`
- **Static sites**: Hash-based change detection at build time
- **SSR sites**: Sync via cron (when enabled) or `POST /__ai-ready/indexnow`
- Stats included in `/__ai-ready/status`

See [IndexNow guide](/docs/ai-ready/guides/indexnow) for details.

## `runtimeSyncSecret`

- **Type:** `string`
- **Default:**: (no auth required)

Secret token for authenticating runtime sync endpoints. When set, requires `Authorization: Bearer <token>` header for `/__ai-ready/poll`, `/__ai-ready/prune`, and `/__ai-ready/indexnow` endpoints.

```ts
export default defineNuxtConfig({
  aiReady: {
    runtimeSyncSecret: process.env.AI_READY_SECRET
  }
})
```

## `runtimeSync`

- **Type:** `boolean | { ttl?: number, batchSize?: number, pruneTtl?: number }`
- **Default:** `false`

**Opt-in runtime sync for dynamic content sites.** Most sites don't need this - prerendering handles page indexing automatically.

Enable only if your site has frequently changing content that can't be prerendered. Set to `true` for defaults or object to customize.

<table>
<thead>
  <tr>
    <th>
      Option
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        ttl
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        3600
      </code>
    </td>
    
    <td>
      Re-index pages & refresh sitemap older than this (seconds)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        batchSize
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        20
      </code>
    </td>
    
    <td>
      Pages per batch (max: 50)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        pruneTtl
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        0
      </code>
    </td>
    
    <td>
      Prune routes not in sitemap for this long (0 = never)
    </td>
  </tr>
</tbody>
</table>

```ts
export default defineNuxtConfig({
  aiReady: {
    runtimeSync: {
      ttl: 3600,
      batchSize: 20,
      pruneTtl: 604800 // prune after 7 days
    },
    runtimeSyncSecret: process.env.AI_READY_SECRET,
    cron: true // enable scheduled indexing
  }
})
```

**When enabled:**

- `GET /__ai-ready/status` - Check indexing progress
- `POST /__ai-ready/poll` - Trigger batch indexing (requires `Authorization: Bearer <token>` header)
- `POST /__ai-ready/prune` - Prune stale routes (requires `Authorization: Bearer <token>` header)

See [Runtime Sync guide](/docs/ai-ready/guides/runtime-indexing) for details.

## `autoI18n`

- **Type:** `boolean`
- **Default:** `true`

Auto-detect [`@nuxtjs/i18n`](https://i18n.nuxtjs.org/) (or `nuxt-i18n-micro`) at build time and integrate locale data into:

- **llms.txt**: adds an `## Available Languages on Website` section listing every locale
- **Link headers**: emits `Link: <…>; rel="alternate"; hreflang="…"` per locale on `.md` and HTML responses (RFC 8288)
- **Frontmatter**: markdown bodies include a `locale` field
- **Database**: each indexed page persists its `locale` for filtered queries
- **FTS5 tokenizer**: auto-switches to `trigram` for CJK locales (zh / ja / ko)

Disable to skip the integration even with an i18n module present:

```ts
export default defineNuxtConfig({
  aiReady: {
    autoI18n: false
  }
})
```

See [i18n guide](/docs/ai-ready/guides/i18n) for details.
