Home › LLM apps & agents › CrewAI multi-agent AGENTS.md

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

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: CrewAI project

## Commands
- `crewai install` (uv-based) · `crewai run` · `crewai test -n 3` · `uv run pytest -q`
- CrewAI releases often; check `pyproject.toml` for the pinned version and its docs before using new APIs.

## Structure (from `crewai create crew`)
- `src/<project>/config/agents.yaml`: role, goal, backstory per agent. `config/tasks.yaml`: description, expected_output, agent.
- `crew.py`: `@CrewBase` class with `@agent`, `@task`, `@crew` methods that load the YAML. `main.py`: inputs and kickoff.
- Custom tools in `tools/` subclassing `BaseTool` with a Pydantic `args_schema`.

## Rules
- Each agent has one clear responsibility; prefer 2-4 agents over many overlapping ones.
- Tasks state a concrete `expected_output` (format, length, fields). Use `output_pydantic` for structured results that code consumes.
- Use `Process.sequential` unless a manager really adds value; hierarchical runs cost more.
- Use Flows (`@start`, `@listen`, `@router`, typed state) for deterministic orchestration; put crews inside flow steps for the fuzzy parts.
- LLMs configured per agent via `LLM(model=...)` from config/env; set `max_iter` and `max_rpm` to cap loops and spend.
- Tools that write, send, or spend need explicit human input (`human_input=True` on the task) or an allowlist.
- Enable `memory`/knowledge only when needed; it adds embedding calls.

## Done
Tool unit tests pass; one `crewai test` run on sample inputs produces outputs matching `expected_output`. Report token usage from `crew.usage_metrics`.

More: all LLM apps & agents rules · all AGENTS.md rules

Related rules

Claude Agent SDK CLAUDE.md

CLAUDE.md for building agents with the Claude Agent SDK (Python/TypeScript): options, tools, permissions, and hooks.

Claude Code (CLAUDE.md)LLM apps & agents

LangGraph agent rules

Cursor rules for building agents with LangGraph in Python: typed state, nodes, tools, checkpointers, and tests.

CursorLLM apps & agents

LLM app (Python) AGENTS.md

AGENTS.md for Python apps that call LLM APIs (OpenAI, Anthropic, Gemini): prompts, structured output, evals, and cost.

AGENTS.mdLLM apps & agents

OpenAI Agents SDK rules

Cursor rules for the OpenAI Agents SDK (Python 0.2x): agents, function tools, handoffs, guardrails, sessions, and tracing.

CursorLLM apps & agents

Vercel AI SDK rules

Cursor rules for the Vercel AI SDK 5 in TypeScript: streamText, structured output, tools, and useChat UIs.

CursorLLM apps & agents

dbt analytics engineering AGENTS.md

AGENTS.md for dbt projects (dbt Core / Fusion 1.9+): staging/marts layering, tests, docs, and selective runs.

AGENTS.mddbt

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.