llms.txt Generator
Create spec-compliant llms.txt and llms-full.txt files to provide structured context manifests for AI assistants, ChatGPT, and LLM web crawlers.
Core Documentation Links (## Docs)
High-priority pages: quickstarts, API references, core concepts
Optional / Deep Dive Links (## Optional)
Secondary content: CLI guides, security whitepapers, benchmarks
How to Create and Publish an llms.txt File
Follow this 5-step implementation guide to provide LLMs with clean, machine-readable documentation context.
- Declare Your Project Identity: Provide a clear H1 title for your project or platform, followed by a concise 1 to 2 sentence summary blockquote describing your core functionality.
- Curate Essential Documentation Links: Under the
## Docssection, link only to high-value architectural pages (quickstarts, API guides, and reference manuals). Always append a 1-line note explaining what the page covers. - Add Optional Deep-Dive Content: Use the
## Optionalsection for secondary material like detailed CLI parameters, benchmarks, or legal terms that aren't required for basic prompt comprehension. - Verify Context Token Efficiency: Keep your
llms.txtunder 2,000 tokens so autonomous agents and search engines can ingest your manifest without exceeding context limits. - Upload to Domain Root: Place the finished file at
https://yourdomain.com/llms.txtso AI crawlers and developer tools can automatically discover it.
The Anatomy of an llms.txt File: Specification Breakdown
Proposed by Jeremy Howard of Answer.AI, the llms.txt specification relies on standard Markdown syntax to make content consumption frictionless for language models:
- Title (H1):
# Project Name- Establishes the authoritative brand or repository identity. - Summary Blockquote:
> Short project summary- Gives the LLM high-level semantic context before reading individual links. - Section Headers (H2): Standardized sections such as
## Docsor## Key Pagesorganize content hierarchically. - Hyperlinks with Context:
- [Title](URL): Description- Rather than bare URLs, the colon syntax provides semantic meaning so the model knows which page to inspect for specific user queries. - Optional Section (
## Optional): Designates non-critical documentation that models can skip unless the prompt specifically demands deep technical implementation.
llms.txt vs. robots.txt vs. sitemap.xml: Key Differences
Modern websites serve different discovery files tailored to distinct consumer types:
- robots.txt (Crawler Permissions): Dictates crawl authorization. It answers: “Is a crawler legally and technically permitted to request this path?” It contains no semantic content.
- sitemap.xml (Search Engine Inventory): A comprehensive XML list of every indexable URL on your domain for search engines to discover. It does not explain what content matters most.
- llms.txt (AI Reasoning Index): A curated, Markdown-based map designed specifically for LLMs. It answers: “What does this site do, and where are the cleanest explanations of its features?”
Understanding llms-full.txt: When to Provide Single-File Docs
In addition to llms.txt, the community specification recommends hosting an llms-full.txt companion file:
- Single-Request Ingestion: Modern frontier models (like Claude 4.5 Sonnet with 200k context windows or Gemini Argon 4 with 1M+ context) can ingest entire technical libraries in a single prompt.
- Zero HTML Scraping: By serving raw, concatenated Markdown at
/llms-full.txt, AI tools do not need to scrape hundreds of individual web pages, stripping out cookies, headers, and footers. - Autonomous Coding Workflows: Tools like Cursor, Windsurf, and Claude Code can index your entire SDK documentation instantly from a single URL.
Deployment Guide: Next.js, Static Sites, & Cloudflare
Hosting your llms.txt file is simple and supported on every modern web framework:
- Next.js (App Router): Place your generated
llms.txtfile inside the/publicdirectory. Next.js will automatically serve it athttps://yourdomain.com/llms.txtwithtext/plaincontent type. - Dynamic Route in Next.js: If you want to generate it dynamically from your database or CMS, create
src/app/llms.txt/route.tsand return anew Response(content, { headers: { 'Content-Type': 'text/plain; charset=utf-8' } }). - Vercel / Netlify / Cloudflare Pages: Drop the file into your static build output folder (e.g.
dist,build, orpublic). - WordPress & Shopify: Upload via your hosting file manager (cPanel/FTP) directly into the root public folder, or use a custom redirect rule in
.htaccessor Nginx.