---
title: LLMs.txt
description: How CamelMind generates an AI-readable llms.txt file for your documentation site.
---

Modern AI assistants can answer questions more accurately when they have direct access to your documentation.

CamelMind can automatically generate an `llms.txt` file—a machine-readable version of your documentation that's optimized for AI models. It follows the `llms.txt` standard while preserving the structure and content of your documentation.

Once enabled, AI tools can read your documentation directly instead of relying solely on web search or scraped content.

---

## Enable llms.txt

In `camelmind.config.ts`:

```typescript
const config: CamelMindConfig = {
  // ...
  ai: {
    llmsTxt: {
      enabled: true,
      directive: "For a complete documentation index, see /llms.txt. To read any public page as Markdown, append .md to the URL.",
    },
  },
}
```

### Configuration fields

| Field | Required | Description |
|---|---|---|
| `enabled` | Yes | Set `true` to activate `/llms.txt` and `/api/llms` endpoints |
| `directive` | No | Additional instructions prepended to the generated output to provide context for AI models. |

---

## Generated endpoints

When enabled, CamelMind exposes two endpoints.

| Endpoint | Description |
|---|---|
| `/llms.txt` | Plain-text version of your documentation for AI assistants and developers. |
| `/api/llms/<page-slug>` | JSON representation of the same content for programmatic use. For example, [https://camelmind-docs.vercel.app/api/llms/features/llms-txt](https://camelmind-docs.vercel.app/api/llms/features/llms-txt) |

<Callout type="tip">
If you're building an AI assistant, point it to `https://your-docs-site.com/llms.txt` to give it direct access to your documentation.
</Callout>

---

## What content is included?

CamelMind automatically generates the output from your published documentation.

By default:

- Public pages are included.
- Role-protected pages are excluded.
- Markdown formatting is preserved.
- Code blocks, tables, and headings remain intact.

This helps AI assistants understand your documentation without exposing private content.

### Control AI-visible content

Sometimes information is useful for human readers but unnecessary for AI—or vice versa.

CamelMind includes two MDX components to control what appears in `llms.txt`.

=== "LLMIgnore"

Content inside `LLMIgnore` is rendered on the page but omitted from `llms.txt`.

```
<LLMIgnore>

Internal implementation details for human readers.

</LLMIgnore>

```

Use this for:

- Internal notes
- Marketing copy
- Content that isn't useful for AI assistants

=== "LLMOnly"

Content inside `LLMOnly` is included in `llms.txt` but hidden from the rendered page.

```
<LLMOnly>

The Alert component was deprecated in v0.2.0. Use Callout instead.

</LLMOnly>
```

This is useful for:

- Additional context
- Alternate terminology
- Migration notes
- AI-specific guidance
- Metadata that doesn't belong in the rendered documentation

===

---

## Output format

CamelMind generates a single Markdown document containing your documentation in reading order.

A simplified example looks like this:

```
# My Product Documentation > You are reading the official documentation... --- ## Installation ... --- ## Configuration
```

Pages are separated by horizontal rules, while headings, code blocks, and tables remain in Markdown format. Interactive MDX components are converted into plain text so the output remains easy for language models to process.
