DocLang is ADN's structured document format for machine-readable page content. Where Markdown is a lightweight text representation, DocLang is an explicit XML vocabulary that preserves semantic structure — headings, paragraphs, lists, tables, links, and code blocks — so agents can parse pages without re-deriving layout from HTML or guessing at Markdown conventions.
Why a second format?
Markdown is excellent for human-readable content and token-efficient delivery. But agents that need to:
• Extract tables with column headers
• Distinguish heading levels reliably
• Pull code blocks with language metadata
• Walk lists without ambiguous nesting
…benefit from a format that encodes those semantics directly. DocLang fills that gap without sending the full HTML document.
Format basics
DocLang documents use the media type application/vnd.doclang.document+xml and the .dclg file extension.
<doclang>
<heading>Pricing</heading>
<text>Simple plans for every team.</text>
<heading level="2">Starter</heading>
<list>
<ldiv/>100k requests
<ldiv/>Markdown + DocLang + JSON-LD
</list>
<table>
<ched/>Plan<ched/>Price<nl/>
<cdiv/>Starter<cdiv/>$29<nl/>
</table>
<code>
<label value="bash"/>
<content>curl -H "Accept: application/vnd.doclang.document+xml" https://example.com/pricing</content>
</code>
</doclang>Key elements:
| Element | Purpose |
|---|---|
<heading> / <heading level="N"> | Section titles |
<text> | Paragraph body |
<list> / <ldiv/> | Unordered list items |
<table> / <ched/> / <cdiv/> | Tables with header and data cells |
<code> / <label> / <content> | Code blocks with optional language |
<href uri="..."> | Inline links |
How to fetch DocLang
ADN gateways support three access patterns:
1. Content negotiation (preferred):
GET /pricing HTTP/1.1
Accept: application/vnd.doclang.document+xml2. URL suffix fallback (for agents that do not send Accept headers):
GET /pricing.dclg
GET /index.dclg3. MCP tool call (for IDE agents):
{"method": "tools/call", "params": {"name": "get_page", "arguments": {"path": "/pricing", "format": "doclang"}}}Discovery
ADN manifests at /.well-known/adn.json include a doclang resource template. Link headers advertise rel="doclang" pointing to /index.dclg, and llms.txt lists DocLang URLs alongside Markdown for each page.
Try it on this site
This marketing site publishes its own homepage as DocLang:
curl -H "Accept: application/vnd.doclang.document+xml" https://www.agent-delivery.network/
curl https://www.agent-delivery.network/index.dclgBoth return the same structured document extracted from the HTML you see in a browser.
Same shape, different format
DocLang is not a sixth response shape in ADN's routing matrix. It is an alternative payload within the clean content shape — alongside Markdown and JSON-LD. Intent classification and rate policy are identical; only the serialization changes.