Appearance
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
| Format | What it gives you | When to reach for it |
|---|---|---|
AGENTS.md | Explicit instructions on how to use the docs | Start here - orient the agent |
llms.txt | Curated index of pages with titles and descriptions | Discover what exists, then drill in |
llms-full.txt | The entire docs as one Markdown file | Maximum context for deep reasoning |
.md suffix | Clean Markdown for any single page | Targeted lookups (append .md to a URL) |
skill.md | Capability summary - actions, inputs, constraints | Action-oriented, reliable tool use |
| Docs MCP | Live search_x and get_page_x | Tool-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.mdLoad everything for deep reasoning
bash
curl https://docs.x.com/llms-full.txtCapability summary for an agent
bash
curl https://docs.x.com/skill.mdAgents 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.jsonOr add X API capabilities to any agent that supports the skills CLI:
bash
npx skills add https://docs.x.comGuidance baked into AGENTS.md
The platform's AGENTS.md recommends a clear order of preference:
- Start with the root
llms.txtto discover relevant pages. - Fetch individual pages via the
.mdsuffix for clean Markdown. - Load
llms-full.txtfor deep context across the whole platform. - Load
skill.mdfor structured capabilities (what actions are possible). - Use the MCP server for live tool calling against the X API.
- 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.