Point an agent at llms.txt
Feed the auto-generated llms.txt and per-page llms.mdx to an agent for context-frugal docs.
Point an agent at this site's auto-generated llms.txt, llms-full.txt, and
per-page llms.mdx instead of scraping rendered HTML — it reads clean Markdown
with no markup and no token waste, whether it grabs the whole corpus at once or
pulls just the page it needs.
Example
Fetch the index to discover structure, then pull a single page as Markdown:
# The curated index of every docs page, one line per page.
curl https://stitchapi.dev/llms.txt
# The clean Markdown form of one page — just this feature, into context.
curl https://stitchapi.dev/llms.mdx/docs/agents/run-stitch-tool/content.md
# When the agent needs everything at once, the whole docs concatenated.
curl https://stitchapi.dev/llms-full.txtEach page already stands on its own — restating its premise rather than leaning on neighbors — so the Markdown the agent pulls reads correctly in isolation. The stitch it documents is the same one-source-of-truth definition the runtime uses.
Default: load the whole corpus
The simplest workflow is also the cheapest correct one: fetch /llms-full.txt
once and drop the entire docs into context. The whole corpus fits inside a
modern large-context model — Claude's 200k window, for instance — so there is
nothing to gain from retrieval: no search index to build, no vector store to
host, no embeddings to keep in sync. The agent reads exactly the Markdown a
human does, generated from the same source, so it never drifts.
Reach for the frugal path — the per-page llms.mdx above, or a dedicated
docs-search tool — only when one of two things becomes true: the corpus
outgrows the model's context window, or loading it on every turn costs more
than a targeted lookup is worth. Until then, llms-full.txt wholesale is the
default.
Options
The site emits three machine-readable outputs automatically; you never hand-author them.
/llms.txt opens with a curated StitchAPI header — the one-line premise, the
signals an agent needs, and a runnable quickstart — and then the curated index,
one line per page, title plus description, so an agent grasps what StitchAPI is
before it maps the docs structure or pulls anything.
A page's llms.mdx variant is the same page as clean Markdown, with rendered
chrome stripped. Because guides are fine-grained — one page per feature — an
agent pulls exactly one feature's page into context (say, just
run_stitch) rather than the whole manual. That
fine-grained, self-contained-pages design is what makes each llms.mdx a
focused, extractable unit.
/llms-full.txt is every page concatenated, for when an agent genuinely needs
the entire corpus in one fetch.
These are generated from the page content itself, so they never drift from what a human reads — the same anti-drift, one-source-of-truth principle the stitch enforces at runtime.
See also
How the rule saves tokens
The stitch init rule is the cheapest layer of the agent stack — a ~300-token file the agent reads when it's relevant, in place of loading the whole docs corpus or exploring your repo to rediscover the pattern every session.
Search the docs over MCP
Connect an agent to the hosted docs MCP — search_docs finds the relevant sections, get_doc reads a full page — for context-frugal retrieval when loading the whole corpus is more than you need.