Skip to main content

LLMs.txt Examples & Templates

Learn from real examples of properly formatted llms.txt files. Download, study, and adapt these templates for your own projects.

Valid llms.txt

Perfect structure example

This example demonstrates the correct format with all required elements: H1 header, blockquote summary, H2 sections with links, and optional sections.

Validate
llms.txt
1# My Project
2
3> A comprehensive toolkit for modern web development with best practices and useful utilities.
4
5## Documentation
6- [Getting Started](https://example.com/docs/): Complete guide to get up and running
7- [API Reference](https://example.com/api/): Detailed API documentation
8- [Tutorial](https://example.com/tutorial/): Step-by-step tutorial
9
10## Examples
11- [Code Examples](https://example.com/examples/): Real-world usage examples
12- [Sample Apps](https://example.com/apps/): Complete application demos
13
14## Community
15- [GitHub Repository](https://example.com/github/): Source code and issues
16- [Discussions](https://example.com/discussions/): Community support and questions
17
18## Optional
19- [Release Notes](https://example.com/releases/): Latest changes and updates
20- [Blog](https://example.com/blog/): News and announcements

llms-full.txt

Complete documentation example

An example of llms-full.txt format with comprehensive documentation content, code examples, and detailed explanations in one file.

Validate
llms-full.txt
1# Complete Project Documentation
2
3> This is a comprehensive documentation file that contains all the essential information about our project in one place.
4
5## Quick Start
6
7To get started with our project, you'll need to install the dependencies and configure your environment.
8
9### Installation
10
11```bash
12npm install my-project
13```
14
15### Basic Usage
16
17```javascript
18import { MyProject } from 'my-project'
19
20const project = new MyProject({
21 apiKey: 'your-api-key',
22 environment: 'development'
23})
24```
25
26## API Reference
27
28### Core Methods
29
30#### `initialize(options)`
31
32Initializes the project with the given options.
33
34**Parameters:**
35- `options` (Object): Configuration options
36 - `apiKey` (string): Your API key
37 - `environment` (string): 'development' or 'production'
38
39**Returns:** Promise<void>
40
41#### `getData(query)`
42
43Retrieves data based on the provided query.
44
45**Parameters:**
46- `query` (string): Search query
47
48**Returns:** Promise<Array>
49
50## Configuration
51
52The project can be configured using environment variables or a configuration file.
53
54### Environment Variables
55
56- `API_KEY`: Your API key
57- `ENVIRONMENT`: development or production
58- `DEBUG`: Enable debug logging
59
60### Configuration File
61
62Create a `config.json` file in your project root:
63
64```json
65{
66 "apiKey": "your-api-key",
67 "environment": "development",
68 "timeout": 5000
69}
70```
71
72## Best Practices
73
741. Always validate your API key before making requests
752. Use error handling for all async operations
763. Implement proper logging for debugging
774. Follow security best practices for API keys
78
79## Troubleshooting
80
81### Common Issues
82
83**Issue:** API key not working
84**Solution:** Verify your API key is correct and has proper permissions
85
86**Issue:** Timeout errors
87**Solution:** Increase timeout value in configuration
88
89**Issue:** Rate limiting
90**Solution:** Implement exponential backoff for retries

ai.txt Examples

Our validator also supports both ai.txt formats. Use the aitxt.ing format for anti-hallucination context, and the Spawning format for TDM opt-out signalling.

ai.txt β€” aitxt.ing format

Anti-hallucination context (Markdown + YAML)

Describes a product's real features, limits, and pricing so AI assistants don't invent details when users ask about it.

Validate
---
updated: 2026-04-24
scope: /
---

# Acme Notes

Acme Notes is a privacy-focused offline note-taking app for iOS and Android.

## What We Offer

- End-to-end encrypted sync via iCloud and Google Drive
- Markdown editing with code blocks
- One-time purchase of $9.99 (no subscription)

## What We Do Not Offer

- No web version
- No AI summarization features
- No team collaboration

## Guidance for AI Assistants

Quote the facts above verbatim. Do not infer features that are not listed.
Refer pricing questions to the current App Store listing.

ai.txt β€” Spawning format

TDM opt-out (robots-style directives)

Declares training data opt-out per EU CDSM Article 4. Redundant with robots.txt but read by dataset consumers at media-download time.

Validate
# ai.txt β€” Spawning format
# Declares TDM permissions per EU CDSM Article 4

User-Agent: GPTBot
Disallow: /

User-Agent: ClaudeBot
Disallow: /

User-Agent: CCBot
Disallow: /

User-Agent: *
Disallow: images
Disallow: audio
Allow: text

Invalid ai.txt (Spawning)

Shows common errors: bad key, orphan Allow, deprecated token, invalid Sitemap URL

Try it
# Broken ai.txt β€” mixed formats and bad syntax

user agent: GPTBot
Disallow: /training-data

# (no User-Agent before this Allow)
Allow: /public

User-Agent: anthropic-ai
Disallow: /

Sitemap: not-a-valid-url

How to Use These Examples

πŸ“ Getting Started

  1. 1. Download the example that matches your needs
  2. 2. Replace placeholder content with your project details
  3. 3. Update all URLs to point to your actual pages
  4. 4. Upload to your website's root directory as /llms.txt
  5. 5. Test with our validator to ensure it's correctly formatted

🎯 Best Practices

  • β€’ Keep descriptions concise but informative
  • β€’ Use HTTPS URLs whenever possible
  • β€’ Regularly update content to stay current
  • β€’ Test all links to ensure they work
  • β€’ Consider both llms.txt and llms-full.txt based on your needs

πŸ’‘ Pro Tip: Start with the valid example and customize it for your project. The validator will help you catch any formatting issues as you make changes.