Pular para o conteúdo
editaliza
A plataformaComo funcionaPara sua equipeConteúdos
EntrarComeçar
A plataformaComo funcionaPara sua equipeConteúdosEntrar na Editaliza ↗
Introduction
QuickstartEnvironment SetupRunning LocallyFirst Deploy
Meet LiaQuickstart with LiaMCP ServersRules and instructionsCommands and workflowsUsing llms.txt
Code Agents

Using llms.txt

Learn how the llms.txt standard helps AI agents discover and understand your documentation structure for better results.

By the end of this guide, you'll understand how the llms.txt standard works and how the SaaS Boilerplate can expose documentation to compatible AI agents.

What is llms.txt?

The llms.txt standard is a simple convention that helps Large Language Models (LLMs) and AI agents better understand and navigate documentation websites. It's essentially a plain text file that provides a structured overview of your documentation, making it easier for AI tools to:

  • Discover content: Quickly find relevant documentation pages
  • Understand structure: See how your docs are organized
  • Get context: Access high-level information about your project
  • Navigate efficiently: Jump to specific sections without crawling the entire site

This standard was popularized by libraries like Next.js and has become a common practice across the developer ecosystem.

How llms.txt Works

The llms.txt file is typically placed at the root of your website (e.g., yoursite.com/llms.txt) and follows a simple format:

# Project Name

Brief description of what this project does.

## Getting Started

- [Quick Start Guide](link-to-quickstart)
- [Installation](link-to-installation)
- [Configuration](link-to-config)

## Core Concepts

- [Architecture Overview](link-to-architecture)
- [API Reference](link-to-api)
- [Best Practices](link-to-best-practices)

## Advanced Topics

- [Performance Tuning](link-to-performance)
- [Troubleshooting](link-to-troubleshooting)
- [Contributing](link-to-contributing)

This structured format allows AI agents to quickly understand your project's scope and find the information they need.

SaaS Boilerplate Implementation

The SaaS Boilerplate comes with llms.txt support built-in, making all your content (documentation, blog posts, help center, and updates) easily accessible to AI agents.

Automatic Content Exposure

Your SaaS Boilerplate automatically exposes content through API routes configured in next.config.ts:

// next.config.ts - Automatic llms.txt routing
async rewrites() {
  return [
    {
      source: '/docs/:path*.mdx',
      destination: '/api/content/docs/llms.mdx/:path*',
    },
    {
      source: '/blog/:path*.mdx',
      destination: '/api/content/blog/llms.mdx/:path*',
    },
    {
      source: '/help/:path*.mdx',
      destination: '/api/content/help/llms.mdx/:path*',
    },
    {
      source: '/updates/:path*.mdx',
      destination: '/api/content/updates/llms.mdx/:path*',
    },
  ]
}

This means any AI agent can access your content at URLs like:

  • yoursite.com/docs/getting-started/quickstart/llms.mdx
  • yoursite.com/blog/announcements/llms.mdx
  • yoursite.com/help/faq/llms.mdx

Content API Structure

The content is served through API routes in src/app/(api)/api/content/ that automatically convert your MDX files into LLM-friendly formats. This includes:

  • Documentation: All technical docs and guides
  • Blog posts: Announcements, tutorials, and updates
  • Help center: FAQs, troubleshooting, and support content
  • Release notes: Version updates and changelogs

Code Agents and llms.txt

Code Agents such as Lia can optionally leverage llms.txt files for additional context. The file is supplemental: current project behavior still comes from the repository and the canonical .fractal/ records.

Built-in Training vs. Dynamic Context

  • Agent context: A provider may have specialized knowledge of Igniter.js patterns, multi-tenancy, and SaaS Boilerplate architecture
  • Dynamic Context: The agent can use llms.txt to access the latest documentation, blog posts, and project updates
  • Hybrid Approach: Best results come from combining the provider's capabilities with fresh content via llms.txt

Practical Usage

When working with Lia, you can reference llms.txt content for:

  • Latest API changes or deprecations
  • New feature announcements
  • Updated best practices
  • Recent troubleshooting guides

Popular llms.txt Resources

Many popular libraries and frameworks provide llms.txt files for their documentation. Here's a curated list of useful resources:

Library/Frameworkllms.txt URLDescription
Next.jsnextjs.org/docs/llms.txtReact framework documentation
Better Authbetter-auth.com/docs/llms.txtAuthentication library docs
Zodzod.dev/llms.txtTypeScript schema validation
Prismaprisma.io/docs/llms.txtDatabase ORM documentation
Fumadocsfumadocs.dev/llms.txtDocumentation framework
SaaS Boilerplatedemo.saas-boilerplate.com/llms.txtLive demo of this implementation

Implementing llms.txt in Your Project

If you're extending the SaaS Boilerplate or building your own implementation:

Basic Setup

  1. Create the file: Add public/llms.txt to your project
  2. Structure content: Organize with clear sections and links
  3. Keep updated: Regularly refresh with new content
  4. Test access: Ensure the file is publicly accessible

Best Practices

Commands and workflows

Turn Fractal workflows into native Code Agent entry points.

On this page

What is llms.txt?How llms.txt WorksSaaS Boilerplate ImplementationAutomatic Content ExposureContent API StructureCode Agents and llms.txtBuilt-in Training vs. Dynamic ContextPractical UsagePopular llms.txt ResourcesImplementing llms.txt in Your ProjectBasic SetupBest Practices
BlogCentral de ajudaContatoPrivacidadeTermos de uso

© 2026 Editaliza · Contexto. Evidência. Decisão.