The CLI project layout is how CrewAI expects real projects to be organised, run, trained and deployed.
For anything beyond a script, create a project with the CLI:
crewai create crew research_crew
cd research_crew
crewai install
crewai runcrewai create asks for a model provider and writes a project. Since CrewAI 1.15 the default layout is JSON-first:
agents/researcher.jsonc: one file per agent withrole,goal,backstory,llm,toolsand asettingsblock (such asverboseandallow_delegation).crew.jsonc: the crew'sname, the list ofagents, thetasks(each withname,description,expected_output,agent, optionalcontextandoutput_file), theprocess, and defaultinputsfor placeholders.tools/: your own tools as Python files, referenced from an agent as"custom:my_tool".knowledge/: files agents can search (a later lesson)..envfor keys andpyproject.tomlfor dependencies.
JSONC is JSON that also allows // comments. The generated files are full of commented-out options, which makes them a handy reference.
crewai install installs dependencies into the project's own environment. crewai run loads crew.jsonc, asks for any placeholder that has no default in inputs, and runs the crew.
From Python you can load the same project: load_crew("crew.jsonc") returns the crew and its default inputs.
Older tutorials show crew.py with config/agents.yaml and config/tasks.yaml. That classic layout still exists behind --classic (next level). Only run projects from sources you trust: custom: tools are executed as Python code when the crew loads.
Example
// agents/researcher.jsonc
{
"role": "Senior research specialist for {topic}",
"goal": "Find accurate, current information about {topic}",
"backstory": "You verify facts and always note your sources.",
"llm": "openai/gpt-4o-mini",
"tools": ["SerperDevTool"], // web search (needs SERPER_API_KEY)
"settings": { "verbose": true, "allow_delegation": false }
}
// crew.jsonc
{
"name": "Research crew",
"agents": ["researcher"],
"tasks": [{
"name": "research_task",
"description": "Research the latest developments in {topic}.",
"expected_output": "10 bullet points with sources.",
"agent": "researcher",
"output_file": "output/report.md"
}],
"process": "sequential",
"inputs": { "topic": "AI in healthcare" }
}Remember
crewai create crew NAMEscaffolds a JSON-first project- Agents live in
agents/*.jsonc; tasks, process and inputs increw.jsonc crewai installthencrewai run;load_crew()loads it from Python
Watch out for
- Copying a 0.x tutorial's crew.py/YAML files into a new JSON-first project and wondering why crewai run ignores them; use --classic for that layout.