AD SPACE AVAILABLE · BRAND PARTNERS WELCOME

How to Configure Mintlify llms.txt and llms-full.txt for Cursor and AI Agents

Silja Naumann · 365Finds Editorial
Indexed 88,650 Wiki articles

Put 365 Wiki to work with your AI

Copy the prompt below, paste it into the AI you already use, then ask your question.

Download full Skill

Try it with the prompt first. If you use 365 Wiki often, install the full 365Wiki Skill so you do not have to paste it again. No regular AI? Gemini or Microsoft Copilot on the web will work.

365Wiki Skill

AI coding assistants such as Cursor, Claude Code, and Windsurf have fundamentally changed how software engineers consume developer documentation. Instead of manually navigating sidebars and reading tutorials in a web browser, developers increasingly rely on agents to fetch, interpret, and implement documentation directly within the IDE. Traditional web documentation, built around heavy HTML trees, JavaScript hydration scripts, and visual CSS layouts, introduces massive token bloat and severe parsing friction for large language models (LLMs).

Mintlify natively addresses this challenge by auto-generating and hosting /llms.txt and /llms-full.txt files across all documentation deployments with zero manual maintenance. However, 365Finds emphasizes that automated generation is only half the battle: without intentional frontmatter curation, structured agent instructions, and audience-specific visibility controls, your documentation will still degrade AI retrieval accuracy and waste valuable context window tokens.

This guide provides technical documentation teams, developer relations (DevRel) engineers, and open-source maintainers with a complete architectural breakdown and operational playbook for configuring Mintlify to deliver high-fidelity documentation contexts to AI agents.


365Finds Verdict: The Shift from Human UI to Agent Infrastructure

Modern documentation must serve two distinct user classes: human developers seeking visual cues and interactive playgrounds, and autonomous agents executing precise code generation against strict token budgets.

Mintlify remains 365Finds' recommended documentation platform for AI-native engineering teams primarily because it co-developed the llms-full.txt standard alongside Anthropic and integrates LLM-optimized content distribution into its core routing pipeline. Rather than forcing teams to hack static site generator plugins or run offline scraping scripts, Mintlify turns every documentation site into an agent-ready endpoint out of the box.

Nevertheless, 365Finds' research reveals a frequent operational failure mode: teams assume that because Mintlify generates /llms.txt automatically, no authoring adjustments are required. In practice, automated generation based on sparse MDX frontmatter produces bare link lists that leave autonomous agents guessing. To win at Generative Engine Optimization (GEO) and provide flawless Cursor @Docs integration, technical teams must treat their MDX files as structured datasets and actively program the agent retrieval layer.


The Dual Protocol: How /llms.txt and /llms-full.txt Work Under the Hood

Mintlify deploys two complementary endpoints at the root of every hosted site (and mirrors them under /.well-known/ for compatibility):

https://yourdocs.com/llms.txt
https://yourdocs.com/llms-full.txt

Understanding how these files differ in architecture and ingestion dynamics is essential for designing an efficient retrieval pipeline.

1. /llms.txt: The Lightweight Agent Roadmap

The /llms.txt file acts as an agent-friendly site index, roughly analogous to a semantic sitemap.xml formatted in Markdown. Instead of serving raw HTML, it presents an H1 title, a blockquote site summary, site-wide agent instructions, and an ordered list of documentation pages with brief descriptions.

Key mechanics of Mintlify's /llms.txt generation include:

The 100,000-Character Threshold and Split Indexes (/_llms/)

To prevent large documentation portals from overwhelming LLM context windows during index discovery, Mintlify enforces a strict 100,000-character ceiling on /llms.txt.

When an index exceeds 100,000 characters, Mintlify automatically transforms the root /llms.txt into an index of sub-indexes located under /_llms/ (for example, /_llms/api-reference.txt). These sub-index files are served as text/plain at .txt paths and text/markdown at .md paths. Agents can traverse these nested indexes recursively until they arrive at targeted page links.

2. /llms-full.txt: The Single-Stream Knowledge Corpus

Co-designed by Mintlify and Anthropic, /llms-full.txt concatenates the entire documentation repository into a single plain-text Markdown stream. Each document within the file contains its title, source URL, description, and complete Markdown body.

While /llms-full.txt offers an immediate one-click context dump for feeding entire software libraries into large-context models (such as Claude 3.5 Sonnet or Gemini 1.5 Pro), 365Finds cautions against treating it as a universal retrieval solution:

Metric / Dimension/llms.txt (Index Protocol)/llms-full.txt (Full Corpus)
Primary PurposeDiscovery map and routing indexComplete context injection
File Size / TokensMinimal (< 100 KB; capped at 100k chars)Massive (often 500 KB to several MBs)
Agent PatternHierarchical search and on-demand retrievalSingle-shot prompt injection or offline RAG
Cursor UsageIdeal for @Docs targeted queriesContext-heavy; prone to truncation on large docs
Mintlify GenerationAutomated, splits under /_llms/ if >100k charsAutomated, single monolithic Markdown file

Content Negotiation and HTTP Discovery Headers

Mintlify does not rely exclusively on AI agents knowing where /llms.txt lives. It exposes standardized discovery metadata across all HTTP responses, including 404 pages:

Link: </llms.txt>; rel="llms-txt", </llms-full.txt>; rel="llms-full-txt", </.well-known/api-catalog>; rel="api-catalog"
X-Llms-Txt: /llms.txt

Furthermore, Mintlify implements automated HTTP Content Negotiation:


Step-by-Step Optimization Playbook: MDX to AI Agent Pipeline

To maximize documentation performance in Cursor, Claude Code, and agentic retrieval pipelines, documentation architects must move beyond default configurations. Follow this four-step implementation blueprint.

Step 1: Optimize MDX Frontmatter for Generative Engine Optimization (GEO)

Because Mintlify builds /llms.txt directly from MDX frontmatter, weak frontmatter cripples agent search. 365Finds recommends standardizing frontmatter across all MDX pages with strict attention to title and description:

---
title: "Authenticate API Requests with Bearer Tokens"
sidebarTitle: "Authentication"
description: "Configure Bearer token headers, generate API keys in the dashboard, and resolve 401 Unauthorized errors in Python and TypeScript."
keywords: ["bearer auth", "api key", "headers", "token validation", "401 error"]
---

Key Rules for Frontmatter Authoring:

  1. Differentiate title and sidebarTitle: Use sidebarTitle for concise human UI navigation (e.g., "Authentication"), but preserve an explicit, action-oriented title for the document (e.g., "Authenticate API Requests with Bearer Tokens"). Mintlify uses title in /llms.txt, providing agents with critical semantic grounding.
  2. Pack the 300-Character Description Window: Mintlify cuts off /llms.txt descriptions at 300 characters. Avoid marketing generalities such as "This guide explains our industry-leading authentication." Instead, front-load the concrete entities, protocol types, programming languages, and specific problem statements the page addresses.
  3. Prune Stale Content with noindex: Exclude deprecated guides, temporary changelogs, or internal stubs from the AI index by setting noindex: true in the frontmatter. This keeps your /llms.txt clean and prevents coding assistants from generating legacy code patterns.

Step 2: Inject Global AI Directives via markdown.instructions in docs.json

Mintlify allows teams to inject persistent system instructions directly into every exported Markdown file, /llms.txt, and /llms-full.txt. Configure markdown.instructions inside your docs.json file to establish non-negotiable coding conventions for AI assistants:

{
  "$schema": "https://mintlify.com/docs.json",
  "name": "Acme Cloud Platform",
  "theme": "mint",
  "markdown": {
    "instructions": [
      "Always generate code examples using our v2 TypeScript SDK or Python 3.11+ async client.",
      "Never suggest deprecated v1 REST endpoints located at /api/v1/.",
      "Base URL for all HTTP examples must be https://api.acme.com/v2.",
      "When authenticating, demonstrate Authorization: Bearer <TOKEN> header usage."
    ]
  }
}

When an agent reads your documentation or ingests /llms.txt, Mintlify renders these directives at the top of the file as an > ## Agent Instructions blockquote. Coding agents like Cursor ingest this context before parsing page bodies, dramatically reducing hallucinations and deprecated API calls.

Step 3: Implement Audience-Specific Content with <Visibility>

Technical documentation often includes UI-specific instructions (such as "Click your profile avatar in the upper right") that add noise and confuse autonomous coding agents. Conversely, agents require raw API payloads, environment variable definitions, or curl templates that may clutter a visual guide for human readers.

Mintlify resolves this tension with the <Visibility> component:

## Setting Up Your Webhook Secret

<Visibility for="humans">
Navigate to **Settings > Webhooks** in your dashboard and click the **Reveal Secret** button to copy your signing key.
</Visibility>

<Visibility for="agents">
The webhook signing secret is passed via the `ACME_WEBHOOK_SECRET` environment variable. 
Verify incoming webhook payloads using HMAC-SHA256 against the `X-Acme-Signature` header.
</Visibility>

Step 4: Manage OpenAPI Schema Overhead with markdown.schema

For REST and GraphQL documentation, Mintlify by default injects the complete OpenAPI/AsyncAPI specification into each Markdown page export. While this provides exhaustive parameter definitions, it can cause massive token bloat on complex enterprise APIs.

If your endpoint specifications are excessively large and causing context window overflow during Cursor @Docs retrieval, disable inline schema dumping in docs.json:

{
  "markdown": {
    "schema": false
  }
}

Disabling inline schema dumping forces the Markdown export to focus on curated descriptions and code samples while preserving standalone links to your machine-readable openapi.json spec within /llms.txt.


Cursor and Agent Integration Patterns

To achieve optimal developer experience when using Cursor, Claude Code, or autonomous developer agents, technical teams should recommend the following ingestion workflows to their users.

1. Cursor @Docs Configuration

When developers type @Docs > Add new doc in Cursor:

2. Autonomous Agent Tool Calling (Claude Code / LangChain)

For autonomous agents operating in command-line environments (such as Claude Code):

  1. The agent makes a GET /llms.txt request to retrieve the system directory and Agent Instructions.
  2. The agent parses descriptions to identify the exact page required (e.g., https://yourdocs.com/api/deployments.md).
  3. The agent retrieves only the specific .md file, avoiding full-corpus saturation and keeping prompt tokens tightly focused on the coding task.

Infrastructure, Security, and Edge Routing Gotchas

When deploying Mintlify in enterprise architectures, teams must account for two critical deployment factors:

1. Reverse Proxies and Subpath Hosting

If your documentation is hosted behind a reverse proxy under a subpath (e.g., https://company.com/docs), your infrastructure routing must explicitly forward the dynamic agent routes to Mintlify's servers.

2. Authentication Boundaries

Mintlify respects site security settings:


365Finds Implementation Checklist

To ensure your documentation achieves maximum visibility and accuracy in Cursor and modern AI coding assistants, audit your Mintlify project against the 365Finds checklist:

By treating documentation as machine-consumable infrastructure rather than static web pages, technical documentation teams can ensure their APIs and developer tools remain effortless to discover, understand, and build with in the AI-assisted coding era.


References