Documentation Index
Fetch the complete documentation index at: https://motherfuckingsideproject.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
How It Works
Understand AgentXP’s detection and transformation pipeline.AgentXP runs entirely in Next.js middleware. It intercepts every incoming request, checks whether it comes from an AI agent, and either passes it through unchanged or transforms the response to markdown before returning it.
Request flow
Agent detection
AgentXP uses two detection signals:Accept: text/markdownheader — Any agent that explicitly requests markdown is identified with full confidence. This is the definitive signal.- User-Agent pattern matching — AgentXP matches the User-Agent string against 20 known AI crawlers, including GPTBot, ClaudeBot, ChatGPT-User, PerplexityBot, Anthropic, Cohere, Google-Extended, Meta-ExternalAgent, and others.
Accept: text/markdown are 100%.
For the full list of recognized agents, see Supported agents.
Transformation pipeline
When AgentXP identifies an agent, it fetches your page’s HTML from the origin and runs it through a four-stage pipeline:Hidden content expansion
Accordions, tabs, carousels, modals, and tooltips are expanded so the agent sees all content on the page — not just what is visible in the default collapsed state.
Content extraction
Navigation, headers, footers, sidebars, ads, cookie banners, chat widgets, and scripts are stripped using Readability. Only the main content remains.
HTML-to-markdown conversion
The extracted content is converted to clean markdown using Turndown. Headings, lists, links, code blocks, and tables are preserved in their natural structure.
text/markdown response with headers that report the token estimate, your content permissions, and the detected agent name. See Response headers for details.
Special endpoints
AgentXP serves two endpoints automatically — no additional configuration required:| Endpoint | Purpose |
|---|---|
/llms.txt | Site index for AI agents, following the llmstxt.org specification |
/.well-known/agent-experience.json | Machine-readable capabilities manifest listing your site’s AgentXP features and permissions |
/llms.txt with a page list via the llmsTxt configuration option. See llms.txt configuration.
What stays unchanged
- Regular browsers receive normal HTML responses — AgentXP never touches them
- No changes to your build configuration or output
- No performance impact on human page loads
- Your existing middleware, if any, continues to work alongside AgentXP