AGENTS.md · aio-libs/aiohttp
AGENTS.md from aio-libs/aiohttp: 72 lines covering Branching, Build, Test, Lint & Format and more.
Template by aio-libs
Install
Works with Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code. Read the repository before you give any tool access to your data.
curl -fsSL https://raw.githubusercontent.com/aio-libs/aiohttp/master/AGENTS.md -o AGENTS.md
Read it and adapt it to your project before use.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: code-generation, testing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
What's in it
An AGENTS.md file: instructions coding agents (Codex, Cursor, Copilot, Gemini CLI and others) read before working in a repo.
- For
- Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code
- Length
- 72 lines
- File
AGENTS.md
Sections
- Branching
- Build
- Test
- Lint & Format
- Documentation & code style
- Changelog
- PRs
- Threat model
First lines (shown under the repo's Apache-2.0 license)
# AGENTS.md
This file provides guidance to AI coding agents working with this repository.
## Branching
- All new features and bug fixes target `master`. A bot creates backports to the `x.y` release branches automatically.
## Build
- Full dev setup: `make install-dev` (installs deps, cythonizes, builds extensions)
- Vendored llhttp: `git submodule update --init` + `make generate-llhttp` (requires Node.js)
- Cython extensions: `make cythonize` (.pyx → .c), then `pip install -e .` to compile
- Pure Python mode: `AIOHTTP_NO_EXTENSIONS=1 pip install -e .`
- `AIOHTTP_CYTHON_TRACE=1` enables Cython trace macros (only useful with linetrace-enabled .c files)
## Test
- Run all: `PYTHONPATH='.' pytest --numprocesses=auto`
- Single test: `PYTHONPATH='.' pytest tests/test_foo.py::test_name`
- Pure Python only: `PYTHONPATH='.' AIOHTTP_NO_EXTENSIONS=1 pytest`
## Lint & Format
- `pre-commit run --all-files` runs all checks (black, isort, flake8, pyupgrade, codespell)
- `black` for formatting only, `mypy` for type checking
- black with 88-col line length, isort with trailing commas
## Documentation & code style
- User-visible API changes need a docs update under `docs/` (`docs/client_reference.rst` / `docs/web_reference.rst` plus any narrative pages).
- Docstrings in code, prose in Sphinx; `make doc` builds locally.
- No docstrings or comments that just restate the code.
## Changelog
- Fragments in `CHANGES/{pr_or_issue}.{type}.rst` (valid types are defined in `pyproject.toml` under `[tool.towncrier]`).
- Sign with `` -- by :user:`github-handle` ``.
- Both issue and PR number wanted: keep the issue-numbered file and symlink: `ln -s 1234.bugfix.rst CHANGES/1240.bugfix.rst`.
- Multiple fragments same category: `1234.feature.rst`, `1234.feature.1.rst`.
## PRs
- **Prove it works before opening the PR**. This means:
- Relevant tests pass locally.
- New behaviour is covered by a test.
- Any parser/websocket related changes have been tested with Cython extensions installed.
- Use the shipped template at [`.github/PULL_REQUEST_TEMPLATE.md`](.github/PULL_REQUEST_TEMPLATE.md).
- A couple of sentences per section is plenty.
- Tick checklist boxes that apply; write `N/A` next to ones that do not.
- First-time contributors add themselves to `CONTRIBUTORS.txt` (alphabetical by first name).
- **Draft.** Use `gh pr create --draft`.
- Every submission must be reviewed by a human before going out of draft; that review is the operator's job, not the maintainers'.
- Do not mark ready or request reviewers yourself.
- **Disclosure.** One plain line at the bottom: `Drafted with <agent name and version>; reviewed by <human handle>.`
- **No `Co-Authored-By:`** LLM trailers in commits or PR body.
- Agent run output (test logs) goes in a collapsed `<details>` block **below** the template summary.
**Commits**: Don't use conventional commits; match recent imperative subjects.
## Threat model
`THREAT_MODEL.md` is a living document and should be revised when:
- A CVE / GHSA is filed against aiohttp.
- The parser configuration changes (llhttp lenient flags, size limits, version regex).
- Any default referenced in the document changes (`client_max_size`, `client_max_fields`, `keepalive_timeout`, `max_redirects`, `limit`, `limit_per_host`, etc.).
- The vendored llhttp version is bumped.
- A public API surface is added or removed in `client.py` / `web_*.py` / `multipart.py`.
When a chunk's content is materially affected, update both the chunk and the relevant entries in §6.1–§6.4. The "Past advisories / hardening (recap)" subsection of each chunk is the audit trail for what has been verified-in-place.Signals
- Stars
- 16,590
- Forks
- 2,483
- Open issues
- 159
- Last commit (this folder)
- Sep 16, 2026 (1 month ago)
- Last release
- Oct 11, 2026 (18 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/aio-libs/aiohttp
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Cite this page
AGENTS.md · aio-libs/aiohttp. Agent Mart. https://agentmart.dev/templates/aio-libs-aiohttp-agents-md (last updated 2026-10-24)