Skip to content

docs(ai): improve agent-facing llms.txt and Markdown exports - #551

Merged
pedromcunha-uneven merged 3 commits into
mainfrom
pedro/agent-facing-llms-txt
Nov 6, 2026
Merged

pedromcunha-uneven merged 3 commits into
mainfrom
pedro/agent-facing-llms-txt

Conversation

@pedromcunha-uneven

@pedromcunha-uneven pedromcunha-uneven commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Agents ranking cross-chain services (see the 100-agent experiment in #data-general) mostly describe Relay as a fast, cheap EVM bridge, with no mention of security or agent tooling. Mintlify generates llms.txt from docs.json and page frontmatter, and several of those inputs are empty:

  • docs.json has no description, so llms.txt has no summary line.
  • docs.json has no markdown.instructions, so there's no Agent Instructions block.
  • Contract Audits, Support and Community Support are listed with no description, and the empty Core, Utilities and Advanced nav stubs appear as entries.
  • The docs mention only the Mintlify docs MCP, not @relayprotocol/relay-mcp, the MCP server agents use to get quotes.

This PR doesn't add a custom llms.txt. Mintlify still generates it.

Changes / decisions to review

  • docs.json description: the approved introduction from CLAUDE.md §1.2, verbatim. It becomes the summary line of llms.txt.
  • docs.json markdown.instructions: two lines, one pointing agents to the Relay MCP server and one to the protocol security and transaction screening pages. Mintlify adds this block to llms.txt, llms-full.txt, and every page's Markdown export, so it's kept short.
  • Descriptions added to the three redirect pages, using wording that matches each target page. Contract Audits' url now points straight to /references/protocol/security, so it no longer goes through a redirect.
  • noindex: true on the empty Core, Utilities and Advanced stubs, which removes them from llms.txt and the sitemap. They still create the sidebar group headers.
  • Integrating using AI: new "Relay MCP Server" section. The existing docs MCP sections are renamed "Docs MCP Server" so the two servers aren't confused. The page description is unchanged.
  • Merge only after @relayprotocol/relay-mcp 0.4.0 is on npm (in progress, chore: bump server.json to 0.4.0 relay-mcp#12). The new section and the agent instruction describe 0.4.0's tools, and npx still installs 0.1.1. The version isn't pinned, so the docs won't break when later releases ship.

Not in this PR

  • Supported Chains. The chain table renders client-side, so the page's Markdown export (and llms-full.txt) shows empty "Mainnets" and "Testnets" headings, and agents never see Bitcoin, Solana, Tron or TON. This needs a fix that keeps the table dynamic for users and generates the list for LLMs, so it goes in its own PR.
  • Both Zellic audit links on the protocol security page return 404. That fix goes in a separate PR.
  • mint validate fails on main with an existing <StatusWebsockets> error in calling-integration-guide.mdx, which this PR doesn't touch.

Verification

  • mint dev: the .md export for Integrating using AI includes the Agent Instructions block and the new MCP section.
  • llms.txt on the Mintlify preview deployment shows the summary, the Agent Instructions block and the new descriptions, and no longer lists the empty stubs.

Add a site description and agent instructions, describe pages that were
listed without one, drop empty nav stubs from the index, list Relay's
non-EVM chains on Supported Chains, and document the Relay MCP server.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1b1ba-012a-756d-8c12-aa51ef7e17f0
Co-authored-by: Amp <amp@ampcode.com>
@mintlify

mintlify Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
unevenlabs 🟢 Ready View Preview Nov 6, 2026, 8:00 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @pedromcunha-uneven's task in 41s —— View job


Code review: PR #551

  • Gather context (diff, AGENTS.md rules)
  • Review changes
  • Post findings

I found no correctness bugs in the diff. Every link target exists: references/protocol/security.mdx, security/transaction-screening.mdx, and /references/api/api-keys. The docs.json description matches the approved introduction in AGENTS.md §1.2 word for word. noindex only touches the three empty nav stubs. There is one issue to fix before merging and two small nits.

1. The new docs describe MCP tools that npm doesn't ship yet (fix before merge)

resources/developing-with-ai.mdx:9-25 and docs.json:8

The new section says the server can "estimate fees", "check chain health" and track transactions, and it names get_transaction_history. Those are 0.4.0 tools. As the PR body says, npx -y @relayprotocol/relay-mcp currently installs 0.1.1.

The first markdown.instructions line is added to llms.txt, llms-full.txt and every page's .md export. So if this merges before relayprotocol/relay-mcp#12 is published, every agent reading the docs is sent to a server that lacks the tools the docs describe. That is exactly the kind of wrong signal this PR is trying to remove.

Options:

  • Hold the merge until 0.4.0 is on npm.
  • Or pin @relayprotocol/relay-mcp@^0.4.0 in both the JSON config and the instruction line. npx will then fail loudly instead of silently running an older server.
  • Or limit the description to what 0.1.1 can do until the release lands.

Fix this →

2. Nit: Contract Audits points at a redirect

security/contract-audits.mdx:4

url: "/references/protocol/audits" only works through the redirect at docs.json:522, which sends it to /references/protocol/security. Since this PR already edits that frontmatter, pointing url straight at /references/protocol/security removes a hop. Agents following llms.txt would then land on the real page and not on a path that only exists as a redirect.

3. Nit: calling Hyperliquid "non-EVM" is only half right

references/api/api_resources/supported-chains.mdx:10

Relay supports both HyperCore and HyperEVM (hypevm), so the sentence "non-EVM chains, including … Hyperliquid" is only partly accurate. Consider "Hyperliquid (HyperCore)", or listing it apart from the non-EVM chains. The two new descriptions on the Supported Chains pages use the same chain list, so update them too if you change the wording.

Looks good

  • The <Visibility for="agents"> note on Supported Chains is a sensible fix for the table that only renders in the browser, and it keeps the human page unchanged.
  • Renaming the existing sections to "Docs MCP Server" and the Claude Code line to "Relay docs MCP server" makes the two servers easy to tell apart.
  • The three instruction lines are short, which matters because Mintlify repeats them on every page export.
  • The new descriptions follow §2.1: one sentence, starting with a verb.

I didn't run mint validate. The PR notes it already fails on main because of an unrelated <StatusWebsockets> error.

@greptile-apps

greptile-apps Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with a non-blocking gap in the Supported Chains Markdown.

Findings

  1. P2 Chain exports lose useful content ▶

Summary

Adds a site introduction, shared agent instructions, and Relay MCP setup guidance.

  • Markdown exports now tell agents how to find Relay tools and safety guidance.
  • The AI guide explains Relay tools separately from documentation search.
  • Directory entries explain their destinations, while empty API stubs leave generated listings.

Reviews (3) · Last reviewed commit: "docs(ai): drop Supported Chains changes ..." · Reviewed by Greptile

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @pedromcunha-uneven's task in 26s —— View job


Re-review after b2b2d2c

  • Read the diff against origin/main
  • Check the earlier findings against the new commit
  • Post the review

Fixed in this commit:

  • Contract Audits now points straight at /references/protocol/security, so readers no longer go through a redirect.
  • Hyperliquid is now called "Hyperliquid (HyperCore)" in the Supported Chains body text.

Still open: the new docs describe Relay MCP tools that the npm package doesn't have yet. This should be settled before merging.

  • Where: resources/developing-with-ai.mdx:11,25 and docs.json:8.
  • What the docs claim: the section says the server can "estimate fees", "check chain health" and use get_transaction_history. Those tools only exist in 0.4.0.
  • What users get: npx -y @relayprotocol/relay-mcp installs 0.1.1 until chore: bump server.json to 0.4.0 relay-mcp#12 is published.
  • Why it matters: the markdown.instructions line is added to llms.txt, llms-full.txt and every page's .md export. If this merges before 0.4.0 is out, every agent reading the docs gets sent to a server without the tools the docs describe.
  • Ways to fix it:
    • Hold the merge until 0.4.0 is on npm.
    • Or pin @relayprotocol/relay-mcp@^0.4.0 in both places once 0.4.0 is published.
    • Or cut the description down to what 0.1.1 can do.

Fix this →

Small, optional:

  • Wording mismatch: the two Supported Chains description fields (references/api/api_resources/supported-chains.mdx:3 and resources/supported-chains.mdx:3) still say plain "Hyperliquid", while the body text now says "Hyperliquid (HyperCore)". That's fine for a summary line; matching them is optional.
  • Paragraph order: supported-chains.mdx:8-10 reads "Relay is currently supported on the following chains…" and is then followed by the EVM/non-EVM sentence. Putting the new sentence first would read more naturally.

Checked and fine:

  • Link targets: references/protocol/security.mdx and security/transaction-screening.mdx both exist.
  • noindex: it is only on the three empty nav stubs, which AGENTS.md §1.1 says to treat as nav-only.
  • Agents-only chain note: supported-chains.mdx is the first page in the repo to use <Visibility for="agents">. The PR body says mint dev hides it from the rendered HTML; confirm the same on the preview deployment.

I didn't run mint validate. The PR says it already fails on main because of an unrelated <StatusWebsockets> error.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @pedromcunha-uneven's task in 32s —— View job


Re-review after ad70c42

  • Read the diff against the PR base (a636507)
  • Check the earlier findings against the new commit
  • Check that link targets exist
  • Post the review

What changed: ad70c42 removes all the Supported Chains edits and puts back the original description on the Integrating using AI page. This PR now only changes docs.json (description and markdown.instructions), adds noindex to the three nav stubs, adds descriptions to the Support, Community Support and Contract Audits redirect pages, and adds the new Relay MCP Server section.

1. The docs still describe Relay MCP tools that npm doesn't ship yet (fix before merge)

resources/developing-with-ai.mdx:10,25 and docs.json:8

  • The section says the server can "estimate fees" and "check chain health", and it names get_transaction_history. These tools only exist in 0.4.0.
  • npx -y @relayprotocol/relay-mcp installs 0.1.1 until chore: bump server.json to 0.4.0 relay-mcp#12 is published.
  • The markdown.instructions line is added to llms.txt, llms-full.txt and every page's .md export. Merging early would send every agent that reads the docs to the old 0.1.1 server.
  • Fix one of these ways: wait for 0.4.0, pin @relayprotocol/relay-mcp@^0.4.0 in both places, or cut the description down to what 0.1.1 can do.

Fix this →

2. The PR description no longer matches the diff

These parts of the description describe changes that ad70c42 removed:

  • "Supported Chains: one visible sentence… plus an agents-only note"
  • "The page description now names MCP"
  • The verification notes about the Supported Chains .md export and the 57-row table

The problem the description starts with is also still open. Supported Chains renders its table client-side, so its .md export still has empty "Mainnets" and "Testnets" headings. Agents still won't see Bitcoin, Solana, Tron and the other non-EVM chains from that page. The new instruction line only partly covers this: it points agents to the MCP server for chain lookups, not to GET /chains.

Please update the description so reviewers know the Supported Chains fix is deferred, and say where it will land.

3. Nit: the Integrating using AI entry in llms.txt won't mention MCP

resources/developing-with-ai.mdx:3 is back to "Use AI coding assistants to build with Relay faster". Its llms.txt line won't mention the MCP server, though the markdown.instructions block makes up for most of that. This is fine if it was deliberate.

Checked and fine

  • description matches the approved introduction in AGENTS.md §1.2 word for word.
  • Link targets:
    • references/protocol/security.mdx exists and has an ## Audits section, so the Contract Audits description is accurate.
    • security/transaction-screening.mdx and references/api/api-keys.mdx both exist.
  • Contract Audits now points straight at /references/protocol/security, with no redirect hop.
  • noindex is only on the three empty nav stubs, which AGENTS.md §1.1 says are for navigation only.
  • Naming: "Docs MCP Server" and "Relay docs MCP server" keep the two servers clearly apart. snippets/BuildWithAI.mdx already says "Relay docs MCP server", so the wording matches.
  • Descriptions: the new ones follow §2.1: one sentence, starting with a verb.

I didn't run mint validate, which the PR says already fails on main because of an unrelated <StatusWebsockets> error. I also didn't check that Mintlify accepts the markdown.instructions key; confirm it on the preview's llms.txt.

Comment thread docs.json
"markdown": {
"instructions": [
"To quote bridges and swaps, look up chains and tokens, or track Relay transactions from an agent, use the Relay MCP server: `npx -y @relayprotocol/relay-mcp`. It is read-only and does not sign or broadcast transactions. Setup: https://docs.relay.link/resources/developing-with-ai.md",
"For Relay Protocol's trust model, security architecture, and audits, see https://docs.relay.link/references/protocol/security.md. For address screening, see https://docs.relay.link/security/transaction-screening.md."

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Chain exports lose useful content

The latest changes remove the plain-text chain names and agents-only API links from Supported Chains, along with the global GET /chains instruction here. Chains returns nothing outside the browser, so agents reading that page's Markdown again get empty Mainnets and Testnets sections. The remaining instruction points them to a local MCP server instead of the live list.

Restore the page's chain summary and live API links. They do not need to appear on every page.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@pedromcunha-uneven
pedromcunha-uneven merged commit bdae84d into main Nov 6, 2026
10 checks passed
@pedromcunha-uneven
pedromcunha-uneven deleted the pedro/agent-facing-llms-txt branch November 6, 2026 20:23

This branch was successfully deployed

1 active deployment
staging — ad70c429 Deployed Nov 6, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants