All articles
AI Trends/December 3, 2026

How do agents use documentation, and how can we help them?

10 minutes read

M

Mintlify

mintlify.com

ORL

Ora Research Lab

ora.ai

Share this article


How do agents use documentation, and how can we help them?

AI agents now account for more than 80% of documentation-site traffic on Mintlify, and they read the web live to answer users (Ora). When a developer asks an agent how to use your product, the answer is built from what the agent finds on your docs, and limited by what it fails to find.

Together with the Ora research lab, we set out to learn what makes documentation work for agents. We traced 11,000+ agent journeys: coding tools and consumer agents answering 400+ real questions and tasks on 20+ documentation sites across several docs platforms.

We recorded the full trajectory of every journey: each search, page request and tool call, what came back, and the agent's reasoning between steps. We then analyzed how agents behaved along the way: where they looked first, which paths they took, where they got stuck and how they recovered. We graded every final answer against the documentation. Finally, we tested what we learned by running the same tasks before and after sites applied the practices. This builds on our earlier 2,400-run docs URL benchmark, which showed that one link to llms.txt removes most agent 404s.

Where the docs are built for agents, agents do better: on Mintlify sites they reached the right page more often, solved more multi-step tasks and finished faster than on other platforms. Below are thirteen practices behind those results, in four areas, each backed by our experiments.

On Mintlify sites, agents find the right page more often and finish multi-step tasks fasterMintlify sites vs sites on other docs platforms · same agents, tasks matched in difficultyRuns that reached the right page: 71% on Mintlify sites, 64% on other platforms. Multi-step tasks answered fully correctly: 78% on Mintlify sites, 69% on other platforms. Time to finish a multi-step task: 82 seconds on Mintlify sites, 112 seconds on other platforms.
Mintlify sitesOther platforms
Runs that reached the right page+12%
Mintlify
71%
other
64%
Multi-step tasks answered fully correctly+13%
Mintlify
78%
other
69%
Time to finish a multi-step task−27%
Mintlify
82 s
other
112 s
Thirteen practices in four areas help agents find and read the right contentThe headline result in each area · 11,000+ agent journeys on 20+ documentation sitesThe headline result in each of the four areas. Information patterns (practices 01–03): agents missed the key fact 8.5× as often when an information pattern hid it. Index files (practices 04–07): 95% of runs reached a page once they saw its index entry. Dead ends (practices 08–09): a guessed URL hit a missing page 7× as often as a followed link. Markdown (practices 10–13): agents that read a .md page found 15% more of the pages a task needed, 85% against 74%. Based on 11,000+ agent journeys on 20+ documentation sites.
Information patterns8.5×more missed facts when an information pattern hides themPractices 01–03
Index files95%of runs reach a page once they see its index entryPractices 04–07
Dead ends7×more dead ends when an agent guesses a URL than when it follows a linkPractices 08–09
Markdown+15%more of the needed pages found when the agent reads a .md page (85% vs 74%)Practices 10–13

Avoid the information patterns that hide the key fact

Agents rarely read a whole documentation site. They open a page, and if it looks like it answers the question, they stop.

That works when the page is complete. It fails when a key fact, such as an exception or a limit, lives somewhere else or appears with two different values.

We found three such patterns on real docs and paired each case with a similar fact the same site documents clearly. Agents missed the key fact 8.5× as often when a pattern hid it, and every agent we tested was affected.

01 · Don't leave the exception on another page

The rule is on one page and the case that changes it is somewhere else, so the page looks complete and the agent stops. State the exception at the step it changes, and link to the details. In our experiments, 27.5% of runs missed the fact, against 0% when it was documented clearly.

02 · Don't let two pages disagree

Guide, reference and changelog give different values for the same thing, and the agent can't tell which is current. Keep one value per fact, and update every page when it changes. In our runs, 22% missed the right value, against 3%.

03 · Don't leave a limit only in the API reference

The guide gives some limits, and the one that matters is only in the generated reference. State it in the guide, or say that more limits exist and link straight to them. In our runs, 16% missed the limit, against 2%.

