Skip to content

Agent Documentation Access Fresh

The X Developer Platform exposes several machine-readable documentation formats. This workflow helps you choose the right one for an agent based on how much context it needs and whether it can call tools.

The decision flow

flowchart TD
    Start[Agent needs X API knowledge] --> Q1{Can the agent call MCP tools?}
    Q1 -->|Yes| MCP[Use the Docs MCP
search_x + get_page_x] Q1 -->|No| Q2{How much context is needed?} Q2 -->|A specific page| MD[Fetch the page with the .md suffix] Q2 -->|A map of the docs| LLMS[Fetch llms.txt] Q2 -->|Everything, deep reasoning| FULL[Fetch llms-full.txt] Q2 -->|What actions are possible| SKILL[Fetch skill.md] Start -.->|First, always| AGENTS[Read AGENTS.md for guidance]

The formats at a glance

FormatWhat it gives youWhen to reach for it
AGENTS.mdExplicit instructions on how to use the docsStart here - orient the agent
llms.txtCurated index of pages with titles and descriptionsDiscover what exists, then drill in
llms-full.txtThe entire docs as one Markdown fileMaximum context for deep reasoning
.md suffixClean Markdown for any single pageTargeted lookups (append .md to a URL)
skill.mdCapability summary - actions, inputs, constraintsAction-oriented, reliable tool use
Docs MCPLive search_x and get_page_xTool-using agents that look things up on demand

Practical recipes

Fetch the index, then a page

bash
# 1. Discover available pages
curl https://docs.x.com/llms.txt

# 2. Fetch any individual page as clean Markdown
curl https://docs.x.com/tools/llms-txt.md

Load everything for deep reasoning

bash
curl https://docs.x.com/llms-full.txt

Capability summary for an agent

bash
curl https://docs.x.com/skill.md

Agents can also discover skill files programmatically:

bash
# Discovery endpoint (agent-skills 0.2.0 spec)
curl https://docs.x.com/.well-known/agent-skills/index.json

# Original discovery format
curl https://docs.x.com/.well-known/skills/index.json

Or add X API capabilities to any agent that supports the skills CLI:

bash
npx skills add https://docs.x.com

Guidance baked into AGENTS.md

The platform's AGENTS.md recommends a clear order of preference:

  1. Start with the root llms.txt to discover relevant pages.
  2. Fetch individual pages via the .md suffix for clean Markdown.
  3. Load llms-full.txt for deep context across the whole platform.
  4. Load skill.md for structured capabilities (what actions are possible).
  5. Use the MCP server for live tool calling against the X API.
  6. When writing code, prefer the official Python or TypeScript SDKs.

It also lists explicit do nots: don't rely on HTML when clean Markdown exists, don't assume deprecated v1.1 endpoints are primary, don't ignore rate limits or auth context, and don't generate code that violates the Developer Agreement or Display Requirements.

See also