Home › Python / FastAPI › Python FastAPI AGENTS.md

Python FastAPI AGENTS.md

Universal AGENTS.md for Codex, Jules, Cursor and other agents working on a FastAPI + uv project.

AGENTS.mdPython / FastAPI

How to use

Save this as AGENTS.md in your repository root, commit it, and your agent will pick it up automatically. Edit the commands to match your project.

AGENTS.mdDownload  
# AGENTS.md

## Setup
- `uv sync` installs everything. Run commands with `uv run`.
- Start: `uv run fastapi dev app/main.py`

## Checks (all must pass before you finish)
- `uv run ruff format . && uv run ruff check .`
- `uv run mypy app`
- `uv run pytest -q`

## Conventions
- Routers stay thin; logic goes in `app/services/`.
- Pydantic v2 schemas for all I/O. Use `model_config = ConfigDict(from_attributes=True)` for ORM mapping.
- New env vars must be added to `app/config.py` and `.env.example`.

## PRs
- Title: `<area>: <imperative summary>`. Include what changed, why, and how it was tested.
- Keep diffs focused; no drive-by reformatting of untouched files.

Related rules

REST API design AGENTS.md

AGENTS.md for designing consistent HTTP/JSON APIs: resource naming, status codes, errors, pagination, and versioning.

AGENTS.mdAPI design

Bevy game engine AGENTS.md

AGENTS.md for Bevy (0.16+) games in Rust: ECS systems, plugins, required components, and fast dev builds.

AGENTS.mdBevy (Rust)

Git commits & PRs AGENTS.md

AGENTS.md rules for how agents commit: Conventional Commits, atomic changes, safe git commands, and PR descriptions.

AGENTS.mdAgent workflows

CrewAI multi-agent AGENTS.md

AGENTS.md for CrewAI 1.x projects: YAML agents and tasks, crews and flows, tools, and cost-aware runs.

AGENTS.mdLLM apps & agents

Get new rules weekly

One email a week: fresh rule files, agent tips, and what's changing in Cursor, Claude Code and Copilot. Free, unsubscribe anytime.

Opens the Rulestack Newsletter on beehiiv in a new tab. Or subscribe directly on beehiiv.