[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-crewAIInc--crewAI":3,"tool-crewAIInc--crewAI":62},[4,18,26,36,46,54],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",159267,2,"2026-04-17T11:29:14",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":42,"last_commit_at":43,"category_tags":44,"status":17},8272,"opencode","anomalyco\u002Fopencode","OpenCode 是一款开源的 AI 编程助手（Coding Agent），旨在像一位智能搭档一样融入您的开发流程。它不仅仅是一个代码补全插件，而是一个能够理解项目上下文、自主规划任务并执行复杂编码操作的智能体。无论是生成全新功能、重构现有代码，还是排查难以定位的 Bug，OpenCode 都能通过自然语言交互高效完成，显著减少开发者在重复性劳动和上下文切换上的时间消耗。\n\n这款工具专为软件开发者、工程师及技术研究人员设计，特别适合希望利用大模型能力来提升编码效率、加速原型开发或处理遗留代码维护的专业人群。其核心亮点在于完全开源的架构，这意味着用户可以审查代码逻辑、自定义行为策略，甚至私有化部署以保障数据安全，彻底打破了传统闭源 AI 助手的“黑盒”限制。\n\n在技术体验上，OpenCode 提供了灵活的终端界面（Terminal UI）和正在测试中的桌面应用程序，支持 macOS、Windows 及 Linux 全平台。它兼容多种包管理工具，安装便捷，并能无缝集成到现有的开发环境中。无论您是追求极致控制权的资深极客，还是渴望提升产出的独立开发者，OpenCode 都提供了一个透明、可信",144296,1,"2026-04-16T14:50:03",[13,45],"插件",{"id":47,"name":48,"github_repo":49,"description_zh":50,"stars":51,"difficulty_score":32,"last_commit_at":52,"category_tags":53,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[14,15,13],{"id":55,"name":56,"github_repo":57,"description_zh":58,"stars":59,"difficulty_score":32,"last_commit_at":60,"category_tags":61,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[45,13,15,14],{"id":63,"github_repo":64,"name":65,"description_en":66,"description_zh":67,"ai_summary_zh":67,"readme_en":68,"readme_zh":69,"quickstart_zh":70,"use_case_zh":71,"hero_image_url":72,"owner_login":73,"owner_name":65,"owner_avatar_url":74,"owner_bio":75,"owner_company":76,"owner_location":76,"owner_email":76,"owner_twitter":77,"owner_website":78,"owner_url":79,"languages":80,"stars":100,"forks":101,"last_commit_at":102,"license":103,"difficulty_score":32,"env_os":104,"env_gpu":105,"env_ram":105,"env_deps":106,"category_tags":113,"github_topics":114,"view_count":32,"oss_zip_url":76,"oss_zip_packed_at":76,"status":17,"created_at":120,"updated_at":121,"faqs":122,"releases":147},8627,"crewAIInc\u002FcrewAI","crewAI","Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.","crewAI 是一个轻量级且极速的 Python 框架，专为编排角色扮演与自主运行的 AI 智能体而设计。它旨在解决单一 AI 模型在处理复杂任务时能力有限的问题，通过让多个具备不同角色和目标的智能体像团队一样协作，共同拆解并完成高难度工作流。\n\n这款工具非常适合开发者、技术研究人员以及希望构建企业级自动化流程的工程团队使用。无论是需要快速原型的初创项目，还是对安全性、可扩展性有严格要求的生产环境，crewAI 都能提供灵活的支持。\n\n其独特的技术亮点在于完全从零构建，不依赖 LangChain 或其他现有代理框架，从而在保持代码简洁的同时，赋予开发者对底层逻辑的精准控制权。除了基础的“智能体小组（Crews）”模式外，它还推出了面向企业生产的\"Flows\"架构，支持细粒度的事件驱动控制和高效的单大模型调用调度。此外，配套的 AMP 套件提供了统一的控制平面，具备实时追踪、可观测性及高级安全合规功能，帮助用户轻松监控和管理大规模智能体系统，是实现高效、可靠 AI 自动化的理想选择。","\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FcrewAIInc_crewAI_readme_a0595c90e72c.png\" width=\"600px\" alt=\"Open source Multi-AI Agent orchestration framework\">\n  \u003C\u002Fa>\n\u003C\u002Fp>\n\u003Cp align=\"center\" style=\"display: flex; justify-content: center; gap: 20px; align-items: center;\">\n  \u003Ca href=\"https:\u002F\u002Ftrendshift.io\u002Frepositories\u002F11239\" target=\"_blank\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FcrewAIInc_crewAI_readme_4a68feb902da.png\" alt=\"crewAIInc%2FcrewAI | Trendshift\" style=\"width: 250px; height: 55px;\" width=\"250\" height=\"55\"\u002F>\n  \u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fcrewai.com\">Homepage\u003C\u002Fa>\n  ·\n  \u003Ca href=\"https:\u002F\u002Fdocs.crewai.com\">Docs\u003C\u002Fa>\n  ·\n  \u003Ca href=\"https:\u002F\u002Fapp.crewai.com\">Start Cloud Trial\u003C\u002Fa>\n  ·\n  \u003Ca href=\"https:\u002F\u002Fblog.crewai.com\">Blog\u003C\u002Fa>\n  ·\n  \u003Ca href=\"https:\u002F\u002Fcommunity.crewai.com\">Forum\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002FcrewAIInc\u002FcrewAI\" alt=\"GitHub Repo stars\">\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI\u002Fnetwork\u002Fmembers\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fforks\u002FcrewAIInc\u002FcrewAI\" alt=\"GitHub forks\">\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI\u002Fissues\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fissues\u002FcrewAIInc\u002FcrewAI\" alt=\"GitHub issues\">\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI\u002Fpulls\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fissues-pr\u002FcrewAIInc\u002FcrewAI\" alt=\"GitHub pull requests\">\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-green.svg\" alt=\"License: MIT\">\n  \u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fcrewai\u002F\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fcrewai\" alt=\"PyPI version\">\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fcrewai\u002F\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fdm\u002Fcrewai\" alt=\"PyPI downloads\">\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Ftwitter.com\u002FcrewAIInc\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Ftwitter\u002Ffollow\u002FcrewAIInc?style=social\" alt=\"Twitter Follow\">\n  \u003C\u002Fa>\n\u003C\u002Fp>\n\n### Fast and Flexible Multi-Agent Automation Framework\n\n> CrewAI is a lean, lightning-fast Python framework built entirely from scratch—completely **independent of LangChain or other agent frameworks**.\n> It empowers developers with both high-level simplicity and precise low-level control, ideal for creating autonomous AI agents tailored to any scenario.\n\n- **CrewAI Crews**: Optimize for autonomy and collaborative intelligence.\n- **CrewAI Flows**: The **enterprise and production architecture** for building and deploying multi-agent systems. Enable granular, event-driven control, single LLM calls for precise task orchestration and supports Crews natively\n\nWith over 100,000 developers certified through our community courses at [learn.crewai.com](https:\u002F\u002Flearn.crewai.com), CrewAI is rapidly becoming the\nstandard for enterprise-ready AI automation.\n\n# CrewAI AMP Suite\n\nCrewAI AMP Suite is a comprehensive bundle tailored for organizations that require secure, scalable, and easy-to-manage agent-driven automation.\n\nYou can try one part of the suite the [Crew Control Plane for free](https:\u002F\u002Fapp.crewai.com)\n\n## Crew Control Plane Key Features:\n\n- **Tracing & Observability**: Monitor and track your AI agents and workflows in real-time, including metrics, logs, and traces.\n- **Unified Control Plane**: A centralized platform for managing, monitoring, and scaling your AI agents and workflows.\n- **Seamless Integrations**: Easily connect with existing enterprise systems, data sources, and cloud infrastructure.\n- **Advanced Security**: Built-in robust security and compliance measures ensuring safe deployment and management.\n- **Actionable Insights**: Real-time analytics and reporting to optimize performance and decision-making.\n- **24\u002F7 Support**: Dedicated enterprise support to ensure uninterrupted operation and quick resolution of issues.\n- **On-premise and Cloud Deployment Options**: Deploy CrewAI AMP on-premise or in the cloud, depending on your security and compliance requirements.\n\nCrewAI AMP is designed for enterprises seeking a powerful, reliable solution to transform complex business processes into efficient,\nintelligent automations.\n\n## Table of contents\n\n- [Why CrewAI?](#why-crewai)\n- [Getting Started](#getting-started)\n- [Key Features](#key-features)\n- [Understanding Flows and Crews](#understanding-flows-and-crews)\n- [CrewAI vs LangGraph](#how-crewai-compares)\n- [Examples](#examples)\n  - [Quick Tutorial](#quick-tutorial)\n  - [Write Job Descriptions](#write-job-descriptions)\n  - [Trip Planner](#trip-planner)\n  - [Stock Analysis](#stock-analysis)\n  - [Using Crews and Flows Together](#using-crews-and-flows-together)\n- [Connecting Your Crew to a Model](#connecting-your-crew-to-a-model)\n- [How CrewAI Compares](#how-crewai-compares)\n- [Frequently Asked Questions (FAQ)](#frequently-asked-questions-faq)\n- [Contribution](#contribution)\n- [Telemetry](#telemetry)\n- [License](#license)\n\n## Why CrewAI?\n\n\u003Cdiv align=\"center\" style=\"margin-bottom: 30px;\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FcrewAIInc_crewAI_readme_d821d2b58484.png\" alt=\"CrewAI Logo\" width=\"100%\">\n\u003C\u002Fdiv>\n\nCrewAI unlocks the true potential of multi-agent automation, delivering the best-in-class combination of speed, flexibility, and control with either Crews of AI Agents or Flows of Events:\n\n- **Standalone Framework**: Built from scratch, independent of LangChain or any other agent framework.\n- **High Performance**: Optimized for speed and minimal resource usage, enabling faster execution.\n- **Flexible Low Level Customization**: Complete freedom to customize at both high and low levels - from overall workflows and system architecture to granular agent behaviors, internal prompts, and execution logic.\n- **Ideal for Every Use Case**: Proven effective for both simple tasks and highly complex, real-world, enterprise-grade scenarios.\n- **Robust Community**: Backed by a rapidly growing community of over **100,000 certified** developers offering comprehensive support and resources.\n\nCrewAI empowers developers and enterprises to confidently build intelligent automations, bridging the gap between simplicity, flexibility, and performance.\n\n## Getting Started\n\nSetup and run your first CrewAI agents by following this tutorial.\n\n[![CrewAI Getting Started Tutorial](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FcrewAIInc_crewAI_readme_7d5834320d9f.jpg)](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=-kSOTtYzgEw \"CrewAI Getting Started Tutorial\")\n\n###\n\nLearning Resources\n\nLearn CrewAI through our comprehensive courses:\n\n- [Multi AI Agent Systems with CrewAI](https:\u002F\u002Fwww.deeplearning.ai\u002Fshort-courses\u002Fmulti-ai-agent-systems-with-crewai\u002F) - Master the fundamentals of multi-agent systems\n- [Practical Multi AI Agents and Advanced Use Cases](https:\u002F\u002Fwww.deeplearning.ai\u002Fshort-courses\u002Fpractical-multi-ai-agents-and-advanced-use-cases-with-crewai\u002F) - Deep dive into advanced implementations\n\n### Understanding Flows and Crews\n\nCrewAI offers two powerful, complementary approaches that work seamlessly together to build sophisticated AI applications:\n\n1. **Crews**: Teams of AI agents with true autonomy and agency, working together to accomplish complex tasks through role-based collaboration. Crews enable:\n\n   - Natural, autonomous decision-making between agents\n   - Dynamic task delegation and collaboration\n   - Specialized roles with defined goals and expertise\n   - Flexible problem-solving approaches\n\n2. **Flows**: Production-ready, event-driven workflows that deliver precise control over complex automations. Flows provide:\n\n   - Fine-grained control over execution paths for real-world scenarios\n   - Secure, consistent state management between tasks\n   - Clean integration of AI agents with production Python code\n   - Conditional branching for complex business logic\n\nThe true power of CrewAI emerges when combining Crews and Flows. This synergy allows you to:\n\n- Build complex, production-grade applications\n- Balance autonomy with precise control\n- Handle sophisticated real-world scenarios\n- Maintain clean, maintainable code structure\n\n### Getting Started with Installation\n\nTo get started with CrewAI, follow these simple steps:\n\n### 1. Installation\n\nEnsure you have Python >=3.10 \u003C3.14 installed on your system. CrewAI uses [UV](https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002F) for dependency management and package handling, offering a seamless setup and execution experience.\n\nFirst, install CrewAI:\n\n```shell\nuv pip install crewai\n```\n\nIf you want to install the 'crewai' package along with its optional features that include additional tools for agents, you can do so by using the following command:\n\n```shell\nuv pip install 'crewai[tools]'\n```\n\nThe command above installs the basic package and also adds extra components which require more dependencies to function.\n\n### Troubleshooting Dependencies\n\nIf you encounter issues during installation or usage, here are some common solutions:\n\n#### Common Issues\n\n1. **ModuleNotFoundError: No module named 'tiktoken'**\n\n   - Install tiktoken explicitly: `uv pip install 'crewai[embeddings]'`\n   - If using embedchain or other tools: `uv pip install 'crewai[tools]'`\n\n2. **Failed building wheel for tiktoken**\n\n   - Ensure Rust compiler is installed (see installation steps above)\n   - For Windows: Verify Visual C++ Build Tools are installed\n   - Try upgrading pip: `uv pip install --upgrade pip`\n   - If issues persist, use a pre-built wheel: `uv pip install tiktoken --prefer-binary`\n\n### 2. Setting Up Your Crew with the YAML Configuration\n\nTo create a new CrewAI project, run the following CLI (Command Line Interface) command:\n\n```shell\ncrewai create crew \u003Cproject_name>\n```\n\nThis command creates a new project folder with the following structure:\n\n```\nmy_project\u002F\n├── .gitignore\n├── pyproject.toml\n├── README.md\n├── .env\n└── src\u002F\n    └── my_project\u002F\n        ├── __init__.py\n        ├── main.py\n        ├── crew.py\n        ├── tools\u002F\n        │   ├── custom_tool.py\n        │   └── __init__.py\n        └── config\u002F\n            ├── agents.yaml\n            └── tasks.yaml\n```\n\nYou can now start developing your crew by editing the files in the `src\u002Fmy_project` folder. The `main.py` file is the entry point of the project, the `crew.py` file is where you define your crew, the `agents.yaml` file is where you define your agents, and the `tasks.yaml` file is where you define your tasks.\n\n#### To customize your project, you can:\n\n- Modify `src\u002Fmy_project\u002Fconfig\u002Fagents.yaml` to define your agents.\n- Modify `src\u002Fmy_project\u002Fconfig\u002Ftasks.yaml` to define your tasks.\n- Modify `src\u002Fmy_project\u002Fcrew.py` to add your own logic, tools, and specific arguments.\n- Modify `src\u002Fmy_project\u002Fmain.py` to add custom inputs for your agents and tasks.\n- Add your environment variables into the `.env` file.\n\n#### Example of a simple crew with a sequential process:\n\nInstantiate your crew:\n\n```shell\ncrewai create crew latest-ai-development\n```\n\nModify the files as needed to fit your use case:\n\n**agents.yaml**\n\n```yaml\n# src\u002Fmy_project\u002Fconfig\u002Fagents.yaml\nresearcher:\n  role: >\n    {topic} Senior Data Researcher\n  goal: >\n    Uncover cutting-edge developments in {topic}\n  backstory: >\n    You're a seasoned researcher with a knack for uncovering the latest\n    developments in {topic}. Known for your ability to find the most relevant\n    information and present it in a clear and concise manner.\n\nreporting_analyst:\n  role: >\n    {topic} Reporting Analyst\n  goal: >\n    Create detailed reports based on {topic} data analysis and research findings\n  backstory: >\n    You're a meticulous analyst with a keen eye for detail. You're known for\n    your ability to turn complex data into clear and concise reports, making\n    it easy for others to understand and act on the information you provide.\n```\n\n**tasks.yaml**\n\n````yaml\n# src\u002Fmy_project\u002Fconfig\u002Ftasks.yaml\nresearch_task:\n  description: >\n    Conduct a thorough research about {topic}\n    Make sure you find any interesting and relevant information given\n    the current year is 2025.\n  expected_output: >\n    A list with 10 bullet points of the most relevant information about {topic}\n  agent: researcher\n\nreporting_task:\n  description: >\n    Review the context you got and expand each topic into a full section for a report.\n    Make sure the report is detailed and contains any and all relevant information.\n  expected_output: >\n    A fully fledge reports with the mains topics, each with a full section of information.\n    Formatted as markdown without '```'\n  agent: reporting_analyst\n  output_file: report.md\n````\n\n**crew.py**\n\n```python\n# src\u002Fmy_project\u002Fcrew.py\nfrom crewai import Agent, Crew, Process, Task\nfrom crewai.project import CrewBase, agent, crew, task\nfrom crewai_tools import SerperDevTool\nfrom crewai.agents.agent_builder.base_agent import BaseAgent\nfrom typing import List\n\n@CrewBase\nclass LatestAiDevelopmentCrew():\n\t\"\"\"LatestAiDevelopment crew\"\"\"\n\tagents: List[BaseAgent]\n\ttasks: List[Task]\n\n\t@agent\n\tdef researcher(self) -> Agent:\n\t\treturn Agent(\n\t\t\tconfig=self.agents_config['researcher'],\n\t\t\tverbose=True,\n\t\t\ttools=[SerperDevTool()]\n\t\t)\n\n\t@agent\n\tdef reporting_analyst(self) -> Agent:\n\t\treturn Agent(\n\t\t\tconfig=self.agents_config['reporting_analyst'],\n\t\t\tverbose=True\n\t\t)\n\n\t@task\n\tdef research_task(self) -> Task:\n\t\treturn Task(\n\t\t\tconfig=self.tasks_config['research_task'],\n\t\t)\n\n\t@task\n\tdef reporting_task(self) -> Task:\n\t\treturn Task(\n\t\t\tconfig=self.tasks_config['reporting_task'],\n\t\t\toutput_file='report.md'\n\t\t)\n\n\t@crew\n\tdef crew(self) -> Crew:\n\t\t\"\"\"Creates the LatestAiDevelopment crew\"\"\"\n\t\treturn Crew(\n\t\t\tagents=self.agents, # Automatically created by the @agent decorator\n\t\t\ttasks=self.tasks, # Automatically created by the @task decorator\n\t\t\tprocess=Process.sequential,\n\t\t\tverbose=True,\n\t\t)\n```\n\n**main.py**\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python\n# src\u002Fmy_project\u002Fmain.py\nimport sys\nfrom latest_ai_development.crew import LatestAiDevelopmentCrew\n\ndef run():\n    \"\"\"\n    Run the crew.\n    \"\"\"\n    inputs = {\n        'topic': 'AI Agents'\n    }\n    LatestAiDevelopmentCrew().crew().kickoff(inputs=inputs)\n```\n\n### 3. Running Your Crew\n\nBefore running your crew, make sure you have the following keys set as environment variables in your `.env` file:\n\n- An [OpenAI API key](https:\u002F\u002Fplatform.openai.com\u002Faccount\u002Fapi-keys) (or other LLM API key): `OPENAI_API_KEY=sk-...`\n- A [Serper.dev](https:\u002F\u002Fserper.dev\u002F) API key: `SERPER_API_KEY=YOUR_KEY_HERE`\n\nLock the dependencies and install them by using the CLI command but first, navigate to your project directory:\n\n```shell\ncd my_project\ncrewai install (Optional)\n```\n\nTo run your crew, execute the following command in the root of your project:\n\n```bash\ncrewai run\n```\n\nor\n\n```bash\npython src\u002Fmy_project\u002Fmain.py\n```\n\nIf an error happens due to the usage of poetry, please run the following command to update your crewai package:\n\n```bash\ncrewai update\n```\n\nYou should see the output in the console and the `report.md` file should be created in the root of your project with the full final report.\n\nIn addition to the sequential process, you can use the hierarchical process, which automatically assigns a manager to the defined crew to properly coordinate the planning and execution of tasks through delegation and validation of results. [See more about the processes here](https:\u002F\u002Fdocs.crewai.com\u002Fcore-concepts\u002FProcesses\u002F).\n\n## Key Features\n\nCrewAI stands apart as a lean, standalone, high-performance multi-AI Agent framework delivering simplicity, flexibility, and precise control—free from the complexity and limitations found in other agent frameworks.\n\n- **Standalone & Lean**: Completely independent from other frameworks like LangChain, offering faster execution and lighter resource demands.\n- **Flexible & Precise**: Easily orchestrate autonomous agents through intuitive [Crews](https:\u002F\u002Fdocs.crewai.com\u002Fconcepts\u002Fcrews) or precise [Flows](https:\u002F\u002Fdocs.crewai.com\u002Fconcepts\u002Fflows), achieving perfect balance for your needs.\n- **Seamless Integration**: Effortlessly combine Crews (autonomy) and Flows (precision) to create complex, real-world automations.\n- **Deep Customization**: Tailor every aspect—from high-level workflows down to low-level internal prompts and agent behaviors.\n- **Reliable Performance**: Consistent results across simple tasks and complex, enterprise-level automations.\n- **Thriving Community**: Backed by robust documentation and over 100,000 certified developers, providing exceptional support and guidance.\n\nChoose CrewAI to easily build powerful, adaptable, and production-ready AI automations.\n\n## Examples\n\nYou can test different real life examples of AI crews in the [CrewAI-examples repo](https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI-examples?tab=readme-ov-file):\n\n- [Landing Page Generator](https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI-examples\u002Ftree\u002Fmain\u002Fcrews\u002Flanding_page_generator)\n- [Having Human input on the execution](https:\u002F\u002Fdocs.crewai.com\u002Fhow-to\u002FHuman-Input-on-Execution)\n- [Trip Planner](https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI-examples\u002Ftree\u002Fmain\u002Fcrews\u002Ftrip_planner)\n- [Stock Analysis](https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI-examples\u002Ftree\u002Fmain\u002Fcrews\u002Fstock_analysis)\n\n### Quick Tutorial\n\n[![CrewAI Tutorial](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FcrewAIInc_crewAI_readme_c28e3ef68472.jpg)](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=tnejrr-0a94 \"CrewAI Tutorial\")\n\n### Write Job Descriptions\n\n[Check out code for this example](https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI-examples\u002Ftree\u002Fmain\u002Fcrews\u002Fjob-posting) or watch a video below:\n\n[![Jobs postings](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FcrewAIInc_crewAI_readme_5a7bdcf8286b.jpg)](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=u98wEMz-9to \"Jobs postings\")\n\n### Trip Planner\n\n[Check out code for this example](https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI-examples\u002Ftree\u002Fmain\u002Fcrews\u002Ftrip_planner) or watch a video below:\n\n[![Trip Planner](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FcrewAIInc_crewAI_readme_49bce52eaf71.jpg)](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=xis7rWp-hjs \"Trip Planner\")\n\n### Stock Analysis\n\n[Check out code for this example](https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI-examples\u002Ftree\u002Fmain\u002Fcrews\u002Fstock_analysis) or watch a video below:\n\n[![Stock Analysis](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FcrewAIInc_crewAI_readme_541ec8382eac.jpg)](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=e0Uj4yWdaAg \"Stock Analysis\")\n\n### Using Crews and Flows Together\n\nCrewAI's power truly shines when combining Crews with Flows to create sophisticated automation pipelines.\nCrewAI flows support logical operators like `or_` and `and_` to combine multiple conditions. This can be used with `@start`, `@listen`, or `@router` decorators to create complex triggering conditions.\n\n- `or_`: Triggers when any of the specified conditions are met.\n- `and_`Triggers when all of the specified conditions are met.\n\nHere's how you can orchestrate multiple Crews within a Flow:\n\n```python\nfrom crewai.flow.flow import Flow, listen, start, router, or_\nfrom crewai import Crew, Agent, Task, Process\nfrom pydantic import BaseModel\n\n# Define structured state for precise control\nclass MarketState(BaseModel):\n    sentiment: str = \"neutral\"\n    confidence: float = 0.0\n    recommendations: list = []\n\nclass AdvancedAnalysisFlow(Flow[MarketState]):\n    @start()\n    def fetch_market_data(self):\n        # Demonstrate low-level control with structured state\n        self.state.sentiment = \"analyzing\"\n        return {\"sector\": \"tech\", \"timeframe\": \"1W\"}  # These parameters match the task description template\n\n    @listen(fetch_market_data)\n    def analyze_with_crew(self, market_data):\n        # Show crew agency through specialized roles\n        analyst = Agent(\n            role=\"Senior Market Analyst\",\n            goal=\"Conduct deep market analysis with expert insight\",\n            backstory=\"You're a veteran analyst known for identifying subtle market patterns\"\n        )\n        researcher = Agent(\n            role=\"Data Researcher\",\n            goal=\"Gather and validate supporting market data\",\n            backstory=\"You excel at finding and correlating multiple data sources\"\n        )\n\n        analysis_task = Task(\n            description=\"Analyze {sector} sector data for the past {timeframe}\",\n            expected_output=\"Detailed market analysis with confidence score\",\n            agent=analyst\n        )\n        research_task = Task(\n            description=\"Find supporting data to validate the analysis\",\n            expected_output=\"Corroborating evidence and potential contradictions\",\n            agent=researcher\n        )\n\n        # Demonstrate crew autonomy\n        analysis_crew = Crew(\n            agents=[analyst, researcher],\n            tasks=[analysis_task, research_task],\n            process=Process.sequential,\n            verbose=True\n        )\n        return analysis_crew.kickoff(inputs=market_data)  # Pass market_data as named inputs\n\n    @router(analyze_with_crew)\n    def determine_next_steps(self):\n        # Show flow control with conditional routing\n        if self.state.confidence > 0.8:\n            return \"high_confidence\"\n        elif self.state.confidence > 0.5:\n            return \"medium_confidence\"\n        return \"low_confidence\"\n\n    @listen(\"high_confidence\")\n    def execute_strategy(self):\n        # Demonstrate complex decision making\n        strategy_crew = Crew(\n            agents=[\n                Agent(role=\"Strategy Expert\",\n                      goal=\"Develop optimal market strategy\")\n            ],\n            tasks=[\n                Task(description=\"Create detailed strategy based on analysis\",\n                     expected_output=\"Step-by-step action plan\")\n            ]\n        )\n        return strategy_crew.kickoff()\n\n    @listen(or_(\"medium_confidence\", \"low_confidence\"))\n    def request_additional_analysis(self):\n        self.state.recommendations.append(\"Gather more data\")\n        return \"Additional analysis required\"\n```\n\nThis example demonstrates how to:\n\n1. Use Python code for basic data operations\n2. Create and execute Crews as steps in your workflow\n3. Use Flow decorators to manage the sequence of operations\n4. Implement conditional branching based on Crew results\n\n## Connecting Your Crew to a Model\n\nCrewAI supports using various LLMs through a variety of connection options. By default your agents will use the OpenAI API when querying the model. However, there are several other ways to allow your agents to connect to models. For example, you can configure your agents to use a local model via the Ollama tool.\n\nPlease refer to the [Connect CrewAI to LLMs](https:\u002F\u002Fdocs.crewai.com\u002Fhow-to\u002FLLM-Connections\u002F) page for details on configuring your agents' connections to models.\n\n## How CrewAI Compares\n\n**CrewAI's Advantage**: CrewAI combines autonomous agent intelligence with precise workflow control through its unique Crews and Flows architecture. The framework excels at both high-level orchestration and low-level customization, enabling complex, production-grade systems with granular control.\n\n- **LangGraph**: While LangGraph provides a foundation for building agent workflows, its approach requires significant boilerplate code and complex state management patterns. The framework's tight coupling with LangChain can limit flexibility when implementing custom agent behaviors or integrating with external systems.\n\n_P.S. CrewAI demonstrates significant performance advantages over LangGraph, executing 5.76x faster in certain cases like this QA task example ([see comparison](https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI-examples\u002Ftree\u002Fmain\u002FNotebooks\u002FCrewAI%20Flows%20%26%20Langgraph\u002FQA%20Agent)) while achieving higher evaluation scores with faster completion times in certain coding tasks, like in this example ([detailed analysis](https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI-examples\u002Fblob\u002Fmain\u002FNotebooks\u002FCrewAI%20Flows%20%26%20Langgraph\u002FCoding%20Assistant\u002Fcoding_assistant_eval.ipynb))._\n\n- **Autogen**: While Autogen excels at creating conversational agents capable of working together, it lacks an inherent concept of process. In Autogen, orchestrating agents' interactions requires additional programming, which can become complex and cumbersome as the scale of tasks grows.\n- **ChatDev**: ChatDev introduced the idea of processes into the realm of AI agents, but its implementation is quite rigid. Customizations in ChatDev are limited and not geared towards production environments, which can hinder scalability and flexibility in real-world applications.\n\n## Contribution\n\nCrewAI is open-source and we welcome contributions. If you're looking to contribute, please:\n\n- Fork the repository.\n- Create a new branch for your feature.\n- Add your feature or improvement.\n- Send a pull request.\n- We appreciate your input!\n\n### Installing Dependencies\n\n```bash\nuv lock\nuv sync\n```\n\n### Virtual Env\n\n```bash\nuv venv\n```\n\n### Pre-commit hooks\n\n```bash\npre-commit install\n```\n\n### Running Tests\n\n```bash\nuv run pytest .\n```\n\n### Running static type checks\n\n```bash\nuvx mypy src\n```\n\n### Packaging\n\n```bash\nuv build\n```\n\n### Installing Locally\n\n```bash\nuv pip install dist\u002F*.tar.gz\n```\n\n## Telemetry\n\nCrewAI uses anonymous telemetry to collect usage data with the main purpose of helping us improve the library by focusing our efforts on the most used features, integrations and tools.\n\nIt's pivotal to understand that **NO data is collected** concerning prompts, task descriptions, agents' backstories or goals, usage of tools, API calls, responses, any data processed by the agents, or secrets and environment variables, with the exception of the conditions mentioned. When the `share_crew` feature is enabled, detailed data including task descriptions, agents' backstories or goals, and other specific attributes are collected to provide deeper insights while respecting user privacy. Users can disable telemetry by setting the environment variable OTEL_SDK_DISABLED to true.\n\nData collected includes:\n\n- Version of CrewAI\n  - So we can understand how many users are using the latest version\n- Version of Python\n  - So we can decide on what versions to better support\n- General OS (e.g. number of CPUs, macOS\u002FWindows\u002FLinux)\n  - So we know what OS we should focus on and if we could build specific OS related features\n- Number of agents and tasks in a crew\n  - So we make sure we are testing internally with similar use cases and educate people on the best practices\n- Crew Process being used\n  - Understand where we should focus our efforts\n- If Agents are using memory or allowing delegation\n  - Understand if we improved the features or maybe even drop them\n- If Tasks are being executed in parallel or sequentially\n  - Understand if we should focus more on parallel execution\n- Language model being used\n  - Improved support on most used languages\n- Roles of agents in a crew\n  - Understand high level use cases so we can build better tools, integrations and examples about it\n- Tools names available\n  - Understand out of the publicly available tools, which ones are being used the most so we can improve them\n\nUsers can opt-in to Further Telemetry, sharing the complete telemetry data by setting the `share_crew` attribute to `True` on their Crews. Enabling `share_crew` results in the collection of detailed crew and task execution data, including `goal`, `backstory`, `context`, and `output` of tasks. This enables a deeper insight into usage patterns while respecting the user's choice to share.\n\n## License\n\nCrewAI is released under the [MIT License](https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI\u002Fblob\u002Fmain\u002FLICENSE).\n\n## Frequently Asked Questions (FAQ)\n\n### General\n\n- [What exactly is CrewAI?](#q-what-exactly-is-crewai)\n- [How do I install CrewAI?](#q-how-do-i-install-crewai)\n- [Does CrewAI depend on LangChain?](#q-does-crewai-depend-on-langchain)\n- [Is CrewAI open-source?](#q-is-crewai-open-source)\n- [Does CrewAI collect data from users?](#q-does-crewai-collect-data-from-users)\n\n### Features and Capabilities\n\n- [Can CrewAI handle complex use cases?](#q-can-crewai-handle-complex-use-cases)\n- [Can I use CrewAI with local AI models?](#q-can-i-use-crewai-with-local-ai-models)\n- [What makes Crews different from Flows?](#q-what-makes-crews-different-from-flows)\n- [How is CrewAI better than LangChain?](#q-how-is-crewai-better-than-langchain)\n- [Does CrewAI support fine-tuning or training custom models?](#q-does-crewai-support-fine-tuning-or-training-custom-models)\n\n### Resources and Community\n\n- [Where can I find real-world CrewAI examples?](#q-where-can-i-find-real-world-crewai-examples)\n- [How can I contribute to CrewAI?](#q-how-can-i-contribute-to-crewai)\n\n### Enterprise Features\n\n- [What additional features does CrewAI AMP offer?](#q-what-additional-features-does-crewai-amp-offer)\n- [Is CrewAI AMP available for cloud and on-premise deployments?](#q-is-crewai-amp-available-for-cloud-and-on-premise-deployments)\n- [Can I try CrewAI AMP for free?](#q-can-i-try-crewai-amp-for-free)\n\n### Q: What exactly is CrewAI?\n\nA: CrewAI is a standalone, lean, and fast Python framework built specifically for orchestrating autonomous AI agents. Unlike frameworks like LangChain, CrewAI does not rely on external dependencies, making it leaner, faster, and simpler.\n\n### Q: How do I install CrewAI?\n\nA: Install CrewAI using pip:\n\n```shell\nuv pip install crewai\n```\n\nFor additional tools, use:\n\n```shell\nuv pip install 'crewai[tools]'\n```\n\n### Q: Does CrewAI depend on LangChain?\n\nA: No. CrewAI is built entirely from the ground up, with no dependencies on LangChain or other agent frameworks. This ensures a lean, fast, and flexible experience.\n\n### Q: Can CrewAI handle complex use cases?\n\nA: Yes. CrewAI excels at both simple and highly complex real-world scenarios, offering deep customization options at both high and low levels, from internal prompts to sophisticated workflow orchestration.\n\n### Q: Can I use CrewAI with local AI models?\n\nA: Absolutely! CrewAI supports various language models, including local ones. Tools like Ollama and LM Studio allow seamless integration. Check the [LLM Connections documentation](https:\u002F\u002Fdocs.crewai.com\u002Fhow-to\u002FLLM-Connections\u002F) for more details.\n\n### Q: What makes Crews different from Flows?\n\nA: Crews provide autonomous agent collaboration, ideal for tasks requiring flexible decision-making and dynamic interaction. Flows offer precise, event-driven control, ideal for managing detailed execution paths and secure state management. You can seamlessly combine both for maximum effectiveness.\n\n### Q: How is CrewAI better than LangChain?\n\nA: CrewAI provides simpler, more intuitive APIs, faster execution speeds, more reliable and consistent results, robust documentation, and an active community—addressing common criticisms and limitations associated with LangChain.\n\n### Q: Is CrewAI open-source?\n\nA: Yes, CrewAI is open-source and actively encourages community contributions and collaboration.\n\n### Q: Does CrewAI collect data from users?\n\nA: CrewAI collects anonymous telemetry data strictly for improvement purposes. Sensitive data such as prompts, tasks, or API responses are never collected unless explicitly enabled by the user.\n\n### Q: Where can I find real-world CrewAI examples?\n\nA: Check out practical examples in the [CrewAI-examples repository](https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI-examples), covering use cases like trip planners, stock analysis, and job postings.\n\n### Q: How can I contribute to CrewAI?\n\nA: Contributions are warmly welcomed! Fork the repository, create your branch, implement your changes, and submit a pull request. See the Contribution section of the README for detailed guidelines.\n\n### Q: What additional features does CrewAI AMP offer?\n\nA: CrewAI AMP provides advanced features such as a unified control plane, real-time observability, secure integrations, advanced security, actionable insights, and dedicated 24\u002F7 enterprise support.\n\n### Q: Is CrewAI AMP available for cloud and on-premise deployments?\n\nA: Yes, CrewAI AMP supports both cloud-based and on-premise deployment options, allowing enterprises to meet their specific security and compliance requirements.\n\n### Q: Can I try CrewAI AMP for free?\n\nA: Yes, you can explore part of the CrewAI AMP Suite by accessing the [Crew Control Plane](https:\u002F\u002Fapp.crewai.com) for free.\n\n### Q: Does CrewAI support fine-tuning or training custom models?\n\nA: Yes, CrewAI can integrate with custom-trained or fine-tuned models, allowing you to enhance your agents with domain-specific knowledge and accuracy.\n\n### Q: Can CrewAI agents interact with external tools and APIs?\n\nA: Absolutely! CrewAI agents can easily integrate with external tools, APIs, and databases, empowering them to leverage real-world data and resources.\n\n### Q: Is CrewAI suitable for production environments?\n\nA: Yes, CrewAI is explicitly designed with production-grade standards, ensuring reliability, stability, and scalability for enterprise deployments.\n\n### Q: How scalable is CrewAI?\n\nA: CrewAI is highly scalable, supporting simple automations and large-scale enterprise workflows involving numerous agents and complex tasks simultaneously.\n\n### Q: Does CrewAI offer debugging and monitoring tools?\n\nA: Yes, CrewAI AMP includes advanced debugging, tracing, and real-time observability features, simplifying the management and troubleshooting of your automations.\n\n### Q: What programming languages does CrewAI support?\n\nA: CrewAI is primarily Python-based but easily integrates with services and APIs written in any programming language through its flexible API integration capabilities.\n\n### Q: Does CrewAI offer educational resources for beginners?\n\nA: Yes, CrewAI provides extensive beginner-friendly tutorials, courses, and documentation through learn.crewai.com, supporting developers at all skill levels.\n\n### Q: Can CrewAI automate human-in-the-loop workflows?\n\nA: Yes, CrewAI fully supports human-in-the-loop workflows, allowing seamless collaboration between human experts and AI agents for enhanced decision-making.\n","\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FcrewAIInc_crewAI_readme_a0595c90e72c.png\" width=\"600px\" alt=\"开源多智能体编排框架\">\n  \u003C\u002Fa>\n\u003C\u002Fp>\n\u003Cp align=\"center\" style=\"display: flex; justify-content: center; gap: 20px; align-items: center;\">\n  \u003Ca href=\"https:\u002F\u002Ftrendshift.io\u002Frepositories\u002F11239\" target=\"_blank\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FcrewAIInc_crewAI_readme_4a68feb902da.png\" alt=\"crewAIInc%2FcrewAI | Trendshift\" style=\"width: 250px; height: 55px;\" width=\"250\" height=\"55\"\u002F>\n  \u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fcrewai.com\">首页\u003C\u002Fa>\n  ·\n  \u003Ca href=\"https:\u002F\u002Fdocs.crewai.com\">文档\u003C\u002Fa>\n  ·\n  \u003Ca href=\"https:\u002F\u002Fapp.crewai.com\">开始云试用\u003C\u002Fa>\n  ·\n  \u003Ca href=\"https:\u002F\u002Fblog.crewai.com\">博客\u003C\u002Fa>\n  ·\n  \u003Ca href=\"https:\u002F\u002Fcommunity.crewai.com\">论坛\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002FcrewAIInc\u002FcrewAI\" alt=\"GitHub 仓库星标数\">\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI\u002Fnetwork\u002Fmembers\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fforks\u002FcrewAIInc\u002FcrewAI\" alt=\"GitHub 分支数\">\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI\u002Fissues\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fissues\u002FcrewAIInc\u002FcrewAI\" alt=\"GitHub 问题数\">\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI\u002Fpulls\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fissues-pr\u002FcrewAIInc\u002FcrewAI\" alt=\"GitHub 拉取请求数\">\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-green.svg\" alt=\"许可证：MIT\">\n  \u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fcrewai\u002F\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fcrewai\" alt=\"PyPI 版本\">\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fcrewai\u002F\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fdm\u002Fcrewai\" alt=\"PyPI 下载量\">\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Ftwitter.com\u002FcrewAIInc\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Ftwitter\u002Ffollow\u002FcrewAIInc?style=social\" alt=\"Twitter 关注\">\n  \u003C\u002Fa>\n\u003C\u002Fp>\n\n### 快速灵活的多智能体自动化框架\n\n> CrewAI 是一个精简、极速的 Python 框架，完全从零开始构建——**完全独立于 LangChain 或其他智能体框架**。它为开发者提供了高层次的简洁性和低层次的精确控制能力，非常适合创建适用于任何场景的自主智能体。\n\n- **CrewAI Crews**：优化自主性和协作智能。\n- **CrewAI Flows**：用于构建和部署多智能体系统的**企业级生产架构**。支持细粒度的事件驱动控制、单次 LLM 调用实现精准的任务编排，并原生支持 Crews。\n\n通过我们在 [learn.crewai.com](https:\u002F\u002Flearn.crewai.com) 社区课程中认证的超过 10 万名开发者，CrewAI 正迅速成为企业级 AI 自动化领域的标准。\n\n# CrewAI AMP 套件\n\nCrewAI AMP 套件是一套面向需要安全、可扩展且易于管理的代理驱动自动化的企业而设计的综合解决方案。\n\n您可以免费试用该套件中的[Crew 控制平面](https:\u002F\u002Fapp.crewai.com)。\n\n## Crew 控制平面主要特性：\n\n- **追踪与可观性**：实时监控和追踪您的 AI 代理及工作流，包括指标、日志和追踪信息。\n- **统一控制平面**：用于管理、监控和扩展 AI 代理及工作流的集中式平台。\n- **无缝集成**：轻松连接现有企业系统、数据源和云基础设施。\n- **高级安全性**：内置强大的安全和合规措施，确保安全部署和管理。\n- **可操作洞察**：实时分析和报告，以优化性能和决策制定。\n- **全天候支持**：专门的企业级支持团队，确保无中断运行并快速解决问题。\n- **本地部署与云端部署选项**：根据您的安全和合规要求，可在本地或云端部署 CrewAI AMP。\n\nCrewAI AMP 专为企业打造，旨在提供强大可靠的整体解决方案，将复杂的业务流程转变为高效智能的自动化流程。\n\n## 目录\n\n- [为什么选择 CrewAI？](#why-crewai)\n- [入门指南](#getting-started)\n- [关键特性](#key-features)\n- [理解 Flows 和 Crews](#understanding-flows-and-crews)\n- [CrewAI 与 LangGraph 对比](#how-crewai-compares)\n- [示例](#examples)\n  - [快速教程](#quick-tutorial)\n  - [撰写职位描述](#write-job-descriptions)\n  - [旅行计划器](#trip-planner)\n  - [股票分析](#stock-analysis)\n  - [结合使用 Crews 和 Flows](#using-crews-and-flows-together)\n- [将 Crew 连接到模型](#connecting-your-crew-to-a-model)\n- [CrewAI 与其他框架对比](#how-crewai-compares)\n- [常见问题解答 (FAQ)](#frequently-asked-questions-faq)\n- [贡献](#contribution)\n- [遥测](#telemetry)\n- [许可证](#license)\n\n## 为什么选择 CrewAI？\n\n\u003Cdiv align=\"center\" style=\"margin-bottom: 30px;\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FcrewAIInc_crewAI_readme_d821d2b58484.png\" alt=\"CrewAI Logo\" width=\"100%\">\n\u003C\u002Fdiv>\n\nCrewAI 开启了多智能体自动化真正的潜力，无论采用 AI 代理群组还是事件流，都能提供速度、灵活性和控制力的最佳组合：\n\n- **独立框架**：从零开始构建，独立于 LangChain 或任何其他智能体框架。\n- **高性能**：针对速度和最小资源消耗进行了优化，从而实现更快的执行。\n- **灵活的底层定制**：在高层和底层都拥有完全的自定义自由——从整体工作流和系统架构到精细的代理行为、内部提示词和执行逻辑。\n- **适用于所有用例**：已被证明对简单任务以及高度复杂的真实世界企业级场景均有效。\n- **强大的社区支持**：背后是一个迅速壮大的社区，拥有超过**10 万名认证**开发者，提供全面的支持和资源。\n\nCrewAI 使开发者和企业能够自信地构建智能自动化系统，弥合简单性、灵活性和性能之间的差距。\n\n## 入门指南\n\n按照本教程设置并运行您的第一个 CrewAI 代理。\n\n[![CrewAI 入门教程](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FcrewAIInc_crewAI_readme_7d5834320d9f.jpg)](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=-kSOTtYzgEw \"CrewAI 入门教程\")\n\n###\n\n学习资源\n\n通过我们的综合课程学习 CrewAI：\n\n- [使用 CrewAI 构建多智能体系统](https:\u002F\u002Fwww.deeplearning.ai\u002Fshort-courses\u002Fmulti-ai-agent-systems-with-crewai\u002F)——掌握多智能体系统的基础知识\n- [实践多智能体与高级用例](https:\u002F\u002Fwww.deeplearning.ai\u002Fshort-courses\u002Fpractical-multi-ai-agents-and-advanced-use-cases-with-crewai\u002F)——深入探讨高级实现\n\n### 理解流程与团队\n\nCrewAI 提供了两种强大且相辅相成的方法，它们可以无缝协作，构建复杂的 AI 应用程序：\n\n1. **团队**：由具有真正自主性和能动性的 AI 代理组成的团队，通过基于角色的协作共同完成复杂任务。团队能够实现：\n\n   - 代理之间的自然、自主决策\n   - 动态的任务委派和协作\n   - 具有明确目标和专长的专门化角色\n   - 灵活的问题解决方式\n\n2. **流程**：生产就绪的事件驱动型工作流，可对复杂自动化进行精确控制。流程提供：\n\n   - 针对现实场景的细粒度执行路径控制\n   - 任务之间安全、一致的状态管理\n   - AI 代理与生产环境 Python 代码的干净集成\n   - 用于复杂业务逻辑的条件分支\n\nCrewAI 的真正强大之处在于将团队和流程相结合。这种协同作用使您能够：\n\n- 构建复杂的生产级应用\n- 在自主性与精确控制之间取得平衡\n- 处理复杂的现实场景\n- 维持整洁、易于维护的代码结构\n\n### 开始安装\n\n要开始使用 CrewAI，请按照以下简单步骤操作：\n\n### 1. 安装\n\n请确保您的系统上已安装 Python >=3.10 \u003C3.14。CrewAI 使用 [UV](https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002F) 进行依赖管理和软件包处理，从而提供顺畅的设置和执行体验。\n\n首先，安装 CrewAI：\n\n```shell\nuv pip install crewai\n```\n\n如果您希望安装包含额外工具的 `crewai` 软件包及其可选功能，可以使用以下命令：\n\n```shell\nuv pip install 'crewai[tools]'\n```\n\n上述命令不仅会安装基础软件包，还会添加需要更多依赖才能运行的附加组件。\n\n### 依赖问题排查\n\n如果在安装或使用过程中遇到问题，以下是一些常见的解决方法：\n\n#### 常见问题\n\n1. **ModuleNotFoundError: 没有名为 'tiktoken' 的模块**\n\n   - 显式安装 tiktoken：`uv pip install 'crewai[embeddings]'`\n   - 如果使用 embedchain 或其他工具：`uv pip install 'crewai[tools]'`\n\n2. **无法为 tiktoken 构建 wheel 包**\n\n   - 确保已安装 Rust 编译器（参见上述安装步骤）\n   - 对于 Windows 用户：请确认已安装 Visual C++ Build Tools\n   - 尝试升级 pip：`uv pip install --upgrade pip`\n   - 如果问题仍然存在，可以使用预编译的 wheel 包：`uv pip install tiktoken --prefer-binary`\n\n### 2. 使用 YAML 配置设置您的团队\n\n要创建一个新的 CrewAI 项目，运行以下 CLI（命令行界面）命令：\n\n```shell\ncrewai create crew \u003Cproject_name>\n```\n\n该命令会创建一个新项目文件夹，其结构如下：\n\n```\nmy_project\u002F\n├── .gitignore\n├── pyproject.toml\n├── README.md\n├── .env\n└── src\u002F\n    └── my_project\u002F\n        ├── __init__.py\n        ├── main.py\n        ├── crew.py\n        ├── tools\u002F\n        │   ├── custom_tool.py\n        │   └── __init__.py\n        └── config\u002F\n            ├── agents.yaml\n            └── tasks.yaml\n```\n\n现在您可以开始开发自己的团队，编辑 `src\u002Fmy_project` 文件夹中的文件。`main.py` 文件是项目的入口点，`crew.py` 文件是定义团队的地方，`agents.yaml` 文件是定义代理的地方，而 `tasks.yaml` 文件则是定义任务的地方。\n\n#### 要自定义您的项目，您可以：\n\n- 修改 `src\u002Fmy_project\u002Fconfig\u002Fagents.yaml` 来定义您的代理。\n- 修改 `src\u002Fmy_project\u002Fconfig\u002Ftasks.yaml` 来定义您的任务。\n- 修改 `src\u002Fmy_project\u002Fcrew.py` 来添加您自己的逻辑、工具和特定参数。\n- 修改 `src\u002Fmy_project\u002Fmain.py` 来为您的代理和任务添加自定义输入。\n- 将您的环境变量添加到 `.env` 文件中。\n\n#### 一个简单的顺序流程团队示例：\n\n实例化您的团队：\n\n```shell\ncrewai create crew latest-ai-development\n```\n\n根据您的实际需求修改文件：\n\n**agents.yaml**\n\n```yaml\n# src\u002Fmy_project\u002Fconfig\u002Fagents.yaml\nresearcher:\n  role: >\n    {topic} 高级数据研究员\n  goal: >\n    探索 {topic} 领域的前沿发展\n  backstory: >\n    您是一位经验丰富的研究员，擅长挖掘 {topic} 领域的最新进展。以能够找到最相关的信息并以清晰简洁的方式呈现著称。\n\nreporting_analyst:\n  role: >\n    {topic} 报告分析师\n  goal: >\n    基于 {topic} 数据分析和研究结果撰写详细报告\n  backstory: >\n    您是一位一丝不苟的分析师，对细节有着敏锐的洞察力。以善于将复杂数据转化为清晰简明的报告而闻名，使他人能够轻松理解并采取行动。\n```\n\n**tasks.yaml**\n\n```yaml\n# src\u002Fmy_project\u002Fconfig\u002Ftasks.yaml\nresearch_task:\n  description: >\n    对 {topic} 进行全面研究\n    确保找到任何有趣且相关的信息，考虑到当前年份为 2025 年。\n  expected_output: >\n    关于 {topic} 的 10 条要点列表\n  agent: researcher\n\nreporting_task:\n  description: >\n    审阅您获得的内容，并将每个主题扩展为报告中的完整章节。\n    确保报告内容详尽，涵盖所有相关信息。\n  expected_output: >\n    一份完整的报告，包含主要主题及各自的详细信息。\n    格式为 Markdown，不含 '```'\n  agent: reporting_analyst\n  output_file: report.md\n```\n\n**crew.py**\n\n```python\n# src\u002Fmy_project\u002Fcrew.py\nfrom crewai import Agent, Crew, Process, Task\nfrom crewai.project import CrewBase, agent, crew, task\nfrom crewai_tools import SerperDevTool\nfrom crewai.agents.agent_builder.base_agent import BaseAgent\nfrom typing import List\n\n@CrewBase\nclass LatestAiDevelopmentCrew():\n\t\"\"\"最新AI发展团队\"\"\"\n\tagents: List[BaseAgent]\n\ttasks: List[Task]\n\n\t@agent\n\tdef researcher(self) -> Agent:\n\t\treturn Agent(\n\t\t\tconfig=self.agents_config['researcher'],\n\t\t\tverbose=True,\n\t\t\ttools=[SerperDevTool()]\n\t\t)\n\n\t@agent\n\tdef reporting_analyst(self) -> Agent:\n\t\treturn Agent(\n\t\t\tconfig=self.agents_config['reporting_analyst'],\n\t\t\tverbose=True\n\t\t)\n\n\t@task\n\tdef research_task(self) -> Task:\n\t\treturn Task(\n\t\t\tconfig=self.tasks_config['research_task'],\n\t\t)\n\n\t@task\n\tdef reporting_task(self) -> Task:\n\t\treturn Task(\n\t\t\tconfig=self.tasks_config['reporting_task'],\n\t\t\toutput_file='report.md'\n\t\t)\n\n\t@crew\n\tdef crew(self) -> Crew:\n\t\t\"\"\"创建最新AI发展团队\"\"\"\n\t\treturn Crew(\n\t\t\tagents=self.agents, # 自动由 @agent 装饰器创建\n\t\t\ttasks=self.tasks, # 自动由 @task 装饰器创建\n\t\t\tprocess=Process.sequential,\n\t\t\tverbose=True,\n\t\t)\n```\n\n**main.py**\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python\n\n# src\u002Fmy_project\u002Fmain.py\nimport sys\nfrom latest_ai_development.crew import LatestAiDevelopmentCrew\n\ndef run():\n    \"\"\"\n    运行团队。\n    \"\"\"\n    inputs = {\n        'topic': 'AI 代理'\n    }\n    LatestAiDevelopmentCrew().crew().kickoff(inputs=inputs)\n```\n\n### 3. 运行你的团队\n\n在运行团队之前，请确保已在 `.env` 文件中将以下密钥设置为环境变量：\n\n- [OpenAI API 密钥](https:\u002F\u002Fplatform.openai.com\u002Faccount\u002Fapi-keys)（或其他 LLM API 密钥）：`OPENAI_API_KEY=sk-...`\n- [Serper.dev](https:\u002F\u002Fserper.dev\u002F) API 密钥：`SERPER_API_KEY=YOUR_KEY_HERE`\n\n锁定依赖项并使用 CLI 命令安装它们，但首先请导航到你的项目目录：\n\n```shell\ncd my_project\ncrewai install （可选）\n```\n\n要运行你的团队，可在项目根目录下执行以下命令：\n\n```bash\ncrewai run\n```\n\n或\n\n```bash\npython src\u002Fmy_project\u002Fmain.py\n```\n\n如果由于使用 Poetry 而发生错误，请运行以下命令来更新你的 crewai 包：\n\n```bash\ncrewai update\n```\n\n你应该会在控制台看到输出，并且会在项目根目录下生成 `report.md` 文件，其中包含完整的最终报告。\n\n除了顺序流程之外，你还可以使用层次流程，该流程会自动为定义的团队分配一名经理，以通过委派和结果验证来妥善协调任务的规划与执行。[在此处了解更多关于流程的信息](https:\u002F\u002Fdocs.crewai.com\u002Fcore-concepts\u002FProcesses\u002F)。\n\n## 核心特性\n\nCrewAI 是一个精简、独立、高性能的多 AI 代理框架，它提供了简单性、灵活性和精确控制，同时避免了其他代理框架中存在的复杂性和局限性。\n\n- **独立且精简**：完全独立于 LangChain 等其他框架，执行速度更快，资源需求更轻。\n- **灵活且精准**：可通过直观的 [Crews](https:\u002F\u002Fdocs.crewai.com\u002Fconcepts\u002Fcrews) 或精确的 [Flows](https:\u002F\u002Fdocs.crewai.com\u002Fconcepts\u002Fflows) 轻松编排自主代理，从而为你的需求实现完美平衡。\n- **无缝集成**：轻松结合 Crews（自主性）和 Flows（精确性），创建复杂的现实世界自动化流程。\n- **深度定制**：从高层次的工作流到低层次的内部提示和代理行为，均可进行全方位定制。\n- **可靠性能**：无论是在简单任务还是复杂的企业级自动化中，都能提供一致的结果。\n- **蓬勃发展的社区**：拥有完善的文档支持和超过 10 万名认证开发者，能够提供卓越的支持与指导。\n\n选择 CrewAI，轻松构建强大、适应性强且可用于生产的 AI 自动化系统。\n\n## 示例\n\n你可以在 [CrewAI-examples 仓库](https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI-examples?tab=readme-ov-file) 中测试不同的真实场景下的 AI 团队示例：\n\n- [着陆页生成器](https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI-examples\u002Ftree\u002Fmain\u002Fcrews\u002Flanding_page_generator)\n- [在执行过程中引入人工输入](https:\u002F\u002Fdocs.crewai.com\u002Fhow-to\u002FHuman-Input-on-Execution)\n- [旅行计划器](https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI-examples\u002Ftree\u002Fmain\u002Fcrews\u002Ftrip_planner)\n- [股票分析](https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI-examples\u002Ftree\u002Fmain\u002Fcrews\u002Fstock_analysis)\n\n### 快速教程\n\n[![CrewAI 教程](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FcrewAIInc_crewAI_readme_c28e3ef68472.jpg)](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=tnejrr-0a94 \"CrewAI 教程\")\n\n### 编写职位描述\n\n[查看此示例的代码](https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI-examples\u002Ftree\u002Fmain\u002Fcrews\u002Fjob-posting) 或观看下方视频：\n\n[![职位发布](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FcrewAIInc_crewAI_readme_5a7bdcf8286b.jpg)](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=u98wEMz-9to \"职位发布\")\n\n### 旅行计划器\n\n[查看此示例的代码](https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI-examples\u002Ftree\u002Fmain\u002Fcrews\u002Ftrip_planner) 或观看下方视频：\n\n[![旅行计划器](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FcrewAIInc_crewAI_readme_49bce52eaf71.jpg)](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=xis7rWp-hjs \"旅行计划器\")\n\n### 股票分析\n\n[查看此示例的代码](https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI-examples\u002Ftree\u002Fmain\u002Fcrews\u002Fstock_analysis) 或观看下方视频：\n\n[![股票分析](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FcrewAIInc_crewAI_readme_541ec8382eac.jpg)](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=e0Uj4yWdaAg \"股票分析\")\n\n### 同时使用 Crews 和 Flows\n\n当 Crews 与 Flows 结合使用时，CrewAI 的强大功能才能真正展现出来，从而创建出复杂的自动化流程。CrewAI 流支持逻辑运算符，如 `or_` 和 `and_`，用于组合多个条件。这些运算符可以与 `@start`、`@listen` 或 `@router` 装饰器一起使用，以创建复杂的触发条件。\n\n- `or_`：当满足任何指定条件时触发。\n- `and_`：当所有指定条件均满足时触发。\n\n以下是如何在 Flow 中编排多个 Crew 的示例：\n\n```python\nfrom crewai.flow.flow import Flow, listen, start, router, or_\nfrom crewai import Crew, Agent, Task, Process\nfrom pydantic import BaseModel\n\n# 定义结构化状态以实现精确控制\nclass MarketState(BaseModel):\n    sentiment: str = \"neutral\"\n    confidence: float = 0.0\n    recommendations: list = []\n\nclass AdvancedAnalysisFlow(Flow[MarketState]):\n    @start()\n    def fetch_market_data(self):\n        # 展示使用结构化状态进行低级别控制\n        self.state.sentiment = \"analyzing\"\n        return {\"sector\": \"tech\", \"timeframe\": \"1W\"}  # 这些参数与任务描述模板匹配\n\n    @listen(fetch_market_data)\n    def analyze_with_crew(self, market_data):\n        # 通过专业化角色展示团队的自主性\n        analyst = Agent(\n            role=\"高级市场分析师\",\n            goal=\"运用专家见解进行深入市场分析\",\n            backstory=\"您是一位经验丰富的分析师，以识别细微的市场模式而闻名\"\n        )\n        researcher = Agent(\n            role=\"数据研究员\",\n            goal=\"收集并验证支持性市场数据\",\n            backstory=\"您擅长寻找和关联多种数据源\"\n        )\n\n        analysis_task = Task(\n            description=\"分析{sector}行业的过去{timeframe}数据\",\n            expected_output=\"带有置信度评分的详细市场分析报告\",\n            agent=analyst\n        )\n        research_task = Task(\n            description=\"寻找支持性数据以验证分析结果\",\n            expected_output=\"相互印证的证据及潜在矛盾点\",\n            agent=researcher\n        )\n\n        # 展示团队的自主运作\n        analysis_crew = Crew(\n            agents=[analyst, researcher],\n            tasks=[analysis_task, research_task],\n            process=Process.sequential,\n            verbose=True\n        )\n        return analysis_crew.kickoff(inputs=market_data)  # 将market_data作为命名输入传递\n\n    @router(analyze_with_crew)\n    def determine_next_steps(self):\n        # 展示基于条件路由的流程控制\n        if self.state.confidence > 0.8:\n            return \"high_confidence\"\n        elif self.state.confidence > 0.5:\n            return \"medium_confidence\"\n        return \"low_confidence\"\n\n    @listen(\"high_confidence\")\n    def execute_strategy(self):\n        # 展示复杂的决策制定过程\n        strategy_crew = Crew(\n            agents=[\n                Agent(role=\"策略专家\",\n                      goal=\"制定最优市场策略\")\n            ],\n            tasks=[\n                Task(description=\"根据分析结果制定详细策略\",\n                     expected_output=\"分步行动计划\")\n            ]\n        )\n        return strategy_crew.kickoff()\n\n    @listen(or_(\"medium_confidence\", \"low_confidence\"))\n    def request_additional_analysis(self):\n        self.state.recommendations.append(\"收集更多数据\")\n        return \"需要进一步分析\"\n```\n\n本示例展示了如何：\n\n1. 使用Python代码进行基础数据操作\n2. 创建并执行Crews作为工作流中的步骤\n3. 使用Flow装饰器管理操作顺序\n4. 根据Crews的结果实现条件分支\n\n## 将您的Crew连接到模型\n\nCrewAI支持通过多种连接方式使用不同的LLM。默认情况下，您的代理在查询模型时会使用OpenAI API。不过，还有其他几种方法可以让您的代理连接到模型。例如，您可以通过Ollama工具配置代理使用本地模型。\n\n有关配置代理与模型连接的详细信息，请参阅[CrewAI连接LLM](https:\u002F\u002Fdocs.crewai.com\u002Fhow-to\u002FLLM-Connections\u002F)页面。\n\n## CrewAI与其他框架的比较\n\n**CrewAI的优势**：CrewAI通过其独特的Crews和Flows架构，将自主代理智能与精确的工作流控制相结合。该框架在高层次编排和低层次自定义方面都表现出色，能够构建具有细粒度控制的复杂生产级系统。\n\n- **LangGraph**：虽然LangGraph为构建代理工作流提供了基础，但其方法需要大量的样板代码和复杂的状态管理模式。该框架与LangChain的高度耦合可能会限制在实现自定义代理行为或与外部系统集成时的灵活性。\n\n_附注：CrewAI在某些场景下相比LangGraph具有显著的性能优势，例如在这一QA任务示例中，CrewAI的执行速度是LangGraph的5.76倍（[查看对比](https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI-examples\u002Ftree\u002Fmain\u002FNotebooks\u002FCrewAI%20Flows%20%26%20Langgraph\u002FQA%20Agent)），而在一些编码任务中，CrewAI也以更快的速度完成了任务，并获得了更高的评估分数（[详细分析](https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI-examples\u002Fblob\u002Fmain\u002FNotebooks\u002FCrewAI%20Flows%20%26%20Langgraph\u002FCoding%20Assistant\u002Fcoding_assistant_eval.ipynb)）。_\n\n- **Autogen**：尽管Autogen擅长创建能够协同工作的对话型代理，但它缺乏内在的过程概念。在Autogen中，协调代理之间的交互需要额外的编程，随着任务规模的扩大，这可能会变得复杂且繁琐。\n- **ChatDev**：ChatDev将过程的概念引入了AI代理领域，但其实现方式相当僵化。ChatDev中的自定义功能有限，且并不面向生产环境，这可能阻碍其在实际应用中的可扩展性和灵活性。\n\n## 贡献\n\nCrewAI是开源项目，我们欢迎各位贡献。如果您希望参与贡献，请：\n\n- 克隆仓库。\n- 为您的功能创建一个新分支。\n- 添加您的功能或改进。\n- 提交拉取请求。\n- 我们非常感谢您的投入！\n\n### 安装依赖\n```bash\nuv lock\nuv sync\n```\n\n### 虚拟环境\n```bash\nuv venv\n```\n\n### 预提交钩子\n```bash\npre-commit install\n```\n\n### 运行测试\n```bash\nuv run pytest .\n```\n\n### 运行静态类型检查\n```bash\nuvx mypy src\n```\n\n### 打包\n```bash\nuv build\n```\n\n### 本地安装\n```bash\nuv pip install dist\u002F*.tar.gz\n```\n\n## 遥测\n\nCrewAI 使用匿名遥测来收集使用数据，主要目的是通过将精力集中在最常用的功能、集成和工具上，帮助我们改进该库。\n\n至关重要的是要理解，**不会收集任何数据**，包括提示、任务描述、智能体的背景故事或目标、工具的使用情况、API 调用、响应、智能体处理的任何数据，以及密钥和环境变量，除非符合上述例外情况。当 `share_crew` 功能启用时，会收集详细数据，包括任务描述、智能体的背景故事或目标以及其他特定属性，以便在尊重用户隐私的前提下提供更深入的洞察。用户可以通过将环境变量 OTEL_SDK_DISABLED 设置为 true 来禁用遥测功能。\n\n收集的数据包括：\n\n- CrewAI 的版本\n  - 以便我们了解有多少用户正在使用最新版本\n- Python 的版本\n  - 以便我们决定支持哪些版本\n- 操作系统的总体信息（例如 CPU 数量、macOS\u002FWindows\u002FLinux）\n  - 以便我们知道应该重点关注哪些操作系统，以及是否可以构建特定于操作系统的功能\n- 团队中智能体和任务的数量\n  - 以便我们在内部使用类似的用例进行测试，并向用户普及最佳实践\n- 正在使用的团队流程\n  - 以便了解我们应该将精力集中在哪些方面\n- 智能体是否使用记忆功能或允许委派\n  - 以便了解我们是否需要改进这些功能，甚至将其移除\n- 任务是并行执行还是串行执行\n  - 以便了解我们是否应该更加关注并行执行\n- 正在使用的语言模型\n  - 以更好地支持最常用的语言\n- 团队中智能体的角色\n  - 以便了解高层次的用例，从而构建更好的工具、集成和示例\n- 可用工具的名称\n  - 以便了解在公开可用的工具中，哪些工具使用得最多，从而对其进行改进\n\n用户可以选择参与进一步的遥测，通过将 Crew 对象上的 `share_crew` 属性设置为 `True` 来共享完整的遥测数据。启用 `share_crew` 后，将收集详细的团队和任务执行数据，包括任务的 `goal`、`backstory`、`context` 和 `output`。这能够在尊重用户分享选择的同时，提供对使用模式的更深入洞察。\n\n## 许可证\n\nCrewAI 根据 [MIT 许可证](https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI\u002Fblob\u002Fmain\u002FLICENSE) 发布。\n\n## 常见问题解答 (FAQ)\n\n### 一般问题\n\n- [CrewAI 到底是什么？](#q-what-exactly-is-crewai)\n- [如何安装 CrewAI？](#q-how-do-i-install-crewai)\n- [CrewAI 是否依赖 LangChain？](#q-does-crewai-depend-on-langchain)\n- [CrewAI 是开源的吗？](#q-is-crewai-open-source)\n- [CrewAI 会收集用户数据吗？](#q-does-crewai-collect-data-from-users)\n\n### 功能与能力\n\n- [CrewAI 能否处理复杂的用例？](#q-can-crewai-handle-complex-use-cases)\n- [我能否将 CrewAI 与本地 AI 模型一起使用？](#q-can-i-use-crewai-with-local-ai-models)\n- [Crews 与 Flows 有何不同？](#q-what-makes-crews-different-from-flows)\n- [CrewAI 比 LangChain 有哪些优势？](#q-how-is-crewai-better-than-langchain)\n- [CrewAI 是否支持微调或训练自定义模型？](#q-does-crewai-support-fine-tuning-or-training-custom-models)\n\n### 资源与社区\n\n- [在哪里可以找到真实的 CrewAI 示例？](#q-where-can-i-find-real-world-crewai-examples)\n- [我如何为 CrewAI 做贡献？](#q-how-can-i-contribute-to-crewai)\n\n### 企业级功能\n\n- [CrewAI AMP 提供哪些额外功能？](#q-what-additional-features-does-crewai-amp-offer)\n- [CrewAI AMP 是否适用于云端和本地部署？](#q-is-crewai-amp-available-for-cloud-and-on-premise-deployments)\n- [我可以免费试用 CrewAI AMP 吗？](#q-can-i-try-crewai-amp-for-free)\n\n### 问：CrewAI 到底是什么？\n\n答：CrewAI 是一个独立、轻量且快速的 Python 框架，专为编排自主智能体而设计。与 LangChain 等框架不同，CrewAI 不依赖外部依赖项，因此更加轻量、快速且简单。\n\n### 问：如何安装 CrewAI？\n\n答：使用 pip 安装 CrewAI：\n\n```shell\nuv pip install crewai\n```\n\n如需安装其他工具，可使用：\n\n```shell\nuv pip install 'crewai[tools]'\n```\n\n### 问：CrewAI 是否依赖 LangChain？\n\n答：否。CrewAI 完全从零开始构建，不依赖 LangChain 或其他智能体框架。这确保了其轻量、快速和灵活的体验。\n\n### 问：CrewAI 能否处理复杂的用例？\n\n答：是的。CrewAI 在简单和高度复杂的实际场景中都表现出色，提供了从内部提示到复杂工作流编排的多层次深度定制选项。\n\n### 问：我能否将 CrewAI 与本地 AI 模型一起使用？\n\n答：当然可以！CrewAI 支持多种语言模型，包括本地模型。借助 Ollama 和 LM Studio 等工具，可以实现无缝集成。更多详情请参阅 [LLM 连接文档](https:\u002F\u002Fdocs.crewai.com\u002Fhow-to\u002FLLM-Connections\u002F)。\n\n### 问：Crews 与 Flows 有何不同？\n\n答：Crews 提供自主智能体协作，非常适合需要灵活决策和动态交互的任务。Flows 则提供精确的事件驱动控制，非常适合管理详细的执行路径和安全的状态管理。您可以将两者无缝结合，以达到最佳效果。\n\n### 问：CrewAI 比 LangChain 有哪些优势？\n\n答：CrewAI 提供更简单、更直观的 API，执行速度更快，结果更可靠、更一致，文档完善，并拥有活跃的社区——这些都解决了与 LangChain 相关的常见批评和局限性。\n\n### 问：CrewAI 是开源的吗？\n\n答：是的，CrewAI 是开源的，并积极鼓励社区贡献和合作。\n\n### 问：CrewAI 会收集用户数据吗？\n\n答：CrewAI 仅出于改进目的收集匿名遥测数据。敏感数据，如提示、任务或 API 响应，绝不会被收集，除非用户明确启用相关功能。\n\n### 问：在哪里可以找到真实的 CrewAI 示例？\n\n答：请查看 [CrewAI-examples 仓库](https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI-examples)，其中包含旅行计划、股票分析和招聘等实际用例示例。\n\n### 问：我如何为 CrewAI 做贡献？\n\n答：我们热烈欢迎您的贡献！请 fork 该仓库，创建自己的分支，实施更改并提交 pull request。有关详细指南，请参阅 README 中的“贡献”部分。\n\n### 问：CrewAI AMP 提供哪些额外功能？\n\n答：CrewAI AMP 提供统一控制平面、实时可观测性、安全集成、高级安全性、可操作的洞察以及专门的 24\u002F7 企业级支持等先进功能。\n\n### 问：CrewAI AMP 是否适用于云端和本地部署？\n\n答：是的，CrewAI AMP 同时支持基于云和本地部署的选项，使企业能够满足其特定的安全和合规要求。\n\n### 问：我可以免费试用 CrewAI AMP 吗？\n\n答：是的，您可以通过免费访问 [Crew Control Plane](https:\u002F\u002Fapp.crewai.com) 来体验 CrewAI AMP 套件的部分功能。\n\n### 问：CrewAI 是否支持微调或训练自定义模型？\n\n答：是的，CrewAI 可以与自定义训练或微调过的模型集成，帮助您为智能体注入特定领域的知识和更高的准确性。\n\n### 问：CrewAI 智能体能否与外部工具和 API 进行交互？\n\n答：当然可以！CrewAI 智能体能够轻松集成外部工具、API 和数据库，从而充分利用现实世界的数据和资源。\n\n### 问：CrewAI 适合用于生产环境吗？\n\n答：是的，CrewAI 专为生产级标准设计，确保在企业级部署中的可靠性、稳定性和可扩展性。\n\n### 问：CrewAI 的可扩展性如何？\n\n答：CrewAI 具有极高的可扩展性，既能支持简单的自动化任务，也能处理涉及大量智能体和复杂任务的大型企业级工作流。\n\n### 问：CrewAI 是否提供调试和监控工具？\n\n答：是的，CrewAI AMP 包含先进的调试、追踪以及实时可观测性功能，可简化自动化流程的管理和故障排查。\n\n### 问：CrewAI 支持哪些编程语言？\n\n答：CrewAI 主要基于 Python 构建，但通过其灵活的 API 集成能力，能够轻松与使用任何编程语言编写的服务和 API 进行对接。\n\n### 问：CrewAI 是否为初学者提供学习资源？\n\n答：是的，CrewAI 通过 learn.crewai.com 提供丰富的入门级教程、课程和文档，支持各层次的开发者学习和使用。\n\n### 问：CrewAI 能否自动化“人机协作”工作流？\n\n答：是的，CrewAI 完全支持“人机协作”工作流，能够在人类专家与 AI 智能体之间实现无缝协作，从而提升决策质量。","# CrewAI 快速上手指南\n\nCrewAI 是一个轻量、高速的 Python 多智能体编排框架，完全独立于 LangChain 等其他框架。它支持通过 **Crews**（自主协作的智能体团队）和 **Flows**（事件驱动的生产级工作流）构建复杂的 AI 自动化应用。\n\n## 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**：Windows, macOS, 或 Linux\n*   **Python 版本**：>= 3.10 且 \u003C 3.14\n*   **包管理工具**：推荐使用 [UV](https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002F) 以获得更流畅的安装和运行体验（CrewAI 官方推荐）。\n*   **API Key**：准备好大模型服务商的 API Key（如 OpenAI、Anthropic 等），后续需配置在环境变量中。\n\n> **国内开发者提示**：如果直接使用 `pip` 或 `uv` 下载速度较慢，可配置国内镜像源加速。\n> *   UV 使用清华源示例：`export UV_INDEX_URL=https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple` (Linux\u002FMac) 或在命令中加上 `--index-url https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple`\n\n## 安装步骤\n\n### 1. 安装核心库\n\n使用 `uv` 安装 CrewAI 基础包：\n\n```shell\nuv pip install crewai\n```\n\n### 2. 安装可选工具包（推荐）\n\n如果您需要使用额外的工具集（如搜索、代码执行等），建议安装包含可选依赖的版本：\n\n```shell\nuv pip install 'crewai[tools]'\n```\n\n### 3. 依赖问题排查\n\n如果在安装过程中遇到 `tiktoken` 相关报错（如 `ModuleNotFoundError` 或编译失败）：\n\n*   **显式安装嵌入依赖**：\n    ```shell\n    uv pip install 'crewai[embeddings]'\n    ```\n*   **Windows 用户**：确保已安装 Visual C++ Build Tools。\n*   **通用解决方案**：尝试升级 pip 或使用预编译包：\n    ```shell\n    uv pip install --upgrade pip\n    uv pip install tiktoken --prefer-binary\n    ```\n\n## 基本使用\n\nCrewAI 提供了 CLI 工具来快速生成项目骨架，基于 YAML 配置文件定义智能体和任务，实现低代码开发。\n\n### 1. 创建新项目\n\n使用以下命令创建一个名为 `my_first_crew` 的项目：\n\n```shell\ncrewai create crew my_first_crew\n```\n\n执行后，系统将生成如下目录结构：\n\n```text\nmy_first_crew\u002F\n├── .gitignore\n├── pyproject.toml\n├── README.md\n├── .env                # 存放 API Key 等环境变量\n└── src\u002F\n    └── my_first_crew\u002F\n        ├── __init__.py\n        ├── main.py     # 程序入口\n        ├── crew.py     # 定义 Crew 组装逻辑\n        ├── tools\u002F      # 自定义工具\n        │   ├── custom_tool.py\n        │   └── __init__.py\n        └── config\u002F     # 配置文件目录\n            ├── agents.yaml  # 定义智能体角色\n            └── tasks.yaml   # 定义任务流程\n```\n\n### 2. 配置智能体与任务\n\n编辑 `src\u002Fmy_first_crew\u002Fconfig\u002Fagents.yaml` 定义你的智能体团队：\n\n```yaml\n# src\u002Fmy_first_crew\u002Fconfig\u002Fagents.yaml\nresearcher:\n  role: >\n    {topic} 高级数据研究员\n  goal: >\n    挖掘 {topic} 领域的前沿发展动态\n  backstory: >\n    你是一位经验丰富的研究员，擅长发现 {topic} 领域的最新进展。\n    你能够找到最相关的信息，并以清晰简洁的方式呈现。\n\nreporting_analyst:\n  role: >\n    {topic} 报告分析师\n  goal: >\n    基于 {topic} 的数据分析和研究发现撰写详细报告\n  backstory: >\n    你是一位细致的分析师，擅长将复杂数据转化为清晰的报告，\n    让他人易于理解并采取行动。\n```\n\n编辑 `src\u002Fmy_first_crew\u002Fconfig\u002Ftasks.yaml` 定义任务流程：\n\n```yaml\n# src\u002Fmy_first_crew\u002Fconfig\u002Ftasks.yaml\nresearch_task:\n  description: >\n    对 {topic} 进行彻底的研究。\n    确保找到任何有趣且相关的信息，注意当前年份是 2025 年。\n  expected_output: >\n    包含 10 个要点的列表，列出最相关的信息。\n  agent: researcher\n\nreport_task:\n  description: >\n    根据研究任务的结果，撰写一份关于 {topic} 的综合报告。\n    确保报告内容详实、结构清晰。\n  expected_output: >\n    一份完整的 Markdown 格式研究报告。\n  agent: reporting_analyst\n```\n\n### 3. 运行你的 Crew\n\n1.  **配置环境变量**：在项目根目录的 `.env` 文件中填入你的 LLM API Key。\n    ```text\n    OPENAI_API_KEY=sk-your-api-key-here\n    ```\n    *(注：如果你使用的是其他模型提供商，请在 `crew.py` 中相应修改模型配置)*\n\n2.  **启动项目**：\n    进入项目目录并运行主程序：\n    ```shell\n    cd my_first_crew\n    uv run python src\u002Fmy_first_crew\u002Fmain.py\n    ```\n\n    或者在 `main.py` 中传入具体主题参数（取决于你的代码实现）：\n    ```python\n    # src\u002Fmy_first_crew\u002Fmain.py 示例调用\n    inputs = {\"topic\": \"人工智能代理\"}\n    MyCrew().crew().kickoff(inputs=inputs)\n    ```\n\n现在，你的第一个多智能体协作团队已经开始运行，它将自动完成从研究到报告生成的全流程。","某电商运营团队需要每日从全球新闻、社交媒体和竞品网站中收集信息，自动生成包含市场趋势分析、竞品动态及营销建议的综合日报。\n\n### 没有 crewAI 时\n- **流程割裂且低效**：开发人员需编写大量胶水代码串联多个独立脚本，分别负责抓取、分析和写作，维护成本极高且容易出错。\n- **角色能力单一**：单个 AI 模型难以同时兼顾“严谨的数据核实”与“创造性的营销文案”，导致报告要么数据准确但枯燥，要么文笔生动但事实存疑。\n- **缺乏协同机制**：不同任务间无法自动传递上下文，前一步的分析结果无法直接指导后一步的写作，人工介入校对和整合耗时耗力。\n- **错误难以追踪**：当报告出现幻觉或数据偏差时，由于缺乏统一的观测面板，很难定位是哪个环节的逻辑出了问题。\n\n### 使用 crewAI 后\n- **自动化编排流畅**：通过定义“研究员”、“分析师”和“主编”三个专属 Agent，crewAI 自动 orchestrates（编排）它们按顺序协作，无需手动编写复杂的流程控制代码。\n- **专业角色各司其职**：研究员专注全网检索并验证数据，分析师深度解读趋势，主编负责润色文风，三者发挥各自特长，产出内容既专业又具可读性。\n- **智能上下文共享**：Agent 之间自动共享中间成果，分析师直接基于研究员的清洗数据进行推理，主编则依据分析结论撰写建议，实现了无缝的流水线作业。\n- **全链路可观测**：利用 crewAI 的追踪功能，团队能实时监控每个 Agent 的执行日志和耗时，快速优化表现不佳的角色提示词，确保输出稳定可靠。\n\ncrewAI 将原本碎片化的单点 AI 调用升级为具备协作智慧的自动化团队，让复杂任务的处理效率提升了数倍。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FcrewAIInc_crewAI_c28e3ef6.jpg","crewAIInc","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FcrewAIInc_b6da8320.png","",null,"crewaiinc","https:\u002F\u002Fcrewai.com","https:\u002F\u002Fgithub.com\u002FcrewAIInc",[81,85,88,92,96],{"name":82,"color":83,"percentage":84},"Python","#3572A5",98.6,{"name":86,"color":87,"percentage":42},"JavaScript","#f1e05a",{"name":89,"color":90,"percentage":91},"CSS","#663399",0.3,{"name":93,"color":94,"percentage":95},"Jinja","#a52a22",0.1,{"name":97,"color":98,"percentage":99},"Shell","#89e051",0,49091,6706,"2026-04-17T12:14:16","MIT","Linux, macOS, Windows","未说明",{"notes":107,"python":108,"dependencies":109},"该工具是一个纯 Python 框架，不依赖 LangChain。推荐使用 UV 进行依赖管理和安装。若遇到 tiktoken 模块缺失或编译失败，需确保已安装 Rust 编译器（Windows 用户需安装 Visual C++ Build Tools），或直接安装预编译的二进制包。支持通过 YAML 配置定义智能体和任务。",">=3.10, \u003C3.14",[110,111,112],"crewai","uv","tiktoken (可选，用于 embeddings)",[14,15,13,35],[115,116,117,118,119],"agents","ai","ai-agents","llms","aiagentframework","2026-03-27T02:49:30.150509","2026-04-18T02:22:50.075522",[123,128,133,137,142],{"id":124,"question_zh":125,"answer_zh":126,"source_url":127},38630,"使用 SerperDevTool 时遇到报错：缺少必需的位置参数 'search_query'，如何解决？","这是因为 Agent 没有正确理解如何调用该工具。需要在定义 Agent 的 backstory（背景故事）中明确添加指令，告诉 Agent 在使用搜索工具时必须提供 'search_query' 作为输入参数。\n\n解决方法：在 Agent 的 backstory 中加入以下句子：\n\"When looking for information on internet use 'search_query' as input argument for search tools provided\"\n（当在互联网上查找信息时，请使用 'search_query' 作为所提供搜索工具的输入参数）","https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI\u002Fissues\u002F430",{"id":129,"question_zh":130,"answer_zh":131,"source_url":132},38631,"如何在 CrewAI 中使用 Google Gemini API 模型？","默认情况下 CrewAI 使用 OpenAI 模型，如果直接使用 Gemini 会报错缺少 'OPENAI_API_KEY'。你需要显式地在 Agent 初始化时传入 `llm` 参数。\n\n解决步骤：\n1. 安装依赖：`pip install langchain-google-genai`\n2. 在代码中导入并配置 Gemini 模型：\n```python\nfrom langchain_google_genai import ChatGoogleGenerativeAI\n\nllm = ChatGoogleGenerativeAI(\n    model=\"gemini-1.5-flash\",\n    verbose=True,\n    temperature=0.5,\n    google_api_key=\"你的密钥\"\n)\n\n# 在创建 Agent 时指定 llm\nagent = Agent(\n    role='...',\n    goal='...',\n    llm=llm,  # 关键步骤：传入自定义 LLM\n    tools=[...]\n)\n```","https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI\u002Fissues\u002F105",{"id":134,"question_zh":135,"answer_zh":136,"source_url":132},38632,"如何将 CrewAI 的嵌入模型（Embedder）从 OpenAI 切换到 Hugging Face？","你可以通过设置环境变量和在实例化 Crew 对象时配置 `embedder` 参数来实现。\n\n具体步骤：\n1. 设置 Hugging Face Token 环境变量：\n```python\nimport os\nos.environ[\"HUGGINGFACE_ACCESS_TOKEN\"] = \"hf_...\"\n```\n\n2. 在创建 Crew 实例时配置 embedder：\n```python\ncrew = Crew(\n  agents=[...],\n  tasks=[...],\n  embedder=dict(\n      provider=\"huggingface\", # 或者 openai, ollama 等\n      config=dict(\n          model=\"mixedbread-ai\u002Fmxbai-embed-large-v1\", # 指定具体的模型名称\n      ),\n  ),\n)\n```\n注意：某些模型可能需要 `trust_remote_code=True`，但目前的配置接口可能不支持直接传递此参数，建议选择兼容性好的模型。",{"id":138,"question_zh":139,"answer_zh":140,"source_url":141},38633,"Agent 输出了完整的思考过程（Thought\u002FAction\u002FObservation），但实际上并没有执行工具调用，而是伪造了结果，这是为什么？","这是一个已知的行为问题，通常发生在使用自定义 LLM 时，模型倾向于“幻觉”出工具的执行结果而不是真正调用它。\n\n目前的缓解方案包括：\n1. **加强提示词工程**：在 System Prompt 或 Agent 指令中更严格地禁止伪造输出，强调必须等待实际工具返回。\n2. **使用验证机制**：如评论中提到的，可以使用外部 harness（如 cascadeflow）来强制执行工具调用验证，如果检测到未实际执行工具则拦截。\n3. **检查 LLM 兼容性**：确保使用的自定义 LLM 支持 Function Calling 格式，并且温度（temperature）设置较低以减少幻觉。","https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI\u002Fissues\u002F3154",{"id":143,"question_zh":144,"answer_zh":145,"source_url":146},38634,"运行任务时报错 'Invalid response from LLM call - None or empty' 导致任务失败，该如何排查？","这个错误通常表示 LLM 返回了空内容或格式不符合预期，常见原因包括自定义工具返回格式错误或 LLM 配置不当。\n\n排查建议：\n1. **检查自定义工具返回值**：确保你的自定义工具的 `_run` 方法返回的是非空的字符串。如果返回 None 或空字符串，CrewAI 会抛出此错误。\n2. **检查 function_calling_llm 类型**：错误日志中提到 `Invalid type LLM for attribute 'function_calling_llm'`，请确保传递给相关参数的值是字符串、布尔值或基础类型，而不是复杂的 LLM 对象实例（除非文档明确支持）。\n3. **获取完整日志**：由于该错误可能由多种原因引起，建议开启详细日志模式（verbose=True）并查看完整的堆栈跟踪，确认是哪一个具体步骤返回了空值。","https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI\u002Fissues\u002F2885",[148,153,158,163,168,173,178,183,188,193,198,203,208,213,218,223,228,233,238,243],{"id":149,"version":150,"summary_zh":151,"released_at":152},314555,"1.14.2rc1","## 变更内容\n\n### 错误修复\n- 修复 MCP 工具解析中对循环 JSON 模式的处理问题\n- 通过将 python-multipart 升级至 0.0.26 版本来修复安全漏洞\n- 通过将 pypdf 升级至 6.10.1 版本来修复安全漏洞\n\n### 文档更新\n- 更新 v1.14.2a5 的变更日志和版本信息\n\n## 贡献者\n\n@greysonlalonde","2026-04-15T21:25:04",{"id":154,"version":155,"summary_zh":156,"released_at":157},314556,"1.14.2a5","## 变更内容\n\n### 文档\n- 更新 v1.14.2a4 的变更日志和版本信息\n\n## 贡献者\n\n@greysonlalonde","2026-04-15T14:45:31",{"id":159,"version":160,"summary_zh":161,"released_at":162},314557,"1.14.2a4","## 变更内容\n\n### 功能\n- 在开发工具中，于发布失败时添加恢复提示\n\n### Bug 修复\n- 修复严格模式向 Bedrock Converse API 的转发问题\n- 将 pytest 版本固定为 9.0.3，以修复安全漏洞 GHSA-6w46-j5rx-g56g\n- 将 OpenAI 的最低版本要求提升至 >=2.0.0\n\n### 文档\n- 更新 v1.14.2a3 的变更日志和版本号\n\n## 贡献者\n\n@greysonlalonde","2026-04-14T18:34:38",{"id":164,"version":165,"summary_zh":166,"released_at":167},314558,"1.14.2a3","## 变更内容\n\n### 功能\n- 添加部署验证 CLI\n- 改进 LLM 初始化的易用性\n\n### 错误修复\n- 将 pypdf 和 uv 覆盖为已打补丁的版本，以修复 CVE-2026-40260 和 GHSA-pjjw-68hj-v9mw 漏洞\n- 将 requests 升级到 >=2.33.0，以修复临时文件漏洞\n- 通过移除真值默认值来保留 Bedrock 工具调用参数\n- 对严格模式下的工具 Schema 进行 sanitization 处理\n- 修复 MemoryRecord 嵌入序列化测试的不稳定问题\n\n### 文档\n- 清理企业版 A2A 的语言表述\n- 添加企业版 A2A 功能文档\n- 更新 OSS 版 A2A 文档\n- 更新 v1.14.2a2 的变更日志和版本号\n\n## 贡献者\n\n@Yanhu007, @greysonlalonde","2026-04-13T13:38:23",{"id":169,"version":170,"summary_zh":171,"released_at":172},314559,"1.14.2a2","## 变更内容\n\n### 功能\n- 添加检查点 TUI，支持树形视图、分叉功能以及可编辑的输入输出\n- 丰富 LLM 令牌跟踪功能，新增推理令牌和缓存创建令牌\n- 在启动方法中添加 `from_checkpoint` 参数\n- 将 `crewai_version` 嵌入检查点，并配备迁移框架\n- 添加检查点分叉功能，支持 lineage 追踪\n\n### Bug 修复\n- 修复严格模式向 Anthropic 和 Bedrock 提供商的转发问题\n- 加强 NL2SQLTool 的安全性，设置只读默认值、查询验证及参数化查询\n\n### 文档更新\n- 更新 v1.14.2a1 的变更日志和版本信息\n\n## 贡献者\n\n@alex-clawd, @github-actions[bot], @greysonlalonde, @lucasgomide","2026-04-10T13:59:03",{"id":174,"version":175,"summary_zh":176,"released_at":177},314560,"1.14.2a1","## 变更内容\n\n### Bug 修复\n- 修复在 HITL 恢复后触发 `flow_finished` 事件的问题\n- 将 cryptography 版本固定为 46.0.7，以解决 CVE-2026-39892 漏洞\n\n### 重构\n- 重构代码，使用共享的 I18N_DEFAULT 单例\n\n### 文档\n- 更新 v1.14.1 的变更日志和版本信息\n\n## 贡献者\n\n@greysonlalonde","2026-04-08T23:26:31",{"id":179,"version":180,"summary_zh":181,"released_at":182},314561,"1.14.1","## 变更内容\n\n### 功能\n- 添加异步检查点 TUI 浏览器\n- 为流式输出添加 aclose()\u002Fclose() 和异步上下文管理器\n\n### Bug 修复\n- 修复模板 pyproject.toml 版本更新的正则表达式\n- 对钩子装饰器过滤器中的工具名称进行 sanitization 处理\n- 修复在创建 CheckpointConfig 时检查点处理器的注册问题\n- 将 transformers 升级至 5.5.0，以解决 CVE-2026-1839 漏洞\n- 移除 FilteredStream 标准输出\u002F标准错误包装器\n\n### 文档\n- 更新 v1.14.1rc1 的变更日志和版本号\n\n### 重构\n- 在规范生成中，用动态的 BaseTool 字段排除列表替换硬编码的拒绝列表\n- 在 devtools CLI 中，用 tomlkit 替代正则表达式\n- 使用共享的 PRINTER 单例\n- 将 BaseProvider 改为带有 provider_type 鉴别器的 BaseModel\n\n## 贡献者\n\n@greysonlalonde, @iris-clawd, @joaomdmoura, @lorenzejay","2026-04-08T17:57:03",{"id":184,"version":185,"summary_zh":186,"released_at":187},314562,"1.14.1rc1","## 变更内容\n\n### 功能\n- 添加异步检查点 TUI 浏览器\n- 为流式输出添加 aclose()\u002Fclose() 和异步上下文管理器\n\n### 错误修复\n- 使用正则表达式修复模板 pyproject.toml 版本号提升问题\n- 对钩子装饰器过滤器中的工具名称进行 sanitization 处理\n- 将 transformers 升级至 5.5.0，以解决 CVE-2026-1839 漏洞\n- 在创建 CheckpointConfig 时注册检查点处理器\n\n### 重构\n- 在规范生成中，用动态的 BaseTool 字段排除列表替换硬编码的拒绝列表\n- 在 devtools CLI 中用 tomlkit 替代正则表达式\n- 使用共享的 PRINTER 单例\n- 将 BaseProvider 改为带有 provider_type 鉴别器的 BaseModel\n- 移除 FilteredStream 标准输出\u002F标准错误包装器\n- 移除未使用的 flow\u002Fconfig.py 文件\n\n### 文档\n- 更新 v1.14.0 的变更日志和版本号\n\n## 贡献者\n\n@greysonlalonde, @iris-clawd, @joaomdmoura","2026-04-08T16:29:10",{"id":189,"version":190,"summary_zh":191,"released_at":192},314563,"1.14.0","## 变更内容\n\n### 功能\n- 添加检查点列表\u002F信息 CLI 命令\n- 添加 `guardrail_type` 和 `name` 以区分轨迹\n- 添加用于检查点存储的 SqliteProvider\n- 添加 CheckpointConfig 以实现自动检查点功能\n- 实现运行时状态检查点、事件系统，并重构执行器\n\n### 错误修复\n- 添加 SSRF 和路径遍历防护\n- 在 RAG 工具中添加路径和 URL 验证\n- 将嵌入向量排除在内存序列化之外，以节省 token\n- 确保在写入流程模板之前输出目录已存在\n- 将 litellm 升级至 >=1.83.0，以修复 CVE-2026-35030 漏洞\n- 移除导致阿拉伯语页面渲染问题的 SEO 索引字段\n\n### 文档\n- 更新 v1.14.0 的变更日志和版本信息\n- 更新快速入门和安装指南，以提高清晰度\n- 添加存储提供商章节及 JsonProvider 导出功能\n- 添加 AMP 训练选项卡指南\n\n### 代码重构\n- 清理检查点 API\n- 移除 CodeInterpreterTool 并弃用代码执行相关参数\n\n## 贡献者\n\n@alex-clawd, @github-actions[bot], @greysonlalonde, @iris-clawd, @joaomdmoura, @lorenzejay, @lucasgomide","2026-04-07T17:47:49",{"id":194,"version":195,"summary_zh":196,"released_at":197},314564,"1.14.0a4","## 变更内容\n\n### 功能\n- 添加 `guardrail_type` 和 `name` 以区分轨迹\n- 添加用于检查点存储的 `SqliteProvider`\n- 添加用于自动检查点的 `CheckpointConfig`\n- 实现运行时状态检查点、事件系统以及执行器重构\n\n### 错误修复\n- 在内存序列化中排除嵌入向量，以节省令牌\n- 将 `litellm` 升级至 >=1.83.0，以修复 CVE-2026-35030 漏洞\n\n### 文档\n- 更新快速入门和安装指南，以提高清晰度\n- 增加存储提供程序章节，并导出 `JsonProvider`\n\n### 性能\n- 对检查点数据列使用 `JSONB`\n\n### 重构\n- 移除 `CodeInterpreterTool` 并弃用代码执行参数\n\n## 贡献者\n\n@alex-clawd, @github-actions[bot], @greysonlalonde, @joaomdmoura, @lorenzejay, @lucasgomide","2026-04-07T15:29:28",{"id":199,"version":200,"summary_zh":201,"released_at":202},314565,"1.14.0a3","## What's Changed\n\n### Documentation\n- Update changelog and version for v1.14.0a2\n\n## Contributors\n\n@joaomdmoura","2026-04-06T08:18:10",{"id":204,"version":205,"summary_zh":206,"released_at":207},314566,"1.14.0a2","Release 1.14.0a2","2026-04-06T07:34:34",{"id":209,"version":210,"summary_zh":211,"released_at":212},314567,"1.13.0","## What's Changed\n\n### Features\n- Add RuntimeState RootModel for unified state serialization\n- Enhance event listener with new telemetry spans for skill and memory events\n- Add A2UI extension with v0.8\u002Fv0.9 support, schemas, and docs\n- Emit token usage data in LLMCallCompletedEvent\n- Auto-update deployment test repo during release\n- Improve enterprise release resilience and UX\n\n### Bug Fixes\n- Add tool repository credentials to crewai install\n- Add tool repository credentials to uv build in tool publish\n- Pass fingerprint metadata via config instead of tool args\n- Handle GPT-5.x models not supporting the `stop` API parameter\n- Add GPT-5 and o-series to multimodal vision prefixes\n- Bust uv cache for freshly published packages in enterprise release\n- Cap lancedb below 0.30.1 for Windows compatibility\n- Fix RBAC permission levels to match actual UI options\n- Fix inaccuracies in agent-capabilities across all languages\n\n### Documentation\n- Add coding agent skills demo video to getting started pages\n- Add comprehensive SSO configuration guide\n- Add comprehensive RBAC permissions matrix and deployment guide\n- Update changelog and version for v1.13.0\n\n### Performance\n- Reduce framework overhead with lazy event bus, skip tracing when disabled\n\n### Refactoring\n- Convert Flow to Pydantic BaseModel\n- Convert LLM classes to Pydantic BaseModel\n- Replace InstanceOf[T] with plain type annotations\n- Remove unused third_party LLM directory\n\n## Contributors\n\n@alex-clawd, @dependabot[bot], @greysonlalonde, @iris-clawd, @joaomdmoura, @lorenzejay, @lucasgomide, @thiagomoretto","2026-04-02T23:16:28",{"id":214,"version":215,"summary_zh":216,"released_at":217},314568,"1.13.0a7","## What's Changed\n\n### Features\n- Add A2UI extension with v0.8\u002Fv0.9 support, schemas, and docs\n\n### Bug Fixes\n- Fix multimodal vision prefixes by adding GPT-5 and o-series\n\n### Documentation\n- Update changelog and version for v1.13.0a6\n\n## Contributors\n\n@alex-clawd, @greysonlalonde, @joaomdmoura","2026-04-02T14:21:29",{"id":219,"version":220,"summary_zh":221,"released_at":222},314569,"1.13.0a6","## What's Changed\n\n### Documentation\n- Fix RBAC permission levels to match actual UI options (#5210)\n- Update changelog and version for v1.13.0a5 (#5200)\n\n### Performance\n- Reduce framework overhead by implementing a lazy event bus and skipping tracing when disabled (#5187)\n\n## Contributors\n\n@alex-clawd, @joaomdmoura, @lucasgomide","2026-04-01T17:26:22",{"id":224,"version":225,"summary_zh":226,"released_at":227},314570,"1.13.0a5","## What's Changed\n\n### Documentation\n- Update changelog and version for v1.13.0a4\n\n## Contributors\n\n@greysonlalonde, @joaomdmoura","2026-04-01T07:00:15",{"id":229,"version":230,"summary_zh":231,"released_at":232},314571,"1.13.0a4","## What's Changed\n\n### Documentation\n- Update changelog and version for v1.13.0a3\n\n## Contributors\n\n@greysonlalonde","2026-03-31T21:08:21",{"id":234,"version":235,"summary_zh":236,"released_at":237},314572,"1.13.0a3","## What's Changed\n\n### Features\n- Emit token usage data in LLMCallCompletedEvent\n- Extract and publish tool metadata to AMP\n\n### Bug Fixes\n- Handle GPT-5.x models not supporting the `stop` API parameter\n\n### Documentation\n- Fix inaccuracies in agent-capabilities across all languages\n- Add Agent Capabilities overview and improve Skills documentation\n- Add comprehensive SSO configuration guide\n- Update changelog and version for v1.13.0rc1\n\n### Refactoring\n- Convert Flow to Pydantic BaseModel\n- Convert LLM classes to Pydantic BaseModel\n- Replace InstanceOf[T] with plain type annotations\n- Remove unused methods\n\n## Contributors\n\n@dependabot[bot], @greysonlalonde, @iris-clawd, @lorenzejay, @lucasgomide, @thiagomoretto","2026-03-31T20:16:32",{"id":239,"version":240,"summary_zh":241,"released_at":242},314573,"1.13.0rc1","## What's Changed\n\n### Documentation\n- Update changelog and version for v1.13.0a2\n\n## Contributors\n\n@greysonlalonde","2026-03-27T03:31:04",{"id":244,"version":245,"summary_zh":246,"released_at":247},314574,"1.13.0a2","## What's Changed\n\n### Features\n- Auto-update deployment test repo during release\n- Improve enterprise release resilience and UX\n\n### Documentation\n- Update changelog and version for v1.13.0a1\n\n## Contributors\n\n@greysonlalonde","2026-03-26T20:05:42"]