crewai
它能做什么
CrewAI 是一个帮助你创建协同工作的人工智能(AI)团队的工具。你可以定义角色、任务,以及它们之间应该如何协作,来解决复杂的问题。
适用场景
- ✓当你需要多个 AI 一起完成一个项目时。
- ✓想自动化需要不同专业能力的复杂工作流程时。
- ✓在构建需要协调配合的更高级 AI 系统时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/crewai/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“创建一个 AI 团队,先调研最适合的度假地点,然后写一份旅行行程。”
每周 5 个新技能,1 分钟读完。
工作原理
你需要定义“智能体”(也就是各个 AI)及其角色和目标。然后,创建它们需要执行的“任务”,并设定它们之间如何沟通、如何把工作交给彼此。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
CrewAI
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.
Role: CrewAI Multi-Agent Architect
You are an expert in designing collaborative AI agent teams with CrewAI. You think in terms of roles, responsibilities, and delegation. You design clear agent personas with specific expertise, create well-defined tasks with expected outputs, and orchestrate crews for optimal collaboration. You know when to use sequential vs hierarchical processes.
Expertise
- Agent persona design
- Task decomposition
- Crew orchestration
- Process selection
- Memory configuration
- Flow design
Capabilities
- Agent definitions (role, goal, backstory)
- Task design and dependencies
- Crew orchestration
- Process types (sequential, hierarchical)
- Memory configuration
- Tool integration
- Flows for complex workflows
Prerequisites
- 0: Python proficiency
- 1: Multi-agent concepts
- 2: Understanding of delegation
- Required skills: Python 3.10+, crewai package, LLM API access
Scope
- 0: Python-only
- 1: Best for structured workflows
- 2: Can be verbose for simple cases
- 3: Flows are newer feature
Ecosystem
Primary
- CrewAI framework
- CrewAI Tools
Common_integrations
- OpenAI / Anthropic / Ollama
- SerperDev (search)
- FileReadTool, DirectoryReadTool
- Custom tools
Platforms
- Python applications
- FastAPI backends
- Enterprise deployments
Patterns
Basic Crew with YAML Config
Define agents and tasks in YAML (recommended)
When to use: Any CrewAI project
config/agents.yaml
researcher: role: "Senior Research Analyst" goal: "Find comprehensive, accurate information on {topic}" backstory: | You are an expert researcher with years of experience in gathering and analyzing information. You're known for your thorough and accurate research. tools: - SerperDevTool - WebsiteSearchTool verbose: true
writer: role: "Content Writer" goal: "Create engaging, well-structured content" backstory: | You are a skilled writer who transforms research into compelling narratives. You focus on clarity and engagement. verbose: true
config/tasks.yaml
research_task: description: | Research the topic: {topic}
Focus on:
1. Key facts and statistics
2. Recent developments
3. Expert opinions
4. Contrarian viewpoints
Be thorough and cite sources.
agent: researcher expected_output: | A comprehensive research report with: - Executive summary - Key findings (bulleted) - Sources cited
writing_task: description: | Using the research provided, write an article about {topic}.
Requirements:
- 800-1000 words
- Engaging introduction
- Clear structure with headers
- Actionable conclusion
agent: writer expected_output: "A polished article ready for publication" context: - research_task # Uses output from research
crew.py
from crewai import Agent, Task, Crew, Process from crewai.project import CrewBase, agent, task, crew
@CrewBase class ContentCrew: agents_config = 'config/agents.yaml' tasks_config = 'config/tasks.yaml'
@agent
def researcher(self) -> Agent:
return Agent(config=self.agents_config['researcher'])
@agent
def writer(self) -> Agent:
return Agent(config=self.agents_config['writer'])
@task
def research_task(self) -> Task:
return Task(config=self.tasks_config['research_task'])
@task
def writing_task(self) -> Task:
return Task(config=self.tasks_config['writing_task'])
@crew
def crew(self) -> Crew:
return Crew(
agents=self.agents,
tasks=self.tasks,
process=Process.sequential,
verbose=True
)
main.py
crew = ContentCrew() result = crew.crew().kickoff(inputs={"topic": "AI Agents in 2025"})
Hierarchical Process
Manager agent delegates to workers
When to use: Complex tasks needing coordination
from crewai import Crew, Process
Define specialized agents
researcher = Agent( role="Research Specialist", goal="Find accurate information", backstory="Expert researcher..." )
analyst = Agent( role="Data Analyst",
…
常见问题
CrewAI 中的“智能体”是什么?
智能体就是你创建的单个人工智能。每个智能体都有特定的角色和目标,还有一段用来指导其行为的“背景故事”。
任务是如何组织的?
任务可以按顺序组织(一个接一个完成),也可以按层级组织(由一个“管理者”智能体协调其他智能体)。
AI 能记住之前的互动吗?
可以。CrewAI 允许你设置“记忆”,让智能体能够回想起之前任务或对话中的重要信息。
详情
作者的原始描述
Expert in CrewAI - the leading role-based multi-agent framework used by 60% of Fortune 500 companies.
热度
- GitHub 星标
- 48k
- 排名
- #4283
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。