Appearance
AGENTS.md Fresh
AGENTS.md (also available as AGENT.md) provides explicit guidance for AI agents, coding assistants, and LLM-based tools interacting with the X Developer Platform documentation. It is the recommended starting point for any agent.
Preferred documentation access methods
Always prefer these methods for the most accurate, up-to-date, and agent-friendly content:
- llms.txt (recommended starting point) - a small, curated root index linking to section-specific indexes:
x-api/llms.txt(X API v2 - 370+ pages)enterprise-api/llms.txtx-ads-api/llms.txtxdks/llms.txt(Python + TypeScript XDKs)
- llms-full.txt - complete documentation as a single Markdown file for maximum context.
- Raw Markdown for any page - append
.mdto any documentation URL. Every page supports this; use it instead of the HTML view when possible. - MCP Server - the full MCP server exposing 200+ X API endpoints plus documentation search.
- skill.md - a structured description of every action an agent can perform (agentskills.io format).
Site structure and navigation
- X API v2 (
/x-api/...): Posts, Users, Direct Messages, Lists, Spaces, Media, Streams (filtered + volume), Compliance, Webhooks, Account Activity, Trends, News, Usage, Connections. - Enterprise APIs (
/enterprise-api/...): Account Activity (webhooks), X Activity (XAA), GNIP/PowerTrack historical and real-time, Compliance. - Ads API (
/x-ads-api/...): Campaign Management, Creatives, Audiences, Analytics, Measurement, Catalog. - SDKs (XDKs) (
/xdks/python/...and/xdks/typescript/...): official client libraries with full type coverage, pagination, and streaming helpers. - Fundamentals: Authentication, rate limits, data dictionary, expansions, fields, pagination, versioning, consistency.
- AI & Agent Tools (
/tools/ai,/tools/llms-txt,/tools/skill-md,/tools/mcp).
Important technical notes for agents
- Authentication: OAuth 1.0a (user context), OAuth 2.0 (user context with PKCE, plus app-only Bearer), and Basic Auth for some enterprise endpoints.
- Rate Limits: most endpoints have both app-level and user-level limits.
- Data Model: use the official data dictionary, fields, expansions, and metrics. Posts, Users, and Spaces are the core objects.
- Real-time Data: Filtered Stream, Volume Streams, Account Activity webhooks, and X Activity (XAA) are the primary real-time mechanisms.
- Compliance & Safety: always respect developer terms, display requirements, and restricted use cases.
How to use the documentation effectively
flowchart TD
A[Start: read AGENTS.md] --> B[Discover pages via llms.txt]
B --> C[Fetch pages via .md suffix]
C --> D{Need deep context?}
D -->|Yes| E[Load llms-full.txt]
D -->|Actions?| F[Load skill.md]
E --> G[Use MCP for live calls]
F --> G
G --> H[Write code with the official XDKs]Do not
- Rely solely on the HTML-rendered pages when a clean Markdown alternative exists.
- Assume deprecated v1.1 endpoints are still primary (focus on v2 and Enterprise equivalents).
- Ignore rate limits, authentication context (app-only vs user context), or pagination requirements.
- Generate code that violates the X Developer Agreement or Display Requirements.