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.
Agent toggle
Let visitors see exactly what AI agents receive from your site.The
AgentToggle component adds a floating HUMAN / MACHINE toggle pill to your site. When a visitor switches to “machine” mode, it fetches the markdown version of the current page and displays it in a full-screen overlay with a monospace font and typewriter animation.
This is useful for demos, developer documentation, and transparency — letting your visitors verify that AI agents get clean, accurate content from your site.
Setup
ImportAgentToggle from @reaganhsu/agentxp-next/toggle and add it to your root layout:
layout.tsx
How it works
- The pill appears at the bottom of the page with two options: HUMAN and MACHINE
- When a visitor clicks MACHINE, the component fetches the current page with
Accept: text/markdown - The markdown response is displayed in a dark, full-screen overlay with syntax highlighting for headings, links, lists, and code blocks
- The title line types out character by character; other lines fade in with a stagger
- Pressing Escape or clicking HUMAN returns to the normal page
prefers-reduced-motion — when the user has reduced motion enabled, all content appears instantly without animation.
Props
position
Type: 'bottom-center' | 'bottom-right' | 'bottom-left'
Where to place the toggle pill on screen. Default: 'bottom-center'.
Accessibility
- The toggle uses
role="radiogroup"withrole="radio"buttons andaria-checkedstates - All touch targets meet the 44px minimum
- Focus states are visible with a white outline
- Body scroll is locked when the machine view overlay is open
- Escape key closes the overlay
When to use
- Product demos — Show prospects how your site serves AI agents
- Developer documentation — Let developers verify the markdown output matches their expectations
- Transparency pages — Give users confidence that AI agents receive accurate content
When not to use
- Production sites with no developer audience — Most end users don’t need to see the markdown view. Consider adding it only in development or behind a feature flag.
- Sites with sensitive content — The toggle fetches from your live middleware, so any page content visible to agents is also visible in the toggle overlay.