← 返回 Skills 市场
zhangifonly

Crewai

作者 zhangifonly · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
294
总下载
0
收藏
2
当前安装
1
版本数
在 OpenClaw 中安装
/install crewai
功能描述
CrewAI 多智能体框架助手,精通 Agent 编排、任务分配、工具集成、工作流设计
使用说明 (SKILL.md)

CrewAI 多智能体框架助手

你是 CrewAI 多智能体编排领域的专家,帮助用户设计和实现高效的 AI 协作工作流。

核心概念

概念 说明
Agent 智能体,具有角色(role)、目标(goal)、背景故事(backstory)的自主实体
Task 任务,分配给特定 Agent 执行,包含描述和期望输出
Crew 团队,编排多个 Agent 和 Task 的协作单元
Tool 工具,Agent 可调用的外部能力(搜索、文件读写、API 调用等)
Process 流程模式,sequential(顺序)或 hierarchical(层级管理)

安装

pip install crewai crewai-tools
crewai create crew my_project  # CLI 创建项目脚手架

Agent 与 Task 定义

from crewai import Agent, Task, Crew, Process

researcher = Agent(
    role="高级研究分析师",
    goal="发现 {topic} 领域的最新突破性进展",
    backstory="你是一位资深的技术研究员,擅长从海量信息中提炼关键洞察。",
    tools=[search_tool, web_scraper],
    llm="gpt-4o",           # 支持 OpenAI/Anthropic/Ollama
    memory=True,             # 启用记忆,跨任务保持上下文
    allow_delegation=False   # 是否允许委派任务给其他 Agent
)

writer = Agent(
    role="技术内容撰稿人",
    goal="将研究成果转化为通俗易懂的技术文章",
    backstory="你是一位经验丰富的技术写作者。",
    llm="gpt-4o"
)

research_task = Task(
    description="深入研究 {topic} 的最新发展,收集至少 5 个可靠来源。",
    expected_output="一份结构化的研究报告,包含关键发现和来源引用。",
    agent=researcher,
    output_file="research_report.md"
)

writing_task = Task(
    description="基于研究报告,撰写一篇 1500 字的技术博客文章。",
    expected_output="一篇完整的技术博客文章。",
    agent=writer,
    context=[research_task]  # 依赖前置任务的输出
)

Crew 编排

crew = Crew(
    agents=[researcher, writer],
    tasks=[research_task, writing_task],
    process=Process.sequential,  # 按顺序执行
    memory=True,                 # 团队级记忆
    planning=True                # 启用任务规划
)
result = crew.kickoff(inputs={"topic": "AI Agent 框架"})

# 层级管理模式(自动创建 Manager Agent)
crew_h = Crew(
    agents=[researcher, writer, editor],
    tasks=[research_task, writing_task, review_task],
    process=Process.hierarchical,
    manager_llm="gpt-4o"
)

工具系统

from crewai_tools import (
    SerperDevTool,          # Google 搜索
    ScrapeWebsiteTool,      # 网页抓取
    FileReadTool,           # 文件读取
    PDFSearchTool,          # PDF 搜索(RAG)
    CodeInterpreterTool     # 代码执行
)

# 自定义工具
from crewai.tools import tool

@tool("股票价格查询")
def stock_price(ticker: str) -> str:
    """查询指定股票的实时价格。参数 ticker 为股票代码。"""
    return f"{ticker} 当前价格: $150.00"

高级特性

特性 说明
Memory 短期/长期/实体记忆,跨任务和跨运行保持上下文
Planning 任务执行前自动生成执行计划
Callbacks 任务/步骤级回调,用于监控和日志
Async 支持异步执行,crew.kickoff_async()
Training crew.train(n_iterations=3) 通过人类反馈优化
YAML 配置 支持 agents.yamltasks.yaml 声明式配置

与同类框架对比

特性 CrewAI LangGraph AutoGen
核心理念 角色扮演协作 图状态机 对话驱动
学习曲线 低,API 直观 中等 中等
编排方式 Sequential/Hierarchical 自定义有向图 对话/群聊
工具生态 crewai-tools 丰富 LangChain 生态 函数注册
适用场景 内容生产、研究分析 复杂工作流 代码生成、多轮讨论
安全使用建议
This skill is an instruction-only documentation helper for designing multi-agent workflows and appears internally consistent. Before you install or run anything referenced here: (1) Check PyPI (or the project source) for 'crewai' and 'crewai-tools' to confirm authorship and inspect their code; (2) Do not provide API keys (OpenAI/Anthropic/etc.) unless you trust those packages and understand where keys are stored/used; (3) Be aware examples enable web scraping, file reads, and code execution — run in a sandbox or with restricted permissions if you want to limit data exposure; (4) If you want the agent to act autonomously, consider restricting or auditing tool access and memory persistence so it cannot read or send files/credentials you care about.
功能分析
Type: OpenClaw Skill Name: crewai Version: 1.0.0 The skill bundle is a standard documentation and instruction set for the CrewAI multi-agent framework. The SKILL.md file provides legitimate code examples for agent orchestration, task definition, and tool integration without any signs of malicious intent, data exfiltration, or prompt injection attacks.
能力评估
Purpose & Capability
The name/description claim a multi-agent orchestration helper and the SKILL.md contains documentation, examples, and usage patterns for such a framework — consistent with the stated purpose.
Instruction Scope
SKILL.md contains role/instruction text for the agent and many code examples that reference web scraping, search tools, file reads, PDF/RAG, and code execution. Those examples are within scope for a multi-agent framework, but they imply actions (network access, file I/O, code execution, use of LLM backends) that the skill does not itself enumerate or constrain.
Install Mechanism
There is no install spec and no code files; the README suggests pip installing 'crewai' and 'crewai-tools' but the skill package does not perform any automatic downloads — this is low risk from the skill bundle itself. If you follow the pip command externally, validate those packages.
Credentials
The SKILL.md references LLM backends (OpenAI/Anthropic/Ollama) and tool integrations that typically require API keys, but the skill does not request or store any environment credentials itself. This is proportionate for documentation, but you should only supply service keys when you trust the actual implementation (crewai/crewai-tools).
Persistence & Privilege
always is false and the skill is user-invocable; the SKILL.md discusses optional 'memory' features but the skill bundle does not declare or modify system-wide configs. No elevated or persistent privileges are requested by the package itself.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install crewai
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /crewai 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of CrewAI multi-agent workflow assistant. - Introduces agent, task, crew, and tool concepts for collaborative AI workflows. - Provides examples for defining agents, tasks, and workflow orchestration (sequential and hierarchical). - Details tool system integration and custom tool creation. - Documents advanced features: memory, planning, callbacks, async execution, and training. - Offers comparison with similar frameworks (LangGraph, AutoGen). - Installation and quick-start instructions included.
元数据
Slug crewai
版本 1.0.0
许可证 MIT-0
累计安装 2
当前安装数 2
历史版本数 1
常见问题

Crewai 是什么?

CrewAI 多智能体框架助手,精通 Agent 编排、任务分配、工具集成、工作流设计. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 294 次。

如何安装 Crewai?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install crewai」即可一键安装,无需额外配置。

Crewai 是免费的吗?

是的,Crewai 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Crewai 支持哪些平台?

Crewai 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Crewai?

由 zhangifonly(@zhangifonly)开发并维护,当前版本 v1.0.0。

💬 留言讨论