Watch: Building CrewAI Agents & Flows with Coding Agent Skills
Install our coding agent skills (Claude Code, Codex, …) to quickly get your coding agents up and running with CrewAI. You can install it withnpx skills add crewaiinc/skills
In this guide you will create a Flow that sets a research topic, runs a crew with one agent (a researcher using web search), and ends with a markdown report on disk. Flows are the recommended way to structure production apps: they own state and execution order, while agents do the work inside a crew step.
If you have not installed CrewAI yet, follow the installation guide first.
Prerequisites
- Python environment and the CrewAI CLI (see installation)
- An LLM configured with the right API keys — see LLMs
- A Serper.dev API key (
SERPER_API_KEY) for web search in this tutorial
Build your first Flow
Create a Flow project
From your terminal, scaffold a Flow project (the folder name uses underscores, e.g. This creates a Flow app under
latest_ai_flow):src/latest_ai_flow/, including a starter crew under crews/content_crew/ that you will replace with a minimal single-agent research crew in the next steps.Configure one agent in `agents.yaml`
Replace the contents of
src/latest_ai_flow/crews/content_crew/config/agents.yaml with a single researcher. Variables like {topic} are filled from crew.kickoff(inputs=...).agents.yaml
Wire the crew class (`content_crew.py`)
Point the generated crew at your YAML and attach
SerperDevTool to the researcher.content_crew.py
Define the Flow in `main.py`
Connect the crew to a Flow: a
@start() step sets the topic in state, and a @listen step runs the crew. The task’s output_file still writes output/report.md.main.py
Set environment variables
In
.env at the project root, set:SERPER_API_KEY— from Serper.dev- Your model provider keys as required — see LLM setup
Install and run
crewai run executes the Flow entrypoint defined in your project (same command as for crews; project type is "flow" in pyproject.toml).How this run fits together
- Flow —
LatestAiFlowrunsprepare_topicfirst, thenrun_research, thensummarize. State (topic,report) lives on the Flow. - Crew —
ResearchCrewruns one task with one agent: the researcher uses Serper to search the web, then writes the structured report. - Artifact — The task’s
output_filewrites the report underoutput/report.md.
Agent and kickoff() without tasks, see Agents.
You now have an end-to-end Flow with an agent crew and a saved report — a solid base to add more steps, crews, or tools.
Naming consistency
YAML keys (researcher, research_task) must match the method names on your @CrewBase class. See Crews for the full decorator pattern.
Deploying
Push your Flow to CrewAI AMP once it runs locally and your project is in a GitHub repository. From the project root:Deploy guide
Step-by-step AMP deployment (CLI and dashboard).
Join the Community
Discuss ideas, share projects, and connect with other CrewAI developers.
