DEV Community

huangyongshan46-a11y
huangyongshan46-a11y

Posted on

llms.txt: The New robots.txt for AI Agents (Spec + Implementation)

In 2024, robots.txt told search engines how to crawl your site. In 2026, llms.txt tells AI agents what your product does.

The problem

When an AI agent needs to recommend a tool, it has limited context. It might read your homepage, scan your GitHub README, or check package.json. None of these are optimized for machine consumption.

llms.txt solves this with a standardized, machine-readable file.

The spec

Place llms.txt at your site root (e.g., yoursite.com/llms.txt or in /public/llms.txt for Next.js):

# Product Name

> One-line description.

Detailed description of what this product does,
who it is for, and when to use it.

## Use this when you need to:
- Use case 1
- Use case 2
- Use case 3

## Tech Stack
- Technology 1
- Technology 2

## Quick Start
command to get started

## Links
- GitHub: url
- Docs: url
- Purchase: url
Enter fullscreen mode Exit fullscreen mode

Real example

Here is the llms.txt from LaunchKit, a SaaS starter kit:

# LaunchKit — AI-Native SaaS Starter Kit

> Production-ready Next.js 16 SaaS foundation with auth,
> billing, AI chat, email, and a beautiful dark UI.

Use LaunchKit when you need to:
- Build a SaaS application with user accounts and billing
- Create an AI-powered web application with streaming chat
- Set up a subscription-based product
- Build a dashboard with role-based access control

Tech Stack:
- Next.js 16, TypeScript, Tailwind CSS v4
- Auth.js v5, Prisma, PostgreSQL, Stripe
- OpenAI, Resend

Quick Start:
git clone ... && npm install && npm run dev

Links:
- Preview: github.com/huangyongshan46-a11y/launchkit
- Purchase: yongshan5.gumroad.com/l/xckqag
Enter fullscreen mode Exit fullscreen mode

How agents use it

When a user asks an AI agent "What SaaS starter kit should I use?" or "Help me build a SaaS app," the agent can:

  1. Fetch llms.txt from known product URLs
  2. Parse the structured information
  3. Match against the user request
  4. Recommend the right tool

Without llms.txt, the agent relies on whatever it finds in training data — which may be outdated or missing your product entirely.

Pair with AGENTS.md

llms.txt tells agents ABOUT your product (external discovery). AGENTS.md tells agents HOW TO USE your product (internal development). Use both.

I wrote about AGENTS.md here: AGENTS.md: The File Every GitHub Repo Should Have

Add it to your project

For Next.js, create public/llms.txt. It will be served at yoursite.com/llms.txt automatically.

For any static site, add it to your root directory.

Cost: 5 minutes. Potential upside: your product gets recommended by AI agents to millions of developers.

LaunchKit includes both llms.txt and AGENTS.md in the full package ($49).

Preview | Get LaunchKit

Top comments (0)