Skip to main content
The Visibility component lets a single page serve two audiences: humans reading on the web and AI agents processing the Markdown output. Content marked for="humans" appears on the rendered page but is excluded from Markdown exports. Content marked for="agents" is hidden on the web but included in Markdown. This means you can write conversational, UI-centric instructions for humans and structured, machine-readable instructions for AI — without maintaining two separate pages.

How it works

Mintlify serves every page at two URLs:
  • https://docs.example.com/page — the rendered site, for humans
  • https://docs.example.com/page.md — the raw Markdown, for AI agents
Visibility controls what appears at each URL.

Example

Human readers see the step-by-step UI walkthrough. AI agents processing the Markdown get the direct API instructions instead.

Props

for
"humans" | "agents"
required
  • "humans" — visible on the rendered web page, excluded from .md export
  • "agents" — hidden on the rendered web page, included in .md export

When to use it

Onboarding flows

Show UI screenshots and button clicks to humans. Give agents the equivalent API calls.

Configuration guides

Show a visual settings panel to humans. Give agents the equivalent JSON or CLI flags.

Error messages

Show a friendly explanation to humans. Give agents structured error codes and remediation steps.

Conceptual pages

Include rich diagrams and narrative for humans. Provide a concise structured summary for agents.

Combining with Prompt

Visibility and Prompt complement each other well. Use Visibility to give agents structured context, then use Prompt to give human readers a prompt they can use to ask an AI about that same content.