Skip to content
Margin

Agents and discovery

Read documentation through Markdown, LLM indexes, MCP, and skills.

Agents can discover and read the same published content as a browser. Public machine-readable routes select the same content version as human pages; preview responses are uncached and excluded from indexing.

Reading surfaces

RouteUse
/llms.txtCompact index of documentation links.
/llms-full.txtFull-document corpus within the configured serving budget.
/sitemap.mdMarkdown navigation index.
/<page>.mdMarkdown representation of a page.
/<page>.pdfDownloadable PDF of a page.
/AGENTS.mdSite-level agent instructions.
/skill.mdSite-level documentation skill.
/changes.mdContent change summary.
/.well-known/llms-manifest.jsonMachine-readable corpus manifest.

The root page’s alternate representations use /index.md and /index.pdf. Follow the site’s Link headers and manifest instead of guessing page URLs. Hidden navigation entries are not private; the site’s indexing rules decide which public pages appear in indexes.

MCP

Connect an MCP client to /api/mcp using Streamable HTTP. The public server supports documentation search and reads. Discovery is available at /.well-known/mcp.json and /api/mcp/server-card. Sites with OpenAPI documents also expose /.well-known/api-catalog.

Skills

Admitted skill folders contain a SKILL.md and supporting files. The framework exposes a manifest at /.well-known/agent-skills/index.json and skill files under /.well-known/agent-skills/. Follow manifest links for exact names and paths. These are published content, not server-side plugins.

Content policy

Use x-margin.agents in docs.json to express content signals and customize agent output:

{
  "x-margin": {
    "agents": {
      "contentSignals": { "search": true, "aiInput": true, "aiTrain": false },
      "indexPreamble": true,
      "mcpInstructions": "Use documentation search before answering API questions."
    }
  }
}

Content signals advertise preferences; they do not enforce access control or prevent a client from copying public content. Agent-specific blocks can be authored with the built-in Agent and Human MDX components. Custom executable components remain subject to the MDX validation and isolate contract.

Link relations defines the URI fragments for LLM indexes, MCP cards, and skills. DOCS_LINK_RELATION_BASE changes the relation URI base at deployment time; it does not move the routes.