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:
- Navigation Ordering: Pages follow the exact hierarchy defined in
docs.json. Unlisted pages enabled throughseo.indexing: "all"are appended alphabetically at the end. - Direct Markdown References: Every linked documentation page in
/llms.txtends with a.mdextension (e.g.,https://yourdocs.com/quickstart.md), ensuring that agents navigating the index request raw Markdown rather than HTML. - Description Truncation: Mintlify extracts descriptions directly from each page's frontmatter, taking the first paragraph and capping it at 300 characters.
- Machine-Readable API Specs: Links to OpenAPI and AsyncAPI specifications are automatically appended when configured.
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:
- Context Bloat: For documentation hubs spanning hundreds of API endpoints,
/llms-full.txtcan easily exceed several megabytes and hundreds of thousands of tokens, driving up API latency and cost. - Lost-in-the-Middle Phenomenon: Placing entire codebases and operational guides into a single context window increases the risk of hallucination or subtle parameter omission compared to precise, page-level retrieval.
| Metric / Dimension | /llms.txt (Index Protocol) | /llms-full.txt (Full Corpus) |
|---|---|---|
| Primary Purpose | Discovery map and routing index | Complete context injection |
| File Size / Tokens | Minimal (< 100 KB; capped at 100k chars) | Massive (often 500 KB to several MBs) |
| Agent Pattern | Hierarchical search and on-demand retrieval | Single-shot prompt injection or offline RAG |
| Cursor Usage | Ideal for @Docs targeted queries | Context-heavy; prone to truncation on large docs |
| Mintlify Generation | Automated, splits under /_llms/ if >100k chars | Automated, 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:
- When an AI agent or automated scraper sends a request containing
Accept: text/markdownorAccept: text/plainto any standard documentation URL (e.g.,https://yourdocs.com/api/authentication), Mintlify intercepts the request and returns the sanitized Markdown representation instead of rendering the React HTML bundle. - Developers and agents can also append
.mddirectly to any documentation URL to inspect the exact Markdown payload consumed by LLMs. - If an agent requests a non-existent route as Markdown, Mintlify returns a customized Markdown 404 response featuring links to
/llms.txt,/llms-full.txt, and up to three semantically related documentation pages to help the agent recover autonomously.
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:
- Differentiate
titleandsidebarTitle: UsesidebarTitlefor concise human UI navigation (e.g., "Authentication"), but preserve an explicit, action-orientedtitlefor the document (e.g., "Authenticate API Requests with Bearer Tokens"). Mintlify usestitlein/llms.txt, providing agents with critical semantic grounding. - Pack the 300-Character Description Window: Mintlify cuts off
/llms.txtdescriptions 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. - Prune Stale Content with
noindex: Exclude deprecated guides, temporary changelogs, or internal stubs from the AI index by settingnoindex: truein the frontmatter. This keeps your/llms.txtclean 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>
- Content wrapped in
<Visibility for="humans">renders in the browser but is completely stripped from.mdexports,/llms.txt, and/llms-full.txt. - Content wrapped in
<Visibility for="agents">is hidden in the web browser but emitted directly into the Markdown stream consumed by Cursor and AI agents.
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:
- Recommended URL: Point Cursor to
https://yourdocs.com/llms.txt. Cursor's web indexing crawler will parse the structured Markdown index, map out the.mdpage endpoints, and index the entire site with minimal token overhead and zero HTML noise. - When to Use
/llms-full.txt: For smaller libraries or single-purpose SDKs where the total documentation footprint is under 50 pages, pointing developers to/llms-full.txtallows immediate one-shot indexing into local context without recursive crawl latency.
2. Autonomous Agent Tool Calling (Claude Code / LangChain)
For autonomous agents operating in command-line environments (such as Claude Code):
- The agent makes a
GET /llms.txtrequest to retrieve the system directory andAgent Instructions. - The agent parses descriptions to identify the exact page required (e.g.,
https://yourdocs.com/api/deployments.md). - The agent retrieves only the specific
.mdfile, 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.
- Ensure that forwarding rules cover
https://company.com/docs/llms.txt,https://company.com/docs/llms-full.txt, and wildcard sub-indexeshttps://company.com/docs/_llms/*. - Configure the base path inside your Mintlify project settings so that internal index links generated under
/_llms/do not resolve to incorrect root domains.
2. Authentication Boundaries
Mintlify respects site security settings:
- Fully Protected Sites: Both
/llms.txtand/llms-full.txtrequire authentication. Anonymous AI crawlers will receive a 401/403 status. - Partially Protected Sites: Mintlify serves
/llms.txtpublicly, but strictly filters the index to expose only public pages, stripping any documentation restricted to specific user groups.
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:
- Frontmatter Descriptions: Every MDX page has a custom, verb-led
descriptionunder 300 characters packed with technical keywords. - Title Differentiation: Pages use descriptive, action-oriented
titleproperties for agent indexes and concisesidebarTitleproperties for human UI. - Global AI Guidance:
docs.jsonspecifiesmarkdown.instructionsdefining preferred SDK languages, current API versions, and disallowed legacy patterns. - Audience Tagging: Human UI click-paths are wrapped in
<Visibility for="humans">, and machine-executable code or payloads are provided via<Visibility for="agents">. - Index Pruning: Outdated or internal pages carry
noindex: trueorhidden: true. - Proxy Verification: Reverse proxies properly forward
/llms.txt,/llms-full.txt, and/_llms/*under configured subpaths.
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.