Getting Started with CrewAI: A Step-by-Step Walkthrough
Watch on TikTok
A hands-on tutorial that walks through installing CrewAI, creating a project, understanding the file structure, and running your first agent crew. The demo creates a research-and-reporting crew that investigates AI language models and outputs a markdown report.
Setting Up CrewAI
Open your terminal and install CrewAI with pip:
pip install crewai
pip install "crewai[tools]"

Then create a new project:
crewai create crew demo
The CLI walks you through a few setup questions. It asks which LLM provider you want (OpenAI, Anthropic, Gemini, Groq, etc.), which model to use, and your API key.

For the API key, go to platform.openai.com/api-keys and generate a new key. Copy it into the terminal prompt. Important: always delete API keys after demos and never share them publicly.

Understanding the Project Structure
Once the project is created, open it in your editor. There are four files that matter:
main.py is the start button. It defines what the crew will research (in this case, "AI language models") and provides commands to run, train, replay, or test the crew.
crew.py organizes the crew members and their execution order. It defines which agents exist, what tasks they perform, and runs them sequentially.
config/agents.yaml defines who the agents are. The demo includes a "senior data researcher" whose goal is to uncover developments in the specified topic, and a "reporting analyst" who compiles the researcher's findings into a report.
config/tasks.yaml defines what each agent does. The research task tells the researcher to conduct thorough research on the topic. The reporting task tells the analyst to review the researcher's output and produce a formatted report.
Running the Crew
Install dependencies and run:
crewai install
crewai run

The terminal shows each agent working in sequence. First, the senior data researcher investigates large language models. Then the reporting analyst takes those findings and generates a markdown report.
The output is a complete report saved as a markdown file. In the demo, it produced "Advanced AI and LLM Programs: A Comprehensive Report" with structured findings from the research agent.
Where to Go from Here
The framework is flexible. You can add more agents, define different tasks, and chain them in various orders. The example in the video suggests using agents to pull NFL game stats and compile analysis, but the pattern applies to any domain where you need research, synthesis, and output.
Key Takeaways
- CrewAI lets you define AI agents with specific roles and chain them together into workflows
- The project structure separates concerns: agents.yaml for who, tasks.yaml for what, crew.py for how they work together
- A simple two-agent crew (researcher + analyst) can produce a full markdown report from a single topic prompt
- The framework supports OpenAI, Anthropic, Gemini, and Groq as LLM providers
Resources
- CrewAI -- Framework for building and orchestrating AI agent crews
- OpenAI API Keys -- Generate API keys for OpenAI models
Published May 25, 2026. Writeup generated from a favorited TikTok.