# CrewAI — Multi-Agent Orchestration Framework > Python framework for orchestrating role-playing AI agents that collaborate on complex tasks. Define agents with roles, goals, and tools, then let them work together autonomously. 25,000+ stars. ## Install Save as a script file and run: ## Quick Use ```bash pip install crewai crewai-tools ``` ```python from crewai import Agent, Task, Crew researcher = Agent( role="Senior Researcher", goal="Find the latest AI trends", backstory="Expert at analyzing tech trends", tools=[search_tool] ) writer = Agent( role="Tech Writer", goal="Write engaging content about AI", backstory="Skilled at making complex topics accessible" ) research_task = Task( description="Research the top 5 AI coding tools in 2026", agent=researcher ) write_task = Task( description="Write a blog post based on the research", agent=writer ) crew = Crew(agents=[researcher, writer], tasks=[research_task, write_task]) result = crew.kickoff() ``` --- ## Intro CrewAI is a Python framework for orchestrating role-playing AI agents that collaborate on complex tasks with 25,000+ GitHub stars. Define agents with specific roles, goals, backstories, and tools, then organize them into crews that work together autonomously — like assembling a virtual team where each member has specialized expertise. Best for developers building multi-agent systems for research, content creation, data analysis, and workflow automation. Works with: Claude, GPT-4, Gemini, Ollama, any LangChain-supported model. Setup time: under 3 minutes. --- ## Core Concepts ### Agents Each agent has a role, goal, and optional tools: ```python analyst = Agent( role="Data Analyst", goal="Analyze datasets and find actionable insights", backstory="10 years of experience in data science", tools=[csv_tool, sql_tool, chart_tool], llm="claude-sonnet-4-20250514" ) ``` ### Tasks Tasks define what needs to be done: ```python analysis_task = Task( description="Analyze Q1 sales data and identify top-performing regions", expected_output="Report with charts and recommendations", agent=analyst, output_file="q1_analysis.md" ) ``` ### Crews Crews orchestrate agents and tasks: ```python crew = Crew( agents=[analyst, writer, reviewer], tasks=[analysis_task, write_task, review_task], process=Process.sequential # or Process.hierarchical ) ``` ### Process Types | Process | How It Works | |---------|-------------| | `sequential` | Tasks run one after another | | `hierarchical` | Manager agent delegates to workers | ### Built-In Tools ```python from crewai_tools import ( SerperDevTool, # Web search ScrapeWebsiteTool, # Web scraping FileReadTool, # Read files DirectoryReadTool, # Read directories CodeInterpreterTool # Execute code ) ``` ### Real-World Example: Content Pipeline ```python # Research → Write → Edit → Publish researcher = Agent(role="Researcher", tools=[search_tool]) writer = Agent(role="Writer") editor = Agent(role="Editor") crew = Crew( agents=[researcher, writer, editor], tasks=[ Task(description="Research topic X", agent=researcher), Task(description="Write 1000-word article", agent=writer), Task(description="Edit for grammar and clarity", agent=editor), ], process=Process.sequential ) ``` ### Key Stats - 25,000+ GitHub stars - Role-based agent design - Sequential and hierarchical processes - 20+ built-in tools - Memory and caching support ### FAQ **Q: What is CrewAI?** A: CrewAI is a Python framework for building teams of AI agents that collaborate on complex tasks, each with specialized roles, goals, and tools. **Q: Is CrewAI free?** A: Yes, open-source under MIT license. Enterprise edition available. **Q: How is CrewAI different from LangGraph?** A: CrewAI uses a role-playing metaphor — you define agents with roles and goals. LangGraph uses a graph-based approach with nodes and edges. CrewAI is more intuitive for team-like workflows. --- ## Source & Thanks > Created by [CrewAI](https://github.com/crewAIInc). Licensed under MIT. > > [crewAI](https://github.com/crewAIInc/crewAI) — ⭐ 25,000+ Thanks to the CrewAI team for making multi-agent orchestration accessible. --- ## 快速使用 ```bash pip install crewai crewai-tools ``` ```python from crewai import Agent, Task, Crew researcher = Agent(role="研究员", goal="找到最新 AI 趋势") writer = Agent(role="作者", goal="撰写引人入胜的内容") crew = Crew( agents=[researcher, writer], tasks=[Task(description="研究 AI 工具趋势", agent=researcher), Task(description="写一篇博客文章", agent=writer)] ) result = crew.kickoff() ``` --- ## 简介 CrewAI 是一个用于编排角色扮演 AI Agent 的 Python 框架,GitHub 25,000+ stars。定义具有角色、目标和工具的 Agent,组织成团队自主协作完成复杂任务。适合构建研究、内容创作、数据分析等多 Agent 系统。 --- ## 来源与感谢 > Created by [CrewAI](https://github.com/crewAIInc). Licensed under MIT. > > [crewAI](https://github.com/crewAIInc/crewAI) — ⭐ 25,000+ --- Source: https://tokrepo.com/en/workflows/97fce2da-d60f-413c-a31d-527cd7aaa558 Author: Agent Toolkit