How to Make Your API Agent-Discoverable with llms.txt
Описание и применение
API с llms.txt, agents.json и openapi.json автоматически обнаруживаются агентами, платят через HTTP 402, и SDK генерирует все необходимые файлы.
Задача
AI agents skip APIs that lack machine-readable manifests, preventing discovery and monetization.
Результат
Two agents discovered the API, made payments totaling $0.125, and the SDK automatically generated all required discovery files.
Рабочий процесс
- Create llms.txt with service, authentication, and payment details
- Create agents.json with Schema.org Service and Offer data
- Create openapi.json with x‑402 pricing extensions
- Deploy API with x‑402 middleware (e.g., nano‑empire‑tollbooth)
- Publish the three files at the domain root
- Agents crawl the files, discover the API, and pay via HTTP 402
- Agents retry with signed receipt and receive 200 OK
Доказательства
Result: 2 agents found us organically, paid $0.125 total.
The SDK generates all three discovery files automatically.
- Дата записи: 2026-09-09T02:01:53.216Z