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.
Quick Start
Install AgentXP and serve your first markdown response in minutes.
Add middleware
Create That’s all you need for a working installation. AgentXP detects AI agents and serves markdown automatically from this point forward.Already have middleware? If you use Clerk, next-intl, or any other middleware, pass it as the second argument:AgentXP runs first. If the request is from an AI agent, it handles the response. Otherwise, it passes the request to your existing middleware unchanged.
middleware.ts in your project root (next to package.json). If your project uses a src/ directory, create src/middleware.ts instead.middleware.ts
middleware.ts
Add the AgentExperience component (optional)
Add the The component renders no visible UI. It injects:
AgentExperience component to your root layout to inject structured metadata for agents — a JSON-LD WebSite schema, a link to /llms.txt, and AI-specific robots directives.- JSON-LD structured data (WebSite schema)
- A
<link>to/llms.txt - AI-specific
meta robotsdirectives (noai,noimageai) based on your permissions settings
Configuration
withAgentXP() accepts an optional configuration object. Here is a full example showing the available options:
AgentXP requires Next.js 14 or later.