Getting Started with CrewAI
CrewAI lets you build teams of AI agents that work together. One agent researches, another writes, another reviews. Here's how to set it up.
What you need
- • Python 3.10+ installed on your computer
- • An API key from at least one AI provider (OpenAI, Anthropic, etc.)
Install CrewAI
Open your terminal and run pip install crewai. CrewAI is a Python framework — it runs on your machine and orchestrates AI agents.
Use a virtual environment. python -m venv .venv && source .venv/bin/activate before installing.
Set up your API keys
CrewAI needs API keys to talk to AI models. Set them as environment variables: export OPENAI_API_KEY=your-key or put them in a .env file.
Our guides tell you which API keys you need. Most use OpenAI or Anthropic. You can mix providers.
Understand Agents, Tasks, and Crews
An Agent has a role ("researcher"), a goal, and a backstory. A Task is a specific job. A Crew is a team of Agents working on Tasks together.
Think of it like a small company. The researcher finds info, the writer creates content, the editor reviews it. Each agent is specialized.
Create your first Agent
Define an Agent with a role, goal, and backstory in Python. Our guides come with pre-built agent definitions — copy-paste and customize.
Keep agent roles focused. A "Senior Financial Analyst" agent beats a "do everything" agent.
Define Tasks and assemble a Crew
Create Tasks that describe what needs to be done, assign them to Agents, and create a Crew that runs them in sequence or in parallel.
Our guides include complete Crew definitions. Run them and watch the agents collaborate in your terminal.
Run and iterate
Run your Crew with crew.kickoff(). Watch the agents work in your terminal. Review the output, tweak agent instructions, run again.
Start simple. Get 2 agents working well before adding more. Complexity grows fast with multi-agent systems.
Ready to go?
Now that CrewAI is set up, our premium build guides come with pre-built agent teams and task definitions. Run them and watch the agents collaborate.