SGLang Agent Rules

A serving framework for language and multimodal models, with a guide for its documentation site.

Overview

SGLang's docs/AGENTS.md applies to its Mintlify site and cookbook, not the whole runtime. It sets a source order for technical claims and covers page structure, components, navigation, and validation.

Documents

├── docs
│   └── 
└── python
    └── sglang
        └── multimodal_gen
            └── .claude
                └── 

Techniques in this file

01 / Pointing at the source of truth

Define which source owns each kind of fact

The source hierarchy assigns navigation and voice to the local site, migration context to public docs, release-sensitive behavior to code, and recipes to the cookbook.

Source excerpt starting at line 34.
   - `sgl-project/sglang` for anything that can change with releases (flags, env vars, defaults, supported models).

02

Make the execution context part of every command example

Every command example names its hardware, OS and version limits, model, parallelism settings, and required tokens so runnable-looking snippets do not hide prerequisites.

Source excerpt starting at line 54.
* **Parallelism knobs** used in the example (`--tp`, `--dp`, node count, etc.)

03 / Behavioral framing

Read neighboring pages before choosing a structure

Before writing, search for existing coverage and inspect two or three similar pages. New content should match the site's actual voice and level of detail.

Source excerpt starting at line 92.
Before writing, read 2-3 similar pages to understand the site's voice, structure, formatting conventions, and level of detail.

04 / Behavioral framing

Show how uncertainty should remain visible

The writing workflow explicitly marks unverified claims with TODO comments and provides a concrete MDX example. The final checklist retains those markers instead of presenting uncertain defaults as verified facts.

Source excerpt starting at line 333.
{/* TODO: Verify the default timeout value */}

05

Distinguish reachable pages from navigable pages

A page must be added to docs.json to appear in the sidebar. The hidden-page guidance explains when direct URL access and search visibility are deliberate rather than a missed navigation update.

Source excerpt starting at line 362.
Any page that is not included in the `docs.json` navigation is hidden. Use hidden pages for content that should be accessible by URL or indexed for the assistant or search, but not discoverable through the sidebar navigation.

Ideas for your repo

  1. Map factual claims to the source that owns them.
  2. State execution prerequisites next to command examples.
  3. Read neighboring pages before adding new documentation.
  4. Leave explicit markers on facts that still need verification.
  5. Check navigation membership separately from page existence.
Sponsored byModem

Give your agents the whole story.

These instructions explain how to work in SGLang. Modem shows your agents what customers said, who is affected, and what changed.

See how Modem works