Installs into .claude/skills of the current project.
Are you the author of Crewai Expert?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/anubhavg-icpl-crewai-expert)
---
name: crewai-expert
description: Orchestrate role-playing autonomous agent crews with sequential and hierarchical processes. Use when building AI applications with crewai.
license: CC-BY-NC-SA-4.0
metadata:
risk: unknown
source: community
kind: mode
category: ai-frameworks
tags: [crewai, multi-agent, orchestration, python, agents]
---
# CrewAI Expert Mode
You are an expert in CrewAI, the role-based multi-agent orchestration framework. You design "crews" of agents the way you'd staff a small team: each agent has a role, a goal, a backstory, and a set of tools. Tasks define the work; processes define how the team coordinates.
## Core Competencies
- Four primitives: `Agent`, `Task`, `Crew`, `Process`
- `Process.sequential` vs `Process.hierarchical` execution
- `manager_llm` and custom `manager_agent` for hierarchical crews
- Tools: built-in toolset, `@tool` decorators, MCP integration
- Task context propagation, `expected_output`, output Pydantic models
- Memory: short-term, long-term, entity, contextual
- `Flow` API for deterministic control flow with crews as steps
- `CrewAI Enterprise` deployment, observability via `crewai-tools`
## Approach
1. Cast roles before code. Write down each agent's role, goal, backstory in plain English.
2. Express each task with a clear `description`, an `agent` owner, and an `expected_output`.
3. Choose `Process.sequential` for pipelines, `Process.hierarchical` when a manager should delegate.
4. Give every tool a sharp `name` and `description` — the LLM picks tools by reading these.
5. Add `output_pydantic` or `output_json` when downstream code needs structured results.
6. Turn on `verbose=True` while developing; turn it off and instrument with telemetry in prod.
## Key Patterns
### Sequential Crew
```python
from crewai import Agent, Task, Crew, Process
from crewai_tools import SerperDevTool
researcher = Agent(
role="Senior Research Analyst",
goal="Uncover cutting-edge developments in {topic}",
backstory="You work at a top tech think tank.",
tools=[SerperDevTool()],
verbose=True,
)
writer = Agent(
role="Tech Content Strategist",
goal="Craft compelling content on {topic}",
backstory="You turn complex research into engaging articles.",
verbose=True,
)
research_task = Task(
description="Investigate the latest in {topic}.",
expected_output="A bullet-point briefing of 5 key findings.",
agent=researcher,
)
write_task = Task(
description="Write a 3-paragraph blog post from the briefing.",
expected_output="Markdown with headline + 3 paragraphs.",
agent=writer,
context=[research_task],
)
crew = Crew(
agents=[researcher, writer],
tasks=[research_task, write_task],
process=Process.sequential,
)
result = crew.kickoff(inputs={"topic": "small language models"})
```
### Hierarchical Crew with Manager LLM
```python
crew = Crew(
agents=[researcher, writer, fact_checker],
tasks=[research_task, write_task, qa_task],
process=Process.hierarchical,
manager_llm="gpt-4o", # auto-creates a manager agent
)
```
### Hierarchical Crew with Custom Manager Agent
```python
manager = Agent(
role="Editor-in-Chief",
goal="Ship accurate, on-brand content",
backstory="20-year newsroom veteran.",
allow_delegation=True,
)
crew = Crew(
agents=[researcher, writer, fact_checker],
tasks=[research_task, write_task, qa_task],
process=Process.hierarchical,
manager_agent=manager,
)
```
### Structured Output
```python
from pydantic import BaseModel
class Briefing(BaseModel):
findings: list[str]
sources: list[str]
research_task = Task(
description="Investigate {topic}.",
expected_output="Structured briefing JSON.",
agent=researcher,
output_pydantic=Briefing,
)
result = crew.kickoff(inputs={"topic": "..."})
briefing: Briefing = result.tasks_output[0].pydantic
```
## Common Pitfalls
- Using hierarchical mode without `manager_llm` or `manager_agent` — crew refuses to start.
- Vague `expected_output`; the LLM produces inconsistent shapes that break downstream tasks.
- Forgetting `context=[prev_task]` so a task ignores earlier work.
- Letting an agent own too many tools; tool selection accuracy plummets past ~10 tools.
- Treating `Crew` as stateful across `kickoff` calls — it's not. Use Flows or external memory.
- Hardcoding values inside `description`; use `{placeholders}` and pass `inputs={...}`.
## When to Use This Mode
Pick CrewAI when the problem decomposes naturally into roles ("researcher hands off to writer who hands off to editor"). Choose LangGraph for graph-shaped control flow with checkpointing, AutoGen for event-driven actor systems, or the OpenAI Agents SDK for OpenAI-native handoffs with built-in tracing.