Chuyển đến nội dung
Skillpedia
Agent14k · #11221

crewai-multi-agent

Skill này làm gì

Skill này giải thích CrewAI, một framework để xây dựng nhóm agent AI, mỗi agent có vai trò, mục tiêu và nhiệm vụ riêng. Skill dành cho lập trình viên muốn các agent cộng tác theo một thứ tự rõ ràng.

Khi nào nên dùng

  • ✓Khi một tác vụ được chia tốt nhất cho các vai trò chuyên biệt, như nhà nghiên cứu, người viết và nhà phân tích.
  • ✓Khi bạn cần các agent chạy theo trình tự hoặc dưới sự điều phối của một agent quản lý.
  • ✓Khi bạn muốn các agent giữ bộ nhớ ngắn hạn và dài hạn qua các bước.

Liên kết skill

https://github.com/Orchestra-Research/AI-Research-SKILLs/blob/main/14-agents/crewai/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/Orchestra-Research/AI-Research-SKILLs/blob/main/14-agents/crewai/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Hãy thiết lập một nhóm ba agent AI: một agent nghiên cứu chủ đề, một agent viết bài, và một agent kiểm tra lỗi.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Bạn định nghĩa agent với vai trò, mục tiêu và tiểu sử, sau đó định nghĩa các nhiệm vụ và gom chúng vào một crew. Crew chạy các nhiệm vụ theo trình tự hoặc phân cấp, và các agent chuyển kết quả cho nhau.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

CrewAI - Multi-Agent Orchestration Framework

Build teams of autonomous AI agents that collaborate to solve complex tasks.

When to use CrewAI

Use CrewAI when:

  • Building multi-agent systems with specialized roles
  • Need autonomous collaboration between agents
  • Want role-based task delegation (researcher, writer, analyst)
  • Require sequential or hierarchical process execution
  • Building production workflows with memory and observability
  • Need simpler setup than LangChain/LangGraph

Key features:

  • Standalone: No LangChain dependencies, lean footprint
  • Role-based: Agents have roles, goals, and backstories
  • Dual paradigm: Crews (autonomous) + Flows (event-driven)
  • 50+ tools: Web scraping, search, databases, AI services
  • Memory: Short-term, long-term, and entity memory
  • Production-ready: Tracing, enterprise features

Use alternatives instead:

  • LangChain: General-purpose LLM apps, RAG pipelines
  • LangGraph: Complex stateful workflows with cycles
  • AutoGen: Microsoft ecosystem, multi-agent conversations
  • LlamaIndex: Document Q&A, knowledge retrieval

Quick start

Installation

# Core framework
pip install crewai

# With 50+ built-in tools
pip install 'crewai[tools]'

Create project with CLI

# Create new crew project
crewai create crew my_project
cd my_project

# Install dependencies
crewai install

# Run the crew
crewai run

Simple crew (code-only)

from crewai import Agent, Task, Crew, Process

# 1. Define agents
researcher = Agent(
    role="Senior Research Analyst",
    goal="Discover cutting-edge developments in AI",
    backstory="You are an expert analyst with a keen eye for emerging trends.",
    verbose=True
)

writer = Agent(
    role="Technical Writer",
    goal="Create clear, engaging content about technical topics",
    backstory="You excel at explaining complex concepts to general audiences.",
    verbose=True
)

# 2. Define tasks
research_task = Task(
    description="Research the latest developments in {topic}. Find 5 key trends.",
    expected_output="A detailed report with 5 bullet points on key trends.",
    agent=researcher
)

write_task = Task(
    description="Write a blog post based on the research findings.",
    expected_output="A 500-word blog post in markdown format.",
    agent=writer,
    context=[research_task]  # Uses research output
)

# 3. Create and run crew
crew = Crew(
    agents=[researcher, writer],
    tasks=[research_task, write_task],
    process=Process.sequential,  # Tasks run in order
    verbose=True
)

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

Core concepts

Agents - Autonomous workers

from crewai import Agent

agent = Agent(
    role="Data Scientist",                    # Job title/role
    goal="Analyze data to find insights",     # What they aim to achieve
    backstory="PhD in statistics...",         # Background context
    llm="gpt-4o",                             # LLM to use
    tools=[],                                 # Tools available
    memory=True,                              # Enable memory
    verbose=True,                             # Show reasoning
    allow_delegation=True,                    # Can delegate to others
    max_iter=15,                              # Max reasoning iterations
    max_rpm=10                                # Rate limit
)

Tasks - Units of work

from crewai import Task

task = Task(
    description="Analyze the sales data for Q4 2024. {context}",
    expected_output="A summary report with key metrics and trends.",
    agent=analyst,                            # Assigned agent
    context=[previous_task],                  # Input from other tasks
    output_file="report.md",                  # Save to file
    async_execution=False,                    # Run synchronously
    human_input=False                         # No human approval needed
)

Crews - Teams of agents

from crewai import Crew, Process

crew = Crew(
    agents=[researcher, writer, editor],      # Team members
    tasks=[research, write, edit],            # Tasks to complete
    process=Process.sequential,               # Or Process.hierarchical
    verbose=True,
    memory=True,                              # Enable crew memory
    cache=True,                               # Cache tool results
    max_rpm=10,                               # Rate limit
Câu hỏi thường gặp

Nó có cần LangChain không?

Không. Skill nói CrewAI hoạt động độc lập và không phụ thuộc LangChain.

Làm sao để bắt đầu một dự án mới?

Chạy crewai create crew my_project, rồi cài đặt các phụ thuộc mà lệnh liệt kê.

Nó có công cụ đi kèm không?

Có. Skill nhắc tới hơn 50 công cụ dựng sẵn, như tìm kiếm web và thu thập dữ liệu từ web.

Chi tiết

Mô tả gốc của tác giả

Multi-agent orchestration framework for autonomous AI collaboration. Use when building teams of specialized agents working together on complex tasks, when you need role-based agent collaboration with memory, or for production workflows requiring sequential/hierarchical execution. Built without LangChain dependencies for lean, fast execution.

repo: Orchestra-Research/AI-Research-SKILLs

Độ phổ biến

Sao GitHub
14k
Vị trí xếp hạng
#11221
Giấy phép
MIT
Cập nhật
10/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự