crewai

crewai is a skill for Claude Code, Codex from znlgis/opengis-skills. It costs 107 tokens per session (4,390 once invoked), scanned C, original, MIT.

A Python framework for coordinating several AI agents and their tasks. An agent is an AI worker with a role and tools; crews organise collaborative work, while flows define controlled steps, branches, and state.

In plain words
What is it for?
Use it to build multi-agent teams, assign dependent tasks, add Python tools, route work through conditions, keep workflow state, and produce structured results.
Why use it?
It provides a structure for splitting a larger AI workflow into roles and steps instead of managing every model call manually.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to build multi-agent teams, assign dependent tasks, add Python tools, route work through conditions, keep workflow state, and produce structured results.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/znlgis/opengis-skills/crewai
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add znlgis/opengis-skills --skill crewai
Clone the repo
git clone --depth 1 https://github.com/znlgis/opengis-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for crewai

README.md
[![agentmods](https://agentmods.dev/badge/skills/znlgis/opengis-skills/crewai/github.svg)](https://agentmods.dev/skills/znlgis/opengis-skills/crewai)
Your own site
<a href="https://agentmods.dev/skills/znlgis/opengis-skills/crewai"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/crewai/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for crewai

Your own site · 80×15
<a href="https://agentmods.dev/skills/znlgis/opengis-skills/crewai"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/crewai.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 107 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,390 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 3 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00107 $0.04390
Opus 5.5 $0.00043 $0.01756
Sonnet 5.5 $0.00021 $0.00878
Haiku 4.5 $0.00011 $0.00439

Measured today against content hash 09ee4693e5b5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

crewai scanned grade C with 3 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl -LsSf https://astral.sh/uv/install.sh | sh

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -LsSf https://astral.sh/uv/install.sh | sh

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

subprocess.run(
ai/crewai/SKILL.md · 399 lines

How it starts

The opening of the file, as written. The whole thing — 399 lines — stays where its author put it; the contents beside it link to each section on GitHub.

项目地址: https://github.com/crewAIInc/crewAI

官方文档: https://docs.crewai.com/

PyPI: crewai(1.15.30,截至 2026-10)| 工具包:crewai-tools(同版号)

许可证: MIT

概述

crewAI 用两层抽象组织多智能体系统,边界很清楚:

  • Crews(自治):Agent(角色、目标、背景、工具)+ Task(描述、期望产出、依赖)组成团队,Crew 按 Process 调度执行
  • Flows(可控):事件驱动的编排层,@start / @listen / @router 加 or_ / and_ 组合条件,带类型化 state,适合生产级分支与重试
  • 两者可混用:Flow 里调 Crew,或 Crew 的某个 Task 触发 Flow,是官方推荐的生产形态
  • Python 原生:prompt、工具、执行路径、state 都能直接用 Python 改,不跟框架打架
  • 生产特性:结构化输出(output_pydantic/output_json)、memory、knowledge、checkpointing、异步执行、MCP/A2A 支持
  • 脚手架:1.x 默认 JSON-first 项目(agents/*.jsonc + crew.jsonc),需要传统 YAML/Python 结构用 --classic

环境准备

前置条件

项 要求
Python >=3.10,<3.14
包管理 官方推荐 uv(CLI 也用它装)
模型 任一经 LiteLLM 支持的 provider(OpenAI、Anthropic、DeepSeek、本地 vLLM/Ollama 均可)

方式一:uv tool(官方推荐,装 CLI)

# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

# Windows PowerShell
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

# 安装 crewai CLI
uv tool install crewai
uv tool update-shell      # 若提示 PATH 警告
uv tool list              # 应能看到 crewai

后续升级 CLI:uv tool install crewai --upgrade(只升全局 CLI,不升项目环境里的 crewai)。

方式二:pip(已有虚拟环境时)

python -m venv .venv && . .venv/bin/activate    # Windows: .venv\Scripts\Activate.ps1
python -m pip install -U crewai
python -m pip install -U crewai-tools            # 需要现成工具集时

验证

crewai version
python -c "import crewai, crewai_tools; print(crewai.__version__)"

Windows 上装 chroma-hnswlib 可能报 fatal error C1083: Cannot open include file: 'float.h'——装 Visual Studio Build Tools 的「Desktop development with C++」工作负载即可。


核心模型:Agent / Task / Crew

代码式最小 Crew

from crewai import Agent, Crew, Process, Task

researcher = Agent(
    role="Senior Data Researcher",
    goal="Uncover cutting-edge developments in {topic}",
    backstory="You are a seasoned researcher who presents findings clearly.",
    verbose=True,
)

analyst = Agent(
    role="Reporting Analyst",
    goal="Turn research into a clear report",
    backstory="You are a meticulous analyst who writes concisely.",
    verbose=True,
)

research_task = Task(
    description="Research {topic} and list 10 key points.",
    expected_output="A bullet list of 10 relevant points.",
    agent=researcher,
)

report_task = Task(
    description="Expand the research into a full markdown report.",
    expected_output="A markdown report with a section per topic.",
    agent=analyst,
    context=[research_task],
    output_file="output/report.md",
)

crew = Crew(
    agents=[researcher, analyst],
    tasks=[research_task, report_task],
    process=Process.sequential,
    verbose=True,
)

result = crew.kickoff(inputs={"topic": "AI Agents"})
print(result.raw)

Read the full file on GitHub · 399 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 399 lines · 107 tokens per session scan C 09ee4693e5b5

Subscribe to this mod's changes

crewai is a skill published in the GitHub repository znlgis/opengis-skills (75 stars, last pushed today), licensed MIT. It adds 107 tokens to every session and 4,390 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it C with 3 findings (downloads and executes remote code, makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-28.