Workflows2026年4月2日·1 分钟阅读

CrewAI — Multi-Agent Orchestration Framework

Python framework for orchestrating autonomous AI agents that collaborate on complex tasks. Role-based agents with tools, memory, and delegation.

AG
Agent Toolkit · Community
快速使用

先拿来用,再决定要不要深挖

这里应该同时让用户和 Agent 知道第一步该复制什么、安装什么、落到哪里。

# Install CrewAI
pip install crewai

# Create a new project
crewai create crew my-project
cd my-project

# Run your crew
crewai run
from crewai import Agent, Task, Crew

researcher = Agent(
    role="Senior Researcher",
    goal="Find the latest AI trends",
    backstory="Expert AI researcher with 10 years experience",
    verbose=True
)

task = Task(
    description="Research the top 5 AI trends for 2026",
    expected_output="A bullet-point summary of trends",
    agent=researcher
)

crew = Crew(agents=[researcher], tasks=[task])
result = crew.kickoff()
print(result)

Introduction

CrewAI is a production-grade Python framework for building multi-agent AI systems. Unlike single-agent approaches, CrewAI lets you define teams of specialized AI agents that collaborate, delegate, and share context to solve complex problems.

Core concepts:

  • Agents — Autonomous units with specific roles, goals, backstories, and tool access. Each agent has a persona that guides its behavior.
  • Tasks — Defined units of work assigned to agents, with expected outputs and optional dependencies.
  • Crews — Teams of agents working together on a set of tasks, with configurable process flows (sequential, hierarchical, or custom).
  • Flows — Event-driven orchestration layer for building structured, multi-step workflows that combine crews with conditional logic.
  • Tools — 60+ built-in tools (web search, file I/O, code execution) plus easy custom tool creation.
  • Memory — Short-term, long-term, and entity memory for agents to learn and improve across interactions.

Built from scratch (not a LangChain wrapper), optimized for performance and minimal resource usage.

FAQ

Q: How is CrewAI different from AutoGen or LangGraph? A: CrewAI focuses on role-based agent collaboration with a simpler API. It's standalone (no LangChain dependency), has built-in memory, and supports both autonomous crews and structured flows.

Q: What LLMs does it support? A: Any LLM via LiteLLM — OpenAI, Anthropic Claude, Google Gemini, local models via Ollama, and 100+ others.

Q: Can I use custom tools? A: Yes. Decorate any Python function with @tool or create a class inheriting from BaseTool. CrewAI also integrates with LangChain tools.

Q: Is it production-ready? A: Yes. CrewAI AMP (Agent Monitoring Platform) provides enterprise features: observability, security guardrails, and deployment management.

Works With

  • Python 3.10+
  • OpenAI / Anthropic / Google / Ollama / 100+ LLMs via LiteLLM
  • Built-in tools: SerperDev, Browserbase, Firecrawl, code interpreter
  • CrewAI AMP for production monitoring
🙏

来源与感谢

  • GitHub: crewAIInc/crewAI
  • License: MIT
  • Stars: 47,000+
  • Maintainer: CrewAI Inc. (@joaomdmoura)

Thanks to Joao Moura and the CrewAI team for building the most popular multi-agent framework, making collaborative AI accessible to every developer.

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产