写点什么

CrewAI 上手攻略:多 Agent 自动化处理复杂任务,让 AI 像员工一样分工协作

作者:郝培强
  • 2025-11-29
    广东
  • 本文字数:18692 字

    阅读完需:约 61 分钟

CrewAI 上手攻略:多 Agent 自动化处理复杂任务,让 AI 像员工一样分工协作

CrewAI 是一个可以专门用来编排自主 AI 智能体(Autonomous AI Agents) 的 Python 框架,你可以把它理解为在代码层面组建一个“虚拟团队”,给每个 Agent 分配特定的角色、目标,让它们协同处理那些单个 LLM 搞不定的复杂任务。

CrewAI 介绍

CrewAI 包含以下组件:

Agents 是具体的执行实体,有角色设定和能力边界;Tasks 是具体的任务指令;Crews 是把“人”和事儿撮合到一起的团队容器;Tools 则是 Agent 手里的工具(比如搜索、读文件、调 API 等等);Processes 决定了活儿怎么干,比如说是大家排队干(顺序)还是层级汇报(层级)。

CrewA 最适合的是那种链条长、环节多的工作流。比如你要搞个深度研报,需要先全网搜集信息,然后整理分析,写初稿,最后润色发布,这种“研究-写作-编辑”的流水线就非常契合。同理商业竞品分析、代码开发流程(设计-编码-测试)或者分工明确的客户支持系统,都是它的强项。

但有几种情况别用:

如果你的任务简单到一次 LLM 调用就能解决,用 CrewAI 就没有必要了而且还会增加复杂度和成本。对实时性要求极高的场景(比如毫秒级响应)也不合适,因为多 Agent 交互本来就慢。还有那种每一步都得让人盯着确认的流程,这种流程自动化程度太低也没必要上 Agent 编排。

安装与配置

环境准备很简单,基础包装上就行,如果需要额外的工具集,就把 tools 加上。

 # Install CrewAI   pip install crewai crewai-tools  # For additional tools   pip install 'crewai[tools]'
复制代码

基础示例:搭建内容创作团队

下面这段代码展示了如何把 Research Analyst(研究员)、Content Writer(撰稿人)和 Editor(编辑)这三个角色串起来。代码逻辑很简单:定义 Agent,定义 Task,最后塞进 Crew 里跑起来。

*注意观察

context
复制代码

参数,它实现了任务间的数据流转。*

 from crewai import Agent, Task, Crew, Process  from crewai_tools import SerperDevTool, WebsiteSearchTool
