{"slug": "how-i-made-mezo-s-documentation-agent-ready", "title": "How I Made Mezo's Documentation Agent-Ready", "summary": "A Mezo community member raised the blockchain network's documentation from an AFDocs score of 41 out of 100 (an F) to agent-readiness by opening an issue per problem and fixing them in eight pull requests, including PR #349, which generates a Markdown version of every live documentation page and strips MDX component syntax into plain text. The effort followed Fern's November 10, 2026 report finding 52% of documentation traffic now comes from agents, up from 14% in January, and targeted the Mezo Buildathon, which ran in two waves from October 16 to November 15, 2026. The October 10, 2026 AFDocs assessment had scored only two of seven categories: authentication and access at 100/100 and content discoverability at 0/100, with the remaining five marked not applicable for lack of agent-facing content.", "body_md": "# Case Study: How I Made Mezo's Documentation Agent-Ready\n\nby [Abdulganiy Adeleke](https://0xdezman.cv/), published on Nov 16, 2026\n\n## On this page\n\n[Mezo](https://mezo.org/) is a blockchain network that enables developers to build decentralized applications for the Bitcoin community.\n\nAs a member of the Mezo community, I noticed they were preparing to host a hackathon, the Mezo Buildathon. The event ran in two waves, each lasting about two weeks, from October 16 to November 15, 2026.\n\nRecently, I have focused on agent-ready documentation. I saw the Buildathon as an opportunity to put my learning into practice.\n\n## The Problem\n\nCoding agents now read documentation on behalf of developers. They rely on it to understand products and complete development tasks, and they are becoming its primary consumers. [Fern published a report](https://buildwithfern.com/post/state-of-docs) on November 10, 2026 that found 52% of documentation traffic comes from agents, up from 14% in January.\n\nDeveloper experience now depends on how well agents navigate documentation.\n\nAI agents read documentation differently from people. They need an index file (`llms.txt`) that tells them where each page lives, and a clean Markdown version of each page.\n\nMezo's documentation lacked the structure agents need to navigate and consume its content.\n\nWhen agents cannot navigate documentation, they miss information or give wrong answers. Developers who rely on those answers lose trust, and the developer experience suffers.\n\nOn October 10, 2026, I assessed Mezo's documentation using [AFDocs](https://afdocs.dev/). AFDocs is a specification for evaluating how well documentation supports AI agents. Mezo's documentation scored 41 out of 100, an F.\n\nOnly two of seven categories could be scored.\n\n- Authentication and access (100/100).\n- Content discoverability (0/100).\n\nAuthentication and access scored 100 because the documentation already supported standard HTTP behavior. Content discoverability scored 0 because there was no agent-facing content. The check marked the following five categories as Not Applicable (N/A) for the same reason.\n\n- Markdown availability.\n- Page size and truncation risk.\n- Content structure.\n- URL stability and redirects.\n- Observability and content health.\n\n## Solution\n\nI opened an issue for each problem and fixed them in eight pull requests.\n\nMy first change was to the internal documentation, a README for the repository owner. The file listed many pages that did not exist. I fixed the links so every listed page opens ([PR #345](https://github.com/mezo-org/documentation/pull/345)).\n\nThe second change kept the README out of the files agents read, such as `llms.txt` and the Markdown pages ([PR #352](https://github.com/mezo-org/documentation/pull/352)).\n\nOne PR ([PR #349](https://github.com/mezo-org/documentation/pull/349)) covers Markdown availability, structure, size, and URL stability. The four checks examine whether the Markdown files exist and whether their properties are correct.\n\nThe other PRs ensure that agents can discover and consume those files. The build automatically regenerates everything I created whenever the site changes, so nothing has to be updated by hand.\n\n### Markdown availability\n\nMarkdown is easier for AI agents to read than HTML pages. I wrote a script that creates a Markdown version of each live documentation page ([PR #349](https://github.com/mezo-org/documentation/pull/349)).\n\n### Content structure\n\nThe same script keeps headings and code blocks intact on every Markdown page. Usually, React components in MDX source become visual elements when the documentation is built.\n\nSince the agent-facing Markdown depends on the same MDX source, the script strips the component syntax and turns its content into plain text. This prevents agents from receiving the raw components as code.\n\nI also made tabbed content write out one tab after another, each with its label. This ensures one tab's content is never mistaken for another's ([PR #349](https://github.com/mezo-org/documentation/pull/349)).\n\nThe script also wrote links to other pages as short paths, such as `/docs/users/borrow`.\n\nThose links only work while the reader is on `mezo.org`. Once you copy the Markdown locally, the path points to the wrong place. I changed the script to write every link as a full web address and fixed nine links that led to missing pages (404).\n\nThe link check `markdown-link-portability`, which failed before, now passes ([PR #362](https://github.com/mezo-org/documentation/pull/362)).\n\n### Page size\n\nI kept each Markdown page under 50,000 characters without cutting its content. This ensures an agent never has to open two pages to get one piece of information ([PR #349](https://github.com/mezo-org/documentation/pull/349)).\n\n### URL stability and redirects\n\nThis category checks that web addresses respond correctly. That includes a correct error response for bad addresses and a working redirect. Creating the Markdown pages gave agents working links to follow, so that work also covered this category ([PR #349](https://github.com/mezo-org/documentation/pull/349)).\n\n### Content discoverability\n\nAgents cannot use Markdown pages they do not know exist.\n\n- I generated `llms.txt` , an index agents can follow, and`llms-full.txt` , the full text of every page. Each entry links to a page's Markdown version ([PR #354](https://github.com/mezo-org/documentation/pull/354) ).\n- I added descriptions to 8 pages that had none. Agents use the descriptions to understand what each page covers, and the descriptions feed the `llms.txt` entries ([PR #347](https://github.com/mezo-org/documentation/pull/347) ).\n- I added a directive to the HTML pages ([PR #357](https://github.com/mezo-org/documentation/pull/357) ). A directive is a short instruction in the HTML source that points agents to`llms.txt` . I later noticed it was missing from the Markdown pages, so I added it there too ([PR #360](https://github.com/mezo-org/documentation/pull/360) ).\n\n### Observability and content health\n\nI created a script that generates `llms.txt` from the same Markdown files, so the index and the pages remain in sync ([PR #354](https://github.com/mezo-org/documentation/pull/354)).\n\n## Outcome\n\nAfter the fixes, the score went from 41/100 (F) to 100/100 (A+). Every category now scores 100.\n\n| AFDocs score before and after the fixes |  |  | \n|---|---|---|\n| Category | Before | After | \n|---|---|---|\n| Overall | 41 (F) | 100 (A+) | \n| Markdown availability | N/A | 100 | \n| Page size and truncation risk | N/A | 100 | \n| Content structure | N/A | 100 | \n| URL stability and redirects | N/A | 100 | \n| Content discoverability | 0 | 100 | \n| Observability and content health | N/A | 100 | \n| Authentication and access | 100 | 100 | \n\nN/A means the check had nothing to test.\n\nAgents now get the Markdown version and the `llms.txt` map they need.\n\n## Verify it yourself\n\nYou need Node.js to run this command. It queries Mezo's live docs and prints the current AFDocs scorecard.\n\n```\nnpx afdocs check https://mezo.org/docs/developers --format scorecard\n```\n\nThe output is a scorecard like the screenshots above, with one line for each category and an overall score.\n\nNote. My runs were on October 10, 2026 and November 12, 2026. Mezo's docs may have changed since.\n\n## What I learned\n\nThis contribution taught me two lessons about `llms.txt` directive placement:\n\n- Place the `llms.txt` directive in the HTML pages and in each`.md` file.\n- Do not hide the directive with `aria-hidden` .\n\nI initially followed the implementation used in the Claude Code documentation. It hides the HTML `llms.txt` directive with two accessibility tools. `sr-only` hides text visually but keeps it in the page. `aria-hidden` removes it from the accessibility tree, so extraction tools skip it.\n\nThe Markdown conversion script also adds the directive to the top of each `.md` file.\n\nThe reviewer raised a concern about `mozilla/readability`, a library that extracts the main text from a page. He said this extraction method, which agents can use, removes hidden content. He added that the official Model Context Protocol (MCP) server uses this mode by default.\n\nI set out to verify the claim. I asked my agent to read the Claude Code docs three ways. One route applied readability extraction to the HTML, one went through the MCP server, and one opened the `.md` file directly.\n\nThe agent did not see the directive through readability extraction. It saw the directive through the MCP server and in the `.md` file.\n\nThis is because the MCP server calls the `fetch` tool before `readability`. That tool can negotiate content, which means it asks for Markdown instead of HTML and receives a Markdown file when the server has one. If it gets the Markdown, it skips the extraction step. The directive sits in the first lines of that Markdown, so the agent finds `llms.txt`.\n\nWhen the server does not negotiate Markdown and returns HTML instead, the agent extracts the text from the HTML. If that HTML lacks the `llms.txt` directive, the agent cannot find `llms.txt`, even when the `.md` file has it.\n\nI removed the `aria-hidden` attribute from the Mezo HTML files and ran the same check. Here is what I found.\n\nFor Mezo, the agent saw the directive through all three methods.\n\nThe Claude Code result reveals that its implementation did not work for agents that use readability extraction.\n\nTo check your own docs, replace `<DOCS_URL>` with your own docs URL, then give this prompt to an agent.\n\n```\nTest whether an agent can see the llms.txt directive at <DOCS_URL>.\n\nUse these three surfaces.\n\n1. HTML extracted with Mozilla Readability.\n2. The MCP server configured in your environment.\n3. The .md file.\n\nFor each page and surface, check whether the extracted text contains a directive to llms.txt.\n\nOutput one table.\n\n| Surface | Directive visible |\n| --- | --- |\n| HTML via Readability | Yes or No |\n| MCP server | Yes or No |\n| .md file | Yes or No |\n\nBelow the table, print the directive text for each passing surface. State the pages tested and the date. Print a separate table for each site.\n```\n\nThis was my experience contributing to the Mezo documentation. All credit to William Pyke, who reviewed my contributions.\n\n## Want results like this?\n\nI write developer documentation that serves both human developers and AI agents.\n\nLet's talk about your docs.", "url": "https://wpnews.pro/news/how-i-made-mezo-s-documentation-agent-ready", "canonical_source": "https://0xdezman.cv/blog/how-i-made-mezo-documentation-agent-ready/", "published_at": "2026-11-26 18:45:14+00:00", "updated_at": "2026-11-26 19:13:07.581760+00:00", "lang": "en", "topics": ["agent-protocols", "ai-agents", "ai-crawlers", "developer-tools"], "entities": ["Mezo", "Abdulganiy Adeleke", "AFDocs", "Fern", "Mezo Buildathon"], "also_reported_by": [], "takeaway": "Generate a Markdown mirror of each documentation page from the same MDX source, strip component syntax to plain text, and label each tab so agents never receive raw components or misattribute tab content.", "recommendation": {"advice": "Publish an llms.txt index plus a build-generated Markdown version of every docs page, stripping MDX components to plain text and labeling tabs, then verify with AFDocs before shipping.", "playbook": "agent-architecture", "playbook_url": "https://wpnews.pro/playbooks/agent-architecture"}, "alternates": {"html": "https://wpnews.pro/news/how-i-made-mezo-s-documentation-agent-ready", "markdown": "https://wpnews.pro/news/how-i-made-mezo-s-documentation-agent-ready.md", "text": "https://wpnews.pro/news/how-i-made-mezo-s-documentation-agent-ready.txt", "jsonld": "https://wpnews.pro/news/how-i-made-mezo-s-documentation-agent-ready.jsonld"}}