Skip to content

CrewAI Lint Rules

Rules are grouped by severity. Codes are stable across versions.

Errors

Errors indicate broken project structure and should be fixed before running or documenting the project.

CodeRuleWhat it checks
E001Task has no agentA task in tasks.yaml has no agent field
E002Agent not declaredA task references an agent name that does not exist in agents.yaml

Warnings

Warnings identify likely design issues.

CodeRuleWhat it checks
W001Idle agentAn agent is declared in agents.yaml but no task is assigned to it
W002Useless delegationallow_delegation=True on the only agent in the crew
W003No expected outputA task has no expected_output
W004No pyproject.tomlProject metadata is missing
W005Vague roleAgent role is fewer than 5 characters
W006Missing required fieldRequired YAML field is empty or absent
W007Unknown fieldField is not part of the CrewAI schema
W008Wrong typeField value has the wrong type

Info

Info findings are optional improvements.

CodeRuleWhat it checks
I001No toolsNo tool is used anywhere in the crew
I002Template placeholderspyproject.toml still contains scaffold defaults
I003Very long goalAgent goal exceeds 500 characters
I004Very long task descriptionTask description exceeds 800 characters

Agent Field Schema

The linter validates against the CrewAI agent schema:

FieldTypeRequired
rolestringyes
goalstringyes
backstorystringyes
llmstring or dictno
toolslistno
max_iterintno
max_rpmintno
max_execution_timeint or floatno
memoryboolno
verboseboolno
allow_delegationboolno
cacheboolno
allow_code_executionboolno
max_retry_limitintno
knowledge_sourceslistno
embedderdictno
use_system_promptboolno
respect_context_windowboolno

Task Field Schema

FieldTypeRequired
descriptionstringyes
expected_outputstringyes
agentstring or dictno
toolslistno
contextlistno
async_executionboolno
human_inputboolno
output_filestringno
output_jsondictno
output_pydanticdictno
callbackdictno

Released under the MIT License.