Agents miss the key fact 8.5× as often when a pattern hides itShare of runs that missed the key factShare of runs that missed the key fact when a pattern hid it, against a similar fact the same site documents clearly: the exception lives on another page, 27.5% against 0%; two pages disagree, 22.2% against 2.8%; the limit lives only in the API reference, 15.9% against 2.3%.
Hidden by the patternDocumented clearly
The exception lives on another page
0%
27.5%
Two pages disagree
2.8%
22.2%
The limit lives only in the API reference
2.3%
15.9%

Make sure the right llms.txt entry reaches the agent

An index file such as llms.txt is a short, described list of your pages. An agent that opens it chooses its next page from the entries it can see, so an entry only works if it reaches the agent.

An entry gets lost when the agent's tool cuts a long file short before it, or when it sits in a secondary index the agent never opens. A docs team controls both.

In our experiments, 23% of agent journeys requested an index file. On Mintlify sites, which generate llms.txt automatically, it was 28% of runs, against 15% on other platforms. Runs that saw a page's entry in the index reached that page 95% of the time. When the entry never reached the agent, only about half did.

04 · Publish an llms.txt index, and put the most-asked pages at the top

Agents that read llms.txt found 83% of the pages a task needed, against 78%. They read the root file from the top, so link the pages users ask about most right there, ahead of the long tail. On the sites we tested, the pages agents went looking for fit in about 2 KB of index lines. Put instructions for agents at the top too. In the indexes we examined, the instruction to follow secondary indexes sat at the very end, past the point where agent tools cut the file.

Agents reach a page when its llms.txt entry reaches themShare of runs that reached the pageShare of runs that reached a page: 95% when the agent saw the page's entry in the index, 54% when the index was cut short before the entry, and 58% when the entry sat in a secondary index the agent never opened.
Saw the page's entry
95%
Index cut short before it
54%
Secondary index never opened
58%

05 · Don't make agents read one huge file

Agent tools return only the first part of a long file. The same 40,517-character index came back whole in some agent tools and cut at 14k to 32k characters in others, and runs whose entry was cut off reached the page 54% of the time. A single file holding a site's full documentation ran to 1.6 million characters, and no agent tool returned more than 3% of it. Split long files into smaller ones, don't send agents to a full-docs file from an error page, and fetch each file the way an agent does to check where it ends.

A long file reaches the agent only in partShare of the file's characters that agent tools returnedShare of a file's characters that agent tools returned. For a 40,517-character index, the most a tool returned was the whole file (100%) and the least was 14,321 characters (35%). For a 1.6-million-character file holding a site's full documentation, no tool returned more than 3%.
Most a tool returnedLeast a tool returned
A 40,517-character index
most
100%
least
35%
A 1.6-million-character file holding the full documentation
most
3%

06 · Say what is inside each secondary index

A generic label gives an agent no reason to open the file behind it. Once secondary index labels listed their sections, as Mintlify's now do, agents opened them 2–3× as often. Runs that never opened one reached the page 58% of the time.

Once secondary index labels listed what is inside, agents opened them 2–3× as oftenShare of runs that opened a secondary index · before vs afterShare of runs that opened a secondary index, before and after its label listed the sections inside: a consumer agent went from 11% to 26% (2.3×) and a coding agent from 6% to 19% (3.1×). By site, runs opened a secondary index 1.4× as often on site A, 3.6× on site B and 3.8× on site C. On a control site where nothing changed, the share went from 26.1% to 22.0%.
By agent
Consumer agent11%Coding agent6%
26%2.3×19%3.1×
BeforeAfter
By site · times as often
Site A
1.4×
Site B
3.6×
Site C
3.8×
Control siteNo change applied

07 · Write labels with the words users search for

Agents search an index before they read it, so an entry is found by its words. One coding agent ran a keyword search in 69% of its first index reads. Use your users' terms in link labels and descriptions. After secondary index labels listed their sections, the link showed up in that agent's searches far more often, and it reached the right page through a secondary index 2–7× as often.

Once labels carried the words agents search for, a coding agent found the link and reached the right pageThree sites whose labels changed · before vs afterOn three sites whose secondary index labels changed, the share of a coding agent's keyword searches of the index that showed the link went from 4% to 81% on site A (19×), from 11% to 34% on site B (3.3×) and from 0% to 56% on site C. Runs that reached the right page through a secondary index became 2.1× as common on site A (24% to 52%), 2.9× on site B (15% to 44%) and 7.2× on site C (6% to 44%).
Index searches that showed the link
Site A4%Site B11%Site C0%
81%19×34%3.3×56%From 0
BeforeAfter
Runs that reached the right page · times as often
Site A
2.1×
Site B
2.9×
Site C
7.2×

Remove dead ends, and redirect the URLs agents guess

Agents reach a page in three ways. Most of the time they follow a link from something they already fetched. They also open URLs returned by web search, which can point to pages that have since moved or been removed. And they build URLs from memory of how documentation sites are usually laid out.

Links mostly work and guesses often don't. An agent that hits a dead end does not stop: it retries, searches elsewhere and answers anyway, at a higher cost.

Our experiments show that a guessed URL hits a missing page 7× as often as a followed link, and that guesses cause 78% of the 404s agents run into. Journeys that hit one used 1.4× the tool calls and cost about a quarter more.

08 · Redirect the URLs agents guess

Agents guess the same things on site after site. In our experiments, a third of failed guesses were for a common topic such as quickstart, authentication or rate limits at a path that didn't exist, or for a standard file such as /openapi.json or /sitemap-index.xml. Serve those at the paths agents expect, or redirect them. Your 404 logs show the rest, and a redirect turns each into a hit.

Guessed URLs hit a missing page 7× as often as followed linksHow often a request hits a missing pageHow often a request hit a missing page: 1 in 8 guessed URLs (327 of 2,769, 11.8%), 1 in 60 followed links (56 of 3,330, 1.7%) and 1 in 175 URLs from search results (14 of 2,444, 0.6%).
Guessed URLs
1 in 8
Followed links
1 in 60
URLs from search results
1 in 175

09 · Suggest pages in the 404 response

Keep the 404 status, and list the closest pages in the response body, as Mintlify's 404 page does. In our experiments the right page was on that list in 61% of dead ends. Agents that saw the list lost no accuracy. Agents that did not fell from 91% to 81% correct.

A third of failed guesses are for the same topics and files on site after siteFailed URL guesses on 8 documentation sitesFailed URL guesses on 8 documentation sites: 18% were for a common topic at a path that doesn't exist, 15% for a standard file, and 67% for everything else. Common topics: quickstart 16 failed guesses, authentication 10, rate limits 9, errors 5, pagination 3. Standard files: /openapi.json 11, /search 7, /sitemap-index.xml 6, the site config file 5, an llms.txt inside a section 5.
33%repeat
  • Common topics18%
  • Standard files15%
  • Everything else67%
Common topics at a path that doesn't exist
quickstart
16
authentication
10
rate limits
9
errors
5
pagination
3
Standard files agents expect on every docs site
/openapi.json
11
/search
7
/sitemap-index.xml
6
site config file
5
llms.txt inside a section
5

Serve complete markdown at the URLs agents request

Once an agent reaches a page, it has to pull the answer out of whatever the server returns. An HTML page wraps its content in navigation, scripts and styling. Markdown carries only the content, so agents ask for it when they can.

The HTML page has to hold the answer first. A markdown version then helps only if it carries everything the HTML page does, and if its links lead on to more markdown.

In our experiments, 35% of agent journeys requested a page's .md URL. On Mintlify sites, where every page has a markdown version by default, agents requested markdown in 42% of runs, against 28% on other platforms. Agents that read a markdown page found more of the pages a task needed.

Stronger models use these resources more. On the same tasks, Claude Code requested a .md page in 89% of runs with Opus 5.5, against 18% with Sonnet 5, and read llms.txt in 80%, against 11%.

