Skip to main content
Nile Markets publishes machine-readable documentation indexes following the llms.txt specification. AI agents and LLM applications use these files to discover and consume protocol documentation without manual curation.

Endpoints

URLContentSize
docs.nilemarkets.com/llms.txtPage index with titles and descriptionsCompact
docs.nilemarkets.com/llms-full.txtFull rendered content of every pageLarge
Both files are also served at the well-known paths:
  • docs.nilemarkets.com/.well-known/llms.txt
  • docs.nilemarkets.com/.well-known/llms-full.txt

How It Works

Mintlify auto-generates both files from page frontmatter. Every MDX page with a title and description in its YAML frontmatter is included automatically.
---
title: "Margin Requirements"
description: "Initial margin = notional / leverage; maintenance = initial × 80%. Positions below maintenance margin trigger liquidation."
---
The description field becomes the page summary in llms.txt. This is why every page description in the Nile Markets docs is a self-contained sentence describing the key concept or formula — not a generic “Learn about X” placeholder.

Auto-Discovery

Mintlify adds an HTTP Link header to every page response:
Link: </llms.txt>; rel="llms-txt"
LLM clients that support the llms-txt link relation can discover the index automatically from any page on the docs site.

Feeding Docs to an Agent

Full Context Loading

For agents with large context windows, load the complete documentation:
curl -s https://docs.nilemarkets.com/llms-full.txt
This returns the rendered Markdown content of every page — protocol mechanics, parameter tables, integration guides, and API references — in a single request.

Selective Loading

For smaller context budgets, start with the index and fetch individual pages:
# Get the page index with descriptions
curl -s https://docs.nilemarkets.com/llms.txt

# Fetch a specific page as Markdown
curl -s https://docs.nilemarkets.com/protocol/margin-requirements.md

Markdown Export

Any page URL on the docs site supports Markdown export via two methods:
  • File extension: append .md to the URL path (e.g., docs.nilemarkets.com/protocol/pnl.md)
  • Accept header: request with Accept: text/markdown
# Using file extension
curl -s https://docs.nilemarkets.com/protocol/oracle-pricing.md

# Using Accept header
curl -s -H "Accept: text/markdown" https://docs.nilemarkets.com/protocol/oracle-pricing
Both methods return the page content as clean Markdown, stripped of HTML components and navigation chrome.

Page Description Best Practices

The llms.txt index is only as useful as the page descriptions. Nile Markets docs follow these conventions:

Good Descriptions

Self-contained sentences that include the key formula, parameter, or concept.
  • “PnL = notional x (currentPrice - entryStrike) / PRICE_PRECISION for LONG; losses capped at locked margin”
  • “Initial margin = notional / leverage; maintenance = initial x 80%”
  • “Connect AI agents directly to the Nile Markets subgraph via The Graph’s hosted MCP server”

Avoid

Generic placeholders that don’t help an LLM decide whether to read the page.
  • “How profit and loss is calculated”
  • “Learn about margin requirements”
  • “Overview of the MCP integration”
When an LLM sees the index, a good description provides enough context to decide whether the page contains relevant information — without needing to fetch the full content.

Architecture

Mintlify build

    ├── reads frontmatter from every .mdx page

    ├── generates llms.txt (titles + descriptions)

    ├── generates llms-full.txt (full rendered content)

    ├── serves at /llms.txt and /.well-known/llms.txt

    └── adds Link: </llms.txt>; rel="llms-txt" header
Zero maintenance required. When you add, edit, or remove a docs page, the llms.txt files update automatically on the next deploy.