# Writing for LLMs

Developers increasingly use AI assistants to help them integrate Sentry. We design our documentation to work well for both human readers and LLMs.

## [Principles](https://docs.sentry.io/contributing/pages/llm-support.md#principles)

Our existing documentation principles naturally support LLM consumption:

* **Minimalist content** helps LLMs extract relevant information without noise
* **Technical accuracy** ensures LLMs provide correct guidance
* **Self-contained pages** allow LLMs to answer questions from a single page fetch
* **Clear structure** (headings, code blocks, lists) helps LLMs parse and understand content

## [How We Support LLMs](https://docs.sentry.io/contributing/pages/llm-support.md#how-we-support-llms)

**Content negotiation**: All pages are available as markdown. Requests with `Accept: text/markdown`, known AI user agents, or `.md` URLs receive markdown instead of HTML.

**Copy page button**: Every page includes a button to copy markdown to clipboard, with direct links to open the page in ChatGPT or Claude.

**Hierarchical navigation**: Index pages include "Pages in this section" listings so LLMs can discover related content.

**Clean markdown output**: We strip navigation chrome, convert internal links to `.md` format, and preserve code blocks with syntax highlighting hints.

## [Writing Considerations](https://docs.sentry.io/contributing/pages/llm-support.md#writing-considerations)

When writing documentation, keep in mind:

* **Frontmatter descriptions** appear in section listings and help LLMs understand page purpose
* **Code examples** should be complete and runnable - LLMs often copy them directly
* **Avoid ambiguous references** like "click the button above" that require visual context
* Pages with `noindex: true` are excluded from search and LLM discovery
