Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions ai/llmstxt.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "llms.txt"
description: "Automatically generate llms.txt and llms-full.txt files to help AI tools index and understand your documentation."

Check warning on line 3 in ai/llmstxt.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/llmstxt.mdx#L3

Use 'LLMs?' instead of 'llms'.
keywords: ["llms.txt", "LLM indexing", "AEO", "GEO", "content discovery"]
---

Expand All @@ -11,14 +11,19 @@
Mintlify automatically hosts an `llms.txt` file at the root of your project that lists all available pages in your documentation. This file is always up to date and requires zero maintenance. You can optionally add a custom `llms.txt` file to the root of your project.

<Note>
If your site requires authentication, `llms.txt` and `llms-full.txt` also require authentication to view. LLMs and AI tools that cannot authenticate into your site cannot access these files. The files exclude pages that belong to [user groups](/deploy/authentication-setup#control-access-with-groups).

Check warning on line 14 in ai/llmstxt.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/llmstxt.mdx#L14

Use 'LLMs?' instead of 'llms'.

Check warning on line 14 in ai/llmstxt.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/llmstxt.mdx#L14

'llms-full.txt' should use sentence-style capitalization.
</Note>

View your `llms.txt` by appending `/llms.txt` to your documentation site's URL.
View your `llms.txt` by appending `/llms.txt` to your documentation site's URL. Mintlify also hosts the file at `/.well-known/llms.txt` for compatibility with tools that follow the `.well-known` convention.

<PreviewButton href="https://mintlify.com/docs/llms.txt">Open the llms.txt for this site.</PreviewButton>

Check warning on line 19 in ai/llmstxt.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/llmstxt.mdx#L19

Use 'LLMs?' instead of 'llms'.

Mintlify adds HTTP headers to every page response so AI tools can discover your `llms.txt` files without prior knowledge of their location:

- `Link: </llms.txt>; rel="llms-txt", </llms-full.txt>; rel="llms-full-txt"`: Follows the standard HTTP `Link` header format for resource discovery.

Check warning on line 23 in ai/llmstxt.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/llmstxt.mdx#L23

Use 'LLMs?' instead of 'llms'.
- `X-Llms-Txt: /llms.txt`: A convenience header for tools that check for `llms.txt` support.

## llms.txt structure

Check warning on line 26 in ai/llmstxt.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/llmstxt.mdx#L26

Use 'LLMs?' instead of 'llms'.

Check warning on line 26 in ai/llmstxt.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/llmstxt.mdx#L26

'llms.txt structure' should use sentence-style capitalization.

An `llms.txt` file is a plain Markdown file that contains:

Expand All @@ -26,34 +31,37 @@
- **Structured content sections** with links and a description of each page in your documentation.
- **API specification links** to your OpenAPI and AsyncAPI specs, if your documentation includes them.

The `llms.txt` file lists your pages alphabetically in the order they appear in your repository, starting from the root directory.
The `llms.txt` file lists your pages alphabetically in the order they appear in your repository, starting from the root directory. Page links in the `llms.txt` file include a `.md` extension so AI tools can fetch the Markdown version of each page directly.

Each page's description comes from the `description` field in its frontmatter. Descriptions truncate at 300 characters and the first line break. For API reference pages, the description also includes the specification information from the `openapi` or `api` frontmatter field. Pages without a `description` field appear in the `llms.txt` file without a description.

This structured approach allows LLMs to efficiently process your documentation at a high level and locate relevant content for user queries, improving the accuracy and speed of AI-assisted documentation searches.

```mdx Example llms.txt
# Site title

## Docs

- [API](https://example.com/docs/api): Endpoint list and usage
- [Install](https://example.com/docs/install): Setup steps
- [Getting started](https://example.com/docs/start): Intro guide
- [API](https://example.com/docs/api.md): Endpoint list and usage
- [Install](https://example.com/docs/install.md): Setup steps
- [Getting started](https://example.com/docs/start.md): Intro guide

## API specifications
## OpenAPI Specs

- [openapi](https://example.com/docs/openapi.json)

## AsyncAPI Specs

- [asyncapi](https://example.com/docs/asyncapi.yaml)
```

This structured approach allows LLMs to efficiently process your documentation at a high level and locate relevant content for user queries, improving the accuracy and speed of AI-assisted documentation searches.

## llms-full.txt

The `llms-full.txt` file combines your entire documentation site into a single file as context for AI tools and LLM indexing.

Mintlify automatically hosts an `llms-full.txt` file at the root of your project. View your `llms-full.txt` by appending `/llms-full.txt` to your documentation site's URL. Mintlify also hosts the file at `/.well-known/llms-full.txt` for compatibility with tools that follow the `.well-known` convention.

<PreviewButton href="https://mintlify.com/docs/llms-full.txt">Open the llms-full.txt for this site.</PreviewButton>

Check warning on line 64 in ai/llmstxt.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/llmstxt.mdx#L64

Use 'LLMs?' instead of 'llms'.

## Custom files

Expand Down
8 changes: 8 additions & 0 deletions ai/markdown-export.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Markdown provides structured text that AI tools can process more efficiently than HTML, which results in better response accuracy, faster processing times, and lower token usage.

Mintlify automatically generates Markdown versions of pages that are optimized for AI tools and external integrations.

Check warning on line 11 in ai/markdown-export.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/markdown-export.mdx#L11

In general, use active voice instead of passive voice ('are optimized').

## .md URL extension

Expand All @@ -16,6 +16,14 @@

<PreviewButton href="https://mintlify.com/docs/ai/markdown-export.md">Open this page as Markdown</PreviewButton>

## Accept header

Send a request with `Accept: text/markdown` or `Accept: text/plain` to any page URL to receive the Markdown version instead of HTML. This is useful for AI tools and integrations that programmatically fetch documentation content.

```bash
curl -H "Accept: text/markdown" https://mintlify.com/docs/ai/markdown-export
```

## Keyboard shortcut

Press <kbd>Command</kbd> + <kbd>C</kbd> (<kbd>Ctrl</kbd> + <kbd>C</kbd> on Windows) to copy a page as Markdown to your clipboard.
30 changes: 28 additions & 2 deletions ai/skillmd.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
## Use `skill.md` files with agents

<Note>
If you use a [reverse proxy](/deploy/reverse-proxy), configure it to forward `/skill.md` and `/.well-known/skills/*` paths (with caching disabled) to your Mintlify subdomain.
If you use a [reverse proxy](/deploy/reverse-proxy), configure it to forward `/skill.md` and `/.well-known/skills/*` paths to your Mintlify subdomain.
</Note>

Agents can process your `skill.md` with the [skills CLI](https://www.npmjs.com/package/skills).
Expand All @@ -43,7 +43,7 @@

Mintlify generates a `skill.md` file following the [agentskills.io specification](https://agentskills.io/specification). The generated file includes:

- **Metadata**: Project name, description, and version.

Check warning on line 46 in ai/skillmd.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/skillmd.mdx#L46

Use 'metadata' instead of 'Metadata'.
- **Capabilities**: What agents can accomplish with your product.
- **Skills**: Specific actions organized by category.
- **Workflows**: Step-by-step procedures for common tasks.
Expand Down Expand Up @@ -79,4 +79,30 @@
author: mintlify
version: "1.0"
---
```
```

## Skills discovery endpoints

Mintlify hosts a skills directory at `/.well-known/skills/` that agents can use to discover and fetch your skill files programmatically.

### Skills index

`GET /.well-known/skills/index.json` returns a JSON manifest listing all available skills:

```json
{
"skills": [
{
"name": "my-product",
"description": "A brief description of what your skill does.",
"files": ["SKILL.md"]
}
]
}
```

The `name` field is a URL-safe slug derived from the `name` in your `skill.md` frontmatter.

### Individual skill files

`GET /.well-known/skills/{name}/skill.md` returns the `skill.md` file for a specific skill identified by its slugified name from the index.

Check warning on line 108 in ai/skillmd.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/skillmd.mdx#L108

Did you really mean 'slugified'?
2 changes: 1 addition & 1 deletion api/assistant/create-assistant-message-v2.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ keywords:
<Info>
The assistant message v2 endpoint is compatible with **AI SDK v5+**. If you
use AI SDK v4, use the [assistant message v1
endpoint](/api-reference/assistant/create-assistant-message) instead.
endpoint](/api/assistant/create-assistant-message) instead.
</Info>

## Integration with `useChat`
Expand Down
2 changes: 1 addition & 1 deletion api/assistant/create-assistant-message.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ keywords: [ "assistant message", "embed", "chat", "integrate", "ai sdk v4" ]
<Badge color="orange">Deprecated</Badge>

<Info>
The assistant message v1 endpoint is compatible with **AI SDK v4**. If you use AI SDK v5 or later, use the [assistant message v2 endpoint](/api-reference/assistant/create-assistant-message-v2) instead.
The assistant message v1 endpoint is compatible with **AI SDK v4**. If you use AI SDK v5 or later, use the [assistant message v2 endpoint](/api/assistant/create-assistant-message-v2) instead.
</Info>

## Integration with `useChat`
Expand Down
Loading