Expert in CrewAI - the leading role-based multi-agent framework used by 60% of Fortune 500 companies. Covers agent design with roles and goals, task definition, crew orchestration, process types (sequential, hierarchical, parallel), memory systems, and flows for complex workflows. Essential for building collaborative AI agent teams. Use when: crewai, multi-agent team, agent roles, crew of agents, role-based agents.
Add this skill
npx mdskills install sickn33/crewaiComprehensive multi-agent framework guide with clear patterns, anti-patterns, and concrete examples
1---2name: crewai3description: "Expert in CrewAI - the leading role-based multi-agent framework used by 60% of Fortune 500 companies. Covers agent design with roles and goals, task definition, crew orchestration, process types (sequential, hierarchical, parallel), memory systems, and flows for complex workflows. Essential for building collaborative AI agent teams. Use when: crewai, multi-agent team, agent roles, crew of agents, role-based agents."4source: vibeship-spawner-skills (Apache 2.0)5---67# CrewAI89**Role**: CrewAI Multi-Agent Architect1011You are an expert in designing collaborative AI agent teams with CrewAI. You think12in terms of roles, responsibilities, and delegation. You design clear agent personas13with specific expertise, create well-defined tasks with expected outputs, and14orchestrate crews for optimal collaboration. You know when to use sequential vs15hierarchical processes.1617## Capabilities1819- Agent definitions (role, goal, backstory)20- Task design and dependencies21- Crew orchestration22- Process types (sequential, hierarchical)23- Memory configuration24- Tool integration25- Flows for complex workflows2627## Requirements2829- Python 3.10+30- crewai package31- LLM API access3233## Patterns3435### Basic Crew with YAML Config3637Define agents and tasks in YAML (recommended)3839**When to use**: Any CrewAI project4041```python42# config/agents.yaml43researcher:44 role: "Senior Research Analyst"45 goal: "Find comprehensive, accurate information on {topic}"46 backstory: |47 You are an expert researcher with years of experience48 in gathering and analyzing information. You're known49 for your thorough and accurate research.50 tools:51 - SerperDevTool52 - WebsiteSearchTool53 verbose: true5455writer:56 role: "Content Writer"57 goal: "Create engaging, well-structured content"58 backstory: |59 You are a skilled writer who transforms research60 into compelling narratives. You focus on clarity61 and engagement.62 verbose: true6364# config/tasks.yaml65research_task:66 description: |67 Research the topic: {topic}6869 Focus on:70 1. Key facts and statistics71 2. Recent developments72 3. Expert opinions73 4. Contrarian viewpoints7475 Be thorough and cite sources.76 agent: researcher77 expected_output: |78 A comprehensive research report with:79 - Executive summary80 - Key findings (bulleted)81 - Sources cited8283writing_task:84 description: |85 Using the research provided, write an article about {topic}.8687 Requirements:88 - 800-1000 words89 - Engaging introduction90 - Clear structure with headers91 - Actionable conclusion92 agent: writer93 expected_output: "A polished article ready for publication"94 context:95 - research_task # Uses output from research9697# crew.py98from crewai import Agent, Task, Crew, Process99from crewai.project import CrewBase, agent, task, crew100101@CrewBase102class ContentCrew:103 agents_config = 'config/agents.yaml'104 tasks_config = 'config/tasks.yaml'105106 @agent107 def researcher(self) -> Agent:108 return Agent(config=self.agents_config['researcher'])109110 @agent111 def writer(self) -> Agent:112 return Agent(config=self.agents_config['writer'])113114 @task115 def research_task(self) -> Task:116 return Task(config=self.tasks_config['research_task'])117118 @task119 def writing_task(self) -> Task:120 return Task(config121```122123### Hierarchical Process124125Manager agent delegates to workers126127**When to use**: Complex tasks needing coordination128129```python130from crewai import Crew, Process131132# Define specialized agents133researcher = Agent(134 role="Research Specialist",135 goal="Find accurate information",136 backstory="Expert researcher..."137)138139analyst = Agent(140 role="Data Analyst",141 goal="Analyze and interpret data",142 backstory="Expert analyst..."143)144145writer = Agent(146 role="Content Writer",147 goal="Create engaging content",148 backstory="Expert writer..."149)150151# Hierarchical crew - manager coordinates152crew = Crew(153 agents=[researcher, analyst, writer],154 tasks=[research_task, analysis_task, writing_task],155 process=Process.hierarchical,156 manager_llm=ChatOpenAI(model="gpt-4o"), # Manager model157 verbose=True158)159160# Manager decides:161# - Which agent handles which task162# - When to delegate163# - How to combine results164165result = crew.kickoff()166```167168### Planning Feature169170Generate execution plan before running171172**When to use**: Complex workflows needing structure173174```python175from crewai import Crew, Process176177# Enable planning178crew = Crew(179 agents=[researcher, writer, reviewer],180 tasks=[research, write, review],181 process=Process.sequential,182 planning=True, # Enable planning183 planning_llm=ChatOpenAI(model="gpt-4o") # Planner model184)185186# With planning enabled:187# 1. CrewAI generates step-by-step plan188# 2. Plan is injected into each task189# 3. Agents see overall structure190# 4. More consistent results191192result = crew.kickoff()193194# Access the plan195print(crew.plan)196```197198## Anti-Patterns199200### ❌ Vague Agent Roles201202**Why bad**: Agent doesn't know its specialty.203Overlapping responsibilities.204Poor task delegation.205206**Instead**: Be specific:207- "Senior React Developer" not "Developer"208- "Financial Analyst specializing in crypto" not "Analyst"209Include specific skills in backstory.210211### ❌ Missing Expected Outputs212213**Why bad**: Agent doesn't know done criteria.214Inconsistent outputs.215Hard to chain tasks.216217**Instead**: Always specify expected_output:218expected_output: |219 A JSON object with:220 - summary: string (100 words max)221 - key_points: list of strings222 - confidence: float 0-1223224### ❌ Too Many Agents225226**Why bad**: Coordination overhead.227Inconsistent communication.228Slower execution.229230**Instead**: 3-5 agents with clear roles.231One agent can handle multiple related tasks.232Use tools instead of agents for simple actions.233234## Limitations235236- Python-only237- Best for structured workflows238- Can be verbose for simple cases239- Flows are newer feature240241## Related Skills242243Works well with: `langgraph`, `autonomous-agents`, `langfuse`, `structured-output`244
Full transparency — inspect the skill content before installing.