vLLM Agent Rules

An inference and serving engine for large language models.

Overview

vLLM asks contributors to state a test's contract and failure mode before writing it. Correctness and performance use different evidence, while native builds and security reviews have dedicated guides.

Documents

├── 
├──  · imports AGENTS.md
├── docs
│   ├── contributing
│   │   ├── model
│   │   │   └── 
│   │   ├── 
│   │   ├── 
│   │   └── 
│   └── usage
│       └── 
├── rust
│   ├── src
│   │   └── bench
│   │       ├── 
│   │       └──  · same content as CLAUDE.md · imports AGENTS.md
│   ├── 
│   ├── AGENTS.override.md · unavailable at this commit
│   └──  · imports AGENTS.override.md (unavailable), AGENTS.md
└── 

Techniques in this file

01 / Behavioral framing

Design the test before writing its setup

The test section asks what the module does, what crosses its boundary, and which failure the test protects against. It then selects the cheapest level that catches that failure.

Source excerpt starting at line 85.
- **Design before you write.** Answer four questions first: what is the module  for, what is its I/O contract, what failure am I guarding against, and what is  the cheapest level that catches it (unit over integration over e2e)?

02 / Hard prohibitions

Separate kernel performance from correctness coverage

One-off performance work belongs in the kernel benchmark directory. Correctness belongs in the existing pytest suites, so the two kinds of evidence have explicit homes.

Source excerpt starting at line 95.
- **No one-off kernel benchmarks in `tests/`.** Put kernel perf work in  `benchmarks/kernels/`; prove correctness in existing pytest suites.

03 / Verification by change type

Require model evaluations when behavior can change

Tests alone do not satisfy the guidance for changes affecting output, accuracy, or serving. The file asks for model evaluations and their results in the PR before a reviewer has to request them.

Source excerpt starting at line 97.
- **Run model evals for model-affecting changes.** Search `tests/evals/` or use  `vllm bench` and include results in the PR — do not wait for reviewers to ask.

04 / Router files

Route native builds away from the default editable install

The default install starts with precompiled artifacts. C, C++, and CUDA changes instead follow the incremental compilation guide, making the distinction depend on the edited implementation.

Source excerpt starting at line 67.
For C/C++ or CUDA changes, follow the[incremental compilation workflow](docs/contributing/incremental_build.md) toconfigure and perform incremental builds.

Ideas for your repo

  1. Ask for the test contract and target failure before building fixtures.
  2. Give performance experiments and correctness tests separate homes.
  3. State which behavioral changes require evaluations beyond unit tests.
  4. Distinguish precompiled development installs from native rebuild workflows.
Sponsored byModem

Give your agents the whole story.

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

See how Modem works