Django · AGENTS.md

The Django AGENTS.md, done right.

Copy a production-ready example below, or generate one tuned to your exact Django setup in about thirty seconds — free, in your browser.

 AGENTS.md
# your-django-app

> Django project.

Instructions for AI coding agents working in this repository.

## Setup

- Install dependencies: `uv sync`
- Start dev server: `python manage.py runserver`
- Run tests: `python manage.py test`

## Code style

- Fat models, thin views.
- Use the ORM; raw SQL only with a comment explaining why.
- Type hints on service-layer functions.

## Guardrails

Things agents get wrong here. Follow these strictly:

- Never hand-edit files in `migrations/` — generate with `makemigrations`.
- Don’t query the database inside templates.

Why Django projects need this

Dropped into a Django repo with no context, an AI agent guesses: it reaches for the wrong package manager, ignores your structure, and edits files it shouldn’t. AGENTS.md is the briefing it reads first — so the very next prompt behaves like a teammate who already knows your conventions.

What to put in it

The example above covers the three sections that matter most for Django: the real setup commands (uv sync, python manage.py runserver, python manage.py test), your code-style conventions, and the guardrails agents reliably get wrong. The generator fills these in from your actual manifest so the commands match your project, not a generic template.

Frequently asked

What is an AGENTS.md file in a Django project?

It is a markdown file at your repo root that tells AI coding agents how your Django project works — setup commands, code style and guardrails — so they follow your conventions instead of guessing.

Which tools read this file?

AGENTS.md is a shared convention read by Cursor, Claude Code, OpenAI Codex, GitHub Copilot, Gemini, Windsurf, Zed and others. For tools with their own filename you can export that format or symlink it to AGENTS.md.

What should a Django AGENTS.md include?

At minimum: install/dev/test commands (uv sync, python manage.py runserver, python manage.py test), your code-style conventions, and the guardrails agents get wrong — like Never hand-edit files in migrations/ — generate with makemigrations.

Other stacks

Generate your Django AGENTS.md

Detect your stack, tune the guardrails, export to every agent format. Free.

Open the generator