Six months ago, LLMs.txt was introduced as a groundbreaking file format designed to make website documentation accessible for large language models (LLMs). Since its release, the standard has steadily gained traction among developers and content creators. Today, as discussions around Model Context Protocols (MCP) intensify, LLMs.txt is in the spotlight as a proven, AI-first documentation solution that bridges the gap between human-readable content and machine-friendly data. In this article, we’ll explore the evolution of LLMs.txt, examine its structure and benefits, dive into technical integrations (including a Python module & CLI), and compare it to the emerging MCP standard.
Released six months ago, LLMs.txt was developed to address a critical challenge: traditional web files like robots.txt and sitemap.xml are designed for search engine crawlers—not for AI models that require concise, curated content. LLMs.txt provides a streamlined overview of website documentation, allowing LLMs to quickly understand essential information without being bogged down by extraneous details.
Key Points:
Purpose: To distill website content into a format optimized for AI reasoning.
Adoption: In its short lifespan, major platforms such as Mintlify, Anthropic, and Cursor have integrated LLMs.txt, highlighting its effectiveness.
Current Trends: With the recent surge in discussions around MCPs (Model Context Protocols), the community is actively comparing these two approaches for enhancing LLM capabilities.
Community Buzz on Twitter
The conversation on Twitter reflects the rapid adoption of LLMs.txt and the excitement around its potential, even as the debate about MCPs grows:
Jeremy Howard (@jeremyphoward): Celebrated the momentum, stating, “My proposed llms.txt standard really has got a huge amount of momentum in recent weeks.” He thanked the community—and notably @StripeDev—for their support, with Stripe now hosting LLMs.txt on their documentation site.
Stripe Developers (@StripeDev): Announced that they’ve added LLMs.txt and Markdown to their docs (docs.stripe.com/llms.txt), enabling developers to easily integrate Stripe’s knowledge into any LLM.
Developer Insights: Tweets from developers like @TheSeaMouse, @xpression_app, and @gpjt have not only praised LLMs.txt but have also sparked discussions comparing it to MCP. Some users note that while LLMs.txt enhances content ingestion, MCP promises to make LLMs more actionable.
My proposed llms.txt standard really has got a huge amount of momentum in recent weeks.
LLMs.txt is a Markdown file with a structured format specifically designed for making website documentation accessible to LLMs. There are two primary versions:
/llms.txt
Purpose: Provides a high-level, curated overview of your site’s documentation. It helps LLMs quickly grasp the site’s structure and locate key resources.
Structure:
An H1 with the name of the project or site. This is the only required section
A blockquote with a short summary of the project, containing key information necessary for understanding the rest of the file
Zero or more markdown sections (e.g. paragraphs, lists, etc) of any type except headings, containing more detailed information about the project and how to interpret the provided files
Zero or more markdown sections delimited by H2 headers, containing “file lists” of URLs where further detail is available
Each “file list” is a markdown list, containing a required markdown hyperlink [name](url), then optionally a: and notes about the file.
/llms-full.txt
Purpose: Contains the complete documentation content in one place, offering detailed context when needed.
Usage: Especially useful for technical API references, in-depth guides, and comprehensive documentation scenarios.
Example Structure Snippet:
# Project Name
> Brief project summary
## Core Documentation
- [Quick Start](url): A concise introduction
- [API Reference](url): Detailed API documentation
## Optional
- [Additional Resources](url): Supplementary information
Key Advantages of LLMs.txt
LLMs.txt offers several distinct benefits over traditional web standards:
Optimized for LLM Processing: It eliminates non-essential elements like navigation menus, JavaScript, and CSS, focusing solely on the critical content that LLMs need.
Efficient Context Management: Given that LLMs operate within limited context windows, the concise format of LLMs.txt ensures that only the most pertinent information is used.
Dual Readability: The Markdown format makes LLMs.txt both human-friendly and easily parsed by automated tools.
Complementary to Existing Standards: Unlike sitemap.xml or robots.txt—which serve different purposes—LLMs.txt provides a curated, AI-centric view of documentation.
How to Use LLMs.txt with AI Systems?
To leverage the benefits of LLMs.txt, its content must be fed into AI systems manually. Here’s how different platforms integrate LLMs.txt:
ChatGPT
Method: Users copy the URL or full content of the /llms-full.txt file into ChatGPT, enriching the context for more accurate responses.
Benefits: This method enables ChatGPT to reference detailed documentation when needed.
Method: Since Claude currently lacks direct browsing capabilities, users can paste the content or upload the file, ensuring comprehensive context is provided.
Benefits: This approach grounds Claude’s responses in reliable, up-to-date documentation.
Several tools streamline the creation of LLMs.txt files, reducing manual effort:
Mintlify: Automatically generates both /llms.txt and /llms-full.txt files for hosted documentation, ensuring consistency.
Look into this too: https://mintlify.com/docs/quickstart
llmstxt by dotenv: Converts your site’s sitemap.xml into a compliant LLMs.txt file, integrating seamlessly with your existing workflow.
llmstxt by Firecrawl: Utilizes web scraping to compile your website content into an LLMs.txt file, minimizing manual intervention.
Real-World Implementations & Versatility
The versatility of LLMs.txt files is evident from real-world projects like FastHTML, which follow both proposals for AI-friendly documentation:
FastHTML Documentation: The FastHTML project not only uses an LLMs.txt file to provide a curated overview of its documentation but also offers a regular HTML docs page with the same URL appended by a .md extension. This dual approach ensures that both human readers and LLMs can access the content in the most suitable format.
Automated Expansion: The FastHTML project opts to automatically expand its LLMs.txt file into two markdown files using an XML-based structure. These two files are:
llms-ctx.txt: Contains the context without the optional URLs.
llms-ctx-full.txt: Includes the optional URLs for a more comprehensive context.
These files are generated using the llms_txt2ctx command-line application, and the FastHTML documentation provides detailed guidance on how to use them.
Versatility Across Applications: Beyond technical documentation, LLMs.txt files are proving useful in a variety of contexts—from helping developers navigate software documentation to enabling businesses to outline their structures, breaking down complex legislation for stakeholders, and even providing personal website content (e.g., CVs). Notably, all nbdev projects now generate .md versions of all pages by default. Similarly, Answer.AI and fast.ai projects using nbdev have their docs regenerated with this feature—exemplified by the markdown version of fastcore’s documents module.
Python Module & CLI for LLMs.txt
For developers looking to integrate LLMs.txt into their workflows, a dedicated Python module and CLI are available to parse LLMs.txt files and create XML context documents suitable for systems like Claude. This tool not only makes it easy to convert documentation into XML but also provides both a command-line interface and a Python API.
Install
pip install llms-txt
How to use it?
CLI
After installation, llms_txt2ctx is available in your terminal.
To get help for the CLI:
llms_txt2ctx -h
To convert an llms.txt file to XML context and save to llms.md:
llms_txt2ctx llms.txt > llms.md
Pass –optional True to add the ‘optional’ section of the input file.
Python module
from llms_txt import *
samp = Path('llms-sample.txt').read_text()
Use parse_llms_file to create a data structure with the sections of an llms.txt file (you can also add optional=True if needed):
To show how simple it is to parse llms.txt files, here’s a complete parser in <20 lines of code with no dependencies:
from pathlib import Path
import re,itertools
def chunked(it, chunk_sz):
it = iter(it)
return iter(lambda: list(itertools.islice(it, chunk_sz)), [])
def parse_llms_txt(txt):
"Parse llms.txt file contents in `txt` to a `dict`"
def _p(links):
link_pat = '-\s*\[(?P<title>[^\]]+)\]\((?P<url>[^\)]+)\)(?::\s*(?P<desc>.*))?'
return [re.search(link_pat, l).groupdict()
for l in re.split(r'\n+', links.strip()) if l.strip()]
start,*rest = re.split(fr'^##\s*(.*?$)', txt, flags=re.MULTILINE)
sects = {k: _p(v) for k,v in dict(chunked(rest, 2)).items()}
pat = '^#\s*(?P<title>.+?$)\n+(?:^>\s*(?P<summary>.+?$)$)?\n+(?P<info>.*)'
d = re.search(pat, start.strip(), (re.MULTILINE|re.DOTALL)).groupdict()
d['sections'] = sects
return d
We have provided a test suite in tests/test-parse.py and confirmed that this implementation passes all tests.
Python Source Code Overview
The llms_txt Python module provides the source code and helpers needed to create and use llms.txt files. Here’s a brief overview of its functionality:
File Specification: The module adheres to the llms.txt spec: an H1 title, a blockquote summary, optional content sections, and H2-delimited sections containing file lists.
Parsing Helpers: Functions such as parse_llms_file break down the file into a simple data structure (with keys like title, summary, info, and sections). For example, parse_link(txt) extracts the title, URL, and optional description from a markdown link.
XML Conversion: Functions like create_ctx and mk_ctx convert the parsed data into an XML context file, which is especially useful for systems like Claude.
Command-Line Interface: The CLI command llms_txt2ctx uses these helpers to process an llms.txt file and output an XML context file. This tool simplifies integrating llms.txt into various workflows.
Concise Implementation: The module even includes a parser implemented in under 20 lines of code, leveraging regex and helper functions like chunked for efficient processing.
For more details, you can refer to this link – https://llmstxt.org/core.html
Comparing LLMs.txt and MCP (Model Context Protocol)
While both LLMs.txt and the emerging Model Context Protocol (MCP) aim to enhance LLM capabilities, they tackle different challenges in the AI ecosystem. Below is an enhanced comparison that dives deeper into each approach:
LLMs.txt
Objective: Focuses on providing LLMs with clean, curated content by distilling website documentation into a structured Markdown format.
Implementation: A static file maintained by site owners, ideal for technical documentation, API references, and comprehensive guides.
Benefits:
Simplifies content ingestion.
Easy to implement and update.
Enhances prompt quality by filtering out unnecessary elements.
MCP (Model Context Protocol)
What is MCP?
MCP is an open standard that creates secure, two-way connections between your data and AI-powered tools. Think of it as a USB-C port for AI applications—a single, common connector that lets different tools and data sources “talk” to each other.
Why MCP Matter?
As AI assistants become integral to our daily workflow (consider Replit, GitHub Copilot, or Cursor IDE), ensuring they have access to all the context they need is crucial. Today, integrating new data sources often requires custom code, which is messy and time-consuming. MCP simplifies this by:
Offering Pre-built Integrations: A growing library of ready-to-use connectors.
Providing Flexibility: Enabling seamless switching between different AI providers.
Enhancing Security: Ensuring that your data remains secure within your infrastructure.
MCP Hosts: Programs (like Claude Desktop or popular IDEs) that want to access data.
MCP Clients: Components maintaining a 1:1 connection with MCP servers.
MCP Servers: Lightweight adapters that expose specific data sources or tools.
Connection Lifecycle:
Initialization: Exchange of protocol versions and capabilities.
Message Exchange: Supporting request-response patterns and notifications.
Termination: Clean shutdown, disconnection, or handling errors.
Real-World Impact and Early Adoption
Imagine if your AI tool could seamlessly access your local files, databases, or remote services without writing custom code for every connection. MCP promises exactly that—simplifying how AI tools integrate with diverse data sources. Early adopters are already experimenting with MCP in various environments, streamlining workflows and reducing development overhead.
Common Goal: Both LLMs.txt and MCP aim to empower LLMs but they do so in complementary ways. LLMs.txt improves content ingestion by providing a curated, streamlined view of website documentation, while MCP extends LLM functionality by enabling them to execute real-world tasks. In essence, LLMs.txt helps LLMs “read” better, and MCP helps them “act” effectively.
Nature of the Solutions
LLMs.txt:
Static, Curated Content Standard: LLMs.txt is designed as a static file that adheres to a strict Markdown-based structure. It includes an H1 title, a blockquote summary, and H2-delimited sections with curated link lists.
Technical Advantages:
Token Efficiency: By filtering out non-essential details (such as navigation menus, JavaScript, and CSS), LLMs.txt compresses complex web content into a succinct format that fits within the limited context windows of LLMs.
Simplicity: Its format is easy to generate and parse using standard text processing tools (e.g., regex and Markdown parsers), making it accessible to a wide range of developers.
Enhancing Capabilities:
Improves the quality of context provided to an LLM, leading to more accurate reasoning and better response generation.
Facilitates testing and iterative refinement since its structure is predictable and machine-readable.
MCP (Model Context Protocol):
Dynamic, Action-Enabling Protocol: MCP is a robust, open standard that creates secure, two-way communications between LLMs and external data sources or services.
Technical Advantages:
Standardized API Interfacing: MCP acts like a universal connector—similar to a USB-C port—allowing LLMs to interface seamlessly with diverse data sources (local files, databases, remote APIs, etc.) without custom code for each integration.
Real-Time Interaction: Through a client-server architecture, MCP supports dynamic request-response cycles and notifications, enabling LLMs to fetch real-time data and execute tasks (e.g., sending emails, updating spreadsheets, or triggering workflows).
Complexity Handling: MCP must address challenges like authentication, error handling, and asynchronous communication, making it more engineering-intensive but also far more versatile in extending LLM capabilities.
Enhancing Capabilities:
Transforms LLMs from passive text generators into active, task-performing assistants.
Facilitates seamless integration of LLMs into business processes and development workflows, boosting productivity through automation.
Ease of Implementation
LLMs.txt:
Is relatively straightforward to implement. Its creation and parsing rely on lightweight text processing techniques that require minimal engineering overhead.
Can be maintained manually or via simple automation tools.
MCP:
Requires a robust engineering effort. Implementing MCP involves designing secure APIs, managing a client-server architecture, and continuously maintaining compatibility with evolving external service standards.
Involves developing pre-built connectors and handling the complexities of real-time data exchange.
Together: These innovations represent complementary strategies in enhancing LLM capabilities. LLMs.txt ensures that LLMs have a high-quality, condensed snapshot of essential content—greatly improving comprehension and response quality. Meanwhile, MCP elevates LLMs by allowing them to bridge the gap between static content and dynamic action, ultimately transforming them from mere content analyzers into interactive, task-performing systems.
Conclusion
LLMs.txt, released six months ago, has already carved out a vital niche in the realm of AI-first documentation. By providing a curated, streamlined method for LLMs to ingest and understand complex website documentation, LLMs.txt significantly enhances the accuracy and reliability of AI responses. Its simplicity and token efficiency have made it an invaluable tool for developers and content creators alike.
At the same time, the emergence of Model Context Protocols (MCP) marks the next evolution in LLM capabilities. MCP’s dynamic, standardized approach allows LLMs to seamlessly access and interact with external data sources and services transforming them from passive readers into active, task-performing assistants. Together, LLMs.txt and MCP represent a powerful synergy: while LLMs.txt ensures that AI models have the best possible context, MCP provides them with the means to act upon that context.
Looking ahead, the future of AI-driven documentation and automation appears increasingly promising. As best practices and tools continue to evolve, developers can expect more integrated, secure, and efficient systems that not only enhance the capabilities of LLMs but also redefine how we interact with digital content. Whether you’re a developer striving for innovation, a business owner aiming to optimize workflows, or an AI enthusiast eager to explore the frontier of technology, now is the time to dive into these standards and unlock the full potential of AI-first documentation.
GenAI Intern @ Analytics Vidhya | Final Year @ VIT Chennai
Passionate about AI and machine learning, I'm eager to dive into roles as an AI/ML Engineer or Data Scientist where I can make a real impact. With a knack for quick learning and a love for teamwork, I'm excited to bring innovative solutions and cutting-edge advancements to the table. My curiosity drives me to explore AI across various fields and take the initiative to delve into data engineering, ensuring I stay ahead and deliver impactful projects.
We use cookies essential for this site to function well. Please click to help us improve its usefulness with additional cookies. Learn about our use of cookies in our Privacy Policy & Cookies Policy.
Show details
Powered By
Cookies
This site uses cookies to ensure that you get the best experience possible. To learn more about how we use cookies, please refer to our Privacy Policy & Cookies Policy.
brahmaid
It is needed for personalizing the website.
csrftoken
This cookie is used to prevent Cross-site request forgery (often abbreviated as CSRF) attacks of the website
Identityid
Preserves the login/logout state of users across the whole site.
sessionid
Preserves users' states across page requests.
g_state
Google One-Tap login adds this g_state cookie to set the user status on how they interact with the One-Tap modal.
MUID
Used by Microsoft Clarity, to store and track visits across websites.
_clck
Used by Microsoft Clarity, Persists the Clarity User ID and preferences, unique to that site, on the browser. This ensures that behavior in subsequent visits to the same site will be attributed to the same user ID.
_clsk
Used by Microsoft Clarity, Connects multiple page views by a user into a single Clarity session recording.
SRM_I
Collects user data is specifically adapted to the user or device. The user can also be followed outside of the loaded website, creating a picture of the visitor's behavior.
SM
Use to measure the use of the website for internal analytics
CLID
The cookie is set by embedded Microsoft Clarity scripts. The purpose of this cookie is for heatmap and session recording.
SRM_B
Collected user data is specifically adapted to the user or device. The user can also be followed outside of the loaded website, creating a picture of the visitor's behavior.
_gid
This cookie is installed by Google Analytics. The cookie is used to store information of how visitors use a website and helps in creating an analytics report of how the website is doing. The data collected includes the number of visitors, the source where they have come from, and the pages visited in an anonymous form.
_ga_#
Used by Google Analytics, to store and count pageviews.
_gat_#
Used by Google Analytics to collect data on the number of times a user has visited the website as well as dates for the first and most recent visit.
collect
Used to send data to Google Analytics about the visitor's device and behavior. Tracks the visitor across devices and marketing channels.
AEC
cookies ensure that requests within a browsing session are made by the user, and not by other sites.
G_ENABLED_IDPS
use the cookie when customers want to make a referral from their gmail contacts; it helps auth the gmail account.
test_cookie
This cookie is set by DoubleClick (which is owned by Google) to determine if the website visitor's browser supports cookies.
_we_us
this is used to send push notification using webengage.
WebKlipperAuth
used by webenage to track auth of webenagage.
ln_or
Linkedin sets this cookie to registers statistical data on users' behavior on the website for internal analytics.
JSESSIONID
Use to maintain an anonymous user session by the server.
li_rm
Used as part of the LinkedIn Remember Me feature and is set when a user clicks Remember Me on the device to make it easier for him or her to sign in to that device.
AnalyticsSyncHistory
Used to store information about the time a sync with the lms_analytics cookie took place for users in the Designated Countries.
lms_analytics
Used to store information about the time a sync with the AnalyticsSyncHistory cookie took place for users in the Designated Countries.
liap
Cookie used for Sign-in with Linkedin and/or to allow for the Linkedin follow feature.
visit
allow for the Linkedin follow feature.
li_at
often used to identify you, including your name, interests, and previous activity.
s_plt
Tracks the time that the previous page took to load
lang
Used to remember a user's language setting to ensure LinkedIn.com displays in the language selected by the user in their settings
s_tp
Tracks percent of page viewed
AMCV_14215E3D5995C57C0A495C55%40AdobeOrg
Indicates the start of a session for Adobe Experience Cloud
s_pltp
Provides page name value (URL) for use by Adobe Analytics
s_tslv
Used to retain and fetch time since last visit in Adobe Analytics
li_theme
Remembers a user's display preference/theme setting
li_theme_set
Remembers which users have updated their display / theme preferences
We do not use cookies of this type.
_gcl_au
Used by Google Adsense, to store and track conversions.
SID
Save certain preferences, for example the number of search results per page or activation of the SafeSearch Filter. Adjusts the ads that appear in Google Search.
SAPISID
Save certain preferences, for example the number of search results per page or activation of the SafeSearch Filter. Adjusts the ads that appear in Google Search.
__Secure-#
Save certain preferences, for example the number of search results per page or activation of the SafeSearch Filter. Adjusts the ads that appear in Google Search.
APISID
Save certain preferences, for example the number of search results per page or activation of the SafeSearch Filter. Adjusts the ads that appear in Google Search.
SSID
Save certain preferences, for example the number of search results per page or activation of the SafeSearch Filter. Adjusts the ads that appear in Google Search.
HSID
Save certain preferences, for example the number of search results per page or activation of the SafeSearch Filter. Adjusts the ads that appear in Google Search.
DV
These cookies are used for the purpose of targeted advertising.
NID
These cookies are used for the purpose of targeted advertising.
1P_JAR
These cookies are used to gather website statistics, and track conversion rates.
OTZ
Aggregate analysis of website visitors
_fbp
This cookie is set by Facebook to deliver advertisements when they are on Facebook or a digital platform powered by Facebook advertising after visiting this website.
fr
Contains a unique browser and user ID, used for targeted advertising.
bscookie
Used by LinkedIn to track the use of embedded services.
lidc
Used by LinkedIn for tracking the use of embedded services.
bcookie
Used by LinkedIn to track the use of embedded services.
aam_uuid
Use these cookies to assign a unique ID when users visit a website.
UserMatchHistory
These cookies are set by LinkedIn for advertising purposes, including: tracking visitors so that more relevant ads can be presented, allowing users to use the 'Apply with LinkedIn' or the 'Sign-in with LinkedIn' functions, collecting information about how visitors use the site, etc.
li_sugr
Used to make a probabilistic match of a user's identity outside the Designated Countries
MR
Used to collect information for analytics purposes.
ANONCHK
Used to store session ID for a users session to ensure that clicks from adverts on the Bing search engine are verified for reporting purposes and for personalisation
We do not use cookies of this type.
Cookie declaration last updated on 24/03/2023 by Analytics Vidhya.
Cookies are small text files that can be used by websites to make a user's experience more efficient. The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies, we need your permission. This site uses different types of cookies. Some cookies are placed by third-party services that appear on our pages. Learn more about who we are, how you can contact us, and how we process personal data in our Privacy Policy.