Saraswati Stitch needle-and-thread markSaraswati Stitch®
contact@saraswatistitch.comBook a call

Case study · in-house build

llms.txt generator

A free tool that reads a site and writes its llms.txt file, and still returns something useful when the AI step fails.

Client
In-house
First version
27 November 2026
AI step in testing
About 12s after the fix

The problem

An llms.txt file is a short map of a site written for AI tools. Writing one by hand means listing pages, grouping them and describing each.

Google says it does not need this file, so we treat the tool as a convenience for the other tools that read it.

What we built

  • The tool reads the home page and sitemap, takes up to 60 page addresses and asks a low-cost AI model to group them and write a short note for each.
  • If the model fails or runs out of room, it returns a plain list of pages and says that is what happened.

Stack

  • Next.js and TypeScript
  • Cheerio to read pages
  • A low-cost model through OpenRouter
  • Supabase for usage limits

Timeline

  • 27 November 2026. First version released.
  • 30 November 2026. Moved to the shared tool design.
  • 1 December 2026. Fixed the time-limit problem.

Results

  • The model had been spending 30 to 40 seconds reasoning before writing, and sometimes returned a file cut off part way.
  • Asking for low reasoning effort brought the AI step to about 12 seconds in our testing. This job is sorting, not problem solving.
  • The whole run now has a 45 second budget, inside the 60 second limit of the server route.

What we would do differently

  • Set a time budget on the first day. We had left room for a long answer and had not allowed for long reasoning before it.
  • Treat a cut-off answer as a failure and check for it, because a half file looks finished at a glance.

See it and read on

Book a free call