Tool Llms Txt
Generate, validate, and manage llms.txt files for AI agent compatibility. The llms.txt format is a proposed standard for providing machine-readable site instructions to AI agents.
What is llms.txt?
llms.txt is a markdown file at your site root (like robots.txt) that tells AI agents:
- What your site does
- Key pages and their purposes
- How to navigate
- What actions are allowed/forbidden
Learn more at llmstxt.org
Quick Start
# Generate llms.txt from site content
npx cbrowser llms-txt generate "https://example.com"
# Validate existing llms.txt
npx cbrowser llms-txt validate "https://example.com"
# Compare versions
npx cbrowser llms-txt diff "https://staging.example.com" "https://example.com"
MCP Tools
llms_txt_generate
Generate llms.txt from site content.
{
"tool": "llms_txt_generate",
"params": {
"url": "https://example.com"
}
}
llms_txt_validate
Validate existing llms.txt against format requirements.
{
"tool": "llms_txt_validate",
"params": {
"url": "https://example.com"
}
}
llms_txt_diff
Compare llms.txt between two URLs.
{
"tool": "llms_txt_diff",
"params": {
"url_a": "https://staging.example.com",
"url_b": "https://example.com"
}
}
Example llms.txt
# Example.com
> E-commerce platform for widgets
## Overview
Example.com is an online store selling widgets and accessories.
We offer free shipping on orders over $50.
## Key Pages
- /products - Browse all products
- /cart - Shopping cart
- /checkout - Complete purchase
- /account - User account management
- /support - Help and FAQ
## Navigation
Main navigation is at the top. Use search for products.
Categories: Electronics, Home, Garden, Sports
## Actions
### Allowed
- Browse products
- Add to cart
- Search catalog
- Read reviews
### Requires Authentication
- Checkout
- View order history
- Write reviews
- Manage account
### Forbidden
- Automated purchases without user consent
- Scraping product images
- Price manipulation
## Contact
- Support: [email protected]
- API: https://api.example.com/docs
Format Requirements
Required Sections
| Section | Description |
|---|---|
# Title |
H1 with site name |
> Tagline |
Blockquote with one-line description |
## Overview |
What the site does |
## Key Pages |
Important pages with URLs |
Optional Sections
| Section | Description |
|---|---|
## Navigation |
How to navigate |
## Actions |
What agents can/cannot do |
## Contact |
Contact information |
Validation Rules
The validator checks:
| Rule | Severity | Description |
|---|---|---|
| Has H1 title | Error | Must start with # Title |
| Has tagline | Error | Must have blockquote after title |
| Has Overview | Error | Must have ## Overview section |
| Has Key Pages | Warning | Should list important pages |
| URLs are valid | Warning | Check for broken links |
| Markdown is valid | Error | Proper markdown syntax |
| Size under 10KB | Warning | Keep concise for AI context |
CI/CD Integration
Add llms.txt validation to your pipeline:
# .github/workflows/llms-txt.yml
name: Validate llms.txt
on:
push:
paths:
- 'public/llms.txt'
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate llms.txt
run: |
npx cbrowser llms-txt validate "https://${{ vars.SITE_URL }}"
- name: Diff against production
if: github.ref != 'refs/heads/main'
run: |
npx cbrowser llms-txt diff \
"https://staging.${{ vars.SITE_URL }}" \
"https://${{ vars.SITE_URL }}"
Generate from Sitemap
If you have a sitemap, the generator uses it:
npx cbrowser llms-txt generate "https://example.com" --sitemap
This produces more comprehensive output by crawling sitemap.xml.
Output: Generate
{
"llmsTxt": "# Example.com\n\n> E-commerce for widgets\n\n## Overview\n...",
"stats": {
"pagesAnalyzed": 12,
"linksExtracted": 45,
"estimatedTokens": 850
}
}
Output: Validate
{
"valid": true,
"errors": [],
"warnings": [
{
"rule": "Size under 10KB",
"message": "File is 12KB, consider trimming"
}
],
"stats": {
"size": 12340,
"sections": 6,
"links": 15
}
}
Output: Diff
{
"identical": false,
"changes": [
{
"type": "added",
"section": "## Actions",
"content": "New actions section"
},
{
"type": "modified",
"section": "## Key Pages",
"before": "- /products",
"after": "- /products - Browse all products"
}
]
}
Related
- AI-Friendliness - AI-Friendliness overview
- Tool-Agent-Ready-Audit - Audit includes llms.txt check
- Tool-Remediation - Generate llms.txt as remediation
Copyright: (c) 2026 Alexa Eden.
License: MIT License