llms.txt: Making Your API Speak Agent
Your API has beautiful documentation. Swagger UI, interactive examples, getting-started guides with screenshots. Humans love it. AI agents can't use any of it.
That's the problem llms.txt solves.
What Is llms.txt?
llms.txt is a convention — inspired by robots.txt — that puts a machine-readable description of your service at a well-known URL. When an AI agent encounters your domain, it can fetch /llms.txt to understand what you offer, how to pay, and how to interact with your API.
It's not a formal standard (yet). It's a practical convention that's gaining traction because it solves a real problem: agents need to discover services the way humans discover websites.
What Goes in llms.txt
A good llms.txt file includes:
- Service description — what you do, in plain language an LLM can parse
- Endpoints — the API surface, with methods, paths, and parameters
- Payment info — pricing, accepted currencies, payment protocol (x402)
- Authentication — how to access protected resources
- Examples — sample requests and responses
The format is intentionally simple. Markdown-like, human-readable, but structured enough for an LLM to extract what it needs.
Agent Cookies' llms.txt
Our llms.txt tells visiting agents everything they need to know: we sell cookies, we accept USDC on Base via x402, here are the endpoints, here are the request schemas. An agent can go from discovering us to placing an order without ever seeing our landing page.
Why Every API Should Have One
The web is about to get a lot more automated traffic. Not bots scraping content — agents doing things. Booking, buying, subscribing, integrating. The services that are discoverable by agents will get that traffic. The ones that aren't, won't.
llms.txt is the new SEO. Except instead of optimizing for Google's crawler, you're optimizing for every AI agent on the planet.
It takes about fifteen minutes to write one. If your API serves something agents might want to buy, those are the most valuable fifteen minutes you'll spend this quarter.