# Initialize tools search_tool = SerperDevTool() web_tool = WebsiteSearchTool()
# Create Agents researcher = Agent( role='Research Analyst', goal='Gather comprehensive information on {topic}', backstory='You are an expert researcher with a keen eye for detail and accuracy.', tools=[search_tool, web_tool], verbose=True, allow_delegation=False )
writer = Agent( role='Content Writer', goal='Create engaging, well-structured content about {topic}', backstory='You are a skilled writer who transforms research into compelling narratives.', verbose=True, allow_delegation=False )
editor = Agent( role='Editor', goal='Refine and polish content to ensure quality and clarity', backstory='You are a meticulous editor with an eye for grammar, style, and flow.', verbose=True, allow_delegation=False )
# Define Tasks research_task = Task( description='Research {topic} and gather key facts, statistics, and insights.', expected_output='A comprehensive research report with sources', agent=researcher )
writing_task = Task( description='Using the research, write a 500-word blog post about {topic}', expected_output='A well-written blog post in markdown format', agent=writer, context=[research_task] # Depends on research task )
editing_task = Task( description='Edit the blog post for grammar, clarity, and engagement', expected_output='A polished, publication-ready blog post', agent=editor, context=[writing_task] )
# Create Crew crew = Crew( agents=[researcher, writer, editor], tasks=[research_task, writing_task, editing_task], process=Process.sequential, # Tasks run in order verbose=True )
# Execute result = crew.kickoff(inputs={'topic': 'Artificial Intelligence in Healthcare'}) print(result)
复制代码

进阶示例:软件开发

对于更复杂的场景,比如软件开发,可能需要引入层级流程(Hierarchical Process)。这时候会有一个隐藏的 Manager Agent(通常用更强的模型如 GPT-5)来统筹分配任务,而不是简单的线性执行。

 from crewai import Agent, Task, Crew  from crewai_tools import FileReadTool, CodeInterpreterTool
# Tools file_tool = FileReadTool() code_tool = CodeInterpreterTool()
# Agents with specific expertise architect = Agent( role='Software Architect', goal='Design scalable software architecture for {project}', backstory='Senior architect with 15 years of experience in system design.', verbose=True )
developer = Agent( role='Python Developer', goal='Write clean, efficient Python code', backstory='Expert Python developer focused on best practices.', tools=[code_tool], verbose=True )
qa_engineer = Agent( role='QA Engineer', goal='Ensure code quality through comprehensive testing', backstory='Detail-oriented QA engineer specializing in test automation.', tools=[code_tool], verbose=True )
# Tasks design_task = Task( description='Design architecture for a {project} including component breakdown', expected_output='Detailed architecture document with diagrams', agent=architect )
development_task = Task( description='Implement the core functionality based on the architecture', expected_output='Working Python code with documentation', agent=developer, context=[design_task] )
testing_task = Task( description='Write and execute unit tests for the developed code', expected_output='Test suite with coverage report', agent=qa_engineer, context=[development_task] )
# Hierarchical process with manager agent dev_crew = Crew( agents=[architect, developer, qa_engineer], tasks=[design_task, development_task, testing_task], process=Process.hierarchical, # Manager coordinates tasks manager_llm='gpt-4', # Manager uses GPT-4 verbose=True )
result = dev_crew.kickoff(inputs={'project': 'RESTful API for task management'})
复制代码

进阶功能:异步、人工介入与结构化输出

如果你追求性能,异步执行(Asynchronous Execution) 是一个可选项,特别是 IO 密集型任务。

 # Run crew asynchronously for better performance   result = await crew.kickoff_async(inputs={'topic': 'AI trends'})  # Run specific tasks in parallel   from crewai import Task   task1 = Task(description='Research topic A', agent=researcher, async_execution=True)   task2 = Task(description='Research topic B', agent=researcher, async_execution=True)
复制代码

有些关键节点不能完全信赖 AI,这时候开启 Human-in-the-Loop,Agent 执行到一半会停下来问你要反馈。

 agent = Agent(       role='Decision Maker',       goal='Make strategic decisions',       human_input=True  # Will prompt for human feedback   )
复制代码

工程化最头疼的是输出格式不可控,CrewAI 支持 Pydantic 模型,强制 Agent 输出结构化数据,这对后续的数据清洗非常有帮助。

 from crewai import Task  from pydantic import BaseModel
class BlogPost(BaseModel): title: str content: str tags: list[str]
task = Task( description='Write a blog post', expected_output='Blog post with title and tags', agent=writer, output_json=BlogPost, # Structured output output_file='output.json' # Save to file )
复制代码

生态与集成

官方内置了一堆工具库,覆盖了搜索(Google/Serper)、文件操作(File/Directory Read)、代码执行(CodeInterpreter)以及各种数据源(PDF, CSV, JSON, GitHub, YouTube)的读取。

模型支持方面利用了 LangChain 的生态,OpenAI, Anthropic, Google Gemini 都能切。想省钱或者数据敏感,用 Ollama 跑本地模型(Llama 3, Mistral)也没问题。

https://vk.com/topic-233805841_55616731

https://vk.com/topic-233805840_55139631

https://vk.com/topic-233805838_54546475

https://vk.com/topic-233805839_54765163

https://vk.com/topic-233805841_55616729

https://vk.com/topic-233805840_55139629

https://vk.com/topic-233805838_54546474

https://vk.com/topic-233805839_54765161

https://vk.com/topic-233805841_55616726

https://vk.com/topic-233805840_55139627

https://vk.com/topic-233805838_54546472

https://vk.com/topic-233805839_54765159

https://vk.com/topic-233805841_55616724

https://vk.com/topic-233805840_55139626

https://vk.com/topic-233805838_54546471

https://vk.com/topic-233805839_54765158

https://vk.com/topic-233805841_55616723

https://vk.com/topic-233805840_55139625

https://vk.com/topic-233805838_54546469

https://vk.com/topic-233805839_54765157

https://vk.com/topic-233805841_55616720

https://vk.com/topic-233805840_55139624

https://vk.com/topic-233805838_54546468

https://vk.com/topic-233805839_54765156

https://vk.com/topic-233805841_55616719

https://vk.com/topic-233805840_55139623

https://vk.com/topic-233805838_54546467

https://vk.com/topic-233805839_54765155

https://vk.com/topic-233805841_55616717

https://vk.com/topic-233805840_55139622

https://vk.com/topic-233805838_54546466

https://vk.com/topic-233805839_54765154

https://vk.com/topic-233805841_55616715

https://vk.com/topic-233805840_55139620

https://vk.com/topic-233805838_54546465

https://vk.com/topic-233805839_54765153

https://vk.com/topic-233805841_55616714

https://vk.com/topic-233805840_55139619

https://vk.com/topic-233805838_54546463

https://vk.com/topic-233805839_54765152

https://vk.com/topic-233805841_55616713

https://vk.com/topic-233805840_55139618

https://vk.com/topic-233805838_54546462

https://vk.com/topic-233805839_54765150

https://vk.com/topic-233805841_55616712

https://vk.com/topic-233805840_55139617

https://vk.com/topic-233805838_54546461

https://vk.com/topic-233805839_54765149

https://vk.com/topic-233805841_55616711

https://vk.com/topic-233805840_55139616

https://vk.com/topic-233805838_54546460

https://vk.com/topic-233805839_54765148

https://vk.com/topic-233805841_55616710

https://vk.com/topic-233805840_55139615

https://vk.com/topic-233805838_54546459

https://vk.com/topic-233805839_54765147

https://vk.com/topic-233805841_55616709

https://vk.com/topic-233805840_55139614

https://vk.com/topic-233805838_54546458

https://vk.com/topic-233805839_54765145

https://vk.com/topic-233805841_55616707

https://vk.com/topic-233805840_55139613

https://vk.com/topic-233805838_54546457

https://vk.com/topic-233805839_54765144

https://vk.com/topic-233805841_55616705

https://vk.com/topic-233805840_55139611

https://vk.com/topic-233805838_54546456

https://vk.com/topic-233805839_54765143

https://vk.com/topic-233805841_55616703

https://vk.com/topic-233805840_55139610

https://vk.com/topic-233805838_54546455

https://vk.com/topic-233805839_54765141

https://vk.com/topic-233805841_55616701

https://vk.com/topic-233805840_55139607

https://vk.com/topic-233805838_54546452

https://vk.com/topic-233805839_54765140

https://vk.com/topic-233805841_55616700

https://vk.com/topic-233805840_55139606

https://vk.com/topic-233805838_54546451

https://vk.com/topic-233805839_54765139

https://vk.com/topic-233805841_55616699

https://vk.com/topic-233805840_55139605

https://vk.com/topic-233805838_54546450

https://vk.com/topic-233805839_54765137

https://vk.com/topic-233805841_55616697

https://vk.com/topic-233805840_55139603

https://vk.com/topic-233805838_54546449

https://vk.com/topic-233805839_54765135

https://vk.com/topic-233805841_55616695

https://vk.com/topic-233805840_55139602

https://vk.com/topic-233805838_54546448

https://vk.com/topic-233805839_54765134

https://vk.com/topic-233805841_55616694

https://vk.com/topic-233805840_55139601

https://vk.com/topic-233805838_54546446

https://vk.com/topic-233805839_54765133

https://vk.com/topic-233805841_55616693

https://vk.com/topic-233805840_55139599

https://vk.com/topic-233805838_54546445

https://vk.com/topic-233805839_54765132

https://vk.com/topic-233805841_55616692

https://vk.com/topic-233805840_55139598

https://vk.com/topic-233805838_54546444

https://vk.com/topic-233805839_54765131

https://vk.com/topic-233805841_55616690

https://vk.com/topic-233805840_55139597

https://vk.com/topic-233805838_54546443

https://vk.com/topic-233805839_54765130

https://vk.com/topic-233805841_55616689

https://vk.com/topic-233805840_55139596

https://vk.com/topic-233805838_54546442

https://vk.com/topic-233805839_54765129

https://vk.com/topic-233805841_55616688

https://vk.com/topic-233805840_55139595

https://vk.com/topic-233805838_54546440

https://vk.com/topic-233805839_54765128

https://vk.com/topic-233805841_55616687

https://vk.com/topic-233805840_55139594

https://vk.com/topic-233805838_54546439

https://vk.com/topic-233805839_54765127

https://vk.com/topic-233805841_55616686

https://vk.com/topic-233805840_55139593

https://vk.com/topic-233805838_54546438

https://vk.com/topic-233805839_54765126

https://vk.com/topic-233805841_55616685

https://vk.com/topic-233805840_55139592

https://vk.com/topic-233805838_54546437

https://vk.com/topic-233805841_55616684

https://vk.com/topic-233805840_55139591

https://vk.com/topic-233805838_54546436

https://vk.com/topic-233805841_55616683

https://vk.com/topic-233805840_55139590

https://vk.com/topic-233805838_54546435

https://vk.com/topic-233805841_55616682

https://vk.com/topic-233805840_55139589

https://vk.com/topic-233805839_54765124

https://vk.com/topic-233805838_54546434

https://vk.com/topic-233805841_55616680

https://vk.com/topic-233805840_55139588

https://vk.com/topic-233805838_54546433

https://vk.com/topic-233805839_54765123

https://vk.com/topic-233805841_55616679

https://vk.com/topic-233805840_55139586

https://vk.com/topic-233805838_54546432

https://vk.com/topic-233805841_55616678

https://vk.com/topic-233805840_55139585

https://vk.com/topic-233805839_54765122

https://vk.com/topic-233805838_54546429

https://vk.com/topic-233805841_55616676

https://vk.com/topic-233805840_55139584

https://vk.com/topic-233805839_54765121

https://vk.com/topic-233805838_54546427

https://vk.com/topic-233805841_55616675

https://vk.com/topic-233805840_55139582

https://vk.com/topic-233805839_54765120

https://vk.com/topic-233805838_54546426

https://vk.com/topic-233805841_55616672

https://vk.com/topic-233805840_55139581

https://vk.com/topic-233805839_54765119

https://vk.com/topic-233805841_55616671

https://vk.com/topic-233805840_55139580

https://vk.com/topic-233805838_54546425

https://vk.com/topic-233805839_54765117

https://vk.com/topic-233805841_55616670

https://vk.com/topic-233805840_55139579

https://vk.com/topic-233805839_54765115

https://vk.com/topic-233805838_54546424

https://vk.com/topic-233805841_55616669

https://vk.com/topic-233805840_55139578

https://vk.com/topic-233805839_54765114

https://vk.com/topic-233805838_54546423

https://vk.com/topic-233805841_55616667

https://vk.com/topic-233805840_55139577

https://vk.com/topic-233805839_54765113

https://vk.com/topic-233805838_54546422

https://vk.com/topic-233805841_55616665

https://vk.com/topic-233805840_55139574

https://vk.com/topic-233805839_54765112

https://vk.com/topic-233805838_54546421

https://vk.com/topic-233805281_55616651

https://vk.com/topic-233805283_54352672

https://vk.com/topic-233805284_54055527

https://vk.com/topic-233805286_54426538

https://vk.com/topic-233805282_54728096

https://vk.com/topic-233805276_54426537

https://vk.com/topic-233805278_54546411

https://vk.com/topic-233805279_54765103

https://vk.com/topic-233805285_53940092

https://vk.com/topic-233805280_55139566

https://vk.com/topic-233805281_55616650

https://vk.com/topic-233805283_54352671

https://vk.com/topic-233805284_54055526

https://vk.com/topic-233805286_54426536

https://vk.com/topic-233805282_54728095

https://vk.com/topic-233805276_54426535

https://vk.com/topic-233805278_54546410

https://vk.com/topic-233805279_54765102

https://vk.com/topic-233805285_53940091

https://vk.com/topic-233805280_55139565

https://vk.com/topic-233805281_55616648

https://vk.com/topic-233805283_54352670

https://vk.com/topic-233805284_54055524

https://vk.com/topic-233805286_54426534

https://vk.com/topic-233805282_54728093

https://vk.com/topic-233805276_54426533

https://vk.com/topic-233805278_54546409

https://vk.com/topic-233805279_54765097

https://vk.com/topic-233805285_53940089

https://vk.com/topic-233805280_55139564

https://vk.com/topic-233805281_55616647

https://vk.com/topic-233805283_54352667

https://vk.com/topic-233805284_54055523

https://vk.com/topic-233805286_54426532

https://vk.com/topic-233805282_54728091

https://vk.com/topic-233805276_54426531

https://vk.com/topic-233805278_54546407

https://vk.com/topic-233805279_54765095

https://vk.com/topic-233805285_53940088

https://vk.com/topic-233805280_55139563

https://vk.com/topic-233805281_55616645

https://vk.com/topic-233805283_54352666

https://vk.com/topic-233805284_54055522

https://vk.com/topic-233805286_54426530

https://vk.com/topic-233805282_54728090

https://vk.com/topic-233805276_54426529

https://vk.com/topic-233805278_54546406

https://vk.com/topic-233805279_54765094

https://vk.com/topic-233805285_53940087

https://vk.com/topic-233805280_55139562

https://vk.com/topic-233805281_55616644

https://vk.com/topic-233805283_54352665

https://vk.com/topic-233805284_54055521

https://vk.com/topic-233805286_54426528

https://vk.com/topic-233805282_54728088

https://vk.com/topic-233805276_54426527

https://vk.com/topic-233805278_54546405

https://vk.com/topic-233805279_54765091

https://vk.com/topic-233805285_53940086

https://vk.com/topic-233805280_55139559

https://vk.com/topic-233805281_55616643

https://vk.com/topic-233805283_54352664

https://vk.com/topic-233805284_54055519

https://vk.com/topic-233805286_54426526

https://vk.com/topic-233805276_54426525

https://vk.com/topic-233805282_54728087

https://vk.com/topic-233805278_54546404

https://vk.com/topic-233805279_54765090

https://vk.com/topic-233805285_53940085

https://vk.com/topic-233805280_55139558

https://vk.com/topic-233805281_55616642

https://vk.com/topic-233805283_54352663

https://vk.com/topic-233805284_54055518

https://vk.com/topic-233805286_54426524

https://vk.com/topic-233805276_54426523

https://vk.com/topic-233805282_54728086

https://vk.com/topic-233805278_54546402

https://vk.com/topic-233805279_54765089

https://vk.com/topic-233805285_53940084

https://vk.com/topic-233805280_55139556

https://vk.com/topic-233805281_55616640

https://vk.com/topic-233805283_54352662

https://vk.com/topic-233805284_54055517

https://vk.com/topic-233805286_54426522

https://vk.com/topic-233805276_54426521

https://vk.com/topic-233805282_54728085

https://vk.com/topic-233805278_54546401

https://vk.com/topic-233805279_54765088

https://vk.com/topic-233805285_53940083

https://vk.com/topic-233805280_55139555

https://vk.com/topic-233805281_55616638

https://vk.com/topic-233805283_54352659

https://vk.com/topic-233805284_54055516

https://vk.com/topic-233805286_54426520

https://vk.com/topic-233805276_54426519

https://vk.com/topic-233805282_54728084

https://vk.com/topic-233805278_54546400

https://vk.com/topic-233805279_54765086

https://vk.com/topic-233805285_53940082

https://vk.com/topic-233805280_55139554

https://vk.com/topic-233805281_55616637

https://vk.com/topic-233805283_54352658

https://vk.com/topic-233805284_54055514

https://vk.com/topic-233805286_54426518

https://vk.com/topic-233805276_54426517

https://vk.com/topic-233805282_54728083

https://vk.com/topic-233805279_54765085

https://vk.com/topic-233805278_54546399

https://vk.com/topic-233805285_53940081

https://vk.com/topic-233805280_55139553

https://vk.com/topic-233805281_55616635

https://vk.com/topic-233805283_54352657

https://vk.com/topic-233805284_54055513

https://vk.com/topic-233805286_54426516

https://vk.com/topic-233805276_54426515

https://vk.com/topic-233805282_54728082

https://vk.com/topic-233805279_54765082

https://vk.com/topic-233805278_54546398

https://vk.com/topic-233805285_53940080

https://vk.com/topic-233805280_55139552

https://vk.com/topic-233805281_55616634

https://vk.com/topic-233805283_54352656

https://vk.com/topic-233805286_54426514

https://vk.com/topic-233805284_54055512

https://vk.com/topic-233805282_54728081

https://vk.com/topic-233805276_54426513

https://vk.com/topic-233805279_54765081

https://vk.com/topic-233805278_54546397

https://vk.com/topic-233805285_53940079

https://vk.com/topic-233805280_55139551

https://vk.com/topic-233805281_55616633

https://vk.com/topic-233805283_54352655

https://vk.com/topic-233805286_54426511

https://vk.com/topic-233805284_54055511

https://vk.com/topic-233805282_54728078

https://vk.com/topic-233805276_54426509

https://vk.com/topic-233805279_54765080

https://vk.com/topic-233805285_53940078

https://vk.com/topic-233805278_54546396

https://vk.com/topic-233805280_55139549

https://vk.com/topic-233805281_55616632

https://vk.com/topic-233805283_54352653

https://vk.com/topic-233805286_54426508

https://vk.com/topic-233805284_54055510

https://vk.com/topic-233805282_54728075

https://vk.com/topic-233805276_54426507

https://vk.com/topic-233805285_53940075

https://vk.com/topic-233805279_54765079

https://vk.com/topic-233805278_54546395

https://vk.com/topic-233805280_55139546

https://vk.com/topic-233805283_54352652

https://vk.com/topic-233805281_55616631

https://vk.com/topic-233805286_54426506

https://vk.com/topic-233805284_54055508

https://vk.com/topic-233805282_54728074

https://vk.com/topic-233805276_54426505

https://vk.com/topic-233805285_53940074

https://vk.com/topic-233805279_54765078

https://vk.com/topic-233805278_54546394

https://vk.com/topic-233805280_55139545

https://vk.com/topic-233805281_55616630

https://vk.com/topic-233805283_54352650

https://vk.com/topic-233805286_54426503

https://vk.com/topic-233805284_54055506

https://vk.com/topic-233805282_54728071

https://vk.com/topic-233805276_54426502

https://vk.com/topic-233805285_53940073

https://vk.com/topic-233805279_54765076

https://vk.com/topic-233805278_54546393

https://vk.com/topic-233805280_55139543

https://vk.com/topic-233805281_55616629

https://vk.com/topic-233805283_54352649

https://vk.com/topic-233805286_54426501

https://vk.com/topic-233805284_54055505

https://vk.com/topic-233805282_54728069

https://vk.com/topic-233805276_54426500

https://vk.com/topic-233805279_54765075

https://vk.com/topic-233805285_53940072

https://vk.com/topic-233805278_54546392

https://vk.com/topic-233805280_55139541

https://vk.com/topic-233805281_55616628

https://vk.com/topic-233805283_54352648

https://vk.com/topic-233805286_54426499

https://vk.com/topic-233805284_54055504

https://vk.com/topic-233805282_54728068

https://vk.com/topic-233805276_54426498

https://vk.com/topic-233805279_54765071

https://vk.com/topic-233805285_53940071

https://vk.com/topic-233805278_54546391

https://vk.com/topic-233805280_55139540

https://vk.com/topic-233805281_55616627

https://vk.com/topic-233805283_54352647

https://vk.com/topic-233805286_54426497

https://vk.com/topic-233805284_54055503

https://vk.com/topic-233805282_54728066

https://vk.com/topic-233805276_54426496

https://vk.com/topic-233805285_53940070

https://vk.com/topic-233805279_54765069

https://vk.com/topic-233805278_54546390

https://vk.com/topic-233805280_55139538

https://vk.com/topic-233805281_55616625

https://vk.com/topic-233805283_54352646

https://vk.com/topic-233805286_54426495

https://vk.com/topic-233805284_54055502

https://vk.com/topic-233805282_54728065

https://vk.com/topic-233805276_54426494

https://vk.com/topic-233805285_53940069

https://vk.com/topic-233805279_54765067

https://vk.com/topic-233805278_54546389

https://vk.com/topic-233805280_55139537

https://vk.com/topic-233805283_54352645

https://vk.com/topic-233805286_54426492

https://vk.com/topic-233805284_54055501

https://vk.com/topic-233805281_55616623

https://vk.com/topic-233805282_54728063

https://vk.com/topic-233805279_54765066

https://vk.com/topic-233805285_53940068

https://vk.com/topic-233805278_54546388

https://vk.com/topic-233805276_54426491

https://vk.com/topic-233805280_55139536

https://vk.com/topic-233805283_54352644

https://vk.com/topic-233805286_54426489

https://vk.com/topic-233805284_54055500

https://vk.com/topic-233805281_55616622

https://vk.com/topic-233805282_54728062

https://vk.com/topic-233805285_53940067

https://vk.com/topic-233805279_54765064

https://vk.com/topic-233805278_54546387

https://vk.com/topic-233805276_54426488

https://vk.com/topic-233805280_55139535

https://vk.com/topic-233805283_54352643

https://vk.com/topic-233805286_54426487

https://vk.com/topic-233805284_54055499

https://vk.com/topic-233805282_54728061

https://vk.com/topic-233805281_55616620

https://vk.com/topic-233805285_53940066

https://vk.com/topic-233805279_54765062

https://vk.com/topic-233805278_54546386

https://vk.com/topic-233805276_54426486

https://vk.com/topic-233805280_55139533

https://vk.com/topic-233805283_54352642

https://vk.com/topic-233805286_54426485

https://vk.com/topic-233805284_54055498

https://vk.com/topic-233805281_55616619

https://vk.com/topic-233805282_54728060

https://vk.com/topic-233805285_53940065

https://vk.com/topic-233805279_54765061

https://vk.com/topic-233805278_54546385

https://vk.com/topic-233805276_54426484

https://vk.com/topic-233805280_55139532

https://vk.com/topic-233805283_54352641

https://vk.com/topic-233805286_54426483

https://vk.com/topic-233805284_54055497

https://vk.com/topic-233805282_54728059

https://vk.com/topic-233805281_55616618

https://vk.com/topic-233805285_53940064

https://vk.com/topic-233805279_54765060

https://vk.com/topic-233805278_54546384

https://vk.com/topic-233805276_54426482

https://vk.com/topic-233805280_55139531

https://vk.com/topic-233805283_54352640

https://vk.com/topic-233805286_54426481

https://vk.com/topic-233805284_54055496

https://vk.com/topic-233805282_54728058

https://vk.com/topic-233805281_55616617

https://vk.com/topic-233805285_53940063

https://vk.com/topic-233805279_54765059

https://vk.com/topic-233805278_54546383

https://vk.com/topic-233805280_55139530

https://vk.com/topic-233805276_54426480

https://vk.com/topic-233805283_54352639

https://vk.com/topic-233805286_54426479

https://vk.com/topic-233805284_54055495

https://vk.com/topic-233805282_54728057

https://vk.com/topic-233805281_55616616

https://vk.com/topic-233805285_53940062

https://vk.com/topic-233805279_54765058

https://vk.com/topic-233805278_54546382

https://vk.com/topic-233805280_55139529

https://vk.com/topic-233805276_54426478

https://vk.com/topic-233805283_54352638

https://vk.com/topic-233805286_54426476

https://vk.com/topic-233805284_54055494

https://vk.com/topic-233805282_54728055

https://vk.com/topic-233805281_55616615

https://vk.com/topic-233805285_53940061

https://vk.com/topic-233805279_54765057

https://vk.com/topic-233805278_54546381

https://vk.com/topic-233805280_55139528

https://vk.com/topic-233805276_54426475

https://vk.com/topic-233805283_54352637

https://vk.com/topic-233805286_54426474

https://vk.com/topic-233805284_54055493

https://vk.com/topic-233805282_54728054

https://vk.com/topic-233805281_55616613

https://vk.com/topic-233805285_53940060

https://vk.com/topic-233805279_54765056

https://vk.com/topic-233805278_54546380

https://vk.com/topic-233805280_55139527

https://vk.com/topic-233805276_54426473

https://vk.com/topic-233805283_54352635

https://vk.com/topic-233805286_54426472

https://vk.com/topic-233805284_54055492

https://vk.com/topic-233805282_54728053

https://vk.com/topic-233805281_55616612

https://vk.com/topic-233805285_53940059

https://vk.com/topic-233805279_54765055

https://vk.com/topic-233805278_54546379

https://vk.com/topic-233805280_55139526

https://vk.com/topic-233805276_54426471

https://vk.com/topic-233805283_54352634

https://vk.com/topic-233805286_54426470

https://vk.com/topic-233805284_54055491

https://vk.com/topic-233805282_54728052

https://vk.com/topic-233805281_55616611

https://vk.com/topic-233805285_53940058

https://vk.com/topic-233805279_54765054

https://vk.com/topic-233805278_54546378

https://vk.com/topic-233805280_55139525

https://vk.com/topic-233805276_54426469

https://vk.com/topic-233805283_54352632

https://vk.com/topic-233805286_54426468

https://vk.com/topic-233805284_54055490

https://vk.com/topic-233805282_54728051

https://vk.com/topic-233805281_55616609

https://vk.com/topic-233805285_53940057

https://vk.com/topic-233805279_54765052

https://vk.com/topic-233805278_54546377

https://vk.com/topic-233805280_55139524

https://vk.com/topic-233805276_54426467

https://vk.com/topic-233805283_54352631

https://vk.com/topic-233805286_54426466

https://vk.com/topic-233805284_54055488

https://vk.com/topic-233805282_54728050

https://vk.com/topic-233805281_55616607

https://vk.com/topic-233805285_53940056

https://vk.com/topic-233805279_54765051

https://vk.com/topic-233805280_55139523

https://vk.com/topic-233805278_54546376

https://vk.com/topic-233805276_54426465

https://vk.com/topic-233805283_54352630

https://vk.com/topic-233805286_54426464

https://vk.com/topic-233805284_54055487

https://vk.com/topic-233805282_54728049

https://vk.com/topic-233805281_55616606

https://vk.com/topic-233805285_53940055

https://vk.com/topic-233805279_54765049

https://vk.com/topic-233805280_55139522

https://vk.com/topic-233805276_54426463

https://vk.com/topic-233805278_54546375

https://vk.com/topic-233805283_54352628

https://vk.com/topic-233805286_54426462

https://vk.com/topic-233805284_54055486

https://vk.com/topic-233805282_54728048

https://vk.com/topic-233805281_55616605

https://vk.com/topic-233805285_53940054

https://vk.com/topic-233805279_54765048

https://vk.com/topic-233805280_55139521

https://vk.com/topic-233805276_54426461

https://vk.com/topic-233805278_54546374

https://vk.com/topic-233805283_54352627

https://vk.com/topic-233805286_54426460

https://vk.com/topic-233805284_54055485

https://vk.com/topic-233805282_54728047

https://vk.com/topic-233805281_55616603

https://vk.com/topic-233805285_53940053

https://vk.com/topic-233805279_54765047

https://vk.com/topic-233805280_55139520

https://vk.com/topic-233805278_54546373

https://vk.com/topic-233805276_54426459

https://vk.com/topic-233805283_54352626

https://vk.com/topic-233805286_54426458

https://vk.com/topic-233805284_54055484

https://vk.com/topic-233805282_54728046

https://vk.com/topic-233805281_55616602

https://vk.com/topic-233805285_53940052

https://vk.com/topic-233805279_54765045

https://vk.com/topic-233805280_55139519

https://vk.com/topic-233805278_54546372

https://vk.com/topic-233805276_54426457

https://vk.com/topic-233805283_54352624

https://vk.com/topic-233805286_54426456

https://vk.com/topic-233805282_54728045

https://vk.com/topic-233805284_54055483

https://vk.com/topic-233805281_55616601

https://vk.com/topic-233805285_53940051

https://vk.com/topic-233805279_54765043

https://vk.com/topic-233805280_55139518

https://vk.com/topic-233805276_54426455

https://vk.com/topic-233805278_54546371

https://vk.com/topic-233805283_54352623

https://vk.com/topic-233805286_54426454

https://vk.com/topic-233805282_54728044

https://vk.com/topic-233805284_54055481

https://vk.com/topic-233805281_55616600

https://vk.com/topic-233805285_53940050

https://vk.com/topic-233805279_54765042

https://vk.com/topic-233805280_55139517

https://vk.com/topic-233805278_54546370

https://vk.com/topic-233805276_54426453

https://vk.com/topic-233805283_54352621

https://vk.com/topic-233805286_54426452

https://vk.com/topic-233805282_54728043

https://vk.com/topic-233805284_54055480

https://vk.com/topic-233805281_55616599

https://vk.com/topic-233805285_53940049

https://vk.com/topic-233805279_54765040

https://vk.com/topic-233805280_55139516

https://vk.com/topic-233805278_54546369

https://vk.com/topic-233805276_54426451

https://vk.com/topic-233805283_54352619

https://vk.com/topic-233805286_54426450

https://vk.com/topic-233805282_54728042

https://vk.com/topic-233805284_54055479

https://vk.com/topic-233805285_53940048

https://vk.com/topic-233805281_55616598

https://vk.com/topic-233805279_54765039

https://vk.com/topic-233805280_55139514

https://vk.com/topic-233805278_54546368

https://vk.com/topic-233805276_54426449

https://vk.com/topic-233805283_54352617

https://vk.com/topic-233805286_54426446

https://vk.com/topic-233805282_54728041

https://vk.com/topic-233805284_54055478

https://vk.com/topic-233805281_55616595

https://vk.com/topic-233805285_53940047

https://vk.com/topic-233805280_55139513

https://vk.com/topic-233805279_54765038

https://vk.com/topic-233805278_54546366

https://vk.com/topic-233805276_54426445

https://vk.com/topic-233805283_54352615

https://vk.com/topic-233805286_54426444

https://vk.com/topic-233805282_54728040

https://vk.com/topic-233805284_54055477

https://vk.com/topic-233805281_55616594

https://vk.com/topic-233805285_53940045

https://vk.com/topic-233805280_55139512

https://vk.com/topic-233805279_54765037

https://vk.com/topic-233805278_54546365

https://vk.com/topic-233805276_54426443

https://vk.com/topic-233805283_54352613

https://vk.com/topic-233805282_54728039

https://vk.com/topic-233805286_54426442

https://vk.com/topic-233805281_55616593

https://vk.com/topic-233805285_53940044

https://vk.com/topic-233805284_54055476

https://vk.com/topic-233805280_55139511

https://vk.com/topic-233805279_54765034

https://vk.com/topic-233805278_54546364

https://vk.com/topic-233805276_54426441

https://vk.com/topic-233805283_54352610

https://vk.com/topic-233805282_54728038

https://vk.com/topic-233805286_54426440

https://vk.com/topic-233805285_53940043

https://vk.com/topic-233805281_55616591

https://vk.com/topic-233805284_54055475

https://vk.com/topic-233805280_55139510

https://vk.com/topic-233805279_54765033

https://vk.com/topic-233805278_54546363

https://vk.com/topic-233805276_54426439

https://vk.com/topic-233805283_54352609

https://vk.com/topic-233805282_54728037

https://vk.com/topic-233805286_54426438

https://vk.com/topic-233805285_53940042

https://vk.com/topic-233805281_55616589

https://vk.com/topic-233805284_54055474

https://vk.com/topic-233805280_55139509

https://vk.com/topic-233805279_54765032

https://vk.com/topic-233805278_54546362

https://vk.com/topic-233805276_54426437

https://vk.com/topic-233805283_54352608

https://vk.com/topic-233805282_54728035

https://vk.com/topic-233805286_54426436

https://vk.com/topic-233805285_53940041

https://vk.com/topic-233805281_55616587

https://vk.com/topic-233805280_55139508

https://vk.com/topic-233805284_54055473

https://vk.com/topic-233805279_54765030

https://vk.com/topic-233805278_54546361

https://vk.com/topic-233805276_54426435

https://vk.com/topic-233805283_54352607

https://vk.com/topic-233805282_54728034

https://vk.com/topic-233805286_54426434

https://vk.com/topic-233805285_53940040

https://vk.com/topic-233805281_55616585

https://vk.com/topic-233805280_55139507

https://vk.com/topic-233805284_54055472

https://vk.com/topic-233805279_54765029

https://vk.com/topic-233805278_54546360

https://vk.com/topic-233805276_54426432

https://vk.com/topic-233805283_54352606

https://vk.com/topic-233805282_54728032

https://vk.com/topic-233805286_54426431

https://vk.com/topic-233805285_53940039

https://vk.com/topic-233805281_55616584

https://vk.com/topic-233805280_55139506

https://vk.com/topic-233805284_54055471

https://vk.com/topic-233805279_54765028

https://vk.com/topic-233805278_54546359

https://vk.com/topic-233805276_54426430

https://vk.com/topic-233804709_54765022

https://vk.com/topic-233804721_55616574

https://vk.com/topic-233804723_54352595

https://vk.com/topic-233804722_54728028

https://vk.com/topic-233804720_55139503

https://vk.com/topic-233804718_54546352

https://vk.com/topic-233804711_55616573

https://vk.com/topic-233804712_54728027

https://vk.com/topic-233804715_53940036

https://vk.com/topic-233804709_54765019

https://vk.com/topic-233804721_55616572

https://vk.com/topic-233804714_54055464

https://vk.com/topic-233804723_54352593

https://vk.com/topic-233804722_54728026

https://vk.com/topic-233804720_55139501

https://vk.com/topic-233804718_54546351

https://vk.com/topic-233804711_55616570

https://vk.com/topic-233804712_54728025

https://vk.com/topic-233804715_53940035

https://vk.com/topic-233804709_54765017

https://vk.com/topic-233804721_55616569

https://vk.com/topic-233804714_54055463

https://vk.com/topic-233804723_54352592

https://vk.com/topic-233804722_54728024

https://vk.com/topic-233804720_55139500

https://vk.com/topic-233804718_54546350

https://vk.com/topic-233804711_55616568

https://vk.com/topic-233804712_54728023

https://vk.com/topic-233804715_53940034

https://vk.com/topic-233804709_54765016

https://vk.com/topic-233804721_55616567

https://vk.com/topic-233804714_54055462

https://vk.com/topic-233804723_54352591

https://vk.com/topic-233804722_54728022

https://vk.com/topic-233804720_55139499

https://vk.com/topic-233804718_54546349

https://vk.com/topic-233804711_55616566

https://vk.com/topic-233804712_54728021

https://vk.com/topic-233804715_53940033

https://vk.com/topic-233804709_54765015

https://vk.com/topic-233804721_55616565

https://vk.com/topic-233804714_54055461

https://vk.com/topic-233804723_54352590

https://vk.com/topic-233804722_54728020

https://vk.com/topic-233804720_55139498

https://vk.com/topic-233804718_54546348

https://vk.com/topic-233804711_55616564

https://vk.com/topic-233804712_54728019

https://vk.com/topic-233804715_53940032

https://vk.com/topic-233804709_54765014

https://vk.com/topic-233804721_55616562

https://vk.com/topic-233804714_54055460

https://vk.com/topic-233804722_54728018

https://vk.com/topic-233804723_54352589

https://vk.com/topic-233804720_55139497

https://vk.com/topic-233804718_54546347

https://vk.com/topic-233804711_55616561

https://vk.com/topic-233804712_54728017

https://vk.com/topic-233804715_53940031

https://vk.com/topic-233804709_54765012

https://vk.com/topic-233804721_55616560

https://vk.com/topic-233804714_54055459

https://vk.com/topic-233804722_54728016

https://vk.com/topic-233804723_54352588

https://vk.com/topic-233804720_55139496

https://vk.com/topic-233804718_54546345

https://vk.com/topic-233804711_55616559

https://vk.com/topic-233804712_54728015

https://vk.com/topic-233804715_53940030

https://vk.com/topic-233804709_54765011

https://vk.com/topic-233804721_55616558

https://vk.com/topic-233804714_54055458

https://vk.com/topic-233804722_54728014

https://vk.com/topic-233804723_54352587

CrewAI vs 其他

经常有人问它和 AutoGen 的区别。简单说 CrewAI 像是管理严密的正规军,强调角色(Role)和流程(Process);AutoGen 更像是一个聊天室,Agent 之间通过对话来解决问题,更灵活但也更难控制。至于 LangGraph,那是更底层的图编排工具,控制粒度极细,但上手门槛高。你可以理解为 CrewAI 是在 LangChain 之上做了很好的封装,用起来简单。

补充规划、记忆与安全

新版本(0.30+)加入了 Planning Mode,Agent 开干前会先生成个计划书(现在 Agent 基本上都会有计划了)。记忆系统也升级了:支持短期记忆(本次执行内)、长期记忆(跨执行持久化)甚至实体记忆(记住具体的人和事)。

如果你需要监控整个 Crew 的运行状态,可以开启 Telemetry,导出 JSON 格式的日志做分析。

总结

CrewAI 在处理角色分工明确、流程复杂的知识型工作时表现非常出色。如果你是初学者:先别整太复杂的流程,2-3 个 Agent 起步,把目标定死,用 Pydantic 锁死输出格式,把缓存开起来。等熟悉了 Agent 的操作,再上复杂的层级结构和记忆系统。

用户头像

郝培强

关注

还未添加个人签名 2025-11-19 加入

还未添加个人简介

评论

发布
暂无评论
CrewAI 上手攻略:多 Agent 自动化处理复杂任务,让 AI 像员工一样分工协作_郝培强_InfoQ写作社区