Stronger models ask for markdown far more oftenShare of runs that requested a .md page · by agentShare of runs that requested a .md page, on an older and a newer model: Claude Code went from 18% with Sonnet 5 to 89% with Opus 5.5 (+71 points), the Claude consumer app from 3% to 69% (+66 points), and the ChatGPT consumer app from 46% with GPT-5.6 Terra to 54% with GPT-5.6 Sol (+8 points).
Sonnet 5 · GPT-5.6 TerraOpus 5.5 · GPT-5.6 Sol
Claude Code18%Claude consumer3%ChatGPT consumer46%
89%+71 pts69%+66 pts54%+8 pts
Older modelNewer model

10 · Publish a .md version of every page

Give every page a markdown twin at a predictable URL, such as the page URL with .md added. Agents that read a .md page found 85% of the pages a task needed, against 74%.

Agents that read a .md page found more of the pages a task neededCoding agents · multi-step tasks · Mintlify sitesCoding agents on multi-step tasks on Mintlify sites found 85% of the pages a task needed when they read a .md page, against 74% when they did not.
Read a .md page85%of needed pages found
Did not74%of needed pages found

An agent that lands on a markdown page should be able to stay on markdown. After links inside .md pages pointed to .md, the share of page requests that asked for a .md URL rose from 57% to 62% for one coding agent, and from 17% to 26% for one consumer agent.

After links in markdown pointed to markdown, agents asked for .md pages more oftenShare of page fetches that asked for a .md URLShare of page fetches that asked for a .md URL, before and after links inside .md pages pointed to .md: a coding agent went from 57% to 62% (+10%), and to 78% on a newer model; a consumer agent went from 17% to 26% (+54%), and to 35% on a newer model.
BeforeAfterNewer model
+10%
57%
62%
78%
A coding agent
+54%
17%
26%
35%
A consumer agent

12 · Render every component into the markdown

Tabs, accordions and cards often drop out of the markdown version, and take their content and links with them. Render them in full, as Mintlify now does by default.

13 · Point to the markdown and the index at the top of every page

An agent that fetches the HTML page should learn right away that a markdown version and an index exist. Mintlify now puts a short comment at the top of each page naming its .md URL and /llms.txt. After that, one coding agent went from its first HTML page straight to the markdown or the index in 99% of runs, up from 62%.

<head>
  <!-- AI agents: this page is available as Markdown at /guides/quickstart.md.
       Request it directly or send "Accept: text/markdown". The site index is at
       /llms.txt. -->
  <title>Quickstart</title>
  …
</head>
Once pages pointed to the markdown and the index, a coding agent went straight to themThe agent's next fetch after its first HTML page · share of runsA coding agent's next fetch after its first HTML page, before and after pages pointed to their markdown and the index: llms.txt went from 48% to 72% of runs (+50%), the page's .md from 13% to 26% (+100%), and either one from 62% to 99% (+61%).
BeforeAfter
+50%
48%
72%
Next fetch is llms.txt
+100%
13%
26%
Next fetch is the page's .md
+61%
62%
99%
Either one

Docs that fit how agents work get better answers

Across more than 11,000 journeys, the agents that answered best were the ones given documentation that fit how they work: a complete markdown version of each page, an index whose entries reach them, redirects for the URLs agents guess, and pages that carry the exception or the limit where the agent will read it. When those held, agents found the right page more often and missed fewer facts. When they didn't, the agent still answered, from a page that looked complete, from a guess, or from somewhere else entirely.

None of the thirteen practices requires new infrastructure. Most are checks a documentation team can run this week: fetch your own index the way an agent does, read your 404 logs, and look for the facts that live only on another page. Agent Score runs the technical checks for you. Running the same tasks before and after showed that these changes move agent behavior within weeks of shipping. Documentation platforms can carry much of this by default, and the platform comparison shows what that is worth. The rest is editorial work that only the people who write the docs can do.

Further reading

Mintlify

Ora

  • Ora research: the research program behind this work
  • AgentReady: the open standard for agent readiness, with Mintlify and Ora among its collaborators