Based on Laravel’s official docs, checked
AGENTS.md template for Laravel
Laravel has an official way to give coding agents framework guidance: Laravel Boost. It writes version-aware Laravel guidelines into AGENTS.md (and CLAUDE.md and other agent files) for the packages you actually have installed, and adds an MCP server. Start there, then add the project-specific parts that only you know. The template below uses only commands from Laravel’s documentation.
What Laravel provides officially
1. Install Laravel Boost
Boost works with Laravel 10 to 13 on PHP 8.1 or higher. Install it as a dev dependency and run the installer, which asks which agents you use and writes their guideline and MCP config files.
composer require laravel/boost --dev php artisan boost:install2. Keep your own text outside the Boost block
If AGENTS.md or CLAUDE.md already exists, Boost only replaces the content inside its own block, so anything you write outside it is kept. php artisan boost:update refreshes the guidelines after you upgrade packages.
3. Add your own guidelines the Laravel way
Put extra .md or .blade.php files in .ai/guidelines/ and Boost includes them when you run boost:install. A file whose path matches a built-in Boost guideline replaces it.
4. Decide whether to commit the generated files
Laravel’s docs say you can add the generated .mcp.json, AGENTS.md, CLAUDE.md and boost.json to .gitignore, because boost:install and boost:update regenerate them. If you do, keep the team-specific rules in .ai/guidelines/ so they still reach everyone.
The AGENTS.md template
Save this as AGENTS.md at the repository root. Replace the HTML comments with your project’s details and delete what doesn’t apply.
# Project overview
<!-- One or two sentences: what this app does, Laravel version, starter kit (React, Vue or Livewire). -->
## Build and test commands
- `composer run dev` starts the local server, queue worker and Vite dev server.
- `npm install && npm run build` builds front-end assets.
- `php artisan test` runs the test suite (Pest or PHPUnit). Run it before you say a change is done.
- `./vendor/bin/pint` fixes code style; `./vendor/bin/pint --test` checks it without changing files.
## Code style
- Follow Laravel conventions and the Laravel Boost guidelines in this file (if Boost is installed).
- Use the formatting Pint applies; don't hand-format against it.
- <!-- Your rules: folder structure, naming, Form Requests, Actions, policies, etc. -->
## Testing instructions
- Tests live in `tests/Feature` and `tests/Unit`.
- Tests run with the `testing` environment from `phpunit.xml`.
- <!-- Which tests must pass before a PR; database and factories setup. -->
## Security considerations
- Never commit `.env` or secrets.
- <!-- Auth, authorization and data rules for this project. -->
Notes
- Boost ships guidelines for Laravel itself plus Livewire, Inertia (React, Vue and Svelte), Pest, PHPUnit, Pint, Tailwind CSS and other first-party packages, matched to the versions you have installed.
- New apps can include Boost from the start: Laravel’s agent instructions use laravel new with the --boost flag.
- The template follows the sections recommended by agents.md: project overview, build and test commands, code style, testing and security.
Related
All AGENTS.md templates
AGENTS.md template for Next.js
AGENTS.md vs CLAUDE.md vs Cursor rules
OpenAI Codex rules file
Frequently asked questions
Yes, through Laravel Boost. php artisan boost:install generates AGENTS.md and other agent guideline files with version-aware Laravel guidelines, inside a block it manages.
Sources
- https://laravel.com/docs/13.x/boost · checked 2026-10-20
- https://laravel.com/docs/13.x/ai · checked 2026-10-20
- https://laravel.com/for/agents · checked 2026-10-20
- https://laravel.com/docs/13.x/installation · checked 2026-10-20
- https://laravel.com/docs/13.x/testing · checked 2026-10-20
- https://laravel.com/docs/13.x/pint · checked 2026-10-20
- https://agents.md/ · checked 2026-10-20