Skip to main content

Documentation Index

Fetch the complete documentation index at: https://motherfuckingsideproject.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

llms.txt

Configure the auto-generated /llms.txt site index served to AI agents.
AgentXP automatically serves a /llms.txt file following the llmstxt.org specification. This file gives AI agents a structured, human-readable index of your site — what it does, what pages exist, and how they’re organized — without the agent needing to crawl every URL.

Configuration

middleware.ts
import { withAgentXP } from '@reaganhsu/agentxp-next'

export default withAgentXP({
  llmsTxt: {
    siteName: 'My SaaS App',
    description: 'Project management tool for engineering teams',
    pages: [
      { path: '/', title: 'Home', section: 'Product' },
      { path: '/pricing', title: 'Pricing', section: 'Product' },
      { path: '/docs', title: 'Documentation', section: 'Documentation' },
      { path: '/blog', title: 'Blog', section: 'Resources' },
    ],
  },
})

Options

siteName

Type: string The name of your site. AgentXP uses this as the top-level heading in the generated /llms.txt file.
llmsTxt: {
  siteName: 'Acme Corp',
}

description

Type: string A one-line description of what your site does. AgentXP renders this as a blockquote beneath the site name — it’s the first thing an agent reads.
llmsTxt: {
  siteName: 'Acme Corp',
  description: 'B2B invoicing software for freelancers and small teams',
}

pages

Type: LlmsTxtPage[] An explicit list of pages to include in the index. If you omit this field, the /llms.txt file is served with just the site name and description, with no page entries. Provide a page list to give agents a structured view of your content. Each entry in the array is an object with the following shape:

pages[].path

Type: string (required) The URL path of the page, relative to your site root (e.g., '/pricing').

pages[].title

Type: string (required) The display title of the page as it should appear in the index.

pages[].section

Type: string An optional grouping label. Pages sharing the same section value are rendered under a common heading. If omitted, AgentXP groups unsectioned pages under an Other heading when other sections are present.

pages[].description

Type: string An optional one-line description of the page. When provided, it appears after the link in the generated file: - [Title](url): description. Include your most important pages — pricing, core features, and documentation. These are the pages agents consult when helping users decide whether your product fits their needs or when answering how-to questions.

Generated output

Given the configuration above, AgentXP serves the following at /llms.txt:
# My SaaS App

> Project management tool for engineering teams

## Product

- [Home](https://yoursite.com/)
- [Pricing](https://yoursite.com/pricing)

## Documentation

- [Documentation](https://yoursite.com/docs)

## Resources

- [Blog](https://yoursite.com/blog)
Pages with a description field render with a colon-separated summary:
- [Pricing](https://yoursite.com/pricing): Plans starting at $12/month

Caching

AgentXP sets the following cache headers on /llms.txt responses:
Cache-Control: public, max-age=3600, s-maxage=86400
The file is cached at the edge for 24 hours and revalidated hourly by browsers. If you update your page list, redeploy your application to bust the edge cache.