<!--
Sitemap:
- [What is Vocs](/introduction/what-is-vocs): Learn why Vocs exists and when to use it
- [Getting Started](/introduction/getting-started): Install Vocs and create your first documentation site
- [Project Structure](/introduction/project-structure): Overview of the structure of a Vocs project
- [Writing Docs with AI](/introduction/writing-docs-with-ai): Use an AI agent to create and maintain Vocs documentation
- [Markdown Extensions](/writing/markdown-extensions): Features and syntax of Markdown in Vocs
- [Code & Syntax Highlighting](/writing/syntax-highlighting): Rich markup and annotations for code
- [Twoslash](/writing/twoslash): Add type-aware annotations to code examples
- [Code Snippets](/writing/code-snippets): Include and reuse code in Markdown
- [Markdown Snippets](/writing/markdown-snippets): Include other Markdown files in MDX
- [React in Markdown](/writing/react): Compose MDX pages with React components
- [Mermaid Diagrams](/writing/mermaid): Render diagrams from text using Mermaid
- [Assets](/writing/assets): Manage images, fonts, icons, and other docs assets
- [Frontmatter](/writing/frontmatter): Configure page metadata, layouts, search, and UI visibility
- [Navigation](/features/navigation): Keep docs navigation synced with routes
- [Search](/features/search): Built-in client-side search powered by MiniSearch
- [Layouts](/features/layouts): Choose and customize page shells for your docs
- [Slots](/features/slots): Inject custom components into the docs shell
- [Theming](/features/theming): Customize colors, typography, spacing, logos, and code themes
- [Tailwind CSS](/features/tailwind): Use Tailwind utilities in Vocs pages and components
- [Dynamic OG Images](/features/dynamic-og-images): Generate social preview images from page metadata
- [Page Feedback](/features/feedback): Collect page-level feedback from readers
- [Redirects](/features/redirects): Preserve old URLs and route legacy paths to new locations
- [API Routes](/features/api-routes): Add server-rendered endpoints to your docs site
- [Agent Support](/features/agent-support): Serve documentation in machine-readable form for AI agents
- [Ask AI](/features/ask-ai): Built-in AI assistant menu on every page
- [MCP Server](/features/mcp-server): Expose your docs and source code to AI assistants
- [Changelog Generation](/features/changelog-generation): Fetch release notes and render a changelog page
- [Site Configuration](/reference/site-config): Reference for options accepted by defineConfig
- [Frontmatter Reference](/reference/frontmatter): All frontmatter fields accepted by a Vocs MDX page
- [Components](/reference/components): Reference for the public React components exported from Vocs
- [Hooks](/reference/hooks): Reference for the React hooks exported from Vocs
- [Changelog](/changelog): Release history for Vocs
-->

# Agent Support \[Serve documentation in machine-readable form for AI agents]

Vocs ships built-in support for making documentation easy for LLMs and AI agents to consume — without any configuration.

## llms.txt Files

Vocs automatically generates [`llms.txt`](https://llmstxt.org/) files for LLM consumption:

* `/llms.txt` — A concise index of all pages with titles and descriptions.
* `/llms-full.txt` — Complete documentation content concatenated into a single file.

These files are generated at build time and served at the root of your site. No configuration is required.

### Example Output

```txt
# Vocs

Vocs is a library for creating documentation websites.

- [What is Vocs?](/introduction/what-is-vocs): Learn about Vocs and its features
- [Getting Started](/introduction/getting-started): Quick start guide
- [Agent Support](/features/agent-support): Machine-readable docs for AI agents
```

## Markdown Rendering for AI Agents

Vocs automatically detects AI user agents and serves them raw Markdown instead of rendered HTML. This provides better token efficiency and easier parsing for LLMs.

### Supported AI Agents

The following user agents are automatically detected:

* **OpenAI**: `GPTBot`, `OAI-SearchBot`, `ChatGPT-User`
* **Anthropic**: `anthropic-ai`, `ClaudeBot`, `claude-web`
* **Google**: `Google-Extended`, `GoogleAgent-Mariner`
* **Perplexity**: `PerplexityBot`, `Perplexity-User`
* **Mistral**: `MistralAI-User`
* **Cohere**: `cohere-ai`
* **Others**: `FacebookBot`, `meta-externalagent`, `Bytespider`, `AI2Bot`, and more

Search engine crawlers such as `Googlebot`, `Bingbot`, `Amazonbot`, and `Applebot` continue to receive rendered HTML so standard indexing behavior is preserved.

### Manual Markdown Access

Most pages can be accessed as Markdown by appending `.md` to the URL:

```
https://docs.example.com/getting-started.md
```

For the home page, use:

```
https://docs.example.com/index.md
```

This is useful for copying documentation into AI conversations or for custom integrations.

## Best Practices

### Optimize for LLMs

1. **Write descriptive titles.** Use clear, descriptive page titles that help LLMs understand content.
2. **Add descriptions.** Include `description` in frontmatter for better `llms.txt` output.
3. **Structure content.** Use headings, lists, and code blocks for easy parsing.
4. **Keep pages focused.** Single-topic pages are easier for LLMs to retrieve and reference.

## See Also

* [Ask AI](/features/ask-ai) — User-facing AI menu on every page.
* [MCP Server](/features/mcp-server) — Expose docs to AI clients via Model Context Protocol.
* [Writing Docs with AI](/introduction/writing-docs-with-ai) — Workflow for authoring docs with AI agents.
