{
  "canonical_name": "crewAIInc/crewAI",
  "compilation_id": "pack_0784dee0500844f688bd26ce60087236",
  "created_at": "2026-05-16T06:24:40.054465+00:00",
  "created_by": "project-pack-compiler",
  "feedback": {
    "carrier_selection_notes": [
      "viable_asset_types=skill, recipe, host_instruction, eval, preflight",
      "recommended_asset_types=skill, recipe, host_instruction, eval, preflight"
    ],
    "evidence_delta": {
      "confirmed_claims": [
        "identity_anchor_present",
        "capability_and_host_targets_present",
        "install_path_declared_or_better"
      ],
      "missing_required_fields": [],
      "must_verify_forwarded": [
        "Run or inspect `npx skills` in an isolated environment.",
        "Confirm the project exposes the claimed capability to at least one target host."
      ],
      "quickstart_execution_scope": "allowlisted_sandbox_smoke",
      "sandbox_command": "npx skills",
      "sandbox_container_image": "node:22-slim",
      "sandbox_execution_backend": "docker",
      "sandbox_planner_decision": "deterministic_isolated_install",
      "sandbox_validation_id": "sbx_0f4dd0fc53a64266ad9f5a5d141b9653"
    },
    "feedback_event_type": "project_pack_compilation_feedback",
    "learning_candidate_reasons": [],
    "template_gaps": []
  },
  "identity": {
    "canonical_id": "project_01f785c8a4e9e730b2ac2c45de2fa4ec",
    "canonical_name": "crewAIInc/crewAI",
    "homepage_url": null,
    "license": "unknown",
    "repo_url": "https://github.com/crewAIInc/crewAI",
    "slug": "crewai",
    "source_packet_id": "phit_170489dc06d140ea9d2e9ebd0d2a0cf8",
    "source_validation_id": "dval_a860c3e6178142e3b92fd4a77029872b"
  },
  "merchandising": {
    "best_for": "需要流程自动化能力，并使用 local_cli的用户",
    "github_forks": 7057,
    "github_stars": 51055,
    "one_liner_en": "Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.",
    "one_liner_zh": "Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.",
    "primary_category": {
      "category_id": "workflow-automation",
      "confidence": "high",
      "name_en": "Workflow Automation",
      "name_zh": "流程自动化",
      "reason": "curated popular coverage category matched project identity"
    },
    "target_user": "使用 local_cli 等宿主 AI 的用户",
    "title_en": "crewAI",
    "title_zh": "crewAI 能力包",
    "visible_tags": [
      {
        "label_en": "Browser Agents",
        "label_zh": "浏览器 Agent",
        "source": "repo_evidence_project_characteristics",
        "tag_id": "product_domain-browser-agents",
        "type": "product_domain"
      },
      {
        "label_en": "Web Task Automation",
        "label_zh": "网页任务自动化",
        "source": "repo_evidence_project_characteristics",
        "tag_id": "user_job-web-task-automation",
        "type": "user_job"
      },
      {
        "label_en": "Natural-language Web Actions",
        "label_zh": "自然语言网页操作",
        "source": "repo_evidence_project_characteristics",
        "tag_id": "core_capability-natural-language-web-actions",
        "type": "core_capability"
      },
      {
        "label_en": "Checkpoint Resume",
        "label_zh": "断点恢复流程",
        "source": "repo_evidence_project_characteristics",
        "tag_id": "workflow_pattern-checkpoint-resume",
        "type": "workflow_pattern"
      },
      {
        "label_en": "Structured Data Extraction",
        "label_zh": "结构化数据提取",
        "source": "repo_evidence_project_characteristics",
        "tag_id": "selection_signal-structured-data-extraction",
        "type": "selection_signal"
      }
    ]
  },
  "packet_id": "phit_170489dc06d140ea9d2e9ebd0d2a0cf8",
  "page_model": {
    "artifacts": {
      "artifact_slug": "crewai",
      "files": [
        "PROJECT_PACK.json",
        "QUICK_START.md",
        "PROMPT_PREVIEW.md",
        "HUMAN_MANUAL.md",
        "AI_CONTEXT_PACK.md",
        "BOUNDARY_RISK_CARD.md",
        "PITFALL_LOG.md",
        "REPO_INSPECTION.json",
        "REPO_INSPECTION.md",
        "CAPABILITY_CONTRACT.json",
        "EVIDENCE_INDEX.json",
        "CLAIM_GRAPH.json"
      ],
      "required_files": [
        "PROJECT_PACK.json",
        "QUICK_START.md",
        "PROMPT_PREVIEW.md",
        "HUMAN_MANUAL.md",
        "AI_CONTEXT_PACK.md",
        "BOUNDARY_RISK_CARD.md",
        "PITFALL_LOG.md",
        "REPO_INSPECTION.json"
      ]
    },
    "detail": {
      "capability_source": "Project Hit Packet + DownstreamValidationResult",
      "commands": [
        {
          "command": "npx skills",
          "label": "Node.js / npx · 官方安装入口",
          "source": "https://github.com/crewAIInc/crewAI#readme",
          "verified": true
        }
      ],
      "display_tags": [
        "浏览器 Agent",
        "网页任务自动化",
        "自然语言网页操作",
        "断点恢复流程",
        "结构化数据提取"
      ],
      "eyebrow": "流程自动化",
      "glance": [
        {
          "body": "判断自己是不是目标用户。",
          "label": "最适合谁",
          "value": "需要流程自动化能力，并使用 local_cli的用户"
        },
        {
          "body": "先理解能力边界，再决定是否继续。",
          "label": "核心价值",
          "value": "Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks."
        },
        {
          "body": "未完成验证前保持审慎。",
          "label": "继续前",
          "value": "publish to Doramagic.ai project surfaces"
        }
      ],
      "guardrail_source": "Boundary & Risk Card",
      "guardrails": [
        {
          "body": "Prompt Preview 只展示流程，不证明项目已安装或运行。",
          "label": "Check 1",
          "value": "不要把试用当真实运行"
        },
        {
          "body": "local_cli",
          "label": "Check 2",
          "value": "确认宿主兼容"
        },
        {
          "body": "publish to Doramagic.ai project surfaces",
          "label": "Check 3",
          "value": "先隔离验证"
        }
      ],
      "mode": "skill, recipe, host_instruction, eval, preflight",
      "pitfall_log": {
        "items": [
          {
            "body": "GitHub 社区证据显示该项目存在一个安装相关的待验证问题：[FEATURE] Implement Process.consensual with a pluggable ConsensusEngine",
            "category": "安装坑",
            "evidence": [
              "community_evidence:github | cevd_a7c38215ebb04a4fbc6e7c6d2fdb2469 | https://github.com/crewAIInc/crewAI/issues/5708 | 来源讨论提到 python 相关条件，需在安装/试用前复核。"
            ],
            "severity": "high",
            "suggested_check": "来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。",
            "title": "来源证据：[FEATURE] Implement Process.consensual with a pluggable ConsensusEngine",
            "user_impact": "可能增加新用户试用和生产接入成本。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个运行相关的待验证问题：[BUG] Wrong code in document",
            "category": "运行坑",
            "evidence": [
              "community_evidence:github | cevd_390380af45524e959d558b160597b38b | https://github.com/crewAIInc/crewAI/issues/5378 | 来源讨论提到 python 相关条件，需在安装/试用前复核。"
            ],
            "severity": "high",
            "suggested_check": "来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。",
            "title": "来源证据：[BUG] Wrong code in document",
            "user_impact": "可能增加新用户试用和生产接入成本。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个运行相关的待验证问题：[FEATURE] Enhance the document about @persisit",
            "category": "运行坑",
            "evidence": [
              "community_evidence:github | cevd_effef000d4cf47a892f17850aa033610 | https://github.com/crewAIInc/crewAI/issues/5372 | 来源类型 github_issue 暴露的待验证使用条件。"
            ],
            "severity": "high",
            "suggested_check": "来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。",
            "title": "来源证据：[FEATURE] Enhance the document about @persisit",
            "user_impact": "可能增加新用户试用和生产接入成本。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：[FEATURE] GuardrailProvider interface for pre-tool-call authorization",
            "category": "安全/权限坑",
            "evidence": [
              "community_evidence:github | cevd_858a1a8bead2456289d686ec0d2d802c | https://github.com/crewAIInc/crewAI/issues/4877 | 来源讨论提到 python 相关条件，需在安装/试用前复核。"
            ],
            "severity": "high",
            "suggested_check": "来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。",
            "title": "来源证据：[FEATURE] GuardrailProvider interface for pre-tool-call authorization",
            "user_impact": "可能阻塞安装或首次运行。"
          },
          {
            "body": "仓库名 `crewai` 与安装入口 `skills` 不完全一致。",
            "category": "身份坑",
            "evidence": [
              "identity.distribution | github_repo:710601088 | https://github.com/crewAIInc/crewAI | repo=crewai; install=skills"
            ],
            "severity": "medium",
            "suggested_check": "在 npm/PyPI/GitHub 上确认包名映射和官方 README 说明。",
            "title": "仓库名和安装名不一致",
            "user_impact": "用户照着仓库名搜索包或照着包名找仓库时容易走错入口。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个安装相关的待验证问题：1.14.4",
            "category": "安装坑",
            "evidence": [
              "community_evidence:github | cevd_dcfa2a852812414a82683392c2888795 | https://github.com/crewAIInc/crewAI/releases/tag/1.14.4 | 来源类型 github_release 暴露的待验证使用条件。"
            ],
            "severity": "medium",
            "suggested_check": "来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。",
            "title": "来源证据：1.14.4",
            "user_impact": "可能增加新用户试用和生产接入成本。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个安装相关的待验证问题：1.14.4a1",
            "category": "安装坑",
            "evidence": [
              "community_evidence:github | cevd_0de86b993ffa4d9298726daa189abf49 | https://github.com/crewAIInc/crewAI/releases/tag/1.14.4a1 | 来源类型 github_release 暴露的待验证使用条件。"
            ],
            "severity": "medium",
            "suggested_check": "来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。",
            "title": "来源证据：1.14.4a1",
            "user_impact": "可能增加新用户试用和生产接入成本。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个安装相关的待验证问题：1.14.5a4",
            "category": "安装坑",
            "evidence": [
              "community_evidence:github | cevd_6db6cd94b6ef4bffa23da215458565b4 | https://github.com/crewAIInc/crewAI/releases/tag/1.14.5a4 | 来源类型 github_release 暴露的待验证使用条件。"
            ],
            "severity": "medium",
            "suggested_check": "来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。",
            "title": "来源证据：1.14.5a4",
            "user_impact": "可能增加新用户试用和生产接入成本。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Scans the client database to extract existing policy details.",
            "category": "配置坑",
            "evidence": [
              "community_evidence:github | cevd_8201c73155314e67801bd0b81ea9820d | https://github.com/crewAIInc/crewAI/issues/5760 | 来源类型 github_issue 暴露的待验证使用条件。"
            ],
            "severity": "medium",
            "suggested_check": "来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。",
            "title": "来源证据：Scans the client database to extract existing policy details.",
            "user_impact": "可能增加新用户试用和生产接入成本。"
          },
          {
            "body": "README/documentation is current enough for a first validation pass.",
            "category": "能力坑",
            "evidence": [
              "capability.assumptions | github_repo:710601088 | https://github.com/crewAIInc/crewAI | README/documentation is current enough for a first validation pass."
            ],
            "severity": "medium",
            "suggested_check": "将假设转成下游验证清单。",
            "title": "能力判断依赖假设",
            "user_impact": "假设不成立时，用户拿不到承诺的能力。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个维护/版本相关的待验证问题：1.14.5a1",
            "category": "维护坑",
            "evidence": [
              "community_evidence:github | cevd_c4094bb55c234f1581b9879efd4994c6 | https://github.com/crewAIInc/crewAI/releases/tag/1.14.5a1 | 来源类型 github_release 暴露的待验证使用条件。"
            ],
            "severity": "medium",
            "suggested_check": "来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。",
            "title": "来源证据：1.14.5a1",
            "user_impact": "可能增加新用户试用和生产接入成本。"
          },
          {
            "body": "未记录 last_activity_observed。",
            "category": "维护坑",
            "evidence": [
              "evidence.maintainer_signals | github_repo:710601088 | https://github.com/crewAIInc/crewAI | last_activity_observed missing"
            ],
            "severity": "medium",
            "suggested_check": "补 GitHub 最近 commit、release、issue/PR 响应信号。",
            "title": "维护活跃度未知",
            "user_impact": "新项目、停更项目和活跃项目会被混在一起，推荐信任度下降。"
          },
          {
            "body": "no_demo",
            "category": "安全/权限坑",
            "evidence": [
              "downstream_validation.risk_items | github_repo:710601088 | https://github.com/crewAIInc/crewAI | no_demo; severity=medium"
            ],
            "severity": "medium",
            "suggested_check": "进入安全/权限治理复核队列。",
            "title": "下游验证发现风险项",
            "user_impact": "下游已经要求复核，不能在页面中弱化。"
          },
          {
            "body": "no_demo",
            "category": "安全/权限坑",
            "evidence": [
              "risks.scoring_risks | github_repo:710601088 | https://github.com/crewAIInc/crewAI | no_demo; severity=medium"
            ],
            "severity": "medium",
            "suggested_check": "把风险写入边界卡，并确认是否需要人工复核。",
            "title": "存在评分风险",
            "user_impact": "风险会影响是否适合普通用户安装。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：1.14.3",
            "category": "安全/权限坑",
            "evidence": [
              "community_evidence:github | cevd_ff4d292bd8984a039527502ef51aed98 | https://github.com/crewAIInc/crewAI/releases/tag/1.14.3 | 来源讨论提到 python 相关条件，需在安装/试用前复核。"
            ],
            "severity": "medium",
            "suggested_check": "来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。",
            "title": "来源证据：1.14.3",
            "user_impact": "可能影响授权、密钥配置或安全边界。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：1.14.5a2",
            "category": "安全/权限坑",
            "evidence": [
              "community_evidence:github | cevd_0e5616e4bf1f47f59e10e83c1849c86a | https://github.com/crewAIInc/crewAI/releases/tag/1.14.5a2 | 来源类型 github_release 暴露的待验证使用条件。"
            ],
            "severity": "medium",
            "suggested_check": "来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。",
            "title": "来源证据：1.14.5a2",
            "user_impact": "可能影响授权、密钥配置或安全边界。"
          }
        ],
        "source": "ProjectPitfallLog + ProjectHitPacket + validation + community signals",
        "summary": "发现 23 个潜在踩坑项，其中 4 个为 high/blocking；最高优先级：安装坑 - 来源证据：[FEATURE] Implement Process.consensual with a pluggable ConsensusEngine。",
        "title": "踩坑日志"
      },
      "snapshot": {
        "contributors": 298,
        "forks": 7057,
        "license": "unknown",
        "note": "站点快照，非实时质量证明；用于开工前背景判断。",
        "stars": 51055
      },
      "source_url": "https://github.com/crewAIInc/crewAI",
      "steps": [
        {
          "body": "不安装项目，先体验能力节奏。",
          "code": "preview",
          "title": "先试 Prompt"
        },
        {
          "body": "理解输入、输出、失败模式和边界。",
          "code": "manual",
          "title": "读说明书"
        },
        {
          "body": "把上下文交给宿主 AI 继续工作。",
          "code": "context",
          "title": "带给 AI"
        },
        {
          "body": "进入主力环境前先完成安装入口与风险边界验证。",
          "code": "verify",
          "title": "沙箱验证"
        }
      ],
      "subtitle": "Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.",
      "title": "crewAI 能力包",
      "trial_prompt": "# crewAI - Prompt Preview\n\n> Copy the prompt below into your AI host before installing anything.\n> Its purpose is to let you safely feel the project's workflow, not to claim the project has already run.\n\n## Copy this prompt\n\n```text\nYou are using an independent Doramagic capability pack for crewAIInc/crewAI.\n\nProject:\n- Name: crewAI\n- Repository: https://github.com/crewAIInc/crewAI\n- Summary: Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.\n- Host target: local_cli\n\nGoal:\nHelp me evaluate this project for the following task without installing it yet: Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.\n\nBefore taking action:\n1. Restate my task, success standard, and boundary.\n2. Identify whether the next step requires tools, browser access, network access, filesystem access, credentials, package installation, or host configuration.\n3. Use only the Doramagic Project Pack, the upstream repository, and the source-linked evidence listed below.\n4. If a real command, install step, API call, file write, or host integration is required, mark it as \"requires post-install verification\" and ask for approval first.\n5. If evidence is missing, say \"evidence is missing\" instead of filling the gap.\n\nPreviewable capabilities:\n- Capability 1: Use the source-backed project context to guide one small, checkable workflow step.\n\nCapabilities that require post-install verification:\n- Capability 1: Use the source-backed project context to guide one small, checkable workflow step.\n\nCore service flow:\n1. quickstart: Quick Start Guide. Produce one small intermediate artifact and wait for confirmation.\n2. agents: Agents Architecture. Produce one small intermediate artifact and wait for confirmation.\n3. tasks: Tasks and Task Management. Produce one small intermediate artifact and wait for confirmation.\n4. crews: Crews and Crew Orchestration. Produce one small intermediate artifact and wait for confirmation.\n5. flows: Flows - Event-Driven Workflows. Produce one small intermediate artifact and wait for confirmation.\n\nSource-backed evidence to keep in mind:\n- https://github.com/crewAIInc/crewAI\n- https://github.com/crewAIInc/crewAI#readme\n- lib/crewai/tests/skills/fixtures/invalid-name/SKILL.md\n- lib/crewai/tests/skills/fixtures/minimal-skill/SKILL.md\n- lib/crewai/tests/skills/fixtures/valid-skill/SKILL.md\n- lib/cli/src/crewai_cli/templates/crew/crew.py\n- lib/cli/src/crewai_cli/templates/crew/main.py\n- lib/cli/src/crewai_cli/templates/crew/config/agents.yaml\n- lib/cli/src/crewai_cli/templates/crew/config/tasks.yaml\n- lib/crewai/src/crewai/agents/agent_builder/base_agent.py\n\nFirst response rules:\n1. Start Step 1 only.\n2. Explain the one service action you will perform first.\n3. Ask exactly three questions about my target workflow, success standard, and sandbox boundary.\n4. Stop and wait for my answers.\n\nStep 1 follow-up protocol:\n- After I answer the first three questions, stay in Step 1.\n- Produce six parts only: clarified task, success standard, boundary conditions, two or three options, tradeoffs for each option, and one recommendation.\n- End by asking whether I confirm the recommendation.\n- Do not move to Step 2 until I explicitly confirm.\n\nConversation rules:\n- Advance one step at a time and wait for confirmation after each small artifact.\n- Write outputs as recommendations or planned checks, not as completed execution.\n- Do not claim tests passed, files changed, commands ran, APIs were called, or the project was installed.\n- If the user asks for execution, first provide the sandbox setup, expected output, rollback, and approval checkpoint.\n```\n",
      "voices": [
        {
          "body": "来源平台：github。github/github_issue: Question: integration path for Agent Threat Rules detection in crewai/se（https://github.com/crewAIInc/crewAI/issues/5763）；github/github_issue: [FEATURE] Implement Process.consensual with a pluggable ConsensusEngine（https://github.com/crewAIInc/crewAI/issues/5708）；github/github_issue: [FEATURE] GuardrailProvider interface for pre-tool-call authorization（https://github.com/crewAIInc/crewAI/issues/4877）；github/github_issue: Security: OWASP Agent Memory Guard – protect CrewAI agents from memory p（https://github.com/crewAIInc/crewAI/issues/5762）；github/github_issue: Scans the client database to extract existing policy details.（https://github.com/crewAIInc/crewAI/issues/5760）；github/github_issue: Security: Request to enable Private Vulnerability Reporting / coordinate（https://github.com/crewAIInc/crewAI/issues/5728）；github/github_issue: Question: integration path for Agent Threat Rules detection in crewai/se（https://github.com/crewAIInc/crewAI/issues/5763）；github/github_issue: Security: OWASP Agent Memory Guard – protect CrewAI agents from memory p（https://github.com/crewAIInc/crewAI/issues/5762）；github/github_issue: Scans the client database to extract existing policy details.（https://github.com/crewAIInc/crewAI/issues/5760）；github/github_issue: [FEATURE] Enhance the document about @persisit（https://github.com/crewAIInc/crewAI/issues/5372）；github/github_issue: [BUG] Wrong code in document（https://github.com/crewAIInc/crewAI/issues/5378）；github/github_issue: [FEATURE] Tool to add input_files（https://github.com/crewAIInc/crewAI/issues/5758）。这些是项目级外部声音，不作为单独质量证明。",
          "items": [
            {
              "kind": "github_issue",
              "source": "github",
              "title": "Question: integration path for Agent Threat Rules detection in crewai/se",
              "url": "https://github.com/crewAIInc/crewAI/issues/5763"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "[FEATURE] Implement Process.consensual with a pluggable ConsensusEngine",
              "url": "https://github.com/crewAIInc/crewAI/issues/5708"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "[FEATURE] GuardrailProvider interface for pre-tool-call authorization",
              "url": "https://github.com/crewAIInc/crewAI/issues/4877"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "Security: OWASP Agent Memory Guard – protect CrewAI agents from memory p",
              "url": "https://github.com/crewAIInc/crewAI/issues/5762"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "Scans the client database to extract existing policy details.",
              "url": "https://github.com/crewAIInc/crewAI/issues/5760"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "Security: Request to enable Private Vulnerability Reporting / coordinate",
              "url": "https://github.com/crewAIInc/crewAI/issues/5728"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "Question: integration path for Agent Threat Rules detection in crewai/se",
              "url": "https://github.com/crewAIInc/crewAI/issues/5763"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "Security: OWASP Agent Memory Guard – protect CrewAI agents from memory p",
              "url": "https://github.com/crewAIInc/crewAI/issues/5762"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "Scans the client database to extract existing policy details.",
              "url": "https://github.com/crewAIInc/crewAI/issues/5760"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "[FEATURE] Enhance the document about @persisit",
              "url": "https://github.com/crewAIInc/crewAI/issues/5372"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "[BUG] Wrong code in document",
              "url": "https://github.com/crewAIInc/crewAI/issues/5378"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "[FEATURE] Tool to add input_files",
              "url": "https://github.com/crewAIInc/crewAI/issues/5758"
            }
          ],
          "status": "已收录 12 条来源",
          "title": "社区讨论"
        }
      ]
    },
    "homepage_card": {
      "category": "流程自动化",
      "desc": "Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.",
      "effort": "安装已验证",
      "forks": 7057,
      "icon": "bolt",
      "name": "crewAI 能力包",
      "risk": "可发布",
      "slug": "crewai",
      "stars": 51055,
      "tags": [
        "浏览器 Agent",
        "网页任务自动化",
        "自然语言网页操作",
        "断点恢复流程",
        "结构化数据提取"
      ],
      "thumb": "gray",
      "type": "Skill Pack"
    },
    "manual": {
      "markdown": "# https://github.com/crewAIInc/crewAI 项目说明书\n\n生成时间：2026-05-16 06:15:18 UTC\n\n## 目录\n\n- [Installation and Setup](#installation)\n- [Quick Start Guide](#quickstart)\n- [Agents Architecture](#agents)\n- [Tasks and Task Management](#tasks)\n- [Crews and Crew Orchestration](#crews)\n- [Flows - Event-Driven Workflows](#flows)\n- [LLM Providers and Configuration](#llm-providers)\n- [Agent-to-Agent (A2A) Communication](#agent-to-agent)\n- [Knowledge Management](#knowledge)\n- [Memory and Storage System](#memory)\n\n<a id='installation'></a>\n\n## Installation and Setup\n\n### 相关页面\n\n相关主题：[Quick Start Guide](#quickstart), [LLM Providers and Configuration](#llm-providers)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [pyproject.toml](https://github.com/crewAIInc/crewAI/blob/main/pyproject.toml)\n- [lib/crewai/pyproject.toml](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/pyproject.toml)\n- [lib/crewai-tools/pyproject.toml](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai-tools/pyproject.toml)\n- [lib/cli/src/crewai_cli/templates/tool/README.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/tool/README.md)\n- [lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n</details>\n\n# Installation and Setup\n\n## Overview\n\nThis guide covers the installation and setup procedures for CrewAI, a multi-agent automation framework. The installation process supports multiple methods including pip, UV package manager, and direct source installation. CrewAI requires Python 3.10 to 3.13 and uses modern dependency management practices to ensure consistent environments across development and production.\n\n## System Requirements\n\n### Python Version Compatibility\n\n| Requirement | Specification |\n|-------------|----------------|\n| Minimum Python | 3.10 |\n| Maximum Python | < 3.14 |\n| Package Manager | UV (recommended) or pip |\n\nThe project enforces version constraints through pyproject.toml configuration files. The version range ensures compatibility with modern Python features while avoiding breaking changes from upcoming releases.\n\n## Installation Methods\n\n### Standard Installation via pip\n\nThe primary method for installing CrewAI uses pip, Python's standard package manager:\n\n```bash\npip install crewai\n```\n\nThis installation includes the core CrewAI framework with essential dependencies. For users requiring additional tooling capabilities, the extended installation includes built-in tools:\n\n```bash\npip install 'crewai[tools]'\n```\n\n资料来源：[lib/crewai/pyproject.toml](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/pyproject.toml)\n\n### UV Package Manager Installation\n\nUV is the recommended package manager for CrewAI projects due to its superior performance and dependency resolution capabilities.\n\n```bash\npip install uv\n```\n\nAfter installing UV, create a new project with:\n\n```bash\ncrewai create crew <project_name> --skip_provider\ncrewai create flow <project_name> --skip_provider\n```\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n\n## Project Structure\n\nAfter creating a new CrewAI project, the following directory structure is generated:\n\n```\nsrc/<project_name>/\n├── __init__.py\n├── crew.py\n├── main.py\n├── tools/\n│   ├── custom_tool.py\n│   └── __init__.py\n└── config/\n    ├── agents.yaml\n    └── tasks.yaml\n```\n\n### Core Files Description\n\n| File | Purpose |\n|------|---------|\n| `main.py` | Entry point for project execution |\n| `crew.py` | Crew definition and agent orchestration logic |\n| `agents.yaml` | Agent role, goal, and backstory configurations |\n| `tasks.yaml` | Task descriptions and dependencies |\n| `tools/` | Custom tool implementations |\n| `.env` | Environment variables and API keys |\n\n资料来源：[README.md](https://github.com/crewAIInc/crewAI/blob/main/README.md)\n\n## Dependencies Management\n\n### Using UV for Dependency Operations\n\nUV provides fast and reliable dependency management. The following commands handle common dependency tasks:\n\n```bash\nuv add <package>          # Add a new dependency\nuv sync                  # Synchronize dependencies with lock file\nuv lock                  # Update the lock file\n```\n\n### Core Dependencies\n\nThe main `crewai` package includes these core dependencies:\n\n- `pydantic` - Data validation and settings management\n- `crewai` core modules - Agent orchestration and task management\n\n### Tools Dependencies\n\nAdditional packages are required for specific tool integrations:\n\n| Tool | Required Package |\n|------|------------------|\n| Tavily Search | `tavily-python` |\n| File Compression | Built-in |\n| PDF Processing | Built-in |\n| ArXiv Integration | Built-in |\n\n资料来源：[lib/crewai-tools/pyproject.toml](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai-tools/pyproject.toml)\n\n## Environment Configuration\n\n### Environment Variables Setup\n\nCreate a `.env` file in your project root to store sensitive configuration:\n\n```bash\nOPENAI_API_KEY=your_openai_api_key\nTAVILY_API_KEY=your_tavily_api_key\nSERPLY_API_KEY=your_serply_api_key\nLINKUP_API_KEY=your_linkup_api_key\n```\n\n### Configuration in agents.yaml\n\nDefine agent behavior through YAML configuration:\n\n```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}.\n```\n\n资料来源：[README.md](https://github.com/crewAIInc/crewAI/blob/main/README.md)\n\n## Custom Tools Installation\n\n### Publishing Tools\n\nDistribute custom tools within your organization or to the community:\n\n```bash\ncrewai tool publish <tool_name>\n```\n\n### Installing Tools\n\nInstall tools published by others or within your organization:\n\n```bash\ncrewai tool install <tool_name>\n```\n\n资料来源：[lib/cli/src/crewai_cli/templates/tool/README.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/tool/README.md)\n\n## Installation Verification\n\n### Quick Verification Steps\n\nAfter installation, verify the setup by running:\n\n```bash\ncrewai run\n```\n\nThis command auto-detects the project type from `pyproject.toml` and executes the crew or flow.\n\n### Memory Management Commands\n\nCrewAI provides CLI commands for managing agent memories:\n\n```bash\ncrewai reset-memories -a              # Reset all memories\ncrewai reset-memories -s              # Short-term only\ncrewai reset-memories -l              # Long-term only\ncrewai reset-memories -e              # Entity only\ncrewai reset-memories -kn             # Knowledge only\ncrewai reset-memories -akn            # Agent knowledge only\n```\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n\n## Development Workflow\n\n```mermaid\ngraph TD\n    A[Install CrewAI] --> B[Create Project]\n    B --> C[Configure Agents]\n    C --> D[Define Tasks]\n    D --> E[Add Tools]\n    E --> F[Set Environment Variables]\n    F --> G[Run crewai run]\n    G --> H[Test and Iterate]\n    H --> I[Deploy]\n```\n\n## Troubleshooting Common Issues\n\n### pyproject.toml Validation\n\nThe CLI validates `pyproject.toml` for proper CrewAI project structure. If validation fails:\n\n1. Verify `crewai` is listed in project dependencies\n2. Check TOML syntax correctness\n3. Ensure required configuration keys exist\n\n### Version Conflicts\n\nIf dependency conflicts occur:\n\n1. Use `uv lock` to regenerate lock file\n2. Verify Python version falls within 3.10-3.13 range\n3. Clear cache with `uv cache clean`\n\n资料来源：[lib/crewai-core/src/crewai_core/project.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai-core/src/crewai_core/project.py)\n\n## Next Steps\n\nAfter successful installation:\n\n1. **Define Agents** - Configure roles, goals, and backstories in `config/agents.yaml`\n2. **Create Tasks** - Define task descriptions and expected outputs in `config/tasks.yaml`\n3. **Add Tools** - Integrate custom or built-in tools for agent capabilities\n4. **Implement Logic** - Customize `crew.py` with specific orchestration requirements\n5. **Test** - Use `crewai test` for iterative testing\n\n## Summary\n\nThe CrewAI installation process supports multiple package managers and provides flexible project scaffolding. Key points:\n\n- Minimum requirement: Python 3.10\n- UV is the recommended package manager for modern workflows\n- Project structure separates configuration (YAML) from implementation (Python)\n- Custom tools can be published and installed through the CLI\n- Environment variables handle sensitive configuration\n\n---\n\n<a id='quickstart'></a>\n\n## Quick Start Guide\n\n### 相关页面\n\n相关主题：[Installation and Setup](#installation), [Agents Architecture](#agents), [Tasks and Task Management](#tasks)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [lib/cli/src/crewai_cli/templates/crew/crew.py](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/crew/crew.py)\n- [lib/cli/src/crewai_cli/templates/crew/main.py](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/crew/main.py)\n- [lib/cli/src/crewai_cli/templates/crew/config/agents.yaml](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/crew/config/agents.yaml)\n- [lib/cli/src/crewai_cli/templates/crew/config/tasks.yaml](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/crew/config/tasks.yaml)\n- [lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n- [lib/crewai/README.md](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/README.md)\n</details>\n\n# Quick Start Guide\n\nThis guide provides a comprehensive overview for setting up and running your first CrewAI project. CrewAI is a multi-agent automation framework that enables you to build sophisticated AI-powered workflows by composing agents, tasks, and crews.\n\n## Overview\n\nThe Quick Start Guide covers the essential steps to:\n\n- Install CrewAI and its dependencies\n- Scaffold a new crew project\n- Configure agents and tasks using YAML\n- Implement crew logic in Python\n- Execute and test your crew\n\n**Scope**: This guide focuses on the standard crew workflow using the `@CrewBase` decorator pattern with YAML-based configuration files.\n\n## Prerequisites\n\n| Requirement | Version |\n|-------------|---------|\n| Python | >=3.10, <3.14 |\n| Package Manager | UV (recommended) |\n\n资料来源：[lib/cli/src/crewai_cli/templates/tool/README.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/tool/README.md)\n\n## Project Structure\n\nA typical CrewAI project follows this directory layout:\n\n```\nmy_project/\n├── src/my_project/\n│   ├── __init__.py\n│   ├── main.py              # Entry point\n│   ├── crew.py              # Crew definition\n│   └── config/\n│       ├── agents.yaml      # Agent configurations\n│       └── tasks.yaml       # Task configurations\n├── .env                      # Environment variables\n└── pyproject.toml           # Project configuration\n```\n\n资料来源：[lib/crewai/README.md](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/README.md)\n\n## Installation\n\n### Step 1: Install CrewAI CLI\n\n```bash\npip install crewai\n```\n\n### Step 2: Install UV (if not already installed)\n\nUV is the recommended package manager for CrewAI projects.\n\n```bash\npip install uv\n```\n\n### Step 3: Create a New Crew Project\n\n```bash\ncrewai create crew my_crew --skip_provider\n```\n\n### Step 4: Install Project Dependencies\n\n```bash\ncd my_crew\ncrewai install\n```\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n\n## Project Components\n\n### Agent Configuration (agents.yaml)\n\nAgents are defined in YAML format with role, goal, and backstory:\n\n```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\n  backstory: >\n    You're a meticulous analyst with a keen eye for detail.\n```\n\n资料来源：[lib/crewai/README.md](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/README.md)\n\n### Task Configuration (tasks.yaml)\n\nTasks define what each agent should accomplish:\n\n```yaml\nresearch_task:\n  description: >\n    Research the latest developments in {topic}\n  expected_output: >\n    A list of key findings with sources and implications.\n  agent: researcher\n\nreporting_task:\n  description: >\n    Create a comprehensive report on {topic}\n  expected_output: >\n    A fully fledged report with the main topics, each with a full section\n    of information. Formatted as markdown.\n  agent: reporting_analyst\n  output_file: report.md\n```\n\n资料来源：[lib/crewai/README.md](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/README.md)\n\n## Crew Implementation\n\n### Crew Class (crew.py)\n\nThe crew class uses the `@CrewBase` decorator to bind agents and tasks:\n\n```python\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 MyProjectCrew():\n    \"\"\"My project crew\"\"\"\n    \n    agents: List[BaseAgent]\n    tasks: List[Task]\n\n    @agent\n    def researcher(self) -> Agent:\n        return Agent(\n            config=self.agents_config['researcher'],\n            verbose=True,\n            tools=[SerperDevTool()]\n        )\n\n    @agent\n    def reporting_analyst(self) -> Agent:\n        return Agent(\n            config=self.agents_config['reporting_analyst'],\n            verbose=True\n        )\n\n    @task\n    def research_task(self) -> Task:\n        return Task(config=self.tasks_config['research_task'])\n\n    @task\n    def reporting_task(self) -> Task:\n        return Task(\n            config=self.tasks_config['reporting_task'],\n            output_file='report.md'\n        )\n\n    @crew\n    def crew(self) -> Crew:\n        return Crew(\n            agents=self.agents,\n            tasks=self.tasks,\n            process=Process.sequential,\n            verbose=True,\n        )\n```\n\n资料来源：[lib/cli/src/crewai_cli/templates/crew/crew.py](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/crew/crew.py)\n\n### Entry Point (main.py)\n\nThe main entry point kicks off the crew:\n\n```python\nfrom crewai import Crew\nfrom my_project.crew import MyProjectCrew\n\ndef run():\n    inputs = {\n        \"topic\": \"AI LLMs\"\n    }\n    \n    crew = MyProjectCrew()\n    result = crew.crew().kickoff(inputs=inputs)\n    print(result)\n\nif __name__ == \"__main__\":\n    run()\n```\n\n资料来源：[lib/cli/src/crewai_cli/templates/crew/main.py](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/crew/main.py)\n\n## Workflow Diagram\n\n```mermaid\ngraph TD\n    A[Start: crewai create crew] --> B[Install Dependencies]\n    B --> C[Configure agents.yaml]\n    C --> D[Configure tasks.yaml]\n    D --> E[Implement crew.py]\n    E --> F[Implement main.py]\n    F --> G[crewai run]\n    G --> H{Crew Execution}\n    H --> I[Agents Complete Tasks]\n    I --> J[Output Generated]\n    J --> K[End]\n    \n    style A fill:#4CAF50,color:#fff\n    style G fill:#2196F3,color:#fff\n    style K fill:#FF5722,color:#fff\n```\n\n## Development Best Practices\n\n| Practice | Description |\n|----------|-------------|\n| YAML-first configuration | Define agents and tasks in YAML, keep crew classes minimal |\n| Use structured output | Use `output_pydantic` for data flowing between tasks |\n| Enable memory | For crews benefiting from cross-session learning |\n| Sequential vs Hierarchical | Sequential for linear workflows; hierarchical for dynamic delegation |\n| Test frequently | Use `crewai test` to evaluate performance |\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n\n## Common CLI Commands\n\n| Command | Description |\n|---------|-------------|\n| `crewai create crew <name>` | Create a new crew project |\n| `crewai run` | Execute the crew |\n| `crewai test` | Test crew (2 iterations, gpt-4o-mini default) |\n| `crewai test -n 5 -m gpt-4o` | Custom test iterations and model |\n| `crewai train -n 5 -f training.json` | Train the crew |\n| `crewai reset-memories -a` | Reset all memories |\n| `crewai log-tasks-outputs` | Show latest task outputs |\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n\n## Running Your Crew\n\nExecute your crew using the CLI:\n\n```bash\ncrewai run\n```\n\nOr run the main.py file directly:\n\n```bash\npython src/my_project/main.py\n```\n\n## Customization\n\n### Adding Tools to Agents\n\n```python\n@agent\ndef researcher(self) -> Agent:\n    return Agent(\n        config=self.agents_config['researcher'],\n        verbose=True,\n        tools=[SerperDevTool()]  # Add tools here\n    )\n```\n\n### Setting Custom LLM Providers\n\nUse the `crewai.LLM` class or string shorthand:\n\n```python\nllm=\"openai/gpt-4o\"\nllm=\"anthropic/claude-3-sonnet\"\n```\n\n### Memory and Knowledge\n\nEnable memory in your crew for cross-session learning:\n\n```python\n@crew\ndef crew(self) -> Crew:\n    return Crew(\n        agents=self.agents,\n        tasks=self.tasks,\n        memory=True,  # Enable memory\n        verbose=True,\n    )\n```\n\n## Common Pitfalls\n\n| Pitfall | Solution |\n|---------|----------|\n| Using `ChatOpenAI()` directly | Use `crewai.LLM` or string shorthand |\n| Forgetting type hints | Add `# type: ignore[index]` for YAML config access |\n| Token limit issues | Set `respect_context_window=True` |\n| API throttling | Configure `max_rpm` rate limiting |\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n\n## Next Steps\n\nAfter completing this Quick Start Guide:\n\n1. Explore [advanced agent configurations](https://docs.crewai.com) for memory, guardrails, and custom LLMs\n2. Learn about [Flows](https://docs.crewai.com) for multi-crew orchestration\n3. Review [tool integrations](https://github.com/crewAIInc/crewAI/tree/main/lib/crewai-tools) for additional capabilities\n4. Join the [Discord community](https://discord.com/invite/X4JWnZnxPb) for support\n\n---\n\n<a id='agents'></a>\n\n## Agents Architecture\n\n### 相关页面\n\n相关主题：[Tasks and Task Management](#tasks), [Crews and Crew Orchestration](#crews), [LLM Providers and Configuration](#llm-providers)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [lib/crewai/src/crewai/agents/agent_builder/base_agent.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/agents/agent_builder/base_agent.py)\n- [lib/crewai/src/crewai/agent/core.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/agent/core.py)\n- [lib/crewai/src/crewai/agents/crew_agent_executor.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/agents/crew_agent_executor.py)\n- [lib/crewai/src/crewai/agents/parser.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/agents/parser.py)\n- [lib/crewai/src/crewai/tasks/hallucination_guardrail.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/tasks/hallucination_guardrail.py)\n</details>\n\n# Agents Architecture\n\n## Overview\n\nThe CrewAI Agents Architecture provides a flexible, modular framework for creating and orchestrating autonomous AI agents. The architecture is designed around the concept of **agents** as independent entities that can collaborate within **crews** to accomplish complex tasks through both autonomous decision-making and structured workflows.\n\nAgents in CrewAI are composed of several key components:\n\n| Component | Purpose |\n|-----------|---------|\n| **BaseAgent** | Abstract base class defining the agent interface |\n| **Agent (Core)** | Concrete agent implementation with LLM integration |\n| **CrewAgentExecutor** | Handles agent execution within crew context |\n| **Parser** | Processes LLM outputs and extracts actions |\n| **Guardrails** | Validates agent outputs for safety and accuracy |\n\n资料来源：[lib/crewai/src/crewai/agents/agent_builder/base_agent.py:1-50]()\n\n## Architecture Diagram\n\n```mermaid\ngraph TD\n    A[User Defined Agent] --> B[BaseAgent]\n    B --> C[Agent Core]\n    C --> D[CrewAgentExecutor]\n    D --> E[Parser]\n    E --> F[LLM]\n    F --> G[Tool Calls]\n    G --> H[Guardrails]\n    H --> D\n    \n    I[Memory] -.-> C\n    J[Knowledge] -.-> C\n    K[Tools] --> G\n```\n\n## Agent Definition\n\nAgents are defined through YAML configuration files and Python decorators. Each agent requires a minimum of three attributes:\n\n```yaml\n# config/agents.yaml\nresearcher:\n  role: \"Senior Data Researcher\"\n  goal: \"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```\n\n### Core Agent Attributes\n\n| Attribute | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `role` | string | Yes | Defines the agent's function within the crew |\n| `goal` | string | Yes | The specific objective the agent aims to achieve |\n| `backstory` | string | Yes | Context that shapes the agent's behavior and decision-making |\n| `tools` | List[BaseTool] | No | Tools available to the agent for task execution |\n| `verbose` | boolean | No | Enable detailed logging (default: False) |\n| `llm` | LLM | No | Custom language model configuration |\n| `memory` | boolean | No | Enable short/long-term memory (default: True) |\n| `max_iter` | int | No | Maximum iterations before forcing response |\n| `max_rpm` | int | No | Rate limiting for API calls |\n\n资料来源：[lib/crewai/src/crewai/agent/core.py:1-100]()\n\n## BaseAgent Class\n\nThe `BaseAgent` serves as the foundational abstract class for all agent implementations:\n\n```python\nfrom crewai.agents.agent_builder.base_agent import BaseAgent\nfrom typing import List\n\nclass BaseAgent:\n    agents: List[BaseAgent]  # Type annotation for crew agents\n    \n    @property\n    def role(self) -> str:\n        \"\"\"Returns the role of the agent\"\"\"\n        \n    @property\n    def goal(self) -> str:\n        \"\"\"Returns the goal of the agent\"\"\"\n        \n    @property\n    def backstory(self) -> str:\n        \"\"\"Returns the backstory of the agent\"\"\"\n```\n\n### Key Methods\n\n| Method | Return Type | Description |\n|--------|-------------|-------------|\n| `execute_task(task, context, tools)` | TaskOutput | Execute a specific task |\n| `set_memory_memory(memory)` | None | Configure agent memory |\n| `set_verbose(verbose)` | None | Toggle verbose logging |\n| `create_agent_executor()` | CrewAgentExecutor | Initialize execution context |\n\n资料来源：[lib/crewai/src/crewai/agents/agent_builder/base_agent.py:50-150]()\n\n## Agent Core Implementation\n\nThe core agent implementation provides the main interface for agent behavior:\n\n```python\nfrom crewai import Agent\nfrom crewai_tools import SerperDevTool\n\n@CrewBase\nclass LatestAiDevelopmentCrew():\n    agents: List[BaseAgent]\n    \n    @agent\n    def researcher(self) -> Agent:\n        return Agent(\n            config=self.agents_config['researcher'],\n            verbose=True,\n            tools=[SerperDevTool()]\n        )\n```\n\n### LLM Configuration\n\nAgents can be configured with custom LLM providers:\n\n```python\nconfig=dict(\n    llm=dict(\n        provider=\"ollama\",\n        config=dict(\n            model=\"llama2\",\n            temperature=0.5,\n        ),\n    ),\n)\n```\n\nSupported providers include: `openai`, `anthropic`, `google`, `ollama`, `azure`, `bedrock`\n\n资料来源：[lib/crewai/src/crewai/agent/core.py:100-200]()\n\n## CrewAgentExecutor\n\nThe `CrewAgentExecutor` manages agent execution within a crew context, handling:\n\n- Task delegation and execution flow\n- Tool invocation and result processing\n- Guardrail validation\n- Response formatting\n\n```mermaid\ngraph LR\n    A[Task Assigned] --> B[Execute with Tools]\n    B --> C{Guardrails Check}\n    C -->|Pass| D[Return Result]\n    C -->|Fail| E[Retry or Fallback]\n```\n\n### Execution Parameters\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `task` | Task | Required | The task to execute |\n| `context` | str | None | Shared context from previous tasks |\n| `tools` | List[BaseTool] | [] | Tools available for this execution |\n\n资料来源：[lib/crewai/src/crewai/agents/crew_agent_executor.py:1-100]()\n\n## Parser\n\nThe Parser component processes LLM outputs and extracts structured actions:\n\n```python\nfrom crewai.agents.parser import CrewAgentParser\n\nparser = CrewAgentParser()\nresult = parser.parse(llm_output)\n```\n\n### Parser Responsibilities\n\n| Responsibility | Description |\n|----------------|-------------|\n| **Action Extraction** | Identify tool calls from LLM responses |\n| **Format Normalization** | Convert LLM output to standardized format |\n| **Error Handling** | Manage malformed outputs gracefully |\n| **Validation** | Ensure parsed actions match expected schemas |\n\n资料来源：[lib/crewai/src/crewai/agents/parser.py:1-80]()\n\n## Guardrails\n\nGuardrails provide validation layers for agent outputs. The framework includes built-in guardrails:\n\n### HallucinationGuardrail\n\nValidates that agent outputs are faithful to provided context:\n\n```python\nfrom crewai.tasks.hallucination_guardrail import HallucinationGuardrail\n\nguardrail = HallucinationGuardrail(\n    llm=agent.llm,\n    context=\"Reference document content\",\n    threshold=7.0,\n    tool_response=\"API response data\"\n)\n```\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `llm` | LLM | Required | Language model for evaluation |\n| `context` | str | None | Reference context for validation |\n| `threshold` | float | None | Minimum faithfulness score |\n| `tool_response` | str | \"\" | Tool response for additional context |\n\n资料来源：[lib/crewai/src/crewai/tasks/hallucination_guardrail.py:1-80]()\n\n## Agent Creation with Decorators\n\nCrewAI uses Python decorators for declarative agent definition:\n\n```python\nfrom crewai import Agent, Crew, Task\nfrom crewai.project import CrewBase, agent, crew, task\nfrom typing import List\n\n@CrewBase\nclass MyCrew():\n    \"\"\"My Crew Description\"\"\"\n    agents: List[BaseAgent]\n    tasks: List[Task]\n\n    @agent\n    def researcher(self) -> Agent:\n        return Agent(\n            config=self.agents_config['researcher'],\n            verbose=True,\n            tools=[SerperDevTool()]\n        )\n\n    @agent\n    def reporting_analyst(self) -> Agent:\n        return Agent(\n            config=self.agents_config['reporting_analyst'],\n            verbose=True\n        )\n\n    @task\n    def research_task(self) -> Task:\n        return Task(config=self.tasks_config['research_task'])\n\n    @task\n    def reporting_task(self) -> Task:\n        return Task(\n            config=self.tasks_config['reporting_task'],\n            output_file='report.md'\n        )\n\n    @crew\n    def crew(self) -> Crew:\n        return Crew(\n            agents=self.agents,\n            tasks=self.tasks,\n            process=Process.sequential,\n            verbose=True\n        )\n```\n\n## Tool Integration\n\nAgents access external capabilities through tools:\n\n### Built-in Tools\n\n| Tool | Purpose |\n|------|---------|\n| `SerperDevTool` | Web search functionality |\n| `CodeDocsSearchTool` | Search code documentation |\n| `DirectorySearchTool` | Search within directories |\n| `FileWriterTool` | Write content to files |\n| `TavilyExtractorTool` | Extract content from URLs |\n| `ApifyActorsTool` | Execute Apify actors |\n| `LinkupSearchTool` | Search via Linkup API |\n\n### Tool Configuration\n\n```python\nfrom crewai_tools import SerperDevTool, FileWriterTool\n\nresearcher = Agent(\n    role=\"Research Analyst\",\n    goal=\"Gather and synthesize information\",\n    backstory=\"Expert researcher with access to web search\",\n    tools=[SerperDevTool(), FileWriterTool()],\n    verbose=True\n)\n```\n\n## Memory and Knowledge\n\nAgents can maintain state across interactions:\n\n### Memory Types\n\n| Type | Scope | Persistence |\n|------|-------|-------------|\n| **Short-term** | Current session | Session lifetime |\n| **Long-term** | Across sessions | Database storage |\n| **Entity** | Entity tracking | Automatic extraction |\n| **Knowledge** | Domain knowledge | Vector store |\n\n### Memory Configuration\n\n```python\ncrew = Crew(\n    agents=[researcher, analyst],\n    tasks=[task1, task2],\n    memory=True,           # Enable all memory types\n    embedder={\n        \"provider\": \"openai\",\n        \"config\": {\"model\": \"text-embedding-ada-002\"}\n    }\n)\n```\n\n## Execution Flow\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant Crew\n    participant Agent\n    participant Executor\n    participant LLM\n    participant Tool\n    \n    User->>Crew: kickoff()\n    Crew->>Agent: execute_task(task)\n    Agent->>Executor: run()\n    Executor->>LLM: generate_response()\n    LLM->>Tool: tool_call()\n    Tool-->>LLM: result\n    LLM-->>Executor: response\n    Executor->>Executor: validate_guardrails()\n    Executor-->>Agent: TaskOutput\n    Agent-->>Crew: result\n    Crew-->>User: final_output\n```\n\n## Best Practices\n\n### Agent Design\n\n1. **Clear Role Definition**: Define distinct, non-overlapping roles for each agent\n2. **Specific Goals**: Ensure each agent has a well-defined, achievable goal\n3. **Rich Backstory**: Provide context that guides agent behavior appropriately\n4. **Appropriate Tools**: Grant only necessary tools to minimize unnecessary complexity\n\n### Configuration Guidelines\n\n| Aspect | Recommendation |\n|--------|----------------|\n| **Verbose Mode** | Enable during development, disable in production |\n| **Rate Limiting** | Set `max_rpm` to avoid API throttling |\n| **Context Window** | Use `respect_context_window=True` for long conversations |\n| **Iterations** | Set `max_iter` to prevent infinite loops |\n\n## CLI Commands for Agents\n\n```bash\n# Create new agent\ncrewai create agent <name>\n\n# Test agent\ncrewai test -n 5 -m gpt-4o\n\n# Reset memories\ncrewai reset-memories -a              # All memories\ncrewai reset-memories -s              # Short-term only\ncrewai reset-memories -l              # Long-term only\n```\n\n## Summary\n\nThe CrewAI Agents Architecture provides a comprehensive framework for building multi-agent systems:\n\n- **BaseAgent** defines the interface all agents must implement\n- **Agent Core** provides the concrete implementation with LLM integration\n- **CrewAgentExecutor** manages execution within crew context\n- **Parser** handles LLM output processing\n- **Guardrails** ensure output quality and safety\n- **Decorators** enable declarative agent definition\n- **Tools** extend agent capabilities beyond LLM-only responses\n\n---\n\n<a id='tasks'></a>\n\n## Tasks and Task Management\n\n### 相关页面\n\n相关主题：[Agents Architecture](#agents), [Crews and Crew Orchestration](#crews)\n\n<details>\n<summary>Related Source Files</summary>\n\nThe following source files were used to generate this documentation:\n\n- [lib/crewai/src/crewai/task.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/task.py)\n- [lib/crewai/src/crewai/tasks/__init__.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/tasks/__init__.py)\n- [lib/crewai/src/crewai/tasks/conditional_task.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/tasks/conditional_task.py)\n- [lib/crewai/src/crewai/tasks/task_output.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/tasks/task_output.py)\n- [lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n- [lib/cli/src/crewai_cli/templates/flow/README.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/flow/README.md)\n</details>\n\n# Tasks and Task Management\n\n## Overview\n\nTasks are the fundamental unit of work in the CrewAI framework. They represent discrete units of work that agents execute within a crew. Each task encapsulates a description of what needs to be accomplished, the expected output format, and optional configurations for output validation, file handling, and dependency management.\n\nTasks serve as the bridge between agent capabilities and crew objectives, enabling complex multi-agent workflows through declarative configuration and structured output handling. The task management system provides both synchronous execution (via `Task`) and conditional execution (via `ConditionalTask`) to support various workflow patterns.\n\n资料来源：[lib/crewai/src/crewai/task.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/task.py) and [lib/crewai/src/crewai/tasks/__init__.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/tasks/__init__.py)\n\n---\n\n## Core Task Components\n\n### Task Class\n\nThe `Task` class is the primary implementation for task definitions in CrewAI. It provides a comprehensive set of attributes to configure task behavior.\n\n```python\nclass Task(BaseModel):\n    description: str                          # Human-readable task description\n    expected_output: str                      # Expected output format/content\n    agent: Optional[BaseAgent]                # Assigned agent for execution\n    crew: Optional[Crew]                      # Parent crew reference\n    output_file: Optional[str]                # Optional file path for output\n    output_pydantic: Optional[BaseModel]      # Structured output schema\n    output_json: Optional[type[BaseModel]]    # JSON output schema\n    async_execution: Optional[bool]           # Enable async execution\n    context: Optional[List[Task]]             # Tasks whose output this depends on\n    config: Optional[dict]                    # Task-specific configuration\n    tools: Optional[List[Any]]                # Tools available to the task\n```\n\n资料来源：[lib/crewai/src/crewai/task.py:1-50](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/task.py)\n\n### Task Configuration Parameters\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `description` | `str` | Yes | - | Human-readable task description |\n| `expected_output` | `str` | Yes | - | Expected format/content of output |\n| `agent` | `BaseAgent` | No | `None` | Agent assigned to execute task |\n| `crew` | `Crew` | No | `None` | Parent crew reference |\n| `output_file` | `str` | No | `None` | File path for writing output |\n| `output_pydantic` | `BaseModel` | No | `None` | Pydantic model for structured output |\n| `output_json` | `type[BaseModel]` | No | `None` | JSON schema for output validation |\n| `async_execution` | `bool` | No | `False` | Enable asynchronous execution |\n| `context` | `List[Task]` | No | `None` | Dependent tasks for context |\n| `config` | `dict` | No | `None` | Additional configuration |\n| `tools` | `List[Any]` | No | `None` | Tools available to task |\n\n资料来源：[lib/crewai/src/crewai/task.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/task.py)\n\n---\n\n## Task Output Management\n\n### TaskOutput Class\n\nThe `TaskOutput` class encapsulates the result of task execution, providing a standardized structure for storing and accessing task results.\n\n```python\nclass TaskOutput(BaseModel):\n    name: str                    # Task identifier\n    description: str             # Task description\n    raw_output: Any              # Raw output from agent execution\n    pydantic: Optional[BaseModel]  # Structured Pydantic output\n    json_dict: Optional[dict]     # JSON dict output\n    \n    def to_dict(self) -> dict    # Serialize to dictionary\n    def save_to_file(self, path: str)  # Write output to file\n```\n\n资料来源：[lib/crewai/src/crewai/tasks/task_output.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/tasks/task_output.py)\n\n### Output File Handling\n\nTasks can automatically write their output to files using the `output_file` parameter:\n\n```python\nfrom crewai import Agent, Task, Crew\n\nreporting_task = Task(\n    description=\"Create a detailed report on AI trends\",\n    expected_output=\"A comprehensive markdown report with sections\",\n    agent=reporting_analyst,\n    output_file=\"report.md\"  # Output will be saved to this file\n)\n```\n\n资料来源：[README.md](https://github.com/crewAIInc/crewAI/blob/main/README.md)\n\n### Structured Output with Pydantic\n\nTasks can enforce structured output using Pydantic models:\n\n```python\nfrom pydantic import BaseModel\nfrom crewai import Task\n\nclass ReportSchema(BaseModel):\n    title: str\n    sections: List[str]\n    conclusion: str\n\nstructured_task = Task(\n    description=\"Generate a structured research report\",\n    expected_output=\"JSON object with title, sections, and conclusion\",\n    output_pydantic=ReportSchema\n)\n```\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n\n---\n\n## Conditional Tasks\n\n### ConditionalTask Class\n\n`ConditionalTask` extends the base `Task` functionality with conditional execution logic. Tasks are only executed when their provided condition function returns `True`.\n\n```python\nclass ConditionalTask(Task):\n    condition: Callable[[], bool]  # Function that determines if task executes\n```\n\n资料来源：[lib/crewai/src/crewai/tasks/conditional_task.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/tasks/conditional_task.py)\n\n### Conditional Task Architecture\n\n```mermaid\ngraph TD\n    A[Crew Execution Starts] --> B{ConditionalTask Condition Check}\n    B -->|True| C[Execute Task]\n    B -->|False| D[Skip Task]\n    C --> E[Continue to Next Task]\n    D --> E\n    E --> F[Crew Execution Completes]\n    \n    G[ConditionalTask] -->|inherits| H[Base Task Properties]\n    G -->|adds| I[condition: Callable]\n```\n\n资料来源：[lib/crewai/src/crewai/tasks/conditional_task.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/tasks/conditional_task.py)\n\n### Conditional Task Usage Example\n\n```python\nfrom crewai import Agent, Task, Crew\nfrom crewai.tasks import ConditionalTask\n\ndef should_process_data() -> bool:\n    # Only process if certain conditions are met\n    return len(available_data) > 0\n\nconditional_task = ConditionalTask(\n    description=\"Process incoming data\",\n    expected_output=\"Processed data summary\",\n    agent=data_processor,\n    condition=should_process_data\n)\n```\n\n资料来源：[lib/crewai/src/crewai/tasks/conditional_task.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/tasks/conditional_task.py)\n\n---\n\n## Task Dependencies and Context\n\n### Context-Based Dependencies\n\nTasks can depend on the output of other tasks through the `context` parameter. This enables sequential workflows where later tasks have access to earlier task results.\n\n```mermaid\ngraph LR\n    A[Research Task] -->|context| B[Analysis Task]\n    B -->|context| C[Reporting Task]\n    \n    A -->|output| D[Research Data]\n    D -->|passed as context| B\n    B -->|output| E[Analysis Results]\n    E -->|passed as context| C\n```\n\n资料来源：[lib/crewai/src/crewai/task.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/task.py)\n\n### Defining Task Context\n\n```python\nresearch_task = Task(\n    description=\"Research latest AI developments\",\n    expected_output=\"Summary of key findings\",\n    agent=researcher\n)\n\nreporting_task = Task(\n    description=\"Create comprehensive report\",\n    expected_output=\"Detailed markdown report\",\n    agent=reporter,\n    context=[research_task]  # This task receives research_task's output\n)\n```\n\n资料来源：[README.md](https://github.com/crewAIInc/crewAI/blob/main/README.md)\n\n---\n\n## Task Configuration in YAML\n\n### agents.yaml Structure\n\nTasks are referenced in the YAML configuration files alongside agent definitions:\n\n```yaml\n# config/agents.yaml\nresearcher:\n  role: \"{topic} Senior Data Researcher\"\n  goal: \"Uncover cutting-edge developments in {topic}\"\n  backstory: \"You're a seasoned researcher...\"\n\nreporting_analyst:\n  role: \"{topic} Reporting Analyst\"\n  goal: \"Create detailed reports based on research findings\"\n  backstory: \"You're a meticulous analyst...\"\n```\n\n资料来源：[README.md](https://github.com/crewAIInc/crewAI/blob/main/README.md)\n\n### tasks.yaml Structure\n\n```yaml\n# config/tasks.yaml\nresearch_task:\n  description: >\n    Research the latest developments in {topic}. \n    Identify key trends and important information.\n  expected_output: >\n    A detailed report with key findings about {topic}.\n  agent: researcher\n\nreporting_task:\n  description: >\n    Create a comprehensive report based on research findings\n  expected_output: >\n    A fully fledged report with main topics, each with a full section.\n    Formatted as markdown without code fences\n  agent: reporting_analyst\n  output_file: report.md\n```\n\n资料来源：[README.md](https://github.com/crewAIInc/crewAI/blob/main/README.md)\n\n---\n\n## Declarative Task Definition with Decorators\n\n### Using the @task Decorator\n\nThe `@task` decorator provides a declarative way to define tasks within a CrewBase class:\n\n```python\nfrom crewai import Agent, Task, Crew, Process\nfrom crewai.project import CrewBase, agent, crew, task\nfrom typing import List\n\n@CrewBase\nclass LatestAiDevelopmentCrew():\n    agents: List[BaseAgent]\n    tasks: List[Task]\n\n    @task\n    def research_task(self) -> Task:\n        return Task(\n            config=self.tasks_config['research_task'],\n        )\n\n    @task\n    def reporting_task(self) -> Task:\n        return Task(\n            config=self.tasks_config['reporting_task'],\n            output_file='report.md'\n        )\n\n    @crew\n    def crew(self) -> Crew:\n        return Crew(\n            agents=self.agents,\n            tasks=self.tasks,\n            process=Process.sequential,\n            verbose=True,\n        )\n```\n\n资料来源：[README.md](https://github.com/crewAIInc/crewAI/blob/main/README.md)\n\n### Decorator Flow\n\n```mermaid\ngraph TD\n    A[@CrewBase class] --> B[@agent decorator]\n    A --> C[@task decorator]\n    A --> D[@crew decorator]\n    \n    B -->|Creates| E[BaseAgent instances]\n    C -->|Creates| F[Task instances from YAML]\n    D -->|Creates| G[Crew with agents & tasks]\n    \n    E --> H[Agent collection]\n    F --> I[Task collection]\n    G --> J[Configured Crew]\n```\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n\n---\n\n## Task Execution in Flows\n\n### Flow Integration\n\nTasks can be integrated into Flow-based workflows using decorators:\n\n```python\nfrom crewai.flow import Flow, listen, start\n\nclass ContentCreationFlow(Flow):\n    @start()\n    def generate_topic(self):\n        topic = \"AI Agents\"\n        return topic\n\n    @listen(generate_topic)\n    def research(self, topic):\n        return research_crew.kickoff(inputs={'topic': topic})\n```\n\n资料来源：[lib/cli/src/crewai_cli/templates/flow/README.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/flow/README.md)\n\n### Flow Task Architecture\n\n```mermaid\ngraph LR\n    A[start()] --> B[generate_topic]\n    B --> C[@listen decorator]\n    C --> D[research_crew]\n    D --> E[Task Execution]\n    \n    F[Flow State] -.->|passes to| D\n    G[crewai run] -->|invokes| H[Flow Kickoff]\n```\n\n资料来源：[lib/cli/src/crewai_cli/templates/flow/README.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/flow/README.md)\n\n---\n\n## Task Export and Import\n\n### Module Exports\n\nThe tasks module exports the following classes for public use:\n\n```python\n# lib/crewai/src/crewai/tasks/__init__.py\nfrom crewai.tasks.task_output import TaskOutput\nfrom crewai.tasks.conditional_task import ConditionalTask\nfrom crewai.task import Task\n```\n\n资料来源：[lib/crewai/src/crewai/tasks/__init__.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/tasks/__init__.py)\n\n---\n\n## Best Practices\n\n### Task Design Guidelines\n\n| Practice | Description |\n|----------|-------------|\n| **Clear descriptions** | Use specific, actionable descriptions that guide the agent |\n| **Structured output** | Use `output_pydantic` for tasks that produce structured data |\n| **Dependency management** | Use `context` to pass relevant outputs between tasks |\n| **File output** | Use `output_file` for persistent results like reports |\n| **Conditional execution** | Use `ConditionalTask` for optional workflow branches |\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n\n### Common Patterns\n\n1. **Sequential Processing**: Tasks execute one after another, each receiving context from previous tasks\n2. **Parallel Execution**: Multiple independent tasks execute simultaneously with `async_execution=True`\n3. **Conditional Branching**: `ConditionalTask` enables dynamic workflow paths based on runtime conditions\n4. **Structured Output**: Pydantic models ensure type-safe output handling between tasks and crews\n\n资料来源：[lib/crewai/src/crewai/tasks/conditional_task.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/tasks/conditional_task.py) and [lib/crewai/src/crewai/tasks/task_output.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/tasks/task_output.py)\n\n---\n\n## Summary\n\nThe Task and Task Management system in CrewAI provides:\n\n- **Task**: Core unit of work with configurable output handling\n- **TaskOutput**: Standardized result container with file persistence\n- **ConditionalTask**: Dynamic execution based on runtime conditions\n- **Context Dependencies**: Enable sequential workflows with data passing\n- **YAML Configuration**: Declarative task definition alongside agents\n- **Decorator Syntax**: Clean, Pythonic task definition within CrewBase classes\n\nTogether, these components enable complex multi-agent workflows where tasks coordinate to accomplish sophisticated objectives through structured collaboration.\n\n---\n\n<a id='crews'></a>\n\n## Crews and Crew Orchestration\n\n### 相关页面\n\n相关主题：[Agents Architecture](#agents), [Tasks and Task Management](#tasks), [Flows - Event-Driven Workflows](#flows), [LLM Providers and Configuration](#llm-providers)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [lib/crewai/src/crewai/crew.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/crew.py)\n- [lib/crewai/src/crewai/process.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/process.py)\n- [lib/crewai/src/crewai/agents/step_executor.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/agents/step_executor.py)\n- [lib/crewai/src/crewai/utilities/crew/crew_context.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/utilities/crew/crew_context.py)\n</details>\n\n# Crews and Crew Orchestration\n\n## Overview\n\nA **Crew** in CrewAI is a collaborative system of autonomous AI agents working together to accomplish complex tasks. Crew orchestration refers to the mechanism by which these agents coordinate, delegate, and execute tasks based on a defined process type.\n\nCrews are the core building blocks for multi-agent automation in CrewAI. They enable sophisticated workflows where multiple specialized agents combine their capabilities to produce results that exceed what any single agent could achieve alone.\n\nThe Crew class serves as the central orchestrator, managing agents, tasks, processes, and shared resources like memory and tools. 资料来源：[lib/crewai/src/crewai/crew.py]()\n\n## Crew Architecture\n\n### Core Components\n\nA Crew consists of four primary components that work together to enable collaborative AI task execution:\n\n| Component | Purpose |\n|-----------|---------|\n| **Agents** | Autonomous AI entities with specific roles, goals, and tool access |\n| **Tasks** | Defined work items with descriptions, expected outputs, and assignments |\n| **Process** | Orchestration strategy determining how tasks are executed |\n| **Memory** | Shared storage for context, learnings, and inter-agent communication |\n\n### Architecture Diagram\n\n```mermaid\ngraph TD\n    A[Crew] --> B[Agents]\n    A --> C[Tasks]\n    A --> D[Process]\n    A --> E[Memory]\n    \n    B --> B1[Agent 1]\n    B --> B2[Agent 2]\n    B --> BN[Agent N]\n    \n    C --> C1[Task 1]\n    C --> C2[Task 2]\n    C --> CN[Task N]\n    \n    D --> D1[Sequential]\n    D --> D2[Hierarchical]\n    \n    E --> E1[Short-term]\n    E --> E2[Long-term]\n    E --> E3[Entity]\n    E --> E4[Knowledge]\n```\n\n## Process Types\n\nCrewAI supports two primary process types for orchestrating agent collaboration:\n\n### Sequential Process\n\nIn the sequential process, tasks are executed one after another in a predefined order. Each task must complete before the next begins. This is ideal for linear workflows where output from one task feeds into the next.\n\n```python\nfrom crewai import Crew, Process\n\ncrew = Crew(\n    agents=self.agents,\n    tasks=self.tasks,\n    process=Process.sequential,\n    verbose=True,\n)\n```\n\n**Use Cases:**\n- Research pipelines where findings accumulate\n- Report generation requiring sequential information gathering\n- Data processing chains where each step depends on the previous\n\n资料来源：[lib/cli/src/crewai_cli/templates/crew/README.md]()\n\n### Hierarchical Process\n\nThe hierarchical process introduces an automated manager agent that coordinates the crew. The manager delegates tasks, validates results, and ensures proper workflow execution without manual intervention.\n\n```python\nfrom crewai import Crew, Process\n\ncrew = Crew(\n    agents=self.agents,\n    tasks=self.tasks,\n    process=Process.hierarchical,\n    verbose=True,\n)\n```\n\n**Use Cases:**\n- Complex projects requiring dynamic task delegation\n- Scenarios where a manager role naturally exists\n- Workflows needing result validation between steps\n\n资料来源：[lib/crewai/README.md]()\n\n### Process Selection Guide\n\n| Criteria | Sequential | Hierarchical |\n|----------|------------|--------------|\n| Task Dependencies | Fixed order | Dynamic delegation |\n| Manager Required | No | Yes (auto-created) |\n| Flexibility | Low | High |\n| Best For | Linear pipelines | Complex orchestration |\n| Overhead | Minimal | Higher due to management |\n\n## Crew Configuration\n\n### Using the @CrewBase Decorator\n\nCrews are defined using Python decorators combined with YAML configuration files. This approach separates concerns between code logic and agent/task definitions.\n\n```python\nfrom crewai import Agent, Crew, Process, Task\nfrom crewai.project import CrewBase, agent, crew, task\nfrom typing import List\n\n@CrewBase\nclass LatestAiDevelopmentCrew():\n    \"\"\"LatestAiDevelopment crew\"\"\"\n    agents: List[BaseAgent]\n    tasks: List[Task]\n\n    @agent\n    def researcher(self) -> Agent:\n        return Agent(\n            config=self.agents_config['researcher'],\n            verbose=True,\n            tools=[SerperDevTool()]\n        )\n\n    @task\n    def research_task(self) -> Task:\n        return Task(\n            config=self.tasks_config['research_task'],\n        )\n\n    @crew\n    def crew(self) -> Crew:\n        return Crew(\n            agents=self.agents,\n            tasks=self.tasks,\n            process=Process.sequential,\n            verbose=True,\n        )\n```\n\n资料来源：[lib/crewai/README.md]()\n\n### YAML Configuration Structure\n\n#### agents.yaml\n\n```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}.\n\nreporting_analyst:\n  role: >\n    {topic} Reporting Analyst\n  goal: >\n    Create detailed reports based on {topic} data analysis\n```\n\n#### tasks.yaml\n\n```yaml\nresearch_task:\n  description: >\n    Research the latest developments in {topic}\n  expected_output: >\n    A comprehensive report on {topic} developments\n  agent: researcher\n\nreporting_task:\n  description: >\n    Create a detailed report based on research findings\n  expected_output: >\n    A fully fleshed report with main topics\n  agent: reporting_analyst\n```\n\n资料来源：[lib/cli/src/crewai_cli/templates/crew/README.md]()\n\n## Agent Management\n\n### Agent Roles and Responsibilities\n\nAgents within a crew are defined by four key attributes:\n\n| Attribute | Description |\n|-----------|-------------|\n| **role** | Defines the agent's function within the crew |\n| **goal** | The specific objective the agent works toward |\n| **backstory** | Context that shapes the agent's behavior and perspective |\n| **tools** | Capabilities the agent can use to accomplish tasks |\n\n### Agent Creation Pattern\n\n```python\n@agent\ndef researcher(self) -> Agent:\n    return Agent(\n        config=self.agents_config['researcher'],\n        verbose=True,\n        tools=[SerperDevTool()]\n    )\n```\n\nAgents receive their configuration from YAML and can be augmented with additional tools or settings at the point of creation.\n\n资料来源：[lib/crewai/src/crewai/crew.py]()\n\n## Task Management\n\n### Task Definition\n\nTasks represent units of work that agents execute. Each task has:\n\n| Property | Purpose |\n|----------|---------|\n| **description** | What needs to be accomplished |\n| **expected_output** | The format and content of deliverables |\n| **agent** | Which agent executes the task |\n| **output_file** | Optional file for storing results |\n| **dependencies** | Tasks that must complete first |\n\n### Task with Output Handling\n\n```python\n@task\ndef reporting_task(self) -> Task:\n    return Task(\n        config=self.tasks_config['reporting_task'],\n        output_file='report.md'\n    )\n```\n\n### Task Execution Flow\n\n```mermaid\ngraph LR\n    A[Task Created] --> B{Process Type}\n    B -->|Sequential| C[Execute in Order]\n    B -->|Hierarchical| D[Manager Delegates]\n    \n    C --> E[Agent 1 Executes]\n    E --> F[Agent 2 Executes]\n    F --> G[Complete]\n    \n    D --> H[Manager Assigns Task]\n    H --> I[Agent Executes]\n    I --> J[Manager Validates]\n    J --> K[Complete]\n```\n\n## Memory and Context\n\n### Memory Types\n\nCrews can maintain different types of memory to preserve context across executions:\n\n| Memory Type | Scope | Purpose |\n|-------------|-------|---------|\n| **Short-term** | Current session | Temporary working memory |\n| **Long-term** | Across sessions | Persistent learnings |\n| **Entity** | Entity tracking | Knowledge graph of entities |\n| **Knowledge** | Structured data | Domain-specific grounding |\n\n### Memory Management Commands\n\n```bash\ncrewai reset-memories -a              # Reset all memories\ncrewai reset-memories -s              # Short-term only\ncrewai reset-memories -l              # Long-term only\ncrewai reset-memories -e              # Entity only\ncrewai reset-memories -kn             # Knowledge only\ncrewai reset-memories -akn            # Agent knowledge only\n```\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md]()\n\n### Crew Context Utilities\n\nThe `CrewContext` class provides utilities for managing scope-based context within crews. Scopes allow hierarchical organization of memory and context:\n\n```python\ndef join_scope_paths(root: str | None, inner: str | None) -> str:\n    \"\"\"\n    Combines two scope path components.\n    \n    Examples:\n        join_scope_paths(\"/crew/test\", \"/market-trends\") -> '/crew/test/market-trends'\n        join_scope_paths(\"/crew/test\", None) -> '/crew/test'\n    \"\"\"\n```\n\n资料来源：[lib/crewai/src/crewai/utilities/crew/crew_context.py]()\n\n## Execution Flow\n\n### Crew Kickoff\n\nThe main entry point for executing a crew is the `kickoff` method:\n\n```python\nfrom latest_ai_development.crew import LatestAiDevelopmentCrew\n\ndef run():\n    inputs = {'topic': 'AI Agents'}\n    LatestAiDevelopmentCrew().crew().kickoff(inputs=inputs)\n```\n\n### Step Execution\n\nThe `StepExecutor` handles the actual execution of agent steps within the crew context:\n\n```mermaid\nsequenceDiagram\n    participant Crew\n    participant StepExecutor\n    participant Agent\n    participant Task\n    \n    Crew->>StepExecutor: Execute Task\n    StepExecutor->>Agent: Call Agent with Context\n    Agent->>Task: Perform Action\n    Task-->>Agent: Return Result\n    Agent-->>StepExecutor: Step Output\n    StepExecutor-->>Crew: Execution Complete\n```\n\n资料来源：[lib/crewai/src/crewai/agents/step_executor.py]()\n\n### Verbose Mode\n\nDuring development, enable verbose mode to see detailed execution logs:\n\n```python\n@crew\ndef crew(self) -> Crew:\n    return Crew(\n        agents=self.agents,\n        tasks=self.tasks,\n        verbose=True,  # Enable for development\n    )\n```\n\nDisable verbose mode in production for cleaner outputs.\n\n## Crew Execution Options\n\n### Running a Crew\n\n```bash\ncrewai run                  # Run crew or flow (auto-detects from pyproject.toml)\n```\n\nOr directly via Python:\n\n```bash\npython src/my_project/main.py\n```\n\n### Testing and Training\n\n```bash\ncrewai test                           # Test crew (default: 2 iterations, gpt-4o-mini)\ncrewai test -n 5 -m gpt-4o           # Custom iterations and model\ncrewai train -n 5 -f training.json   # Train crew\n```\n\n### Debugging\n\n```bash\ncrewai log-tasks-outputs              # Show latest task outputs\ncrewai replay -t <task_id>            # Replay from specific task\n```\n\n## Best Practices\n\n### Configuration Guidelines\n\n1. **YAML-first configuration**: Define agents and tasks in YAML, keep crew classes minimal\n2. **Use structured output** (`output_pydantic`) for data that flows between tasks or crews\n3. **Use guardrails** to validate task outputs programmatically\n4. **Enable memory** for crews that benefit from cross-session learning\n\n### Process Selection\n\n| Workflow Type | Recommended Process |\n|---------------|---------------------|\n| Linear data pipeline | Sequential |\n| Research and report | Sequential |\n| Multi-agent collaboration | Hierarchical |\n| Dynamic task delegation | Hierarchical |\n| Complex multi-stage projects | Hierarchical with Flows |\n\n### Performance Considerations\n\n| Setting | Purpose |\n|---------|---------|\n| `max_rpm` | Rate limiting to avoid API throttling |\n| `respect_context_window=True` | Auto-handle token limits |\n| `verbose=False` | Reduce logging overhead in production |\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md]()\n\n## Common Patterns\n\n### Multi-Crew Orchestration with Flows\n\nFor complex pipelines involving multiple crews:\n\n```mermaid\ngraph TD\n    A[Flow Start] --> B[Crew 1]\n    B --> C{Condition?}\n    C -->|Path A| D[Crew 2]\n    C -->|Path B| E[Crew 3]\n    D --> F[Output]\n    E --> F\n```\n\nUse `@start`, `@listen`, and `@router` decorators for complex flow orchestration.\n\n### Crew with Tools\n\n```python\nfrom crewai_tools import SerperDevTool\n\n@agent\ndef researcher(self) -> Agent:\n    return Agent(\n        config=self.agents_config['researcher'],\n        tools=[SerperDevTool()]  # Attach tools to agent\n    )\n```\n\n## Summary\n\nThe Crew orchestration system in CrewAI provides a flexible framework for coordinating multiple AI agents. Key takeaways:\n\n- **Crews** are the primary unit of multi-agent collaboration\n- **Processes** (Sequential/Hierarchical) define how tasks are coordinated\n- **Agents** are specialized roles with specific goals and tools\n- **Tasks** represent units of work with dependencies and expected outputs\n- **Memory** enables context preservation across executions\n- **YAML configuration** keeps agent/task definitions separate from code\n\nThis architecture enables everything from simple sequential pipelines to complex hierarchical multi-agent systems with dynamic task delegation.\n\n---\n\n<a id='flows'></a>\n\n## Flows - Event-Driven Workflows\n\n### 相关页面\n\n相关主题：[Crews and Crew Orchestration](#crews), [Agents Architecture](#agents)\n\n<details>\n<summary>Related Source Files</summary>\n\nThe following source files and documentation were used to generate this page:\n\n- [lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n- [lib/crewai/src/crewai/flow/flow_serializer.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/flow/flow_serializer.py)\n- [lib/cli/src/crewai_cli/templates/flow/README.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/flow/README.md)\n- [lib/crewai/README.md](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/README.md)\n- [lib/crewai-tools/src/crewai_tools/tools/invoke_crewai_automation_tool/invoke_crewai_automation_tool.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai-tools/src/crewai_tools/tools/invoke_crewai_automation_tool/invoke_crewai_automation_tool.py)\n</details>\n\n# Flows - Event-Driven Workflows\n\n## Overview\n\nFlows in CrewAI provide an event-driven architecture for orchestrating complex, multi-step AI workflows. They enable precise control over execution order, conditional branching, and state management—offering a perfect balance alongside Crew-based autonomous agent orchestration.\n\nFlows are designed for scenarios requiring **sequential execution**, **conditional logic**, **state persistence**, and **event-based triggers**. Unlike Crews that operate autonomously with agents collaborating freely, Flows provide deterministic workflow patterns where execution follows explicit routing rules.\n\n资料来源：[lib/crewai/README.md](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/README.md)\n\n## Core Concepts\n\n### Flow Architecture\n\nA Flow is a Python class that extends the `Flow` base class, decorated with methods that define the workflow graph:\n\n```mermaid\ngraph TD\n    A[Start] --> B[Method A]\n    B --> C{Decision}\n    C -->|Path 1| D[Method B]\n    C -->|Path 2| E[Method C]\n    D --> F[End]\n    E --> F\n```\n\n### Key Components\n\n| Component | Purpose |\n|-----------|---------|\n| `Flow` | Base class for all flows |\n| `@start()` | Marks methods as entry points |\n| `@listen()` | Triggers method execution after another completes |\n| `@router()` | Implements conditional branching logic |\n| `@human_feedback()` | Pauses execution for user input |\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n\n## Flow Execution Model\n\n### Start Methods\n\nMethods decorated with `@start()` execute immediately when the flow begins. Multiple `@start()` decorators can be defined, causing parallel execution:\n\n```python\nfrom crewai.flow.flow import Flow, start, listen\n\nclass MyFlow(Flow):\n    @start()\n    def begin(self):\n        return \"initial data\"\n\n    @start()\n    def begin_parallel(self):\n        return \"parallel data\"\n```\n\n### Listen Decorators\n\nThe `@listen()` decorator binds a method to the completion of another method. The decorated method receives the output of the triggering method as its argument:\n\n```python\nfrom crewai.flow.flow import Flow, start, listen\n\nclass ResearchFlow(Flow):\n    @start()\n    def set_topic(self):\n        return \"AI Agents\"\n\n    @listen(set_topic)\n    def do_research(self, topic):\n        # self.state.topic is available\n        result = ResearchCrew().crew().kickoff(\n            inputs={\"topic\": topic}\n        )\n        return result.raw\n```\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n\n## State Management\n\n### Structured State with Pydantic\n\nFlows support type-safe state management using Pydantic models. Define a state class that inherits from `BaseModel`:\n\n```python\nfrom crewai.flow.flow import Flow, start, listen\nfrom pydantic import BaseModel\n\nclass ResearchState(BaseModel):\n    topic: str = \"\"\n    research: str = \"\"\n    report: str = \"\"\n\nclass ResearchFlow(Flow[ResearchState]):\n    @start()\n    def set_topic(self):\n        self.state.topic = \"AI Agents\"\n\n    @listen(set_topic)\n    def do_research(self):\n        result = ResearchCrew().crew().kickoff(\n            inputs={\"topic\": self.state.topic}\n        )\n        self.state.research = result.raw\n        return self.state.research\n\n    @listen(do_research)\n    def write_report(self, research_data):\n        self.state.report = f\"# Report on {self.state.topic}\\n\\n{research_data}\"\n        return self.state.report\n```\n\nBenefits of structured state:\n- **Type safety** across method boundaries\n- **IDE autocompletion** for state fields\n- **Validation** of state transitions\n- **Persistence** of state between executions\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n\n### State Flow Diagram\n\n```mermaid\ngraph LR\n    A[set_topic] --> B[State Update<br/>topic: \"AI Agents\"]\n    B --> C[do_research]\n    C --> D[State Update<br/>research: data]\n    D --> E[write_report]\n    E --> F[State Update<br/>report: content]\n```\n\n## Conditional Routing\n\n### Router Decorator\n\nThe `@router()` decorator enables conditional branching based on method output. Routers return string labels that determine which `@listen()` methods execute:\n\n```python\nfrom crewai.flow.flow import Flow, start, listen, router\n\nclass DocumentProcessingFlow(Flow):\n    @start()\n    def receive_document(self):\n        return {\"type\": \"image\", \"path\": \"/path/to/image.png\"}\n\n    @router(receive_document)\n    def classify_document(self, doc):\n        if doc[\"type\"] == \"image\":\n            return \"image_processing\"\n        elif doc[\"type\"] == \"text\":\n            return \"text_processing\"\n        return \"unsupported\"\n\n    @listen(\"image_processing\")\n    def process_image(self, doc):\n        return f\"Processed image: {doc['path']}\"\n\n    @listen(\"text_processing\")\n    def process_text(self, doc):\n        return f\"Processed text: {doc['path']}\"\n\n    @listen(\"unsupported\")\n    def handle_unsupported(self, doc):\n        return f\"Unsupported document type: {doc['type']}\"\n```\n\n### Routing Flow Diagram\n\n```mermaid\ngraph TD\n    A[receive_document] --> B{classify_document}\n    B -->|image_processing| C[process_image]\n    B -->|text_processing| D[process_text]\n    B -->|unsupported| E[handle_unsupported]\n```\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n\n## Event System Integration\n\n### Event-Driven Architecture\n\nFlows integrate with CrewAI's event system to enable reactive execution patterns. The `flow_serializer.py` module provides introspection capabilities for visualizing flow structures:\n\n```python\nfrom crewai.flow.flow_serializer import flow_structure\n\nstructure = flow_structure(MyFlow)\nprint(structure[\"name\"])  # Flow class name\nprint(structure[\"methods\"])  # All decorated methods\nprint(structure[\"edges\"])  # Connections between methods\n```\n\n### Event Categories\n\nFlows support integration with multiple event categories:\n\n| Category | Description |\n|----------|-------------|\n| Flow execution | Start, completion, and error events |\n| Agent execution | Individual agent state changes |\n| Task management | Task lifecycle events |\n| Tool usage | Tool invocation events |\n| Safety guardrails | Validation and compliance events |\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n\n## Flow API Reference\n\n### Flow Base Class\n\n```python\nclass Flow[StateType]:\n    \"\"\"Base class for all flows.\"\"\"\n    \n    state: StateType  # Typed state instance\n    \n    def kickoff(self, inputs: dict = None) -> Any:\n        \"\"\"Execute the flow from start methods.\"\"\"\n    \n    def kickoff_async(self, inputs: dict = None) -> Any:\n        \"\"\"Execute the flow asynchronously.\"\"\"\n```\n\n### Decorators\n\n| Decorator | Parameters | Returns | Description |\n|-----------|------------|---------|-------------|\n| `@start()` | - | None | Marks entry point method |\n| `@listen()` | method | None | Binds to method completion |\n| `@router()` | method | str | Returns routing label |\n| `@human_feedback()` | prompt | str | Requests user input |\n\n### Method Information Types\n\nThe `flow_serializer.py` module defines `MethodInfo` for introspecting flow methods:\n\n```python\nclass MethodInfo(TypedDict, total=False):\n    name: str\n    type: str  # start, listen, router, start_router\n    trigger_methods: list[str]\n    condition_type: str | None  # AND, OR\n    router_paths: list[str]\n    has_human_feedback: bool\n```\n\n资料来源：[lib/crewai/src/crewai/flow/flow_serializer.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/flow/flow_serializer.py)\n\n## Flow Structure Serialization\n\n### Introspection for UI Rendering\n\nThe `flow_structure()` function analyzes a Flow class and returns a JSON-serializable dictionary:\n\n```python\nfrom crewai.flow.flow_serializer import flow_structure\n\nclass MyFlow(Flow):\n    @start()\n    def begin(self):\n        return \"started\"\n\n    @listen(begin)\n    def process(self):\n        return \"done\"\n\nstructure = flow_structure(MyFlow)\n# Returns:\n# {\n#     \"name\": \"MyFlow\",\n#     \"methods\": [...],\n#     \"edges\": [...],\n#     \"state_schema\": {...}\n# }\n```\n\nThis serialization enables CrewAI Studio UI to render visual flow graphs.\n\n资料来源：[lib/crewai/src/crewai/flow/flow_serializer.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/flow/flow_serializer.py)\n\n## Integration with Crews\n\n### Calling Crews from Flows\n\nFlows can invoke Crews for agent-based task execution:\n\n```python\nclass ResearchFlow(Flow[ResearchState]):\n    @start()\n    def set_topic(self):\n        self.state.topic = \"AI Agents\"\n\n    @listen(set_topic)\n    def do_research(self):\n        crew = ResearchCrew().crew()\n        result = crew.kickoff(inputs={\"topic\": self.state.topic})\n        self.state.research = result.raw\n        return result.raw\n```\n\n### Flow-to-Crew Communication\n\n```mermaid\ngraph TD\n    A[Flow Start] --> B[Set Topic]\n    B --> C[Crew Kickoff]\n    C --> D[Agent 1]\n    C --> E[Agent 2]\n    D --> F[Task Complete]\n    E --> G[Task Complete]\n    F --> H[Flow Resume]\n    G --> H\n    H --> I[Process Results]\n```\n\n## Best Practices\n\n### When to Use Flows\n\n| Use Case | Recommendation |\n|----------|----------------|\n| Linear workflows with clear steps | Sequential Flow |\n| Dynamic agent delegation | Hierarchical Crew |\n| Multi-crew orchestration | Flow with Crew calls |\n| Conditional branching | Router-based Flow |\n| Human-in-the-loop | Flow with `@human_feedback()` |\n\n### Design Guidelines\n\n1. **Use structured state (Pydantic models)** over unstructured dicts for type safety\n2. **Prefer Flows for multi-crew orchestration** when complex pipelines are needed\n3. **Use `@start()` with multiple methods** only when parallel execution is required\n4. **Keep router labels descriptive** for maintainable flow graphs\n5. **Enable verbose mode during development**, disable in production\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n\n## Running Flows\n\n### CLI Commands\n\n```bash\n# Run crew or flow (auto-detects from pyproject.toml)\ncrewai run\n\n# Legacy flow execution\ncrewai flow kickoff\n```\n\n### Programmatic Execution\n\n```python\nfrom my_flow import ResearchFlow\n\nflow = ResearchFlow()\nresult = flow.kickoff(inputs={\"topic\": \"AI Agents\"})\nprint(result)\n```\n\n资料来源：[lib/cli/src/crewai_cli/templates/flow/README.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/flow/README.md)\n\n## Advanced Patterns\n\n### Multi-Crew Orchestration\n\n```python\nclass OrchestrationFlow(Flow):\n    @start()\n    def initialize(self):\n        return {\"task\": \"complex_research\"}\n\n    @listen(initialize)\n    def research_crew_execution(self, task):\n        return ResearchCrew().crew().kickoff(inputs=task)\n\n    @listen(research_crew_execution)\n    def analysis_crew_execution(self, research_results):\n        return AnalysisCrew().crew().kickoff(\n            inputs={\"data\": research_results}\n        )\n\n    @listen(analysis_crew_execution)\n    def reporting(self, analysis):\n        return ReportCrew().crew().kickoff(\n            inputs={\"analysis\": analysis}\n        )\n```\n\n### Error Handling in Flows\n\n```python\nclass ResilientFlow(Flow):\n    @start()\n    def begin(self):\n        try:\n            return risky_operation()\n        except Exception as e:\n            self.state.error = str(e)\n            return \"error_state\"\n\n    @router(begin)\n    def handle_result(self, result):\n        if result == \"error_state\":\n            return \"error_handler\"\n        return \"success_path\"\n\n    @listen(\"error_handler\")\n    def handle_error(self, _):\n        return \"Recovery action completed\"\n```\n\n## Summary\n\nFlows provide a powerful event-driven workflow system for CrewAI that complements the autonomous agent orchestration of Crews. Key takeaways:\n\n- **Decorators** (`@start`, `@listen`, `@router`, `@human_feedback`) define the workflow graph\n- **Structured state** with Pydantic ensures type safety and validation\n- **Event serialization** enables visual flow editing in CrewAI Studio\n- **Crews integration** allows delegating complex tasks to agent teams\n- **Conditional routing** provides flexible decision-making capabilities\n\nFlows are ideal for precise, deterministic workflows where execution order and branching logic are critical, while Crews excel at autonomous multi-agent collaboration.\n\n---\n\n<a id='llm-providers'></a>\n\n## LLM Providers and Configuration\n\n### 相关页面\n\n相关主题：[Agents Architecture](#agents)\n\n<details>\n<summary>Relevant Source Files</summary>\n\n以下源码文件用于生成本页说明：\n\n- [lib/crewai/src/crewai/llm.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/llm.py)\n- [lib/crewai/src/crewai/llms/__init__.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/llms/__init__.py)\n- [lib/crewai/src/crewai/llms/base_llm.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/llms/base_llm.py)\n- [lib/crewai/src/crewai/llms/providers/openai/completion.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/llms/providers/openai/completion.py)\n- [lib/crewai/src/crewai/llms/providers/anthropic/completion.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/llms/providers/anthropic/completion.py)\n- [lib/crewai-tools/src/crewai_tools/tools/code_docs_search_tool/README.md](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai-tools/src/crewai_tools/tools/code_docs_search_tool/README.md)\n- [lib/crewai-tools/src/crewai_tools/tools/pdf_search_tool/README.md](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai-tools/src/crewai_tools/tools/pdf_search_tool/README.md)\n- [lib/crewai/src/crewai/tasks/hallucination_guardrail.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/tasks/hallucination_guardrail.py)\n</details>\n\n# LLM Providers and Configuration\n\n## Overview\n\nThe LLM (Large Language Model) Providers and Configuration system in CrewAI provides a flexible, extensible architecture for integrating multiple AI model providers into the agent execution pipeline. This system allows developers to configure, customize, and switch between different LLM backends while maintaining a consistent interface for agent operations.\n\nThe configuration system supports multiple providers including OpenAI, Anthropic, Google, Ollama, and Llama2, enabling both embedding and summarization capabilities through a unified config dictionary approach.\n\n资料来源：[lib/crewai-tools/src/crewai_tools/tools/code_docs_search_tool/README.md]()\n\n## Architecture\n\nThe LLM provider system follows a modular architecture with the following components:\n\n```mermaid\ngraph TD\n    A[Agent] --> B[LLM Configuration]\n    B --> C[Provider Selection]\n    C --> D[OpenAI Provider]\n    C --> E[Anthropic Provider]\n    C --> F[Google Provider]\n    C --> G[Ollama Provider]\n    C --> H[Llama2 Provider]\n    D --> I[Model Execution]\n    E --> I\n    F --> I\n    G --> I\n    H --> I\n    I --> J[Response Processing]\n    J --> K[Agent Output]\n```\n\n### Core Components\n\n| Component | Purpose | Location |\n|-----------|---------|----------|\n| `LLM` | Main LLM interface class | `lib/crewai/src/crewai/llm.py` |\n| `BaseLLM` | Abstract base for all providers | `lib/crewai/src/crewai/llms/base_llm.py` |\n| `Providers` | Provider-specific implementations | `lib/crewai/src/crewai/llms/providers/` |\n| Config Dictionary | Runtime configuration | User-defined |\n\n资料来源：[lib/crewai/src/crewai/llm.py](), [lib/crewai/src/crewai/llms/base_llm.py]()\n\n## Configuration Pattern\n\n### Standard Configuration Structure\n\nAll tools and agents using LLM configuration follow a standardized config dictionary pattern:\n\n```python\nconfig=dict(\n    llm=dict(\n        provider=\"provider_name\",\n        config=dict(\n            model=\"model_name\",\n            # Optional parameters\n            temperature=0.5,\n            top_p=1,\n            stream=True,\n        ),\n    ),\n    embedder=dict(\n        provider=\"embedder_provider\",\n        config=dict(\n            model=\"embedding_model\",\n            task_type=\"retrieval_document\",\n        ),\n    ),\n)\n```\n\n资料来源：[lib/crewai-tools/src/crewai_tools/tools/code_docs_search_tool/README.md](), [lib/crewai-tools/src/crewai_tools/tools/pdf_search_tool/README.md]()\n\n### Supported Providers\n\n| Provider | Provider ID | Example Model |\n|----------|-------------|---------------|\n| OpenAI | `openai` | `gpt-4`, `gpt-4o-mini` |\n| Anthropic | `anthropic` | `claude-3`, `claude-3.5-sonnet` |\n| Google | `google` | `models/embedding-001` |\n| Ollama | `ollama` | `llama2`, `mistral` |\n| Llama2 | `llama2` | `meta/llama2` |\n\n资料来源：[lib/crewai-tools/src/crewai_tools/tools/code_docs_search_tool/README.md]()\n\n## LLM Class Integration\n\n### Initialization Parameters\n\nThe primary `LLM` class serves as the main interface for language model operations:\n\n```python\nfrom crewai import LLM\n\nllm = LLM(\n    model=\"gpt-4\",\n    api_key=\"your-api-key\",\n    temperature=0.7,\n)\n```\n\n### Guardrail Integration\n\nLLMs are used as dependencies in guardrail implementations such as the `HallucinationGuardrail`:\n\n```python\nfrom crewai.tasks.hallucination_guardrail import HallucinationGuardrail\n\nguardrail = HallucinationGuardrail(\n    llm=agent.llm,\n    threshold=8.0,\n    context=\"Reference context for validation\",\n)\n```\n\n资料来源：[lib/crewai/src/crewai/tasks/hallucination_guardrail.py:1-70]()\n\n## Provider-Specific Configuration\n\n### OpenAI Configuration\n\n```python\ntool = SomeTool(\n    config=dict(\n        llm=dict(\n            provider=\"openai\",\n            config=dict(\n                model=\"gpt-4o-mini\",\n                temperature=0.5,\n                # streaming support available\n            ),\n        ),\n    )\n)\n```\n\n资料来源：[lib/crewai/src/crewai/llms/providers/openai/completion.py]()\n\n### Anthropic Configuration\n\n```python\ntool = SomeTool(\n    config=dict(\n        llm=dict(\n            provider=\"anthropic\",\n            config=dict(\n                model=\"claude-3-sonnet-20240229\",\n            ),\n        ),\n    )\n)\n```\n\n资料来源：[lib/crewai/src/crewai/llms/providers/anthropic/completion.py]()\n\n### Google Embeddings Configuration\n\n```python\nembedder=dict(\n    provider=\"google\",\n    config=dict(\n        model=\"models/embedding-001\",\n        task_type=\"retrieval_document\",\n    ),\n)\n```\n\n资料来源：[lib/crewai-tools/src/crewai_tools/tools/code_docs_search_tool/README.md]()\n\n### Ollama Configuration\n\n```python\nllm=dict(\n    provider=\"ollama\",\n    config=dict(\n        model=\"llama2\",\n        temperature=0.5,\n        top_p=1,\n        stream=True,\n    ),\n)\n```\n\n资料来源：[lib/crewai-tools/src/crewai_tools/tools/code_docs_search_tool/README.md]()\n\n## Embedder Configuration\n\nEmbedders handle vector embedding generation for retrieval-augmented generation (RAG) workflows:\n\n| Parameter | Type | Description | Default |\n|-----------|------|-------------|---------|\n| `provider` | string | Embedding provider name | `openai` |\n| `model` | string | Model identifier | Provider-specific |\n| `task_type` | string | Embedding use case | `retrieval_document` |\n| `title` | string | Optional title for embeddings | None |\n\n资料来源：[lib/crewai-tools/src/crewai_tools/tools/code_docs_search_tool/README.md]()\n\n## Default Behavior\n\nBy default, tools use OpenAI for both embeddings and summarization:\n\n> By default, the tool uses OpenAI for both embeddings and summarization.\n\n资料来源：[lib/crewai-tools/src/crewai_tools/tools/code_docs_search_tool/README.md](), [lib/crewai-tools/src/crewai_tools/tools/pdf_search_tool/README.md]()\n\n## Configuration Workflow\n\n```mermaid\ngraph LR\n    A[Define Config Dict] --> B[Select Provider]\n    B --> C[Specify Model]\n    C --> D[Set Optional Params]\n    D --> E[Initialize Tool/Agent]\n    E --> F[LLM Loaded at Runtime]\n    F --> G[Execution with Provider]\n```\n\n## Environment Variables\n\nAPI keys should be configured via environment variables for security:\n\n```bash\nexport OPENAI_API_KEY=\"sk-...\"\nexport ANTHROPIC_API_KEY=\"sk-ant-...\"\nexport GOOGLE_API_KEY=\"...\"\nexport LINKUP_API_KEY=\"...\"\n```\n\n资料来源：[lib/crewai-tools/src/crewai_tools/tools/linkup/README.md]()\n\n## Best Practices\n\n1. **Environment Security**: Store API keys in environment variables rather than hardcoding\n2. **Provider Selection**: Choose providers based on task requirements (cost, latency, capabilities)\n3. **Temperature Tuning**: Adjust temperature based on task creativity needs (lower for factual, higher for creative)\n4. **Model Selection**: Use smaller/faster models for simple tasks to reduce costs\n5. **Embedder Consistency**: Use compatible embedders for your vector store\n\n## Related Documentation\n\n- [CrewAI Agents Configuration](agents)\n- [CrewAI Tasks Configuration](tasks)\n- [Tools Integration Guide](tools)\n- [Guardrails System](guardrails)\n\n---\n\n<a id='agent-to-agent'></a>\n\n## Agent-to-Agent (A2A) Communication\n\n### 相关页面\n\n相关主题：[Agents Architecture](#agents), [Crews and Crew Orchestration](#crews)\n\n<details>\n<summary>Related Source Files</summary>\n\nThe following source files were used to generate this documentation:\n\n- [lib/crewai/src/crewai/a2a/__init__.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/a2a/__init__.py)\n- [lib/crewai/src/crewai/a2a/types.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/a2a/types.py)\n- [lib/crewai/src/crewai/a2a/wrapper.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/a2a/wrapper.py)\n- [lib/crewai/src/crewai/a2a/extensions/a2ui/__init__.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/a2a/extensions/a2ui/__init__.py)\n- [lib/crewai/src/crewai/a2a/utils/delegation.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/a2a/utils/delegation.py)\n- [lib/crewai/src/crewai/a2a/extensions/a2ui/schema/v0_8/server_to_client_with_standard_catalog.json](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/a2a/extensions/a2ui/schema/v0_8/server_to_client_with_standard_catalog.json)\n</details>\n\n# Agent-to-Agent (A2A) Communication\n\nAgent-to-Agent (A2A) Communication is a core architectural layer in CrewAI that enables autonomous agents to exchange messages, delegate tasks, and collaborate within multi-agent workflows. This module provides the infrastructure for agents to interact, share context, and coordinate their activities seamlessly.\n\n## Overview\n\nThe A2A subsystem in CrewAI implements a standardized communication protocol that allows agents to:\n\n- Exchange structured messages with rich content types\n- Delegate tasks to other agents with appropriate context\n- Share execution results and artifacts\n- Coordinate through hierarchical or collaborative processes\n\nThe implementation follows modern agent communication patterns and provides both a programmatic API and extension points for UI integration. 资料来源：[lib/crewai/src/crewai/a2a/__init__.py]()\n\n## Architecture\n\n### High-Level Architecture\n\n```mermaid\ngraph TD\n    subgraph \"Agent Layer\"\n        A1[Agent 1]\n        A2[Agent 2]\n        A3[Agent N]\n    end\n    \n    subgraph \"A2A Core\"\n        TW[A2A Wrapper]\n        TT[A2A Types]\n        UD[Utils: Delegation]\n    end\n    \n    subgraph \"Extension Layer\"\n        A2UI[A2UI Extensions]\n        SCH[Schema v0.8]\n    end\n    \n    A1 <--> TW\n    A2 <--> TW\n    A3 <--> TW\n    TW <--> TT\n    TW <--> UD\n    TW <--> A2UI\n    A2UI <--> SCH\n```\n\n### Component Responsibilities\n\n| Component | Purpose | Key Responsibilities |\n|-----------|---------|---------------------|\n| `wrapper.py` | A2A Communication Handler | Manages message routing, task delegation, and response handling |\n| `types.py` | Data Models | Defines message structures, content types, and protocol elements |\n| `delegation.py` | Task Delegation Utility | Provides helper functions for agent delegation patterns |\n| `a2ui/` | UI Extensions | Schema definitions for Agent-to-User Interface communication |\n| `schema/v0_8/` | Protocol Schemas | JSON schemas for message validation and serialization |\n\n资料来源：[lib/crewai/src/crewai/a2a/wrapper.py]()\n\n## Core Types and Data Models\n\nThe A2A module defines comprehensive data models for structured communication between agents. These types ensure type safety and consistent message formats across the system.\n\n### Content Types\n\nThe A2A protocol supports multiple content types for flexible message composition:\n\n```mermaid\ngraph LR\n    M[Message] --> T[TextContent]\n    M --> A[ArtifactContent]\n    M --> T2[TaskContent]\n    M --> S[StatusContent]\n    M --> P[Part]\n    \n    T --> TT[Text]\n    A --> DT[Document]\n    A --> C[Code]\n    A --> D[Data]\n```\n\n### Message Structure\n\nMessages in A2A communication follow a standardized structure defined in the schema:\n\n```json\n{\n  \"message\": {\n    \"role\": \"string\",\n    \"content\": {\n      \"parts\": []\n    },\n    \"agent\": \"string\",\n    \"taskId\": \"string\"\n  }\n}\n```\n\n资料来源：[lib/crewai/src/crewai/a2a/types.py]()\n\n## A2A Wrapper\n\nThe `A2AWrapper` class serves as the primary interface for agent communication:\n\n```python\nclass A2AWrapper:\n    \"\"\"Handles Agent-to-Agent communication and delegation.\"\"\"\n    \n    def __init__(self, config: A2AConfig):\n        self.config = config\n        \n    def send_message(self, agent_id: str, message: A2AMessage) -> A2AResponse:\n        \"\"\"Send a message to another agent.\"\"\"\n        \n    def delegate_task(self, target_agent: str, task: Task) -> DelegationResult:\n        \"\"\"Delegate a task to another agent.\"\"\"\n        \n    def receive_message(self, message: A2AMessage) -> None:\n        \"\"\"Process an incoming message from another agent.\"\"\"\n```\n\n### Key Methods\n\n| Method | Parameters | Return Type | Description |\n|--------|------------|-------------|-------------|\n| `send_message` | `agent_id`, `message` | `A2AResponse` | Send a message to a specific agent |\n| `delegate_task` | `target_agent`, `task` | `DelegationResult` | Delegate a task with full context |\n| `receive_message` | `message` | `None` | Process incoming messages |\n| `get_status` | `task_id` | `TaskStatus` | Get the status of a delegated task |\n\n资料来源：[lib/crewai/src/crewai/a2a/wrapper.py]()\n\n## Task Delegation\n\nThe delegation utility provides specialized functions for distributing work across agents:\n\n```python\ndef delegate_to_agent(\n    source_agent: str,\n    target_agent: str,\n    task: Task,\n    context: Dict[str, Any]\n) -> DelegationResult:\n    \"\"\"Delegate a task from one agent to another.\"\"\"\n    \ndef create_delegation_context(\n    source: Agent,\n    target: Agent,\n    task: Task\n) -> DelegationContext:\n    \"\"\"Create a context object for delegation.\"\"\"\n```\n\n### Delegation Flow\n\n```mermaid\ngraph TD\n    S[Source Agent] -->|Identifies Task| D1{Delegation Decision}\n    D1 -->|Can Delegate| C1[Create Context]\n    D1 -->|Cannot Delegate| R1[Reject Task]\n    C1 -->|Prepare Message| M1[Build A2A Message]\n    M1 -->|Send via Wrapper| TW[A2A Wrapper]\n    TW -->|Route Message| T[Target Agent]\n    T -->|Execute Task| TR[Task Result]\n    TR -->|Send Response| TW2[A2A Wrapper]\n    TW2 -->|Route Response| S2[Source Agent]\n```\n\n### Delegation Context\n\nThe `DelegationContext` object captures all necessary information for proper task delegation:\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `source_agent` | `str` | Identifier of the delegating agent |\n| `target_agent` | `str` | Identifier of the receiving agent |\n| `task_id` | `str` | Unique identifier for the task |\n| `priority` | `int` | Delegation priority (1-10) |\n| `timeout` | `int` | Maximum execution time in seconds |\n| `retry_count` | `int` | Number of retry attempts |\n\n资料来源：[lib/crewai/src/crewai/a2a/utils/delegation.py]()\n\n## A2UI Extensions\n\nThe A2UI (Agent-to-User Interface) module provides schema definitions for rendering agent outputs in user interfaces:\n\n```python\n# Extension initialization\nfrom crewai.a2a.extensions.a2ui import A2UIExtension\n\nextension = A2UIExtension()\nextension.register_handlers()\n```\n\n### Supported Content Rendering\n\n| Content Type | Description | Schema Reference |\n|--------------|-------------|------------------|\n| `text` | Plain text with optional hints | `server_to_client_with_standard_catalog.json` |\n| `image` | Image content with sizing options | `server_to_client_with_standard_catalog.json` |\n| `url` | Web links with metadata | `server_to_client_with_standard_catalog.json` |\n\n### Text Styling Hints\n\nThe schema supports the following text style hints for UI rendering:\n\n| Style Hint | Description | Use Case |\n|------------|-------------|----------|\n| `h1` | Largest heading | Main section titles |\n| `h2` | Second largest heading | Subsection titles |\n| `h3` | Third largest heading | Minor headings |\n| `h4` | Fourth largest heading | Component labels |\n| `h5` | Fifth largest heading | Detailed labels |\n| `caption` | Small text | Figure captions, footnotes |\n| `body` | Standard body text | Regular content |\n\n### Image Rendering Options\n\nImages in A2A messages support the following fit modes:\n\n| Fit Mode | CSS Equivalent | Description |\n|----------|----------------|-------------|\n| `contain` | `object-fit: contain` | Scale to fit within bounds |\n| `cover` | `object-fit: cover` | Scale to fill bounds, crop if needed |\n| `fill` | `object-fit: fill` | Stretch to fill bounds |\n\n资料来源：[lib/crewai/src/crewai/a2a/extensions/a2ui/__init__.py]()\n资料来源：[lib/crewai/src/crewai/a2a/extensions/a2ui/schema/v0_8/server_to_client_with_standard_catalog.json]()\n\n## Protocol Versioning\n\nThe A2A protocol uses semantic versioning with the current implementation supporting **v0.8**:\n\n```mermaid\ngraph LR\n    V08[v0.8] -->|Current| C[Current Schema]\n    V08 -->|Features| T[Text Hints]\n    V08 -->|Features| I[Image Fit Options]\n    V08 -->|Features| U[URL References]\n    \n    C -->|Evolution| F[Future Versions]\n```\n\nSchema files are organized by version in the `schema/` directory, allowing for backward compatibility and gradual migration:\n\n```\nlib/crewai/src/crewai/a2a/extensions/a2ui/schema/\n└── v0_8/\n    └── server_to_client_with_standard_catalog.json\n```\n\n## Usage Examples\n\n### Basic Agent Communication\n\n```python\nfrom crewai.a2a import A2AWrapper, A2AMessage, A2AConfig\n\n# Initialize the A2A wrapper\nconfig = A2AConfig(\n    agent_id=\"researcher_01\",\n    capabilities=[\"delegate\", \"respond\"]\n)\nwrapper = A2AWrapper(config)\n\n# Create and send a message\nmessage = A2AMessage(\n    role=\"agent\",\n    content={\n        \"parts\": [\n            {\"text\": \"Please analyze the provided data and return insights\"}\n        ]\n    },\n    agent=\"researcher_01\"\n)\n\nresponse = wrapper.send_message(\n    agent_id=\"analyst_01\",\n    message=message\n)\n```\n\n### Task Delegation Pattern\n\n```python\nfrom crewai.a2a.utils.delegation import delegate_to_agent, create_delegation_context\n\n# Create delegation context\ncontext = create_delegation_context(\n    source=researcher_agent,\n    target=analyst_agent,\n    task=analysis_task\n)\n\n# Execute delegation\nresult = delegate_to_agent(\n    source_agent=\"researcher_01\",\n    target_agent=\"analyst_01\",\n    task=analysis_task,\n    context={\"priority\": \"high\", \"deadline\": \"2024-01-15\"}\n)\n```\n\n### UI-Ready Response Structure\n\n```python\nfrom crewai.a2a.extensions.a2ui import create_ui_response\n\n# Create a response optimized for UI rendering\nui_response = create_ui_response(\n    content_type=\"text\",\n    text=\"Research findings have been compiled\",\n    style_hint=\"body\"\n)\n\n# Or include rich content\nui_response = create_ui_response(\n    content_type=\"image\",\n    url={\"literalString\": \"https://example.com/chart.png\"},\n    fit=\"contain\"\n)\n```\n\n## Integration with CrewAI\n\nThe A2A module integrates with CrewAI's core components:\n\n```mermaid\ngraph TD\n    subgraph \"CrewAI Core\"\n        C[Crew]\n        P[Process]\n        A[Agents]\n        T[Tasks]\n    end\n    \n    subgraph \"A2A Layer\"\n        W[Wrapper]\n        D[Delegation Utils]\n        U[A2UI]\n    end\n    \n    C -->|Orchestrates| A\n    A -->|Communicates via| W\n    W -->|Delegates via| D\n    W -->|Renders via| U\n    A -->|Execute| T\n    P -->|Manages Flow| C\n```\n\n### Integration Points\n\n| Component | Integration | Description |\n|-----------|-------------|-------------|\n| `Crew` | Automatic initialization | Creates A2A wrapper for each agent |\n| `Agent` | Message handling | Uses A2A for inter-agent communication |\n| `Task` | Delegation support | Can be delegated via A2A protocol |\n| `Process` | Coordination | Uses A2A for process-level messaging |\n\n## Configuration Options\n\n### A2AConfig Parameters\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `agent_id` | `str` | Required | Unique identifier for the agent |\n| `capabilities` | `List[str]` | `[]` | Supported capabilities |\n| `timeout` | `int` | `300` | Default timeout in seconds |\n| `retry_attempts` | `int` | `3` | Number of retry attempts |\n| `enable_ui_extension` | `bool` | `True` | Enable A2UI rendering |\n\n### Environment Variables\n\n| Variable | Description |\n|----------|-------------|\n| `A2A_TIMEOUT` | Global A2A operation timeout |\n| `A2A_MAX_RETRIES` | Maximum retry attempts |\n| `A2A_LOG_LEVEL` | Logging verbosity |\n\n## Best Practices\n\n1. **Message Design**: Keep messages focused and atomic for better error handling\n2. **Context Preservation**: Always include sufficient context when delegating tasks\n3. **Error Handling**: Implement proper exception handling for network failures\n4. **Schema Validation**: Validate messages against the A2UI schema before sending\n5. **Timeout Management**: Set appropriate timeouts based on task complexity\n\n## Summary\n\nThe Agent-to-Agent (A2A) Communication module in CrewAI provides a robust foundation for multi-agent collaboration. Key features include:\n\n- **Standardized messaging** with support for multiple content types\n- **Task delegation** with full context preservation\n- **UI extensions** for rich content rendering\n- **Versioned schemas** ensuring backward compatibility\n- **Deep integration** with CrewAI's agent and task systems\n\nThe modular architecture allows for flexible extension and customization while maintaining a consistent communication protocol across all agents in a crew.\n\n---\n\n<a id='knowledge'></a>\n\n## Knowledge Management\n\n### 相关页面\n\n相关主题：[Memory and Storage System](#memory)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [lib/crewai/src/crewai/knowledge/knowledge.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/knowledge/knowledge.py)\n- [lib/crewai/src/crewai/knowledge/source/pdf_knowledge_source.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/knowledge/source/pdf_knowledge_source.py)\n- [lib/crewai/src/crewai/knowledge/source/csv_knowledge_source.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/knowledge/source/csv_knowledge_source.py)\n- [lib/crewai/src/crewai/knowledge/storage/knowledge_storage.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/knowledge/storage/knowledge_storage.py)\n</details>\n\n# Knowledge Management\n\n## Overview\n\nKnowledge Management in crewAI provides a structured framework for agents to store, retrieve, and utilize contextual information during task execution. This system enables crews to maintain persistent knowledge that can be referenced across multiple agent interactions, enhancing the contextual awareness and accuracy of agent responses.\n\n## Architecture\n\nThe Knowledge Management system consists of three primary components working in coordination:\n\n```mermaid\ngraph TD\n    A[Agent] --> B[Knowledge Source]\n    B --> C[Knowledge Storage]\n    C --> D[Vector Store]\n    B --> E[PDF Files]\n    B --> F[CSV Files]\n    B --> G[Text Data]\n    C --> H[Query Engine]\n    H --> A\n```\n\n### Core Components\n\n| Component | Purpose | Location |\n|-----------|---------|----------|\n| `Knowledge` | Main class orchestrating knowledge operations | `lib/crewai/src/crewai/knowledge/knowledge.py` |\n| `KnowledgeSource` | Abstract base for data ingestion | `lib/crewai/src/crewai/knowledge/source/` |\n| `KnowledgeStorage` | Handles persistence and retrieval | `lib/crewai/src/crewai/knowledge/storage/knowledge_storage.py` |\n\n## Knowledge Sources\n\nKnowledge Sources represent the input layer where data is ingested into the system. The framework supports multiple source types to accommodate various data formats.\n\n### PDF Knowledge Source\n\nThe PDF Knowledge Source processes PDF documents and extracts textual content for vector storage. It handles multi-page documents and preserves structural information where possible.\n\n**Key Features:**\n\n- Automatic text extraction from PDF pages\n- Metadata preservation (page numbers, document titles)\n- Chunk-based processing for large documents\n\n### CSV Knowledge Source\n\nThe CSV Knowledge Source handles tabular data, converting rows and columns into searchable knowledge entries. It maintains the relationship between column headers and values during ingestion.\n\n**Key Features:**\n\n- Header-aware parsing\n- Row-level chunking\n- Delimiter detection\n\n## Storage Layer\n\nThe Knowledge Storage component manages the persistence of processed knowledge using vector embeddings. It interfaces with the underlying vector database to enable semantic search capabilities.\n\n```mermaid\nsequenceDiagram\n    participant Source as Knowledge Source\n    participant Storage as Knowledge Storage\n    participant VectorDB as Vector Database\n    participant Query as Query Engine\n    \n    Source->>Storage: Ingest document chunks\n    Storage->>Storage: Generate embeddings\n    Storage->>VectorDB: Store vectors + metadata\n    Query->>VectorDB: Semantic search\n    VectorDB->>Query: Relevant chunks\n    Query->>Storage: Format results\n```\n\n### Storage Configuration\n\n| Parameter | Type | Description | Default |\n|-----------|------|-------------|---------|\n| `chunk_size` | int | Size of text chunks in characters | 1000 |\n| `chunk_overlap` | int | Overlap between consecutive chunks | 200 |\n| `embedding_model` | str | Model used for vectorization | Configured at crew level |\n\n## Integration with Agents\n\nKnowledge Management integrates with the crewAI agent system through the Agent class. Agents can be configured to automatically query relevant knowledge during task execution.\n\n**Basic Integration Pattern:**\n\n```python\nfrom crewai import Agent, Crew\nfrom crewai.knowledge import Knowledge, PDFKnowledgeSource\n\n# Initialize knowledge base\nknowledge = Knowledge()\n\n# Add sources\nknowledge.add_source(PDFKnowledgeSource(file_path=\"document.pdf\"))\nknowledge.add_source(CSVKnowledgeSource(file_path=\"data.csv\"))\n\n# Create agent with knowledge access\nagent = Agent(\n    role=\"Research Analyst\",\n    goal=\"Answer questions using company knowledge\",\n    backstory=\"Expert at analyzing documents\",\n    knowledge=knowledge\n)\n```\n\n## Query Mechanism\n\nThe query mechanism enables agents to retrieve relevant knowledge based on semantic similarity. When an agent processes a task, the system automatically retrieves chunks that are contextually relevant to the query.\n\n| Query Parameter | Description |\n|----------------|-------------|\n| `query_text` | The search query string |\n| `top_k` | Maximum number of results to return |\n| `similarity_threshold` | Minimum similarity score for inclusion |\n\n## Data Flow\n\n```mermaid\ngraph LR\n    A[Document Files] --> B[Knowledge Sources]\n    B --> C[Text Chunking]\n    C --> D[Embedding Generation]\n    D --> E[Vector Storage]\n    F[Agent Query] --> G[Similarity Search]\n    G --> E\n    E --> H[Retrieved Chunks]\n    H --> I[Agent Context]\n```\n\n## Usage with Crews\n\nFor multi-agent crews, knowledge can be shared across all agents or restricted to specific agents:\n\n```python\nfrom crewai import Crew\nfrom crewai.knowledge import Knowledge\n\n# Shared knowledge across crew\ncrew_knowledge = Knowledge()\ncrew_knowledge.add_source(company_docs_source)\n\ncrew = Crew(\n    agents=[researcher, analyst, writer],\n    tasks=[research_task, analysis_task, report_task],\n    knowledge=crew_knowledge  # Available to all agents\n)\n```\n\n## Best Practices\n\n1. **Chunk Sizing**: Use appropriate chunk sizes based on document structure. Smaller chunks (500-1000 chars) work well for Q&A, larger chunks for document summarization.\n2. **Source Organization**: Group related documents into separate knowledge sources for more targeted retrieval.\n3. **Metadata**: Include relevant metadata with knowledge sources to improve result filtering.\n4. **Update Strategy**: Implement regular synchronization for knowledge sources that change frequently.\n\n## Related Components\n\n| Component | Purpose |\n|-----------|---------|\n| `crewai_tools` | External tool integrations including PDF search, CSV search |\n| `Agent Memory` | Short-term contextual memory for agent sessions |\n| `Task Context` | Task-specific information passing between agents |\n\n---\n\n## References\n\n- Main Knowledge class implementation: `lib/crewai/src/crewai/knowledge/knowledge.py`\n- PDF source handler: `lib/crewai/src/crewai/knowledge/source/pdf_knowledge_source.py`\n- CSV source handler: `lib/crewai/src/crewai/knowledge/source/csv_knowledge_source.py`\n- Storage implementation: `lib/crewai/src/crewai/knowledge/storage/knowledge_storage.py`\n\n---\n\n<a id='memory'></a>\n\n## Memory and Storage System\n\n### 相关页面\n\n相关主题：[Knowledge Management](#knowledge)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [lib/crewai/src/crewai/memory/unified_memory.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/memory/unified_memory.py)\n- [lib/crewai/src/crewai/memory/memory_scope.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/memory/memory_scope.py)\n- [lib/crewai/src/crewai/memory/recall_flow.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/memory/recall_flow.py)\n- [lib/crewai/src/crewai/memory/storage/lancedb_storage.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/memory/storage/lancedb_storage.py)\n- [lib/crewai/src/crewai/memory/types.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/memory/types.py)\n- [lib/crewai/src/crewai/memory/utils.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/memory/utils.py)\n</details>\n\n# Memory and Storage System\n\n## Overview\n\nThe crewAI Memory and Storage System provides persistent, searchable memory capabilities for AI agents and crews. It enables cross-session learning, semantic recall of past interactions, and structured storage of agent experiences. The system is designed to handle various types of memory including short-term, long-term, entity, and knowledge-based memories.\n\n```mermaid\ngraph TD\n    A[Agent Request] --> B[UnifiedMemory]\n    B --> C[MemoryScope]\n    C --> D{Memory Type}\n    D --> E[Short-term Memory]\n    D --> F[Long-term Memory]\n    D --> G[Entity Memory]\n    D --> H[Knowledge Memory]\n    E --> I[Vector Storage]\n    F --> I\n    G --> I\n    H --> I\n    I --> J[Recall Flow]\n    J --> K[MemoryMatch Results]\n    K --> A\n```\n\n## Memory Architecture\n\n### Core Components\n\n| Component | Purpose | Location |\n|-----------|---------|----------|\n| `UnifiedMemory` | Central interface for all memory operations | `unified_memory.py` |\n| `MemoryScope` | Defines isolation boundaries for memory contexts | `memory_scope.py` |\n| `RecallFlow` | Handles semantic search and retrieval of memories | `recall_flow.py` |\n| `LanceDBStorage` | Vector database backend for persistent storage | `lancedb_storage.py` |\n\n### Data Models\n\n#### MemoryRecord\n\nThe fundamental unit of stored information in the memory system:\n\n```python\nclass MemoryRecord(BaseModel):\n    data: Any                           # The actual memory content\n    metadata: dict[str, Any]            # Associated metadata\n    importance: float = Field(         # Relevance score 0.0-1.0\n        default=0.5, ge=0.0, le=1.0\n    )\n    created_at: datetime                # Creation timestamp\n    last_accessed: datetime             # Last retrieval timestamp\n    embedding: list[float] | None       # Vector embedding for semantic search\n    source: str | None                  # Origin tracking (user ID, session ID)\n    private: bool = Field(             # Privacy flag for access control\n        default=False\n    )\n```\n\n资料来源：[lib/crewai/src/crewai/memory/types.py:1-50]()\n\n#### MemoryMatch\n\nReturned by recall operations with relevance scoring:\n\n```python\nclass MemoryMatch(BaseModel):\n    record: MemoryRecord               # The matched memory\n    score: float                       # Combined relevance score\n    match_reasons: list[str]           # Why this matched (semantic, recency, importance)\n    evidence_gaps: list[str]          # Missing context flags\n```\n\n资料来源：[lib/crewai/src/crewai/memory/types.py:55-70]()\n\n## Memory Scoping System\n\nThe `MemoryScope` class manages hierarchical isolation of memory contexts, allowing different crews, agents, or sessions to maintain separate memory stores while supporting controlled cross-context access.\n\n### Scope Path Operations\n\n| Function | Description |\n|----------|-------------|\n| `join_scope_paths(root, inner)` | Combines two scope paths with normalization |\n| `normalize_scope_path(path)` | Standardizes scope path format |\n\n### Scope Path Format\n\nScope paths follow a hierarchical structure:\n\n```\n/crew/{crew-name}/{memory-type}\n/crew/research-crew/short-term\n/crew/research-crew/long-term\n/crew/research-crew/entity\n/crew/research-crew/knowledge\n```\n\n### Scope Path Join Behavior\n\n```python\njoin_scope_paths(\"/crew/test\", \"/market-trends\")\n# Returns: '/crew/test/market-trends'\n\njoin_scope_paths(\"/crew/test\", \"market-trends\")\n# Returns: '/crew/test/market-trends'\n\njoin_scope_paths(\"/crew/test\", \"/\")\n# Returns: '/crew/test'\n\njoin_scope_paths(\"/crew/test\", None)\n# Returns: '/crew/test'\n```\n\n资料来源：[lib/crewai/src/crewai/memory/utils.py:1-50]()\n\n```mermaid\ngraph LR\n    A[\"root: '/crew/test'\"] --> B[join_scope_paths]\n    C[\"inner: '/market-trends'\"] --> B\n    B --> D[\"Result: '/crew/test/market-trends'\"]\n    \n    E[\"root: '/crew/test'\"] --> F[normalize]\n    F --> G[\"Result: '/crew/test'\"]\n```\n\n## Storage Backends\n\n### LanceDB Storage\n\nLanceDB is the primary vector storage backend, providing efficient similarity search capabilities:\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `db_path` | str | Required | Path to the LanceDB database |\n| `table_name` | str | Required | Name of the storage table |\n| `vector_dimension` | int | Auto | Embedding vector size |\n| `reset_db` | bool | False | Whether to reset on initialization |\n\n资料来源：[lib/crewai/src/crewai/memory/storage/lancedb_storage.py]()\n\n### Storage Operations\n\n| Operation | Description |\n|-----------|-------------|\n| `write` | Store a new memory record |\n| `read` | Retrieve by ID |\n| `search` | Semantic similarity search |\n| `delete` | Remove by ID |\n| `reset` | Clear all records |\n\n## Recall and Retrieval\n\nThe `RecallFlow` manages how memories are retrieved based on queries. It combines semantic similarity with recency and importance scoring.\n\n```mermaid\nsequenceDiagram\n    participant Agent\n    participant UnifiedMemory\n    participant RecallFlow\n    participant LanceDBStorage\n    \n    Agent->>UnifiedMemory: Query with context\n    UnifiedMemory->>RecallFlow: Execute recall(query, scope)\n    RecallFlow->>LanceDBStorage: Semantic search\n    LanceDBStorage-->>RecallFlow: Candidate memories\n    RecallFlow->>RecallFlow: Score by relevance\n    RecallFlow-->>UnifiedMemory: Ranked MemoryMatch[]\n    UnifiedMemory-->>Agent: Filtered results\n```\n\n### Recall Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `query` | str | Yes | Search query text |\n| `scope` | str | Yes | Memory scope path |\n| `limit` | int | No | Max results (default: 5) |\n| `include_private` | bool | No | Include private memories |\n\n## Memory Types\n\n| Type | Purpose | Persistence |\n|------|---------|-------------|\n| **Short-term** | Current session context | Ephemeral, cleared on reset |\n| **Long-term** | Cross-session learning | Persistent until explicitly reset |\n| **Entity** | Shared entity information | Persistent, shared across agents |\n| **Knowledge** | Domain-specific grounding | Persistent, used for RAG |\n\n## Configuration Options\n\n### Crew-Level Configuration\n\n```yaml\nmemory:\n  enabled: true\n  type: \"short_term\" | \"long_term\" | \"entity\" | \"knowledge\" | \"all\"\n  scope: \"/crew/{crew_name}\"\n```\n\n### CLI Memory Management\n\n```bash\n# Reset all memories\ncrewai reset-memories -a\n\n# Reset specific memory types\ncrewai reset-memories -s    # Short-term only\ncrewai reset-memories -l    # Long-term only\ncrewai reset-memories -e    # Entity only\ncrewai reset-memories -kn   # Knowledge only\ncrewai reset-memories -akn  # Agent knowledge only\n```\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md]()\n\n## Privacy and Access Control\n\nThe memory system supports private memories that are only accessible under specific conditions:\n\n- **Private flag**: When `private=True`, a memory is only visible to recall requests from the same source\n- **include_private parameter**: Set to `True` to include private memories in cross-source queries\n- **Source tracking**: Each memory records its origin via the `source` field for provenance and filtering\n\n## Embedding Configuration\n\nMemories are stored with vector embeddings for semantic search:\n\n| Provider | Model Example | Configuration |\n|----------|---------------|---------------|\n| OpenAI | `text-embedding-3-small` | `OPENAI_API_KEY` |\n| Google | `models/embedding-001` | `GOOGLE_API_KEY` |\n| Ollama | `nomic-embed-text` | Local endpoint |\n| Azure | `text-embedding-3` | Azure OpenAI config |\n\n资料来源：[lib/crewai-tools/src/crewai_tools/tools/directory_search_tool/README.md]()\n\n## Best Practices\n\n1. **Scope Organization**: Use consistent naming conventions for scope paths to enable efficient cross-crew memory sharing\n2. **Importance Scoring**: Set appropriate importance values (0.0-1.0) to influence retrieval ranking\n3. **Privacy Handling**: Mark sensitive information with `private=True` to prevent unintended access\n4. **Memory Pruning**: Regularly reset short-term memory for clean session boundaries\n5. **Embedding Selection**: Choose embedding models appropriate for your content domain\n\n---\n\n---\n\n## Doramagic 踩坑日志\n\n项目：crewAIInc/crewAI\n\n摘要：发现 23 个潜在踩坑项，其中 4 个为 high/blocking；最高优先级：安装坑 - 来源证据：[FEATURE] Implement Process.consensual with a pluggable ConsensusEngine。\n\n## 1. 安装坑 · 来源证据：[FEATURE] Implement Process.consensual with a pluggable ConsensusEngine\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：[FEATURE] Implement Process.consensual with a pluggable ConsensusEngine\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_a7c38215ebb04a4fbc6e7c6d2fdb2469 | https://github.com/crewAIInc/crewAI/issues/5708 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 2. 运行坑 · 来源证据：[BUG] Wrong code in document\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个运行相关的待验证问题：[BUG] Wrong code in document\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_390380af45524e959d558b160597b38b | https://github.com/crewAIInc/crewAI/issues/5378 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 3. 运行坑 · 来源证据：[FEATURE] Enhance the document about @persisit\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个运行相关的待验证问题：[FEATURE] Enhance the document about @persisit\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_effef000d4cf47a892f17850aa033610 | https://github.com/crewAIInc/crewAI/issues/5372 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 4. 安全/权限坑 · 来源证据：[FEATURE] GuardrailProvider interface for pre-tool-call authorization\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：[FEATURE] GuardrailProvider interface for pre-tool-call authorization\n- 对用户的影响：可能阻塞安装或首次运行。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_858a1a8bead2456289d686ec0d2d802c | https://github.com/crewAIInc/crewAI/issues/4877 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 5. 身份坑 · 仓库名和安装名不一致\n\n- 严重度：medium\n- 证据强度：runtime_trace\n- 发现：仓库名 `crewai` 与安装入口 `skills` 不完全一致。\n- 对用户的影响：用户照着仓库名搜索包或照着包名找仓库时容易走错入口。\n- 建议检查：在 npm/PyPI/GitHub 上确认包名映射和官方 README 说明。\n- 复现命令：`npx skills`\n- 防护动作：页面必须同时展示 repo 名和真实安装入口，避免用户搜索错包。\n- 证据：identity.distribution | github_repo:710601088 | https://github.com/crewAIInc/crewAI | repo=crewai; install=skills\n\n## 6. 安装坑 · 来源证据：1.14.4\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：1.14.4\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_dcfa2a852812414a82683392c2888795 | https://github.com/crewAIInc/crewAI/releases/tag/1.14.4 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 7. 安装坑 · 来源证据：1.14.4a1\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：1.14.4a1\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_0de86b993ffa4d9298726daa189abf49 | https://github.com/crewAIInc/crewAI/releases/tag/1.14.4a1 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 8. 安装坑 · 来源证据：1.14.5a4\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：1.14.5a4\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_6db6cd94b6ef4bffa23da215458565b4 | https://github.com/crewAIInc/crewAI/releases/tag/1.14.5a4 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 9. 配置坑 · 来源证据：Scans the client database to extract existing policy details.\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Scans the client database to extract existing policy details.\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_8201c73155314e67801bd0b81ea9820d | https://github.com/crewAIInc/crewAI/issues/5760 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 10. 能力坑 · 能力判断依赖假设\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：README/documentation is current enough for a first validation pass.\n- 对用户的影响：假设不成立时，用户拿不到承诺的能力。\n- 建议检查：将假设转成下游验证清单。\n- 防护动作：假设必须转成验证项；没有验证结果前不能写成事实。\n- 证据：capability.assumptions | github_repo:710601088 | https://github.com/crewAIInc/crewAI | README/documentation is current enough for a first validation pass.\n\n## 11. 维护坑 · 来源证据：1.14.5a1\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个维护/版本相关的待验证问题：1.14.5a1\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_c4094bb55c234f1581b9879efd4994c6 | https://github.com/crewAIInc/crewAI/releases/tag/1.14.5a1 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 12. 维护坑 · 维护活跃度未知\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：未记录 last_activity_observed。\n- 对用户的影响：新项目、停更项目和活跃项目会被混在一起，推荐信任度下降。\n- 建议检查：补 GitHub 最近 commit、release、issue/PR 响应信号。\n- 防护动作：维护活跃度未知时，推荐强度不能标为高信任。\n- 证据：evidence.maintainer_signals | github_repo:710601088 | https://github.com/crewAIInc/crewAI | last_activity_observed missing\n\n## 13. 安全/权限坑 · 下游验证发现风险项\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：下游已经要求复核，不能在页面中弱化。\n- 建议检查：进入安全/权限治理复核队列。\n- 防护动作：下游风险存在时必须保持 review/recommendation 降级。\n- 证据：downstream_validation.risk_items | github_repo:710601088 | https://github.com/crewAIInc/crewAI | no_demo; severity=medium\n\n## 14. 安全/权限坑 · 存在评分风险\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：风险会影响是否适合普通用户安装。\n- 建议检查：把风险写入边界卡，并确认是否需要人工复核。\n- 防护动作：评分风险必须进入边界卡，不能只作为内部分数。\n- 证据：risks.scoring_risks | github_repo:710601088 | https://github.com/crewAIInc/crewAI | no_demo; severity=medium\n\n## 15. 安全/权限坑 · 来源证据：1.14.3\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：1.14.3\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_ff4d292bd8984a039527502ef51aed98 | https://github.com/crewAIInc/crewAI/releases/tag/1.14.3 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 16. 安全/权限坑 · 来源证据：1.14.5a2\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：1.14.5a2\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_0e5616e4bf1f47f59e10e83c1849c86a | https://github.com/crewAIInc/crewAI/releases/tag/1.14.5a2 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 17. 安全/权限坑 · 来源证据：1.14.5a3\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：1.14.5a3\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_ba25d089d674407d83a29ec4caff6284 | https://github.com/crewAIInc/crewAI/releases/tag/1.14.5a3 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 18. 安全/权限坑 · 来源证据：Question: integration path for Agent Threat Rules detection in crewai/security\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Question: integration path for Agent Threat Rules detection in crewai/security\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_05e39d8c109f4ed0a2974d448468229f | https://github.com/crewAIInc/crewAI/issues/5763 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 19. 安全/权限坑 · 来源证据：Security: OWASP Agent Memory Guard – protect CrewAI agents from memory poisoning\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Security: OWASP Agent Memory Guard – protect CrewAI agents from memory poisoning\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_028fe9ebbcc943f5a7134e08d0ed9450 | https://github.com/crewAIInc/crewAI/issues/5762 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 20. 安全/权限坑 · 来源证据：Security: Request to enable Private Vulnerability Reporting / coordinate channel\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Security: Request to enable Private Vulnerability Reporting / coordinate channel\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_e6b9a787eb544f098525817b61476c11 | https://github.com/crewAIInc/crewAI/issues/5728 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 21. 安全/权限坑 · 来源证据：[FEATURE] Tool to add input_files\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：[FEATURE] Tool to add input_files\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_5ca4885df9ee49459ce8502e94d11f50 | https://github.com/crewAIInc/crewAI/issues/5758 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 22. 维护坑 · issue/PR 响应质量未知\n\n- 严重度：low\n- 证据强度：source_linked\n- 发现：issue_or_pr_quality=unknown。\n- 对用户的影响：用户无法判断遇到问题后是否有人维护。\n- 建议检查：抽样最近 issue/PR，判断是否长期无人处理。\n- 防护动作：issue/PR 响应未知时，必须提示维护风险。\n- 证据：evidence.maintainer_signals | github_repo:710601088 | https://github.com/crewAIInc/crewAI | issue_or_pr_quality=unknown\n\n## 23. 维护坑 · 发布节奏不明确\n\n- 严重度：low\n- 证据强度：source_linked\n- 发现：release_recency=unknown。\n- 对用户的影响：安装命令和文档可能落后于代码，用户踩坑概率升高。\n- 建议检查：确认最近 release/tag 和 README 安装命令是否一致。\n- 防护动作：发布节奏未知或过期时，安装说明必须标注可能漂移。\n- 证据：evidence.maintainer_signals | github_repo:710601088 | https://github.com/crewAIInc/crewAI | release_recency=unknown\n\n<!-- canonical_name: crewAIInc/crewAI; human_manual_source: deepwiki_human_wiki -->\n",
      "markdown_key": "crewai",
      "pages": "draft",
      "source_refs": [
        {
          "evidence_id": "github_repo:710601088",
          "kind": "repo",
          "supports_claim_ids": [
            "claim_identity",
            "claim_distribution",
            "claim_capability"
          ],
          "url": "https://github.com/crewAIInc/crewAI"
        },
        {
          "evidence_id": "art_54a9d78a76654ece9449751eb989967e",
          "kind": "docs",
          "supports_claim_ids": [
            "claim_identity",
            "claim_distribution",
            "claim_capability"
          ],
          "url": "https://github.com/crewAIInc/crewAI#readme"
        }
      ],
      "summary": "DeepWiki/Human Wiki 完整输出，末尾追加 Discovery Agent 踩坑日志。",
      "title": "crewAI 说明书",
      "toc": [
        "https://github.com/crewAIInc/crewAI 项目说明书",
        "目录",
        "Installation and Setup",
        "Overview",
        "System Requirements",
        "Installation Methods",
        "Project Structure",
        "Dependencies Management",
        "Doramagic 踩坑日志"
      ]
    }
  },
  "quality_gate": {
    "blocking_gaps": [],
    "category_confidence": "medium",
    "compile_status": "ready_for_review",
    "five_assets_present": true,
    "install_sandbox_verified": true,
    "missing_evidence": [],
    "next_action": "publish to Doramagic.ai project surfaces",
    "prompt_preview_boundary_ok": true,
    "publish_status": "publishable",
    "quick_start_verified": true,
    "repo_clone_verified": true,
    "repo_commit": "a95d26763f4766b1a4f7c19c039133d1202dbdaa",
    "repo_inspection_error": null,
    "repo_inspection_files": [
      "pyproject.toml",
      "README.md",
      "uv.lock",
      "docs/enterprise-api.en.yaml",
      "docs/reo-tracking.js",
      "docs/enterprise-api.pt-BR.yaml",
      "docs/enterprise-api.base.yaml",
      "docs/index.mdx",
      "docs/common-room-tracking.js",
      "docs/docs.json",
      "docs/enterprise-api.ko.yaml",
      "docs/pt-BR/telemetry.mdx",
      "docs/pt-BR/index.mdx",
      "docs/pt-BR/installation.mdx",
      "docs/pt-BR/quickstart.mdx",
      "docs/pt-BR/changelog.mdx",
      "docs/pt-BR/introduction.mdx",
      "docs/pt-BR/skills.mdx",
      "docs/ar/telemetry.mdx",
      "docs/ar/index.mdx",
      "docs/ar/installation.mdx",
      "docs/ar/quickstart.mdx",
      "docs/ar/changelog.mdx",
      "docs/ar/introduction.mdx",
      "docs/ar/skills.mdx",
      "docs/en/telemetry.mdx",
      "docs/en/index.mdx",
      "docs/en/installation.mdx",
      "docs/en/quickstart.mdx",
      "docs/en/changelog.mdx",
      "docs/en/introduction.mdx",
      "docs/en/skills.mdx",
      "docs/ko/telemetry.mdx",
      "docs/ko/index.mdx",
      "docs/ko/installation.mdx",
      "docs/ko/quickstart.mdx",
      "docs/ko/changelog.mdx",
      "docs/ko/introduction.mdx",
      "docs/ko/skills.mdx",
      "docs/pt-BR/mcp/sse.mdx"
    ],
    "repo_inspection_verified": true,
    "review_reasons": [],
    "tag_count_ok": true,
    "unsupported_claims": []
  },
  "schema_version": "0.1",
  "user_assets": {
    "ai_context_pack": {
      "asset_id": "ai_context_pack",
      "filename": "AI_CONTEXT_PACK.md",
      "markdown": "# crewai - Doramagic AI Context Pack\n\n> 定位：安装前体验与判断资产。它帮助宿主 AI 有一个好的开始，但不代表已经安装、执行或验证目标项目。\n\n## 充分原则\n\n- **充分原则，不是压缩原则**：AI Context Pack 应该充分到让宿主 AI 在开工前理解项目价值、能力边界、使用入口、风险和证据来源；它可以分层组织，但不以最短摘要为目标。\n- **压缩策略**：只压缩噪声和重复内容，不压缩会影响判断和开工质量的上下文。\n\n## 给宿主 AI 的使用方式\n\n你正在读取 Doramagic 为 crewai 编译的 AI Context Pack。请把它当作开工前上下文：帮助用户理解适合谁、能做什么、如何开始、哪些必须安装后验证、风险在哪里。不要声称你已经安装、运行或执行了目标项目。\n\n## Claim 消费规则\n\n- **事实来源**：Repo Evidence + Claim/Evidence Graph；Human Wiki 只提供显著性、术语和叙事结构。\n- **事实最低状态**：`supported`\n- `supported`：可以作为项目事实使用，但回答中必须引用 claim_id 和证据路径。\n- `weak`：只能作为低置信度线索，必须要求用户继续核实。\n- `inferred`：只能用于风险提示或待确认问题，不能包装成项目事实。\n- `unverified`：不得作为事实使用，应明确说证据不足。\n- `contradicted`：必须展示冲突来源，不得替用户强行选择一个版本。\n\n## 它最适合谁\n\n- **正在使用 Claude/Codex/Cursor/Gemini 等宿主 AI 的开发者**：README 或插件配置提到多个宿主 AI。 证据：`README.md` Claim：`clm_0003` supported 0.86\n- **希望把专业流程带进宿主 AI 的用户**：仓库包含 Skill 文档。 证据：`lib/crewai/tests/skills/fixtures/invalid-name/SKILL.md`, `lib/crewai/tests/skills/fixtures/minimal-skill/SKILL.md`, `lib/crewai/tests/skills/fixtures/valid-skill/SKILL.md` Claim：`clm_0004` supported 0.86\n\n## 它能做什么\n\n- **AI Skill / Agent 指令资产库**（可做安装前预览）：项目包含可被宿主 AI 读取的 Skill 或 Agent 指令文件，可用于把专业流程带入 Claude、Codex、Cursor 等宿主。 证据：`lib/crewai/tests/skills/fixtures/invalid-name/SKILL.md`, `lib/crewai/tests/skills/fixtures/minimal-skill/SKILL.md`, `lib/crewai/tests/skills/fixtures/valid-skill/SKILL.md` Claim：`clm_0001` supported 0.86\n- **命令行启动或安装流程**（需要安装后验证）：项目文档中存在可执行命令，真实使用需要在本地或宿主环境中运行这些命令。 证据：`README.md` Claim：`clm_0002` supported 0.86\n\n## 怎么开始\n\n- `/plugin marketplace add crewAIInc/skills` 证据：`README.md` Claim：`clm_0005` supported 0.86\n- `/plugin install crewai-skills@crewai-plugins` 证据：`README.md` Claim：`clm_0006` supported 0.86\n- `npx skills add crewaiinc/skills` 证据：`README.md` Claim：`clm_0007` supported 0.86\n\n## 继续前判断卡\n\n- **当前建议**：仅建议沙盒试装\n- **为什么**：项目存在安装命令、宿主配置或本地写入线索，不建议直接进入主力环境，应先在隔离环境试装。\n\n### 30 秒判断\n\n- **现在怎么做**：仅建议沙盒试装\n- **最小安全下一步**：先跑 Prompt Preview；若仍要安装，只在隔离环境试装\n- **先别相信**：真实输出质量不能在安装前相信。\n- **继续会触碰**：命令执行、宿主 AI 配置、本地环境或项目文件\n\n### 现在可以相信\n\n- **适合人群线索：正在使用 Claude/Codex/Cursor/Gemini 等宿主 AI 的开发者**（supported）：有 supported claim 或项目证据支撑，但仍不等于真实安装效果。 证据：`README.md` Claim：`clm_0003` supported 0.86\n- **适合人群线索：希望把专业流程带进宿主 AI 的用户**（supported）：有 supported claim 或项目证据支撑，但仍不等于真实安装效果。 证据：`lib/crewai/tests/skills/fixtures/invalid-name/SKILL.md`, `lib/crewai/tests/skills/fixtures/minimal-skill/SKILL.md`, `lib/crewai/tests/skills/fixtures/valid-skill/SKILL.md` Claim：`clm_0004` supported 0.86\n- **能力存在：AI Skill / Agent 指令资产库**（supported）：可以相信项目包含这类能力线索；是否适合你的具体任务仍要试用或安装后验证。 证据：`lib/crewai/tests/skills/fixtures/invalid-name/SKILL.md`, `lib/crewai/tests/skills/fixtures/minimal-skill/SKILL.md`, `lib/crewai/tests/skills/fixtures/valid-skill/SKILL.md` Claim：`clm_0001` supported 0.86\n- **能力存在：命令行启动或安装流程**（supported）：可以相信项目包含这类能力线索；是否适合你的具体任务仍要试用或安装后验证。 证据：`README.md` Claim：`clm_0002` supported 0.86\n- **存在 Quick Start / 安装命令线索**（supported）：可以相信项目文档出现过启动或安装入口；不要因此直接在主力环境运行。 证据：`README.md` Claim：`clm_0005` supported 0.86\n\n### 现在还不能相信\n\n- **真实输出质量不能在安装前相信。**（unverified）：Prompt Preview 只能展示引导方式，不能证明真实项目中的结果质量。\n- **宿主 AI 版本兼容性不能在安装前相信。**（unverified）：Claude、Cursor、Codex、Gemini 等宿主加载规则和版本差异必须在真实环境验证。\n- **不会污染现有宿主 AI 行为，不能直接相信。**（inferred）：Skill、plugin、AGENTS/CLAUDE/GEMINI 指令可能改变宿主 AI 的默认行为。 证据：`lib/crewai/tests/skills/fixtures/invalid-name/SKILL.md`, `lib/crewai/tests/skills/fixtures/minimal-skill/SKILL.md`, `lib/crewai/tests/skills/fixtures/valid-skill/SKILL.md`\n- **可安全回滚不能默认相信。**（unverified）：除非项目明确提供卸载和恢复说明，否则必须先在隔离环境验证。\n- **真实安装后是否与用户当前宿主 AI 版本兼容？**（unverified）：兼容性只能通过实际宿主环境验证。\n- **项目输出质量是否满足用户具体任务？**（unverified）：安装前预览只能展示流程和边界，不能替代真实评测。\n- **安装命令是否需要网络、权限或全局写入？**（unverified）：这影响企业环境和个人环境的安装风险。 证据：`README.md`\n\n### 继续会触碰什么\n\n- **命令执行**：包管理器、网络下载、本地插件目录、项目配置或用户主目录。 原因：运行第一条命令就可能产生环境改动；必须先判断是否值得跑。 证据：`README.md`\n- **宿主 AI 配置**：Claude/Codex/Cursor/Gemini/OpenCode 等宿主的 plugin、Skill 或规则加载配置。 原因：宿主配置会改变 AI 后续工作方式，可能和用户已有规则冲突。 证据：`lib/crewai/tests/skills/fixtures/invalid-name/SKILL.md`, `lib/crewai/tests/skills/fixtures/minimal-skill/SKILL.md`, `lib/crewai/tests/skills/fixtures/valid-skill/SKILL.md`\n- **本地环境或项目文件**：安装结果、插件缓存、项目配置或本地依赖目录。 原因：安装前无法证明写入范围和回滚方式，需要隔离验证。 证据：`README.md`\n- **宿主 AI 上下文**：AI Context Pack、Prompt Preview、Skill 路由、风险规则和项目事实。 原因：导入上下文会影响宿主 AI 后续判断，必须避免把未验证项包装成事实。\n\n### 最小安全下一步\n\n- **先跑 Prompt Preview**：用安装前交互式试用判断工作方式是否匹配，不需要授权或改环境。（适用：任何项目都适用，尤其是输出质量未知时。）\n- **只在隔离目录或测试账号试装**：避免安装命令污染主力宿主 AI、真实项目或用户主目录。（适用：存在命令执行、插件配置或本地写入线索时。）\n- **先备份宿主 AI 配置**：Skill、plugin、规则文件可能改变 Claude/Cursor/Codex 的默认行为。（适用：存在插件 manifest、Skill 或宿主规则入口时。）\n- **安装后只验证一个最小任务**：先验证加载、兼容、输出质量和回滚，再决定是否深用。（适用：准备从试用进入真实工作流时。）\n\n### 退出方式\n\n- **保留安装前状态**：记录原始宿主配置和项目状态，后续才能判断是否可恢复。\n- **准备移除宿主 plugin / Skill / 规则入口**：如果试装后行为异常，可以把宿主 AI 恢复到试装前状态。\n- **记录安装命令和写入路径**：没有明确卸载说明时，至少要知道哪些目录或配置需要手动清理。\n- **如果没有回滚路径，不进入主力环境**：不可回滚是继续前阻断项，不应靠信任或运气继续。\n\n## 哪些只能预览\n\n- 解释项目适合谁和能做什么\n- 基于项目文档演示典型对话流程\n- 帮助用户判断是否值得安装或继续研究\n\n## 哪些必须安装后验证\n\n- 真实安装 Skill、插件或 CLI\n- 执行脚本、修改本地文件或访问外部服务\n- 验证真实输出质量、性能和兼容性\n\n## 边界与风险判断卡\n\n- **把安装前预览误认为真实运行**：用户可能高估项目已经完成的配置、权限和兼容性验证。 处理方式：明确区分 prompt_preview_can_do 与 runtime_required。 Claim：`clm_0008` inferred 0.45\n- **命令执行会修改本地环境**：安装命令可能写入用户主目录、宿主插件目录或项目配置。 处理方式：先在隔离环境或测试账号中运行。 证据：`README.md` Claim：`clm_0009` supported 0.86\n- **待确认**：真实安装后是否与用户当前宿主 AI 版本兼容？。原因：兼容性只能通过实际宿主环境验证。\n- **待确认**：项目输出质量是否满足用户具体任务？。原因：安装前预览只能展示流程和边界，不能替代真实评测。\n- **待确认**：安装命令是否需要网络、权限或全局写入？。原因：这影响企业环境和个人环境的安装风险。\n\n## 开工前工作上下文\n\n### 加载顺序\n\n- 先读取 how_to_use.host_ai_instruction，建立安装前判断资产的边界。\n- 读取 claim_graph_summary，确认事实来自 Claim/Evidence Graph，而不是 Human Wiki 叙事。\n- 再读取 intended_users、capabilities 和 quick_start_candidates，判断用户是否匹配。\n- 需要执行具体任务时，优先查 role_skill_index，再查 evidence_index。\n- 遇到真实安装、文件修改、网络访问、性能或兼容性问题时，转入 risk_card 和 boundaries.runtime_required。\n\n### 任务路由\n\n- **AI Skill / Agent 指令资产库**：先基于 role_skill_index / evidence_index 帮用户挑选可用角色、Skill 或工作流。 边界：可做安装前 Prompt 体验。 证据：`lib/crewai/tests/skills/fixtures/invalid-name/SKILL.md`, `lib/crewai/tests/skills/fixtures/minimal-skill/SKILL.md`, `lib/crewai/tests/skills/fixtures/valid-skill/SKILL.md` Claim：`clm_0001` supported 0.86\n- **命令行启动或安装流程**：先说明这是安装后验证能力，再给出安装前检查清单。 边界：必须真实安装或运行后验证。 证据：`README.md` Claim：`clm_0002` supported 0.86\n\n### 上下文规模\n\n- 文件总数：2954\n- 重要文件覆盖：40/2954\n- 证据索引条目：83\n- 角色 / Skill 条目：3\n\n### 证据不足时的处理\n\n- **missing_evidence**：说明证据不足，要求用户提供目标文件、README 段落或安装后验证记录；不要补全事实。\n- **out_of_scope_request**：说明该任务超出当前 AI Context Pack 证据范围，并建议用户先查看 Human Manual 或真实安装后验证。\n- **runtime_request**：给出安装前检查清单和命令来源，但不要替用户执行命令或声称已执行。\n- **source_conflict**：同时展示冲突来源，标记为待核实，不要强行选择一个版本。\n\n## Prompt Recipes\n\n### 适配判断\n\n- 目标：判断这个项目是否适合用户当前任务。\n- 预期输出：适配结论、关键理由、证据引用、安装前可预览内容、必须安装后验证内容、下一步建议。\n\n```text\n请基于 crewai 的 AI Context Pack，先问我 3 个必要问题，然后判断它是否适合我的任务。回答必须包含：适合谁、能做什么、不能做什么、是否值得安装、证据来自哪里。所有项目事实必须引用 evidence_refs、source_paths 或 claim_id。\n```\n\n### 安装前体验\n\n- 目标：让用户在安装前感受核心工作流，同时避免把预览包装成真实能力或营销承诺。\n- 预期输出：一段带边界标签的体验剧本、安装后验证清单和谨慎建议；不含真实运行承诺或强营销表述。\n\n```text\n请把 crewai 当作安装前体验资产，而不是已安装工具或真实运行环境。\n\n请严格输出四段：\n1. 先问我 3 个必要问题。\n2. 给出一段“体验剧本”：用 [安装前可预览]、[必须安装后验证]、[证据不足] 三种标签展示它可能如何引导工作流。\n3. 给出安装后验证清单：列出哪些能力只有真实安装、真实宿主加载、真实项目运行后才能确认。\n4. 给出谨慎建议：只能说“值得继续研究/试装”“先补充信息后再判断”或“不建议继续”，不得替项目背书。\n\n硬性边界：\n- 不要声称已经安装、运行、执行测试、修改文件或产生真实结果。\n- 不要写“自动适配”“确保通过”“完美适配”“强烈建议安装”等承诺性表达。\n- 如果描述安装后的工作方式，必须使用“如果安装成功且宿主正确加载 Skill，它可能会……”这种条件句。\n- 体验剧本只能写成“示例台词/假设流程”：使用“可能会询问/可能会建议/可能会展示”，不要写“已写入、已生成、已通过、正在运行、正在生成”。\n- Prompt Preview 不负责给安装命令；如用户准备试装，只能提示先阅读 Quick Start 和 Risk Card，并在隔离环境验证。\n- 所有项目事实必须来自 supported claim、evidence_refs 或 source_paths；inferred/unverified 只能作风险或待确认项。\n\n```\n\n### 角色 / Skill 选择\n\n- 目标：从项目里的角色或 Skill 中挑选最匹配的资产。\n- 预期输出：候选角色或 Skill 列表，每项包含适用场景、证据路径、风险边界和是否需要安装后验证。\n\n```text\n请读取 role_skill_index，根据我的目标任务推荐 3-5 个最相关的角色或 Skill。每个推荐都要说明适用场景、可能输出、风险边界和 evidence_refs。\n```\n\n### 风险预检\n\n- 目标：安装或引入前识别环境、权限、规则冲突和质量风险。\n- 预期输出：环境、权限、依赖、许可、宿主冲突、质量风险和未知项的检查清单。\n\n```text\n请基于 risk_card、boundaries 和 quick_start_candidates，给我一份安装前风险预检清单。不要替我执行命令，只说明我应该检查什么、为什么检查、失败会有什么影响。\n```\n\n### 宿主 AI 开工指令\n\n- 目标：把项目上下文转成一次对话开始前的宿主 AI 指令。\n- 预期输出：一段边界明确、证据引用明确、适合复制给宿主 AI 的开工前指令。\n\n```text\n请基于 crewai 的 AI Context Pack，生成一段我可以粘贴给宿主 AI 的开工前指令。这段指令必须遵守 not_runtime=true，不能声称项目已经安装、运行或产生真实结果。\n```\n\n\n## 角色 / Skill 索引\n\n- 共索引 3 个角色 / Skill / 项目文档条目。\n\n- **Invalid--Name**（skill）：This skill has an invalid name. 激活提示：当用户任务与“Invalid--Name”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`lib/crewai/tests/skills/fixtures/invalid-name/SKILL.md`\n- **minimal-skill**（skill）：A minimal skill with only required fields. 激活提示：当用户任务与“minimal-skill”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`lib/crewai/tests/skills/fixtures/minimal-skill/SKILL.md`\n- **valid-skill**（skill）：A complete test skill with all optional directories. 激活提示：当用户任务与“valid-skill”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`lib/crewai/tests/skills/fixtures/valid-skill/SKILL.md`\n\n## 证据索引\n\n- 共索引 83 条证据。\n\n- **Fast and Flexible Multi-Agent Automation Framework**（documentation）：Homepage · Docs · Start Cloud Trial · Blog · Forum 证据：`README.md`\n- **crewai-cli**（documentation）：CLI for CrewAI — scaffold, run, deploy and manage AI agent crews without installing the full framework. 证据：`lib/cli/README.md`\n- **AGENTS.md — CrewAI Reference for AI Coding Assistants**（documentation）：AGENTS.md — CrewAI Reference for AI Coding Assistants 证据：`lib/cli/src/crewai_cli/templates/AGENTS.md`\n- **{{crew name}} Crew**（documentation）：Welcome to the {{crew name}} Crew project, powered by crewAI https://crewai.com . This template is designed to help you set up a multi-agent AI system with ease, leveraging the powerful and flexible framework provided by crewAI. Our goal is to enable your agents to collaborate effectively on complex tasks, maximizing their collective intelligence and capabilities. 证据：`lib/cli/src/crewai_cli/templates/crew/README.md`\n- **{{crew name}} Crew**（documentation）：Welcome to the {{crew name}} Crew project, powered by crewAI https://crewai.com . This template is designed to help you set up a multi-agent AI system with ease, leveraging the powerful and flexible framework provided by crewAI. Our goal is to enable your agents to collaborate effectively on complex tasks, maximizing their collective intelligence and capabilities. 证据：`lib/cli/src/crewai_cli/templates/flow/README.md`\n- **{{folder name}}**（documentation）：{{folder name}} is a CrewAI Tool. This template is designed to help you create custom tools to power up your crews. 证据：`lib/cli/src/crewai_cli/templates/tool/README.md`\n- **crewai-core**（documentation）：Shared utilities used by both crewai and crewai-cli : version lookup, storage paths, user-data helpers, telemetry, and the printer. 证据：`lib/crewai-core/README.md`\n- **crewai-files**（documentation）：File handling utilities for CrewAI multimodal inputs. 证据：`lib/crewai-files/README.md`\n- **CrewAI Tools**（documentation）：! Logo of crewAI, two people rowing on a boat ./assets/crewai logo.png 证据：`lib/crewai-tools/README.md`\n- **BedrockInvokeAgentTool**（documentation）：The BedrockInvokeAgentTool enables CrewAI agents to invoke Amazon Bedrock Agents and leverage their capabilities within your workflows. 证据：`lib/crewai-tools/src/crewai_tools/aws/bedrock/agents/README.md`\n- **AWS Bedrock Browser Tools**（documentation）：This toolkit provides a set of tools for interacting with web browsers through AWS Bedrock Browser. It enables your CrewAI agents to navigate websites, extract content, click elements, and more. 证据：`lib/crewai-tools/src/crewai_tools/aws/bedrock/browser/README.md`\n- **AWS Bedrock Code Interpreter Tools**（documentation）：This toolkit provides a set of tools for interacting with the AWS Bedrock Code Interpreter environment. It enables your CrewAI agents to execute code, run shell commands, manage files, and perform computational tasks in a secure, isolated environment. 证据：`lib/crewai-tools/src/crewai_tools/aws/bedrock/code_interpreter/README.md`\n- **BedrockKBRetrieverTool**（documentation）：The BedrockKBRetrieverTool enables CrewAI agents to retrieve information from Amazon Bedrock Knowledge Bases using natural language queries. 证据：`lib/crewai-tools/src/crewai_tools/aws/bedrock/knowledge_base/README.md`\n- **AWS S3 Tools**（documentation）：These tools provide a way to interact with Amazon S3, a cloud storage service. 证据：`lib/crewai-tools/src/crewai_tools/aws/s3/README.md`\n- **AIMind Tool**（documentation）：Minds https://mindsdb.com/minds are AI systems provided by MindsDB https://mindsdb.com/ that work similarly to large language models LLMs but go beyond by answering any question from any data. 证据：`lib/crewai-tools/src/crewai_tools/tools/ai_mind_tool/README.md`\n- **ApifyActorsTool**（documentation）：Integrate Apify Actors https://apify.com/actors into your CrewAI workflows. 证据：`lib/crewai-tools/src/crewai_tools/tools/apify_actors_tool/README.md`\n- **ArxivPaperTool**（documentation）：The ArxivPaperTool is a utility for fetching metadata and optionally downloading PDFs of academic papers from the arXiv https://arxiv.org platform using its public API. It supports configurable queries, batch retrieval, PDF downloading, and clean formatting for summaries and metadata. This tool is particularly useful for researchers, students, academic agents, and AI tools performing automated literature reviews. 证据：`lib/crewai-tools/src/crewai_tools/tools/arxiv_paper_tool/README.md`\n- **BraveSearchTool Documentation**（documentation）：Description This tool is designed to perform a web search for a specified query from a text's content across the internet. It utilizes the Brave Web Search API, which is a REST API to query Brave Search and get back search results from the web. The following sections describe how to curate requests, including parameters and headers, to Brave Web Search API and get a JSON response back. 证据：`lib/crewai-tools/src/crewai_tools/tools/brave_search_tool/README.md`\n- **BrightData Tools Documentation**（documentation）：A comprehensive suite of CrewAI tools that leverage Bright Data's powerful infrastructure for web scraping, data extraction, and search operations. These tools provide three distinct capabilities: 证据：`lib/crewai-tools/src/crewai_tools/tools/brightdata_tool/README.md`\n- **BrowserbaseLoadTool**（documentation）：Browserbase https://browserbase.com is a developer platform to reliably run, manage, and monitor headless browsers. 证据：`lib/crewai-tools/src/crewai_tools/tools/browserbase_load_tool/README.md`\n- **CodeDocsSearchTool**（documentation）：Description The CodeDocsSearchTool is a powerful RAG Retrieval-Augmented Generation tool designed for semantic searches within code documentation. It enables users to efficiently find specific information or topics within code documentation. By providing a docs url during initialization, the tool narrows down the search to that particular documentation site. Alternatively, without a specific docs url , it searches across a wide array of code documentation known or discovered throughout its execution, making it versatile for various documentation search needs. 证据：`lib/crewai-tools/src/crewai_tools/tools/code_docs_search_tool/README.md`\n- **ComposioTool Documentation**（documentation）：This tools is a wrapper around the composio toolset and gives your agent access to a wide variety of tools from the composio SDK. 证据：`lib/crewai-tools/src/crewai_tools/tools/composio_tool/README.md`\n- **ContextualAICreateAgentTool**（documentation）：Description This tool is designed to integrate Contextual AI's enterprise-grade RAG agents with CrewAI. This tool enables you to create a new Contextual RAG agent. It uploads your documents to create a datastore and returns the Contextual agent ID and datastore ID. 证据：`lib/crewai-tools/src/crewai_tools/tools/contextualai_create_agent_tool/README.md`\n- **ContextualAIParseTool**（documentation）：Description This tool is designed to integrate Contextual AI's enterprise-grade document parsing capabilities with CrewAI, enabling you to leverage advanced AI-powered document understanding for complex layouts, tables, and figures. Use this tool to extract structured content from your documents using Contextual AI's powerful document parser. 证据：`lib/crewai-tools/src/crewai_tools/tools/contextualai_parse_tool/README.md`\n- **ContextualAIQueryTool**（documentation）：Description This tool is designed to integrate Contextual AI's enterprise-grade RAG agents with CrewAI. Run this tool to query existing Contextual AI RAG agents that have been pre-configured with documents and knowledge bases. 证据：`lib/crewai-tools/src/crewai_tools/tools/contextualai_query_tool/README.md`\n- **ContextualAIRerankTool**（documentation）：Description This tool is designed to integrate Contextual AI's enterprise-grade instruction-following reranker with CrewAI, enabling you to intelligently reorder documents based on relevance and custom criteria. Use this tool to enhance search result quality and document retrieval for RAG systems using Contextual AI's reranking models that understand context and follow specific instructions for optimal document ordering. 证据：`lib/crewai-tools/src/crewai_tools/tools/contextualai_rerank_tool/README.md`\n- **CouchbaseFTSVectorSearchTool**（documentation）：CouchbaseFTSVectorSearchTool Description Couchbase is a NoSQL database with vector search capabilities. Users can store and query vector embeddings. You can learn more about Couchbase vector search here: https://docs.couchbase.com/cloud/vector-search/vector-search.html 证据：`lib/crewai-tools/src/crewai_tools/tools/couchbase_tool/README.md`\n- **CSVSearchTool**（documentation）：This tool is used to perform a RAG Retrieval-Augmented Generation search within a CSV file's content. It allows users to semantically search for queries in the content of a specified CSV file. This feature is particularly useful for extracting information from large CSV datasets where traditional search methods might be inefficient. All tools with \"Search\" in their name, including CSVSearchTool, are RAG tools designed for searching different sources of data. 证据：`lib/crewai-tools/src/crewai_tools/tools/csv_search_tool/README.md`\n- **DALL-E Tool**（documentation）：Description This tool is used to give the Agent the ability to generate images using the DALL-E model. It is a transformer-based model that generates images from textual descriptions. This tool allows the Agent to generate images based on the text input provided by the user. 证据：`lib/crewai-tools/src/crewai_tools/tools/dalle_tool/README.MD`\n- **Databricks Query Tool**（documentation）：This tool allows AI agents to execute SQL queries against Databricks workspace tables and retrieve the results. It provides a simple interface for querying data from Databricks tables using SQL, making it easy for agents to access and analyze data stored in Databricks. 证据：`lib/crewai-tools/src/crewai_tools/tools/databricks_query_tool/README.md`\n- **Daytona Sandbox Tools**（documentation）：Run shell commands, execute Python, and manage files inside a Daytona https://www.daytona.io/ sandbox. Daytona provides isolated, ephemeral compute environments suitable for agent-driven code execution. 证据：`lib/crewai-tools/src/crewai_tools/tools/daytona_sandbox_tool/README.md`\n- **DirectoryReadTool**（documentation）：Description The DirectoryReadTool is a highly efficient utility designed for the comprehensive listing of directory contents. It recursively navigates through the specified directory, providing users with a detailed enumeration of all files, including those nested within subdirectories. This tool is indispensable for tasks requiring a thorough inventory of directory structures or for validating the organization of files within directories. 证据：`lib/crewai-tools/src/crewai_tools/tools/directory_read_tool/README.md`\n- **DirectorySearchTool**（documentation）：Description This tool is designed to perform a semantic search for queries within the content of a specified directory. Utilizing the RAG Retrieval-Augmented Generation methodology, it offers a powerful means to semantically navigate through the files of a given directory. The tool can be dynamically set to search any directory specified at runtime or can be pre-configured to search within a specific directory upon initialization. 证据：`lib/crewai-tools/src/crewai_tools/tools/directory_search_tool/README.md`\n- **DOCXSearchTool**（documentation）：Description The DOCXSearchTool is a RAG tool designed for semantic searching within DOCX documents. It enables users to effectively search and extract relevant information from DOCX files using query-based searches. This tool is invaluable for data analysis, information management, and research tasks, streamlining the process of finding specific information within large document collections. 证据：`lib/crewai-tools/src/crewai_tools/tools/docx_search_tool/README.md`\n- **E2B Sandbox Tools**（documentation）：Run shell commands, execute Python, and manage files inside an E2B https://e2b.dev/ sandbox. E2B provides isolated, ephemeral VMs suitable for agent-driven code execution, with a Jupyter-style code interpreter for rich Python results. 证据：`lib/crewai-tools/src/crewai_tools/tools/e2b_sandbox_tool/README.md`\n- **ExaSearchTool Documentation**（documentation）：Description This tool lets CrewAI agents search the web using Exa https://exa.ai/ , the fastest and most accurate web search API. By default the tool returns token-efficient highlights of the most relevant results for any query; you can also opt in to full page content. 证据：`lib/crewai-tools/src/crewai_tools/tools/exa_tools/README.md`\n- **FileReadTool**（documentation）：The FileReadTool is a versatile component of the crewai tools package, designed to streamline the process of reading and retrieving content from files. It is particularly useful in scenarios such as batch text file processing, runtime configuration file reading, and data importation for analytics. This tool supports various text-based file formats including .txt , .csv , .json , and adapts its functionality based on the file type, for instance, converting JSON content into a Python dictionary for easy use. 证据：`lib/crewai-tools/src/crewai_tools/tools/file_read_tool/README.md`\n- **FileWriterTool Documentation**（documentation）：Here's the rewritten README for the FileWriterTool : 证据：`lib/crewai-tools/src/crewai_tools/tools/file_writer_tool/README.md`\n- **📦 FileCompressorTool**（documentation）：The FileCompressorTool is a utility for compressing individual files or entire directories including nested subdirectories into different archive formats, such as .zip or .tar including .tar.gz , .tar.bz2 , and .tar.xz . This tool is useful for archiving logs, documents, datasets, or backups in a compact format, and ensures flexibility in how the archives are created. 证据：`lib/crewai-tools/src/crewai_tools/tools/files_compressor_tool/README.md`\n- **FirecrawlCrawlWebsiteTool**（documentation）：Firecrawl https://firecrawl.dev is a platform for crawling and convert any website into clean markdown or structured data. 证据：`lib/crewai-tools/src/crewai_tools/tools/firecrawl_crawl_website_tool/README.md`\n- **FirecrawlScrapeWebsiteTool**（documentation）：Firecrawl https://firecrawl.dev is a platform for crawling and convert any website into clean markdown or structured data. 证据：`lib/crewai-tools/src/crewai_tools/tools/firecrawl_scrape_website_tool/README.md`\n- **FirecrawlSearchTool**（documentation）：Firecrawl https://firecrawl.dev is a platform for crawling and convert any website into clean markdown or structured data. 证据：`lib/crewai-tools/src/crewai_tools/tools/firecrawl_search_tool/README.md`\n- **GenerateCrewaiAutomationTool**（documentation）：The GenerateCrewaiAutomationTool integrates with CrewAI Studio API to generate complete CrewAI automations from natural language descriptions. It translates high-level requirements into functional CrewAI implementations and returns direct links to Studio projects. 证据：`lib/crewai-tools/src/crewai_tools/tools/generate_crewai_automation_tool/README.md`\n- **GithubSearchTool**（documentation）：Description The GithubSearchTool is a Retrieval Augmented Generation RAG tool specifically designed for conducting semantic searches within GitHub repositories. Utilizing advanced semantic search capabilities, it sifts through code, pull requests, issues, and repositories, making it an essential tool for developers, researchers, or anyone in need of precise information from GitHub. 证据：`lib/crewai-tools/src/crewai_tools/tools/github_search_tool/README.md`\n- **HyperbrowserLoadTool**（documentation）：Hyperbrowser https://hyperbrowser.ai is a platform for running and scaling headless browsers. It lets you launch and manage browser sessions at scale and provides easy to use solutions for any webscraping needs, such as scraping a single page or crawling an entire site. 证据：`lib/crewai-tools/src/crewai_tools/tools/hyperbrowser_load_tool/README.md`\n- **InvokeCrewAIAutomationTool**（documentation）：The InvokeCrewAIAutomationTool provides CrewAI Platform API integration with external crew services. This tool allows you to invoke and interact with CrewAI Platform automations from within your CrewAI agents, enabling seamless integration between different crew workflows. 证据：`lib/crewai-tools/src/crewai_tools/tools/invoke_crewai_automation_tool/README.md`\n- **JinaScrapeWebsiteTool**（documentation）：Description A tool designed to extract and read the content of a specified website by using Jina.ai reader. It is capable of handling various types of web pages by making HTTP requests and parsing the received HTML content. This tool can be particularly useful for web scraping tasks, data collection, or extracting specific information from websites. 证据：`lib/crewai-tools/src/crewai_tools/tools/jina_scrape_website_tool/README.md`\n- **JSONSearchTool**（documentation）：Description This tool is used to perform a RAG search within a JSON file's content. It allows users to initiate a search with a specific JSON path, focusing the search operation within that particular JSON file. If the path is provided at initialization, the tool restricts its search scope to the specified JSON file, thereby enhancing the precision of search results. 证据：`lib/crewai-tools/src/crewai_tools/tools/json_search_tool/README.md`\n- **Linkup Search Tool**（documentation）：The LinkupSearchTool is a tool designed for integration with the CrewAI framework. It provides the ability to query the Linkup API for contextual information and retrieve structured results. This tool is ideal for enriching workflows with up-to-date and reliable information from Linkup. 证据：`lib/crewai-tools/src/crewai_tools/tools/linkup/README.md`\n- **LlamaIndexTool Documentation**（documentation）：Description This tool is designed to be a general wrapper around LlamaIndex tools and query engines, enabling you to leverage LlamaIndex resources in terms of RAG/agentic pipelines as tools to plug into CrewAI agents. 证据：`lib/crewai-tools/src/crewai_tools/tools/llamaindex_tool/README.md`\n- **MDXSearchTool**（documentation）：Description The MDX Search Tool, a key component of the crewai tools package, is designed for advanced market data extraction, offering invaluable support to researchers and analysts requiring immediate market insights in the AI sector. With its ability to interface with various data sources and tools, it streamlines the process of acquiring, reading, and organizing market data efficiently. 证据：`lib/crewai-tools/src/crewai_tools/tools/mdx_search_tool/README.md`\n- **MergeAgentHandlerTool Documentation**（documentation）：MergeAgentHandlerTool Documentation 证据：`lib/crewai-tools/src/crewai_tools/tools/merge_agent_handler_tool/README.md`\n- **MongoDBVectorSearchTool**（documentation）：Description This tool is specifically crafted for conducting vector searches within docs within a MongoDB database. Use this tool to find semantically similar docs to a given query. 证据：`lib/crewai-tools/src/crewai_tools/tools/mongodb_vector_search_tool/README.md`\n- **MultiOnTool Documentation**（documentation）：Description The MultiOnTool, integrated within the crewai tools package, empowers CrewAI agents with the capability to navigate and interact with the web through natural language instructions. Leveraging the Multion API, this tool facilitates seamless web browsing, making it an essential asset for projects requiring dynamic web data interaction. 证据：`lib/crewai-tools/src/crewai_tools/tools/multion_tool/README.md`\n- **MySQLSearchTool**（documentation）：Description This tool is designed to facilitate semantic searches within MySQL database tables. Leveraging the RAG Retrieve and Generate technology, the MySQLSearchTool provides users with an efficient means of querying database table content, specifically tailored for MySQL databases. It simplifies the process of finding relevant data through semantic search queries, making it an invaluable resource for users needing to perform advanced queries on extensive datasets within a MySQL database. 证据：`lib/crewai-tools/src/crewai_tools/tools/mysql_search_tool/README.md`\n- **NL2SQL Tool**（documentation）：This tool is used to convert natural language to SQL queries. When passed to the agent it will generate queries and then use them to interact with the database. 证据：`lib/crewai-tools/src/crewai_tools/tools/nl2sql/README.md`\n- **OCR Tool**（documentation）：This tool performs Optical Character Recognition OCR on images using supported LLMs. It can extract text from both local image files and images available via URLs. The tool leverages the LLM's vision capabilities to provide accurate text extraction from images. 证据：`lib/crewai-tools/src/crewai_tools/tools/ocr_tool/README.md`\n- **OxylabsAmazonProductScraperTool**（documentation）：Scrape any website with OxylabsAmazonProductScraperTool 证据：`lib/crewai-tools/src/crewai_tools/tools/oxylabs_amazon_product_scraper_tool/README.md`\n- **OxylabsAmazonSearchScraperTool**（documentation）：Scrape any website with OxylabsAmazonSearchScraperTool 证据：`lib/crewai-tools/src/crewai_tools/tools/oxylabs_amazon_search_scraper_tool/README.md`\n- **OxylabsGoogleSearchScraperTool**（documentation）：Scrape any website with OxylabsGoogleSearchScraperTool 证据：`lib/crewai-tools/src/crewai_tools/tools/oxylabs_google_search_scraper_tool/README.md`\n- 其余 23 条证据见 `AI_CONTEXT_PACK.json` 或 `EVIDENCE_INDEX.json`。\n\n## 宿主 AI 必须遵守的规则\n\n- **把本资产当作开工前上下文，而不是运行环境。**：AI Context Pack 只包含证据化项目理解，不包含目标项目的可执行状态。 证据：`README.md`, `lib/cli/README.md`, `lib/cli/src/crewai_cli/templates/AGENTS.md`\n- **回答用户时区分可预览内容与必须安装后才能验证的内容。**：安装前体验的消费者价值来自降低误装和误判，而不是伪装成真实运行。 证据：`README.md`, `lib/cli/README.md`, `lib/cli/src/crewai_cli/templates/AGENTS.md`\n\n## 用户开工前应该回答的问题\n\n- 你准备在哪个宿主 AI 或本地环境中使用它？\n- 你只是想先体验工作流，还是准备真实安装？\n- 你最在意的是安装成本、输出质量、还是和现有规则的冲突？\n\n## 验收标准\n\n- 所有能力声明都能回指到 evidence_refs 中的文件路径。\n- AI_CONTEXT_PACK.md 没有把预览包装成真实运行。\n- 用户能在 3 分钟内看懂适合谁、能做什么、如何开始和风险边界。\n\n---\n\n## Doramagic Context Augmentation\n\n下面内容用于强化 Repomix/AI Context Pack 主体。Human Manual 只提供阅读骨架；踩坑日志会被转成宿主 AI 必须遵守的工作约束。\n\n## Human Manual 骨架\n\n使用规则：这里只是项目阅读路线和显著性信号，不是事实权威。具体事实仍必须回到 repo evidence / Claim Graph。\n\n宿主 AI 硬性规则：\n- 不得把页标题、章节顺序、摘要或 importance 当作项目事实证据。\n- 解释 Human Manual 骨架时，必须明确说它只是阅读路线/显著性信号。\n- 能力、安装、兼容性、运行状态和风险判断必须引用 repo evidence、source path 或 Claim Graph。\n\n- **Installation and Setup**：importance `high`\n  - source_paths: pyproject.toml, lib/crewai/pyproject.toml, lib/crewai-tools/pyproject.toml\n- **Quick Start Guide**：importance `high`\n  - source_paths: lib/cli/src/crewai_cli/templates/crew/crew.py, lib/cli/src/crewai_cli/templates/crew/main.py, lib/cli/src/crewai_cli/templates/crew/config/agents.yaml, lib/cli/src/crewai_cli/templates/crew/config/tasks.yaml\n- **Agents Architecture**：importance `high`\n  - source_paths: lib/crewai/src/crewai/agents/agent_builder/base_agent.py, lib/crewai/src/crewai/agent/core.py, lib/crewai/src/crewai/agents/crew_agent_executor.py, lib/crewai/src/crewai/agents/parser.py\n- **Tasks and Task Management**：importance `high`\n  - source_paths: lib/crewai/src/crewai/task.py, lib/crewai/src/crewai/tasks/__init__.py, lib/crewai/src/crewai/tasks/conditional_task.py, lib/crewai/src/crewai/tasks/task_output.py\n- **Crews and Crew Orchestration**：importance `high`\n  - source_paths: lib/crewai/src/crewai/crew.py, lib/crewai/src/crewai/process.py, lib/crewai/src/crewai/agents/step_executor.py, lib/crewai/src/crewai/utilities/crew/crew_context.py\n- **Flows - Event-Driven Workflows**：importance `high`\n  - source_paths: lib/crewai/src/crewai/flow/flow.py, lib/crewai/src/crewai/flow/flow_context.py, lib/crewai/src/crewai/flow/types.py, lib/crewai/src/crewai/events/event_listener.py\n- **LLM Providers and Configuration**：importance `high`\n  - source_paths: lib/crewai/src/crewai/llm.py, lib/crewai/src/crewai/llms/__init__.py, lib/crewai/src/crewai/llms/base_llm.py, lib/crewai/src/crewai/llms/providers/openai/completion.py, lib/crewai/src/crewai/llms/providers/anthropic/completion.py\n- **Agent-to-Agent (A2A) Communication**：importance `medium`\n  - source_paths: lib/crewai/src/crewai/a2a/__init__.py, lib/crewai/src/crewai/a2a/types.py, lib/crewai/src/crewai/a2a/wrapper.py, lib/crewai/src/crewai/a2a/extensions/a2ui/__init__.py, lib/crewai/src/crewai/a2a/utils/delegation.py\n\n## Repo Inspection Evidence / 源码检查证据\n\n- repo_clone_verified: true\n- repo_inspection_verified: true\n- repo_commit: `a95d26763f4766b1a4f7c19c039133d1202dbdaa`\n- inspected_files: `pyproject.toml`, `README.md`, `uv.lock`, `docs/enterprise-api.en.yaml`, `docs/reo-tracking.js`, `docs/enterprise-api.pt-BR.yaml`, `docs/enterprise-api.base.yaml`, `docs/index.mdx`, `docs/common-room-tracking.js`, `docs/docs.json`, `docs/enterprise-api.ko.yaml`, `docs/pt-BR/telemetry.mdx`, `docs/pt-BR/index.mdx`, `docs/pt-BR/installation.mdx`, `docs/pt-BR/quickstart.mdx`, `docs/pt-BR/changelog.mdx`, `docs/pt-BR/introduction.mdx`, `docs/pt-BR/skills.mdx`, `docs/ar/telemetry.mdx`, `docs/ar/index.mdx`\n\n宿主 AI 硬性规则：\n- 没有 repo_clone_verified=true 时，不得声称已经读过源码。\n- 没有 repo_inspection_verified=true 时，不得把 README/docs/package 文件判断写成事实。\n- 没有 quick_start_verified=true 时，不得声称 Quick Start 已跑通。\n\n## Doramagic Pitfall Constraints / 踩坑约束\n\n这些规则来自 Doramagic 发现、验证或编译过程中的项目专属坑点。宿主 AI 必须把它们当作工作约束，而不是普通说明文字。\n\n### Constraint 1: 来源证据：[FEATURE] Implement Process.consensual with a pluggable ConsensusEngine\n\n- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：[FEATURE] Implement Process.consensual with a pluggable ConsensusEngine\n- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- Why it matters: 可能增加新用户试用和生产接入成本。\n- Evidence: community_evidence:github | cevd_a7c38215ebb04a4fbc6e7c6d2fdb2469 | https://github.com/crewAIInc/crewAI/issues/5708 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 2: 来源证据：[BUG] Wrong code in document\n\n- Trigger: GitHub 社区证据显示该项目存在一个运行相关的待验证问题：[BUG] Wrong code in document\n- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- Why it matters: 可能增加新用户试用和生产接入成本。\n- Evidence: community_evidence:github | cevd_390380af45524e959d558b160597b38b | https://github.com/crewAIInc/crewAI/issues/5378 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 3: 来源证据：[FEATURE] Enhance the document about @persisit\n\n- Trigger: GitHub 社区证据显示该项目存在一个运行相关的待验证问题：[FEATURE] Enhance the document about @persisit\n- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- Why it matters: 可能增加新用户试用和生产接入成本。\n- Evidence: community_evidence:github | cevd_effef000d4cf47a892f17850aa033610 | https://github.com/crewAIInc/crewAI/issues/5372 | 来源类型 github_issue 暴露的待验证使用条件。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 4: 来源证据：[FEATURE] GuardrailProvider interface for pre-tool-call authorization\n\n- Trigger: GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：[FEATURE] GuardrailProvider interface for pre-tool-call authorization\n- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- Why it matters: 可能阻塞安装或首次运行。\n- Evidence: community_evidence:github | cevd_858a1a8bead2456289d686ec0d2d802c | https://github.com/crewAIInc/crewAI/issues/4877 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 5: 仓库名和安装名不一致\n\n- Trigger: 仓库名 `crewai` 与安装入口 `skills` 不完全一致。\n- Host AI rule: 在 npm/PyPI/GitHub 上确认包名映射和官方 README 说明。\n- Why it matters: 用户照着仓库名搜索包或照着包名找仓库时容易走错入口。\n- Evidence: identity.distribution | github_repo:710601088 | https://github.com/crewAIInc/crewAI | repo=crewai; install=skills\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 6: 来源证据：1.14.4\n\n- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：1.14.4\n- Host AI rule: 来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- Why it matters: 可能增加新用户试用和生产接入成本。\n- Evidence: community_evidence:github | cevd_dcfa2a852812414a82683392c2888795 | https://github.com/crewAIInc/crewAI/releases/tag/1.14.4 | 来源类型 github_release 暴露的待验证使用条件。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 7: 来源证据：1.14.4a1\n\n- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：1.14.4a1\n- Host AI rule: 来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- Why it matters: 可能增加新用户试用和生产接入成本。\n- Evidence: community_evidence:github | cevd_0de86b993ffa4d9298726daa189abf49 | https://github.com/crewAIInc/crewAI/releases/tag/1.14.4a1 | 来源类型 github_release 暴露的待验证使用条件。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 8: 来源证据：1.14.5a4\n\n- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：1.14.5a4\n- Host AI rule: 来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- Why it matters: 可能增加新用户试用和生产接入成本。\n- Evidence: community_evidence:github | cevd_6db6cd94b6ef4bffa23da215458565b4 | https://github.com/crewAIInc/crewAI/releases/tag/1.14.5a4 | 来源类型 github_release 暴露的待验证使用条件。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 9: 来源证据：Scans the client database to extract existing policy details.\n\n- Trigger: GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Scans the client database to extract existing policy details.\n- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- Why it matters: 可能增加新用户试用和生产接入成本。\n- Evidence: community_evidence:github | cevd_8201c73155314e67801bd0b81ea9820d | https://github.com/crewAIInc/crewAI/issues/5760 | 来源类型 github_issue 暴露的待验证使用条件。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 10: 能力判断依赖假设\n\n- Trigger: README/documentation is current enough for a first validation pass.\n- Host AI rule: 将假设转成下游验证清单。\n- Why it matters: 假设不成立时，用户拿不到承诺的能力。\n- Evidence: capability.assumptions | github_repo:710601088 | https://github.com/crewAIInc/crewAI | README/documentation is current enough for a first validation pass.\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n",
      "summary": "给宿主 AI 的上下文和工作边界。",
      "title": "AI Context Pack / 带给我的 AI"
    },
    "boundary_risk_card": {
      "asset_id": "boundary_risk_card",
      "filename": "BOUNDARY_RISK_CARD.md",
      "markdown": "# Boundary & Risk Card / 安装前决策卡\n\n项目：crewAIInc/crewAI\n\n## Doramagic 试用结论\n\n当前结论：可以进入发布前推荐检查；首次使用仍应从最小权限、临时目录和可回滚配置开始。\n\n## 用户现在可以做\n\n- 可以先阅读 Human Manual，理解项目目的和主要工作流。\n- 可以复制 Prompt Preview 做安装前体验；这只验证交互感，不代表真实运行。\n- 可以把官方 Quick Start 命令放到隔离环境中验证，不要直接进主力环境。\n\n## 现在不要做\n\n- 不要把 Prompt Preview 当成项目实际运行结果。\n- 不要把 metadata-only validation 当成沙箱安装验证。\n- 不要把未验证能力写成“已支持、已跑通、可放心安装”。\n- 不要在首次试用时交出生产数据、私人文件、真实密钥或主力配置目录。\n\n## 安装前检查\n\n- 宿主 AI 是否匹配：local_cli\n- 官方安装入口状态：已发现官方入口\n- 是否在临时目录、临时宿主或容器中验证：必须是\n- 是否能回滚配置改动：必须能\n- 是否需要 API Key、网络访问、读写文件或修改宿主配置：未确认前按高风险处理\n- 是否记录了安装命令、实际输出和失败日志：必须记录\n\n## 当前阻塞项\n\n- 无阻塞项。\n\n## 项目专属踩坑\n\n- 来源证据：[FEATURE] Implement Process.consensual with a pluggable ConsensusEngine（high）：可能增加新用户试用和生产接入成本。 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 来源证据：[BUG] Wrong code in document（high）：可能增加新用户试用和生产接入成本。 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 来源证据：[FEATURE] Enhance the document about @persisit（high）：可能增加新用户试用和生产接入成本。 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 来源证据：[FEATURE] GuardrailProvider interface for pre-tool-call authorization（high）：可能阻塞安装或首次运行。 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 仓库名和安装名不一致（medium）：用户照着仓库名搜索包或照着包名找仓库时容易走错入口。 建议检查：在 npm/PyPI/GitHub 上确认包名映射和官方 README 说明。\n\n## 风险与权限提示\n\n- no_demo: medium\n\n## 证据缺口\n\n- 暂未发现结构化证据缺口。\n",
      "summary": "安装、权限、验证和推荐前风险。",
      "title": "Boundary & Risk Card / 边界与风险卡"
    },
    "human_manual": {
      "asset_id": "human_manual",
      "filename": "HUMAN_MANUAL.md",
      "markdown": "# https://github.com/crewAIInc/crewAI 项目说明书\n\n生成时间：2026-05-16 06:15:18 UTC\n\n## 目录\n\n- [Installation and Setup](#installation)\n- [Quick Start Guide](#quickstart)\n- [Agents Architecture](#agents)\n- [Tasks and Task Management](#tasks)\n- [Crews and Crew Orchestration](#crews)\n- [Flows - Event-Driven Workflows](#flows)\n- [LLM Providers and Configuration](#llm-providers)\n- [Agent-to-Agent (A2A) Communication](#agent-to-agent)\n- [Knowledge Management](#knowledge)\n- [Memory and Storage System](#memory)\n\n<a id='installation'></a>\n\n## Installation and Setup\n\n### 相关页面\n\n相关主题：[Quick Start Guide](#quickstart), [LLM Providers and Configuration](#llm-providers)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [pyproject.toml](https://github.com/crewAIInc/crewAI/blob/main/pyproject.toml)\n- [lib/crewai/pyproject.toml](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/pyproject.toml)\n- [lib/crewai-tools/pyproject.toml](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai-tools/pyproject.toml)\n- [lib/cli/src/crewai_cli/templates/tool/README.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/tool/README.md)\n- [lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n</details>\n\n# Installation and Setup\n\n## Overview\n\nThis guide covers the installation and setup procedures for CrewAI, a multi-agent automation framework. The installation process supports multiple methods including pip, UV package manager, and direct source installation. CrewAI requires Python 3.10 to 3.13 and uses modern dependency management practices to ensure consistent environments across development and production.\n\n## System Requirements\n\n### Python Version Compatibility\n\n| Requirement | Specification |\n|-------------|----------------|\n| Minimum Python | 3.10 |\n| Maximum Python | < 3.14 |\n| Package Manager | UV (recommended) or pip |\n\nThe project enforces version constraints through pyproject.toml configuration files. The version range ensures compatibility with modern Python features while avoiding breaking changes from upcoming releases.\n\n## Installation Methods\n\n### Standard Installation via pip\n\nThe primary method for installing CrewAI uses pip, Python's standard package manager:\n\n```bash\npip install crewai\n```\n\nThis installation includes the core CrewAI framework with essential dependencies. For users requiring additional tooling capabilities, the extended installation includes built-in tools:\n\n```bash\npip install 'crewai[tools]'\n```\n\n资料来源：[lib/crewai/pyproject.toml](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/pyproject.toml)\n\n### UV Package Manager Installation\n\nUV is the recommended package manager for CrewAI projects due to its superior performance and dependency resolution capabilities.\n\n```bash\npip install uv\n```\n\nAfter installing UV, create a new project with:\n\n```bash\ncrewai create crew <project_name> --skip_provider\ncrewai create flow <project_name> --skip_provider\n```\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n\n## Project Structure\n\nAfter creating a new CrewAI project, the following directory structure is generated:\n\n```\nsrc/<project_name>/\n├── __init__.py\n├── crew.py\n├── main.py\n├── tools/\n│   ├── custom_tool.py\n│   └── __init__.py\n└── config/\n    ├── agents.yaml\n    └── tasks.yaml\n```\n\n### Core Files Description\n\n| File | Purpose |\n|------|---------|\n| `main.py` | Entry point for project execution |\n| `crew.py` | Crew definition and agent orchestration logic |\n| `agents.yaml` | Agent role, goal, and backstory configurations |\n| `tasks.yaml` | Task descriptions and dependencies |\n| `tools/` | Custom tool implementations |\n| `.env` | Environment variables and API keys |\n\n资料来源：[README.md](https://github.com/crewAIInc/crewAI/blob/main/README.md)\n\n## Dependencies Management\n\n### Using UV for Dependency Operations\n\nUV provides fast and reliable dependency management. The following commands handle common dependency tasks:\n\n```bash\nuv add <package>          # Add a new dependency\nuv sync                  # Synchronize dependencies with lock file\nuv lock                  # Update the lock file\n```\n\n### Core Dependencies\n\nThe main `crewai` package includes these core dependencies:\n\n- `pydantic` - Data validation and settings management\n- `crewai` core modules - Agent orchestration and task management\n\n### Tools Dependencies\n\nAdditional packages are required for specific tool integrations:\n\n| Tool | Required Package |\n|------|------------------|\n| Tavily Search | `tavily-python` |\n| File Compression | Built-in |\n| PDF Processing | Built-in |\n| ArXiv Integration | Built-in |\n\n资料来源：[lib/crewai-tools/pyproject.toml](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai-tools/pyproject.toml)\n\n## Environment Configuration\n\n### Environment Variables Setup\n\nCreate a `.env` file in your project root to store sensitive configuration:\n\n```bash\nOPENAI_API_KEY=your_openai_api_key\nTAVILY_API_KEY=your_tavily_api_key\nSERPLY_API_KEY=your_serply_api_key\nLINKUP_API_KEY=your_linkup_api_key\n```\n\n### Configuration in agents.yaml\n\nDefine agent behavior through YAML configuration:\n\n```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}.\n```\n\n资料来源：[README.md](https://github.com/crewAIInc/crewAI/blob/main/README.md)\n\n## Custom Tools Installation\n\n### Publishing Tools\n\nDistribute custom tools within your organization or to the community:\n\n```bash\ncrewai tool publish <tool_name>\n```\n\n### Installing Tools\n\nInstall tools published by others or within your organization:\n\n```bash\ncrewai tool install <tool_name>\n```\n\n资料来源：[lib/cli/src/crewai_cli/templates/tool/README.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/tool/README.md)\n\n## Installation Verification\n\n### Quick Verification Steps\n\nAfter installation, verify the setup by running:\n\n```bash\ncrewai run\n```\n\nThis command auto-detects the project type from `pyproject.toml` and executes the crew or flow.\n\n### Memory Management Commands\n\nCrewAI provides CLI commands for managing agent memories:\n\n```bash\ncrewai reset-memories -a              # Reset all memories\ncrewai reset-memories -s              # Short-term only\ncrewai reset-memories -l              # Long-term only\ncrewai reset-memories -e              # Entity only\ncrewai reset-memories -kn             # Knowledge only\ncrewai reset-memories -akn            # Agent knowledge only\n```\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n\n## Development Workflow\n\n```mermaid\ngraph TD\n    A[Install CrewAI] --> B[Create Project]\n    B --> C[Configure Agents]\n    C --> D[Define Tasks]\n    D --> E[Add Tools]\n    E --> F[Set Environment Variables]\n    F --> G[Run crewai run]\n    G --> H[Test and Iterate]\n    H --> I[Deploy]\n```\n\n## Troubleshooting Common Issues\n\n### pyproject.toml Validation\n\nThe CLI validates `pyproject.toml` for proper CrewAI project structure. If validation fails:\n\n1. Verify `crewai` is listed in project dependencies\n2. Check TOML syntax correctness\n3. Ensure required configuration keys exist\n\n### Version Conflicts\n\nIf dependency conflicts occur:\n\n1. Use `uv lock` to regenerate lock file\n2. Verify Python version falls within 3.10-3.13 range\n3. Clear cache with `uv cache clean`\n\n资料来源：[lib/crewai-core/src/crewai_core/project.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai-core/src/crewai_core/project.py)\n\n## Next Steps\n\nAfter successful installation:\n\n1. **Define Agents** - Configure roles, goals, and backstories in `config/agents.yaml`\n2. **Create Tasks** - Define task descriptions and expected outputs in `config/tasks.yaml`\n3. **Add Tools** - Integrate custom or built-in tools for agent capabilities\n4. **Implement Logic** - Customize `crew.py` with specific orchestration requirements\n5. **Test** - Use `crewai test` for iterative testing\n\n## Summary\n\nThe CrewAI installation process supports multiple package managers and provides flexible project scaffolding. Key points:\n\n- Minimum requirement: Python 3.10\n- UV is the recommended package manager for modern workflows\n- Project structure separates configuration (YAML) from implementation (Python)\n- Custom tools can be published and installed through the CLI\n- Environment variables handle sensitive configuration\n\n---\n\n<a id='quickstart'></a>\n\n## Quick Start Guide\n\n### 相关页面\n\n相关主题：[Installation and Setup](#installation), [Agents Architecture](#agents), [Tasks and Task Management](#tasks)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [lib/cli/src/crewai_cli/templates/crew/crew.py](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/crew/crew.py)\n- [lib/cli/src/crewai_cli/templates/crew/main.py](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/crew/main.py)\n- [lib/cli/src/crewai_cli/templates/crew/config/agents.yaml](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/crew/config/agents.yaml)\n- [lib/cli/src/crewai_cli/templates/crew/config/tasks.yaml](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/crew/config/tasks.yaml)\n- [lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n- [lib/crewai/README.md](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/README.md)\n</details>\n\n# Quick Start Guide\n\nThis guide provides a comprehensive overview for setting up and running your first CrewAI project. CrewAI is a multi-agent automation framework that enables you to build sophisticated AI-powered workflows by composing agents, tasks, and crews.\n\n## Overview\n\nThe Quick Start Guide covers the essential steps to:\n\n- Install CrewAI and its dependencies\n- Scaffold a new crew project\n- Configure agents and tasks using YAML\n- Implement crew logic in Python\n- Execute and test your crew\n\n**Scope**: This guide focuses on the standard crew workflow using the `@CrewBase` decorator pattern with YAML-based configuration files.\n\n## Prerequisites\n\n| Requirement | Version |\n|-------------|---------|\n| Python | >=3.10, <3.14 |\n| Package Manager | UV (recommended) |\n\n资料来源：[lib/cli/src/crewai_cli/templates/tool/README.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/tool/README.md)\n\n## Project Structure\n\nA typical CrewAI project follows this directory layout:\n\n```\nmy_project/\n├── src/my_project/\n│   ├── __init__.py\n│   ├── main.py              # Entry point\n│   ├── crew.py              # Crew definition\n│   └── config/\n│       ├── agents.yaml      # Agent configurations\n│       └── tasks.yaml       # Task configurations\n├── .env                      # Environment variables\n└── pyproject.toml           # Project configuration\n```\n\n资料来源：[lib/crewai/README.md](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/README.md)\n\n## Installation\n\n### Step 1: Install CrewAI CLI\n\n```bash\npip install crewai\n```\n\n### Step 2: Install UV (if not already installed)\n\nUV is the recommended package manager for CrewAI projects.\n\n```bash\npip install uv\n```\n\n### Step 3: Create a New Crew Project\n\n```bash\ncrewai create crew my_crew --skip_provider\n```\n\n### Step 4: Install Project Dependencies\n\n```bash\ncd my_crew\ncrewai install\n```\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n\n## Project Components\n\n### Agent Configuration (agents.yaml)\n\nAgents are defined in YAML format with role, goal, and backstory:\n\n```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\n  backstory: >\n    You're a meticulous analyst with a keen eye for detail.\n```\n\n资料来源：[lib/crewai/README.md](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/README.md)\n\n### Task Configuration (tasks.yaml)\n\nTasks define what each agent should accomplish:\n\n```yaml\nresearch_task:\n  description: >\n    Research the latest developments in {topic}\n  expected_output: >\n    A list of key findings with sources and implications.\n  agent: researcher\n\nreporting_task:\n  description: >\n    Create a comprehensive report on {topic}\n  expected_output: >\n    A fully fledged report with the main topics, each with a full section\n    of information. Formatted as markdown.\n  agent: reporting_analyst\n  output_file: report.md\n```\n\n资料来源：[lib/crewai/README.md](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/README.md)\n\n## Crew Implementation\n\n### Crew Class (crew.py)\n\nThe crew class uses the `@CrewBase` decorator to bind agents and tasks:\n\n```python\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 MyProjectCrew():\n    \"\"\"My project crew\"\"\"\n    \n    agents: List[BaseAgent]\n    tasks: List[Task]\n\n    @agent\n    def researcher(self) -> Agent:\n        return Agent(\n            config=self.agents_config['researcher'],\n            verbose=True,\n            tools=[SerperDevTool()]\n        )\n\n    @agent\n    def reporting_analyst(self) -> Agent:\n        return Agent(\n            config=self.agents_config['reporting_analyst'],\n            verbose=True\n        )\n\n    @task\n    def research_task(self) -> Task:\n        return Task(config=self.tasks_config['research_task'])\n\n    @task\n    def reporting_task(self) -> Task:\n        return Task(\n            config=self.tasks_config['reporting_task'],\n            output_file='report.md'\n        )\n\n    @crew\n    def crew(self) -> Crew:\n        return Crew(\n            agents=self.agents,\n            tasks=self.tasks,\n            process=Process.sequential,\n            verbose=True,\n        )\n```\n\n资料来源：[lib/cli/src/crewai_cli/templates/crew/crew.py](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/crew/crew.py)\n\n### Entry Point (main.py)\n\nThe main entry point kicks off the crew:\n\n```python\nfrom crewai import Crew\nfrom my_project.crew import MyProjectCrew\n\ndef run():\n    inputs = {\n        \"topic\": \"AI LLMs\"\n    }\n    \n    crew = MyProjectCrew()\n    result = crew.crew().kickoff(inputs=inputs)\n    print(result)\n\nif __name__ == \"__main__\":\n    run()\n```\n\n资料来源：[lib/cli/src/crewai_cli/templates/crew/main.py](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/crew/main.py)\n\n## Workflow Diagram\n\n```mermaid\ngraph TD\n    A[Start: crewai create crew] --> B[Install Dependencies]\n    B --> C[Configure agents.yaml]\n    C --> D[Configure tasks.yaml]\n    D --> E[Implement crew.py]\n    E --> F[Implement main.py]\n    F --> G[crewai run]\n    G --> H{Crew Execution}\n    H --> I[Agents Complete Tasks]\n    I --> J[Output Generated]\n    J --> K[End]\n    \n    style A fill:#4CAF50,color:#fff\n    style G fill:#2196F3,color:#fff\n    style K fill:#FF5722,color:#fff\n```\n\n## Development Best Practices\n\n| Practice | Description |\n|----------|-------------|\n| YAML-first configuration | Define agents and tasks in YAML, keep crew classes minimal |\n| Use structured output | Use `output_pydantic` for data flowing between tasks |\n| Enable memory | For crews benefiting from cross-session learning |\n| Sequential vs Hierarchical | Sequential for linear workflows; hierarchical for dynamic delegation |\n| Test frequently | Use `crewai test` to evaluate performance |\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n\n## Common CLI Commands\n\n| Command | Description |\n|---------|-------------|\n| `crewai create crew <name>` | Create a new crew project |\n| `crewai run` | Execute the crew |\n| `crewai test` | Test crew (2 iterations, gpt-4o-mini default) |\n| `crewai test -n 5 -m gpt-4o` | Custom test iterations and model |\n| `crewai train -n 5 -f training.json` | Train the crew |\n| `crewai reset-memories -a` | Reset all memories |\n| `crewai log-tasks-outputs` | Show latest task outputs |\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n\n## Running Your Crew\n\nExecute your crew using the CLI:\n\n```bash\ncrewai run\n```\n\nOr run the main.py file directly:\n\n```bash\npython src/my_project/main.py\n```\n\n## Customization\n\n### Adding Tools to Agents\n\n```python\n@agent\ndef researcher(self) -> Agent:\n    return Agent(\n        config=self.agents_config['researcher'],\n        verbose=True,\n        tools=[SerperDevTool()]  # Add tools here\n    )\n```\n\n### Setting Custom LLM Providers\n\nUse the `crewai.LLM` class or string shorthand:\n\n```python\nllm=\"openai/gpt-4o\"\nllm=\"anthropic/claude-3-sonnet\"\n```\n\n### Memory and Knowledge\n\nEnable memory in your crew for cross-session learning:\n\n```python\n@crew\ndef crew(self) -> Crew:\n    return Crew(\n        agents=self.agents,\n        tasks=self.tasks,\n        memory=True,  # Enable memory\n        verbose=True,\n    )\n```\n\n## Common Pitfalls\n\n| Pitfall | Solution |\n|---------|----------|\n| Using `ChatOpenAI()` directly | Use `crewai.LLM` or string shorthand |\n| Forgetting type hints | Add `# type: ignore[index]` for YAML config access |\n| Token limit issues | Set `respect_context_window=True` |\n| API throttling | Configure `max_rpm` rate limiting |\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n\n## Next Steps\n\nAfter completing this Quick Start Guide:\n\n1. Explore [advanced agent configurations](https://docs.crewai.com) for memory, guardrails, and custom LLMs\n2. Learn about [Flows](https://docs.crewai.com) for multi-crew orchestration\n3. Review [tool integrations](https://github.com/crewAIInc/crewAI/tree/main/lib/crewai-tools) for additional capabilities\n4. Join the [Discord community](https://discord.com/invite/X4JWnZnxPb) for support\n\n---\n\n<a id='agents'></a>\n\n## Agents Architecture\n\n### 相关页面\n\n相关主题：[Tasks and Task Management](#tasks), [Crews and Crew Orchestration](#crews), [LLM Providers and Configuration](#llm-providers)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [lib/crewai/src/crewai/agents/agent_builder/base_agent.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/agents/agent_builder/base_agent.py)\n- [lib/crewai/src/crewai/agent/core.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/agent/core.py)\n- [lib/crewai/src/crewai/agents/crew_agent_executor.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/agents/crew_agent_executor.py)\n- [lib/crewai/src/crewai/agents/parser.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/agents/parser.py)\n- [lib/crewai/src/crewai/tasks/hallucination_guardrail.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/tasks/hallucination_guardrail.py)\n</details>\n\n# Agents Architecture\n\n## Overview\n\nThe CrewAI Agents Architecture provides a flexible, modular framework for creating and orchestrating autonomous AI agents. The architecture is designed around the concept of **agents** as independent entities that can collaborate within **crews** to accomplish complex tasks through both autonomous decision-making and structured workflows.\n\nAgents in CrewAI are composed of several key components:\n\n| Component | Purpose |\n|-----------|---------|\n| **BaseAgent** | Abstract base class defining the agent interface |\n| **Agent (Core)** | Concrete agent implementation with LLM integration |\n| **CrewAgentExecutor** | Handles agent execution within crew context |\n| **Parser** | Processes LLM outputs and extracts actions |\n| **Guardrails** | Validates agent outputs for safety and accuracy |\n\n资料来源：[lib/crewai/src/crewai/agents/agent_builder/base_agent.py:1-50]()\n\n## Architecture Diagram\n\n```mermaid\ngraph TD\n    A[User Defined Agent] --> B[BaseAgent]\n    B --> C[Agent Core]\n    C --> D[CrewAgentExecutor]\n    D --> E[Parser]\n    E --> F[LLM]\n    F --> G[Tool Calls]\n    G --> H[Guardrails]\n    H --> D\n    \n    I[Memory] -.-> C\n    J[Knowledge] -.-> C\n    K[Tools] --> G\n```\n\n## Agent Definition\n\nAgents are defined through YAML configuration files and Python decorators. Each agent requires a minimum of three attributes:\n\n```yaml\n# config/agents.yaml\nresearcher:\n  role: \"Senior Data Researcher\"\n  goal: \"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```\n\n### Core Agent Attributes\n\n| Attribute | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `role` | string | Yes | Defines the agent's function within the crew |\n| `goal` | string | Yes | The specific objective the agent aims to achieve |\n| `backstory` | string | Yes | Context that shapes the agent's behavior and decision-making |\n| `tools` | List[BaseTool] | No | Tools available to the agent for task execution |\n| `verbose` | boolean | No | Enable detailed logging (default: False) |\n| `llm` | LLM | No | Custom language model configuration |\n| `memory` | boolean | No | Enable short/long-term memory (default: True) |\n| `max_iter` | int | No | Maximum iterations before forcing response |\n| `max_rpm` | int | No | Rate limiting for API calls |\n\n资料来源：[lib/crewai/src/crewai/agent/core.py:1-100]()\n\n## BaseAgent Class\n\nThe `BaseAgent` serves as the foundational abstract class for all agent implementations:\n\n```python\nfrom crewai.agents.agent_builder.base_agent import BaseAgent\nfrom typing import List\n\nclass BaseAgent:\n    agents: List[BaseAgent]  # Type annotation for crew agents\n    \n    @property\n    def role(self) -> str:\n        \"\"\"Returns the role of the agent\"\"\"\n        \n    @property\n    def goal(self) -> str:\n        \"\"\"Returns the goal of the agent\"\"\"\n        \n    @property\n    def backstory(self) -> str:\n        \"\"\"Returns the backstory of the agent\"\"\"\n```\n\n### Key Methods\n\n| Method | Return Type | Description |\n|--------|-------------|-------------|\n| `execute_task(task, context, tools)` | TaskOutput | Execute a specific task |\n| `set_memory_memory(memory)` | None | Configure agent memory |\n| `set_verbose(verbose)` | None | Toggle verbose logging |\n| `create_agent_executor()` | CrewAgentExecutor | Initialize execution context |\n\n资料来源：[lib/crewai/src/crewai/agents/agent_builder/base_agent.py:50-150]()\n\n## Agent Core Implementation\n\nThe core agent implementation provides the main interface for agent behavior:\n\n```python\nfrom crewai import Agent\nfrom crewai_tools import SerperDevTool\n\n@CrewBase\nclass LatestAiDevelopmentCrew():\n    agents: List[BaseAgent]\n    \n    @agent\n    def researcher(self) -> Agent:\n        return Agent(\n            config=self.agents_config['researcher'],\n            verbose=True,\n            tools=[SerperDevTool()]\n        )\n```\n\n### LLM Configuration\n\nAgents can be configured with custom LLM providers:\n\n```python\nconfig=dict(\n    llm=dict(\n        provider=\"ollama\",\n        config=dict(\n            model=\"llama2\",\n            temperature=0.5,\n        ),\n    ),\n)\n```\n\nSupported providers include: `openai`, `anthropic`, `google`, `ollama`, `azure`, `bedrock`\n\n资料来源：[lib/crewai/src/crewai/agent/core.py:100-200]()\n\n## CrewAgentExecutor\n\nThe `CrewAgentExecutor` manages agent execution within a crew context, handling:\n\n- Task delegation and execution flow\n- Tool invocation and result processing\n- Guardrail validation\n- Response formatting\n\n```mermaid\ngraph LR\n    A[Task Assigned] --> B[Execute with Tools]\n    B --> C{Guardrails Check}\n    C -->|Pass| D[Return Result]\n    C -->|Fail| E[Retry or Fallback]\n```\n\n### Execution Parameters\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `task` | Task | Required | The task to execute |\n| `context` | str | None | Shared context from previous tasks |\n| `tools` | List[BaseTool] | [] | Tools available for this execution |\n\n资料来源：[lib/crewai/src/crewai/agents/crew_agent_executor.py:1-100]()\n\n## Parser\n\nThe Parser component processes LLM outputs and extracts structured actions:\n\n```python\nfrom crewai.agents.parser import CrewAgentParser\n\nparser = CrewAgentParser()\nresult = parser.parse(llm_output)\n```\n\n### Parser Responsibilities\n\n| Responsibility | Description |\n|----------------|-------------|\n| **Action Extraction** | Identify tool calls from LLM responses |\n| **Format Normalization** | Convert LLM output to standardized format |\n| **Error Handling** | Manage malformed outputs gracefully |\n| **Validation** | Ensure parsed actions match expected schemas |\n\n资料来源：[lib/crewai/src/crewai/agents/parser.py:1-80]()\n\n## Guardrails\n\nGuardrails provide validation layers for agent outputs. The framework includes built-in guardrails:\n\n### HallucinationGuardrail\n\nValidates that agent outputs are faithful to provided context:\n\n```python\nfrom crewai.tasks.hallucination_guardrail import HallucinationGuardrail\n\nguardrail = HallucinationGuardrail(\n    llm=agent.llm,\n    context=\"Reference document content\",\n    threshold=7.0,\n    tool_response=\"API response data\"\n)\n```\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `llm` | LLM | Required | Language model for evaluation |\n| `context` | str | None | Reference context for validation |\n| `threshold` | float | None | Minimum faithfulness score |\n| `tool_response` | str | \"\" | Tool response for additional context |\n\n资料来源：[lib/crewai/src/crewai/tasks/hallucination_guardrail.py:1-80]()\n\n## Agent Creation with Decorators\n\nCrewAI uses Python decorators for declarative agent definition:\n\n```python\nfrom crewai import Agent, Crew, Task\nfrom crewai.project import CrewBase, agent, crew, task\nfrom typing import List\n\n@CrewBase\nclass MyCrew():\n    \"\"\"My Crew Description\"\"\"\n    agents: List[BaseAgent]\n    tasks: List[Task]\n\n    @agent\n    def researcher(self) -> Agent:\n        return Agent(\n            config=self.agents_config['researcher'],\n            verbose=True,\n            tools=[SerperDevTool()]\n        )\n\n    @agent\n    def reporting_analyst(self) -> Agent:\n        return Agent(\n            config=self.agents_config['reporting_analyst'],\n            verbose=True\n        )\n\n    @task\n    def research_task(self) -> Task:\n        return Task(config=self.tasks_config['research_task'])\n\n    @task\n    def reporting_task(self) -> Task:\n        return Task(\n            config=self.tasks_config['reporting_task'],\n            output_file='report.md'\n        )\n\n    @crew\n    def crew(self) -> Crew:\n        return Crew(\n            agents=self.agents,\n            tasks=self.tasks,\n            process=Process.sequential,\n            verbose=True\n        )\n```\n\n## Tool Integration\n\nAgents access external capabilities through tools:\n\n### Built-in Tools\n\n| Tool | Purpose |\n|------|---------|\n| `SerperDevTool` | Web search functionality |\n| `CodeDocsSearchTool` | Search code documentation |\n| `DirectorySearchTool` | Search within directories |\n| `FileWriterTool` | Write content to files |\n| `TavilyExtractorTool` | Extract content from URLs |\n| `ApifyActorsTool` | Execute Apify actors |\n| `LinkupSearchTool` | Search via Linkup API |\n\n### Tool Configuration\n\n```python\nfrom crewai_tools import SerperDevTool, FileWriterTool\n\nresearcher = Agent(\n    role=\"Research Analyst\",\n    goal=\"Gather and synthesize information\",\n    backstory=\"Expert researcher with access to web search\",\n    tools=[SerperDevTool(), FileWriterTool()],\n    verbose=True\n)\n```\n\n## Memory and Knowledge\n\nAgents can maintain state across interactions:\n\n### Memory Types\n\n| Type | Scope | Persistence |\n|------|-------|-------------|\n| **Short-term** | Current session | Session lifetime |\n| **Long-term** | Across sessions | Database storage |\n| **Entity** | Entity tracking | Automatic extraction |\n| **Knowledge** | Domain knowledge | Vector store |\n\n### Memory Configuration\n\n```python\ncrew = Crew(\n    agents=[researcher, analyst],\n    tasks=[task1, task2],\n    memory=True,           # Enable all memory types\n    embedder={\n        \"provider\": \"openai\",\n        \"config\": {\"model\": \"text-embedding-ada-002\"}\n    }\n)\n```\n\n## Execution Flow\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant Crew\n    participant Agent\n    participant Executor\n    participant LLM\n    participant Tool\n    \n    User->>Crew: kickoff()\n    Crew->>Agent: execute_task(task)\n    Agent->>Executor: run()\n    Executor->>LLM: generate_response()\n    LLM->>Tool: tool_call()\n    Tool-->>LLM: result\n    LLM-->>Executor: response\n    Executor->>Executor: validate_guardrails()\n    Executor-->>Agent: TaskOutput\n    Agent-->>Crew: result\n    Crew-->>User: final_output\n```\n\n## Best Practices\n\n### Agent Design\n\n1. **Clear Role Definition**: Define distinct, non-overlapping roles for each agent\n2. **Specific Goals**: Ensure each agent has a well-defined, achievable goal\n3. **Rich Backstory**: Provide context that guides agent behavior appropriately\n4. **Appropriate Tools**: Grant only necessary tools to minimize unnecessary complexity\n\n### Configuration Guidelines\n\n| Aspect | Recommendation |\n|--------|----------------|\n| **Verbose Mode** | Enable during development, disable in production |\n| **Rate Limiting** | Set `max_rpm` to avoid API throttling |\n| **Context Window** | Use `respect_context_window=True` for long conversations |\n| **Iterations** | Set `max_iter` to prevent infinite loops |\n\n## CLI Commands for Agents\n\n```bash\n# Create new agent\ncrewai create agent <name>\n\n# Test agent\ncrewai test -n 5 -m gpt-4o\n\n# Reset memories\ncrewai reset-memories -a              # All memories\ncrewai reset-memories -s              # Short-term only\ncrewai reset-memories -l              # Long-term only\n```\n\n## Summary\n\nThe CrewAI Agents Architecture provides a comprehensive framework for building multi-agent systems:\n\n- **BaseAgent** defines the interface all agents must implement\n- **Agent Core** provides the concrete implementation with LLM integration\n- **CrewAgentExecutor** manages execution within crew context\n- **Parser** handles LLM output processing\n- **Guardrails** ensure output quality and safety\n- **Decorators** enable declarative agent definition\n- **Tools** extend agent capabilities beyond LLM-only responses\n\n---\n\n<a id='tasks'></a>\n\n## Tasks and Task Management\n\n### 相关页面\n\n相关主题：[Agents Architecture](#agents), [Crews and Crew Orchestration](#crews)\n\n<details>\n<summary>Related Source Files</summary>\n\nThe following source files were used to generate this documentation:\n\n- [lib/crewai/src/crewai/task.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/task.py)\n- [lib/crewai/src/crewai/tasks/__init__.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/tasks/__init__.py)\n- [lib/crewai/src/crewai/tasks/conditional_task.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/tasks/conditional_task.py)\n- [lib/crewai/src/crewai/tasks/task_output.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/tasks/task_output.py)\n- [lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n- [lib/cli/src/crewai_cli/templates/flow/README.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/flow/README.md)\n</details>\n\n# Tasks and Task Management\n\n## Overview\n\nTasks are the fundamental unit of work in the CrewAI framework. They represent discrete units of work that agents execute within a crew. Each task encapsulates a description of what needs to be accomplished, the expected output format, and optional configurations for output validation, file handling, and dependency management.\n\nTasks serve as the bridge between agent capabilities and crew objectives, enabling complex multi-agent workflows through declarative configuration and structured output handling. The task management system provides both synchronous execution (via `Task`) and conditional execution (via `ConditionalTask`) to support various workflow patterns.\n\n资料来源：[lib/crewai/src/crewai/task.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/task.py) and [lib/crewai/src/crewai/tasks/__init__.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/tasks/__init__.py)\n\n---\n\n## Core Task Components\n\n### Task Class\n\nThe `Task` class is the primary implementation for task definitions in CrewAI. It provides a comprehensive set of attributes to configure task behavior.\n\n```python\nclass Task(BaseModel):\n    description: str                          # Human-readable task description\n    expected_output: str                      # Expected output format/content\n    agent: Optional[BaseAgent]                # Assigned agent for execution\n    crew: Optional[Crew]                      # Parent crew reference\n    output_file: Optional[str]                # Optional file path for output\n    output_pydantic: Optional[BaseModel]      # Structured output schema\n    output_json: Optional[type[BaseModel]]    # JSON output schema\n    async_execution: Optional[bool]           # Enable async execution\n    context: Optional[List[Task]]             # Tasks whose output this depends on\n    config: Optional[dict]                    # Task-specific configuration\n    tools: Optional[List[Any]]                # Tools available to the task\n```\n\n资料来源：[lib/crewai/src/crewai/task.py:1-50](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/task.py)\n\n### Task Configuration Parameters\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `description` | `str` | Yes | - | Human-readable task description |\n| `expected_output` | `str` | Yes | - | Expected format/content of output |\n| `agent` | `BaseAgent` | No | `None` | Agent assigned to execute task |\n| `crew` | `Crew` | No | `None` | Parent crew reference |\n| `output_file` | `str` | No | `None` | File path for writing output |\n| `output_pydantic` | `BaseModel` | No | `None` | Pydantic model for structured output |\n| `output_json` | `type[BaseModel]` | No | `None` | JSON schema for output validation |\n| `async_execution` | `bool` | No | `False` | Enable asynchronous execution |\n| `context` | `List[Task]` | No | `None` | Dependent tasks for context |\n| `config` | `dict` | No | `None` | Additional configuration |\n| `tools` | `List[Any]` | No | `None` | Tools available to task |\n\n资料来源：[lib/crewai/src/crewai/task.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/task.py)\n\n---\n\n## Task Output Management\n\n### TaskOutput Class\n\nThe `TaskOutput` class encapsulates the result of task execution, providing a standardized structure for storing and accessing task results.\n\n```python\nclass TaskOutput(BaseModel):\n    name: str                    # Task identifier\n    description: str             # Task description\n    raw_output: Any              # Raw output from agent execution\n    pydantic: Optional[BaseModel]  # Structured Pydantic output\n    json_dict: Optional[dict]     # JSON dict output\n    \n    def to_dict(self) -> dict    # Serialize to dictionary\n    def save_to_file(self, path: str)  # Write output to file\n```\n\n资料来源：[lib/crewai/src/crewai/tasks/task_output.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/tasks/task_output.py)\n\n### Output File Handling\n\nTasks can automatically write their output to files using the `output_file` parameter:\n\n```python\nfrom crewai import Agent, Task, Crew\n\nreporting_task = Task(\n    description=\"Create a detailed report on AI trends\",\n    expected_output=\"A comprehensive markdown report with sections\",\n    agent=reporting_analyst,\n    output_file=\"report.md\"  # Output will be saved to this file\n)\n```\n\n资料来源：[README.md](https://github.com/crewAIInc/crewAI/blob/main/README.md)\n\n### Structured Output with Pydantic\n\nTasks can enforce structured output using Pydantic models:\n\n```python\nfrom pydantic import BaseModel\nfrom crewai import Task\n\nclass ReportSchema(BaseModel):\n    title: str\n    sections: List[str]\n    conclusion: str\n\nstructured_task = Task(\n    description=\"Generate a structured research report\",\n    expected_output=\"JSON object with title, sections, and conclusion\",\n    output_pydantic=ReportSchema\n)\n```\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n\n---\n\n## Conditional Tasks\n\n### ConditionalTask Class\n\n`ConditionalTask` extends the base `Task` functionality with conditional execution logic. Tasks are only executed when their provided condition function returns `True`.\n\n```python\nclass ConditionalTask(Task):\n    condition: Callable[[], bool]  # Function that determines if task executes\n```\n\n资料来源：[lib/crewai/src/crewai/tasks/conditional_task.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/tasks/conditional_task.py)\n\n### Conditional Task Architecture\n\n```mermaid\ngraph TD\n    A[Crew Execution Starts] --> B{ConditionalTask Condition Check}\n    B -->|True| C[Execute Task]\n    B -->|False| D[Skip Task]\n    C --> E[Continue to Next Task]\n    D --> E\n    E --> F[Crew Execution Completes]\n    \n    G[ConditionalTask] -->|inherits| H[Base Task Properties]\n    G -->|adds| I[condition: Callable]\n```\n\n资料来源：[lib/crewai/src/crewai/tasks/conditional_task.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/tasks/conditional_task.py)\n\n### Conditional Task Usage Example\n\n```python\nfrom crewai import Agent, Task, Crew\nfrom crewai.tasks import ConditionalTask\n\ndef should_process_data() -> bool:\n    # Only process if certain conditions are met\n    return len(available_data) > 0\n\nconditional_task = ConditionalTask(\n    description=\"Process incoming data\",\n    expected_output=\"Processed data summary\",\n    agent=data_processor,\n    condition=should_process_data\n)\n```\n\n资料来源：[lib/crewai/src/crewai/tasks/conditional_task.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/tasks/conditional_task.py)\n\n---\n\n## Task Dependencies and Context\n\n### Context-Based Dependencies\n\nTasks can depend on the output of other tasks through the `context` parameter. This enables sequential workflows where later tasks have access to earlier task results.\n\n```mermaid\ngraph LR\n    A[Research Task] -->|context| B[Analysis Task]\n    B -->|context| C[Reporting Task]\n    \n    A -->|output| D[Research Data]\n    D -->|passed as context| B\n    B -->|output| E[Analysis Results]\n    E -->|passed as context| C\n```\n\n资料来源：[lib/crewai/src/crewai/task.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/task.py)\n\n### Defining Task Context\n\n```python\nresearch_task = Task(\n    description=\"Research latest AI developments\",\n    expected_output=\"Summary of key findings\",\n    agent=researcher\n)\n\nreporting_task = Task(\n    description=\"Create comprehensive report\",\n    expected_output=\"Detailed markdown report\",\n    agent=reporter,\n    context=[research_task]  # This task receives research_task's output\n)\n```\n\n资料来源：[README.md](https://github.com/crewAIInc/crewAI/blob/main/README.md)\n\n---\n\n## Task Configuration in YAML\n\n### agents.yaml Structure\n\nTasks are referenced in the YAML configuration files alongside agent definitions:\n\n```yaml\n# config/agents.yaml\nresearcher:\n  role: \"{topic} Senior Data Researcher\"\n  goal: \"Uncover cutting-edge developments in {topic}\"\n  backstory: \"You're a seasoned researcher...\"\n\nreporting_analyst:\n  role: \"{topic} Reporting Analyst\"\n  goal: \"Create detailed reports based on research findings\"\n  backstory: \"You're a meticulous analyst...\"\n```\n\n资料来源：[README.md](https://github.com/crewAIInc/crewAI/blob/main/README.md)\n\n### tasks.yaml Structure\n\n```yaml\n# config/tasks.yaml\nresearch_task:\n  description: >\n    Research the latest developments in {topic}. \n    Identify key trends and important information.\n  expected_output: >\n    A detailed report with key findings about {topic}.\n  agent: researcher\n\nreporting_task:\n  description: >\n    Create a comprehensive report based on research findings\n  expected_output: >\n    A fully fledged report with main topics, each with a full section.\n    Formatted as markdown without code fences\n  agent: reporting_analyst\n  output_file: report.md\n```\n\n资料来源：[README.md](https://github.com/crewAIInc/crewAI/blob/main/README.md)\n\n---\n\n## Declarative Task Definition with Decorators\n\n### Using the @task Decorator\n\nThe `@task` decorator provides a declarative way to define tasks within a CrewBase class:\n\n```python\nfrom crewai import Agent, Task, Crew, Process\nfrom crewai.project import CrewBase, agent, crew, task\nfrom typing import List\n\n@CrewBase\nclass LatestAiDevelopmentCrew():\n    agents: List[BaseAgent]\n    tasks: List[Task]\n\n    @task\n    def research_task(self) -> Task:\n        return Task(\n            config=self.tasks_config['research_task'],\n        )\n\n    @task\n    def reporting_task(self) -> Task:\n        return Task(\n            config=self.tasks_config['reporting_task'],\n            output_file='report.md'\n        )\n\n    @crew\n    def crew(self) -> Crew:\n        return Crew(\n            agents=self.agents,\n            tasks=self.tasks,\n            process=Process.sequential,\n            verbose=True,\n        )\n```\n\n资料来源：[README.md](https://github.com/crewAIInc/crewAI/blob/main/README.md)\n\n### Decorator Flow\n\n```mermaid\ngraph TD\n    A[@CrewBase class] --> B[@agent decorator]\n    A --> C[@task decorator]\n    A --> D[@crew decorator]\n    \n    B -->|Creates| E[BaseAgent instances]\n    C -->|Creates| F[Task instances from YAML]\n    D -->|Creates| G[Crew with agents & tasks]\n    \n    E --> H[Agent collection]\n    F --> I[Task collection]\n    G --> J[Configured Crew]\n```\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n\n---\n\n## Task Execution in Flows\n\n### Flow Integration\n\nTasks can be integrated into Flow-based workflows using decorators:\n\n```python\nfrom crewai.flow import Flow, listen, start\n\nclass ContentCreationFlow(Flow):\n    @start()\n    def generate_topic(self):\n        topic = \"AI Agents\"\n        return topic\n\n    @listen(generate_topic)\n    def research(self, topic):\n        return research_crew.kickoff(inputs={'topic': topic})\n```\n\n资料来源：[lib/cli/src/crewai_cli/templates/flow/README.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/flow/README.md)\n\n### Flow Task Architecture\n\n```mermaid\ngraph LR\n    A[start()] --> B[generate_topic]\n    B --> C[@listen decorator]\n    C --> D[research_crew]\n    D --> E[Task Execution]\n    \n    F[Flow State] -.->|passes to| D\n    G[crewai run] -->|invokes| H[Flow Kickoff]\n```\n\n资料来源：[lib/cli/src/crewai_cli/templates/flow/README.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/flow/README.md)\n\n---\n\n## Task Export and Import\n\n### Module Exports\n\nThe tasks module exports the following classes for public use:\n\n```python\n# lib/crewai/src/crewai/tasks/__init__.py\nfrom crewai.tasks.task_output import TaskOutput\nfrom crewai.tasks.conditional_task import ConditionalTask\nfrom crewai.task import Task\n```\n\n资料来源：[lib/crewai/src/crewai/tasks/__init__.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/tasks/__init__.py)\n\n---\n\n## Best Practices\n\n### Task Design Guidelines\n\n| Practice | Description |\n|----------|-------------|\n| **Clear descriptions** | Use specific, actionable descriptions that guide the agent |\n| **Structured output** | Use `output_pydantic` for tasks that produce structured data |\n| **Dependency management** | Use `context` to pass relevant outputs between tasks |\n| **File output** | Use `output_file` for persistent results like reports |\n| **Conditional execution** | Use `ConditionalTask` for optional workflow branches |\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n\n### Common Patterns\n\n1. **Sequential Processing**: Tasks execute one after another, each receiving context from previous tasks\n2. **Parallel Execution**: Multiple independent tasks execute simultaneously with `async_execution=True`\n3. **Conditional Branching**: `ConditionalTask` enables dynamic workflow paths based on runtime conditions\n4. **Structured Output**: Pydantic models ensure type-safe output handling between tasks and crews\n\n资料来源：[lib/crewai/src/crewai/tasks/conditional_task.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/tasks/conditional_task.py) and [lib/crewai/src/crewai/tasks/task_output.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/tasks/task_output.py)\n\n---\n\n## Summary\n\nThe Task and Task Management system in CrewAI provides:\n\n- **Task**: Core unit of work with configurable output handling\n- **TaskOutput**: Standardized result container with file persistence\n- **ConditionalTask**: Dynamic execution based on runtime conditions\n- **Context Dependencies**: Enable sequential workflows with data passing\n- **YAML Configuration**: Declarative task definition alongside agents\n- **Decorator Syntax**: Clean, Pythonic task definition within CrewBase classes\n\nTogether, these components enable complex multi-agent workflows where tasks coordinate to accomplish sophisticated objectives through structured collaboration.\n\n---\n\n<a id='crews'></a>\n\n## Crews and Crew Orchestration\n\n### 相关页面\n\n相关主题：[Agents Architecture](#agents), [Tasks and Task Management](#tasks), [Flows - Event-Driven Workflows](#flows), [LLM Providers and Configuration](#llm-providers)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [lib/crewai/src/crewai/crew.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/crew.py)\n- [lib/crewai/src/crewai/process.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/process.py)\n- [lib/crewai/src/crewai/agents/step_executor.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/agents/step_executor.py)\n- [lib/crewai/src/crewai/utilities/crew/crew_context.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/utilities/crew/crew_context.py)\n</details>\n\n# Crews and Crew Orchestration\n\n## Overview\n\nA **Crew** in CrewAI is a collaborative system of autonomous AI agents working together to accomplish complex tasks. Crew orchestration refers to the mechanism by which these agents coordinate, delegate, and execute tasks based on a defined process type.\n\nCrews are the core building blocks for multi-agent automation in CrewAI. They enable sophisticated workflows where multiple specialized agents combine their capabilities to produce results that exceed what any single agent could achieve alone.\n\nThe Crew class serves as the central orchestrator, managing agents, tasks, processes, and shared resources like memory and tools. 资料来源：[lib/crewai/src/crewai/crew.py]()\n\n## Crew Architecture\n\n### Core Components\n\nA Crew consists of four primary components that work together to enable collaborative AI task execution:\n\n| Component | Purpose |\n|-----------|---------|\n| **Agents** | Autonomous AI entities with specific roles, goals, and tool access |\n| **Tasks** | Defined work items with descriptions, expected outputs, and assignments |\n| **Process** | Orchestration strategy determining how tasks are executed |\n| **Memory** | Shared storage for context, learnings, and inter-agent communication |\n\n### Architecture Diagram\n\n```mermaid\ngraph TD\n    A[Crew] --> B[Agents]\n    A --> C[Tasks]\n    A --> D[Process]\n    A --> E[Memory]\n    \n    B --> B1[Agent 1]\n    B --> B2[Agent 2]\n    B --> BN[Agent N]\n    \n    C --> C1[Task 1]\n    C --> C2[Task 2]\n    C --> CN[Task N]\n    \n    D --> D1[Sequential]\n    D --> D2[Hierarchical]\n    \n    E --> E1[Short-term]\n    E --> E2[Long-term]\n    E --> E3[Entity]\n    E --> E4[Knowledge]\n```\n\n## Process Types\n\nCrewAI supports two primary process types for orchestrating agent collaboration:\n\n### Sequential Process\n\nIn the sequential process, tasks are executed one after another in a predefined order. Each task must complete before the next begins. This is ideal for linear workflows where output from one task feeds into the next.\n\n```python\nfrom crewai import Crew, Process\n\ncrew = Crew(\n    agents=self.agents,\n    tasks=self.tasks,\n    process=Process.sequential,\n    verbose=True,\n)\n```\n\n**Use Cases:**\n- Research pipelines where findings accumulate\n- Report generation requiring sequential information gathering\n- Data processing chains where each step depends on the previous\n\n资料来源：[lib/cli/src/crewai_cli/templates/crew/README.md]()\n\n### Hierarchical Process\n\nThe hierarchical process introduces an automated manager agent that coordinates the crew. The manager delegates tasks, validates results, and ensures proper workflow execution without manual intervention.\n\n```python\nfrom crewai import Crew, Process\n\ncrew = Crew(\n    agents=self.agents,\n    tasks=self.tasks,\n    process=Process.hierarchical,\n    verbose=True,\n)\n```\n\n**Use Cases:**\n- Complex projects requiring dynamic task delegation\n- Scenarios where a manager role naturally exists\n- Workflows needing result validation between steps\n\n资料来源：[lib/crewai/README.md]()\n\n### Process Selection Guide\n\n| Criteria | Sequential | Hierarchical |\n|----------|------------|--------------|\n| Task Dependencies | Fixed order | Dynamic delegation |\n| Manager Required | No | Yes (auto-created) |\n| Flexibility | Low | High |\n| Best For | Linear pipelines | Complex orchestration |\n| Overhead | Minimal | Higher due to management |\n\n## Crew Configuration\n\n### Using the @CrewBase Decorator\n\nCrews are defined using Python decorators combined with YAML configuration files. This approach separates concerns between code logic and agent/task definitions.\n\n```python\nfrom crewai import Agent, Crew, Process, Task\nfrom crewai.project import CrewBase, agent, crew, task\nfrom typing import List\n\n@CrewBase\nclass LatestAiDevelopmentCrew():\n    \"\"\"LatestAiDevelopment crew\"\"\"\n    agents: List[BaseAgent]\n    tasks: List[Task]\n\n    @agent\n    def researcher(self) -> Agent:\n        return Agent(\n            config=self.agents_config['researcher'],\n            verbose=True,\n            tools=[SerperDevTool()]\n        )\n\n    @task\n    def research_task(self) -> Task:\n        return Task(\n            config=self.tasks_config['research_task'],\n        )\n\n    @crew\n    def crew(self) -> Crew:\n        return Crew(\n            agents=self.agents,\n            tasks=self.tasks,\n            process=Process.sequential,\n            verbose=True,\n        )\n```\n\n资料来源：[lib/crewai/README.md]()\n\n### YAML Configuration Structure\n\n#### agents.yaml\n\n```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}.\n\nreporting_analyst:\n  role: >\n    {topic} Reporting Analyst\n  goal: >\n    Create detailed reports based on {topic} data analysis\n```\n\n#### tasks.yaml\n\n```yaml\nresearch_task:\n  description: >\n    Research the latest developments in {topic}\n  expected_output: >\n    A comprehensive report on {topic} developments\n  agent: researcher\n\nreporting_task:\n  description: >\n    Create a detailed report based on research findings\n  expected_output: >\n    A fully fleshed report with main topics\n  agent: reporting_analyst\n```\n\n资料来源：[lib/cli/src/crewai_cli/templates/crew/README.md]()\n\n## Agent Management\n\n### Agent Roles and Responsibilities\n\nAgents within a crew are defined by four key attributes:\n\n| Attribute | Description |\n|-----------|-------------|\n| **role** | Defines the agent's function within the crew |\n| **goal** | The specific objective the agent works toward |\n| **backstory** | Context that shapes the agent's behavior and perspective |\n| **tools** | Capabilities the agent can use to accomplish tasks |\n\n### Agent Creation Pattern\n\n```python\n@agent\ndef researcher(self) -> Agent:\n    return Agent(\n        config=self.agents_config['researcher'],\n        verbose=True,\n        tools=[SerperDevTool()]\n    )\n```\n\nAgents receive their configuration from YAML and can be augmented with additional tools or settings at the point of creation.\n\n资料来源：[lib/crewai/src/crewai/crew.py]()\n\n## Task Management\n\n### Task Definition\n\nTasks represent units of work that agents execute. Each task has:\n\n| Property | Purpose |\n|----------|---------|\n| **description** | What needs to be accomplished |\n| **expected_output** | The format and content of deliverables |\n| **agent** | Which agent executes the task |\n| **output_file** | Optional file for storing results |\n| **dependencies** | Tasks that must complete first |\n\n### Task with Output Handling\n\n```python\n@task\ndef reporting_task(self) -> Task:\n    return Task(\n        config=self.tasks_config['reporting_task'],\n        output_file='report.md'\n    )\n```\n\n### Task Execution Flow\n\n```mermaid\ngraph LR\n    A[Task Created] --> B{Process Type}\n    B -->|Sequential| C[Execute in Order]\n    B -->|Hierarchical| D[Manager Delegates]\n    \n    C --> E[Agent 1 Executes]\n    E --> F[Agent 2 Executes]\n    F --> G[Complete]\n    \n    D --> H[Manager Assigns Task]\n    H --> I[Agent Executes]\n    I --> J[Manager Validates]\n    J --> K[Complete]\n```\n\n## Memory and Context\n\n### Memory Types\n\nCrews can maintain different types of memory to preserve context across executions:\n\n| Memory Type | Scope | Purpose |\n|-------------|-------|---------|\n| **Short-term** | Current session | Temporary working memory |\n| **Long-term** | Across sessions | Persistent learnings |\n| **Entity** | Entity tracking | Knowledge graph of entities |\n| **Knowledge** | Structured data | Domain-specific grounding |\n\n### Memory Management Commands\n\n```bash\ncrewai reset-memories -a              # Reset all memories\ncrewai reset-memories -s              # Short-term only\ncrewai reset-memories -l              # Long-term only\ncrewai reset-memories -e              # Entity only\ncrewai reset-memories -kn             # Knowledge only\ncrewai reset-memories -akn            # Agent knowledge only\n```\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md]()\n\n### Crew Context Utilities\n\nThe `CrewContext` class provides utilities for managing scope-based context within crews. Scopes allow hierarchical organization of memory and context:\n\n```python\ndef join_scope_paths(root: str | None, inner: str | None) -> str:\n    \"\"\"\n    Combines two scope path components.\n    \n    Examples:\n        join_scope_paths(\"/crew/test\", \"/market-trends\") -> '/crew/test/market-trends'\n        join_scope_paths(\"/crew/test\", None) -> '/crew/test'\n    \"\"\"\n```\n\n资料来源：[lib/crewai/src/crewai/utilities/crew/crew_context.py]()\n\n## Execution Flow\n\n### Crew Kickoff\n\nThe main entry point for executing a crew is the `kickoff` method:\n\n```python\nfrom latest_ai_development.crew import LatestAiDevelopmentCrew\n\ndef run():\n    inputs = {'topic': 'AI Agents'}\n    LatestAiDevelopmentCrew().crew().kickoff(inputs=inputs)\n```\n\n### Step Execution\n\nThe `StepExecutor` handles the actual execution of agent steps within the crew context:\n\n```mermaid\nsequenceDiagram\n    participant Crew\n    participant StepExecutor\n    participant Agent\n    participant Task\n    \n    Crew->>StepExecutor: Execute Task\n    StepExecutor->>Agent: Call Agent with Context\n    Agent->>Task: Perform Action\n    Task-->>Agent: Return Result\n    Agent-->>StepExecutor: Step Output\n    StepExecutor-->>Crew: Execution Complete\n```\n\n资料来源：[lib/crewai/src/crewai/agents/step_executor.py]()\n\n### Verbose Mode\n\nDuring development, enable verbose mode to see detailed execution logs:\n\n```python\n@crew\ndef crew(self) -> Crew:\n    return Crew(\n        agents=self.agents,\n        tasks=self.tasks,\n        verbose=True,  # Enable for development\n    )\n```\n\nDisable verbose mode in production for cleaner outputs.\n\n## Crew Execution Options\n\n### Running a Crew\n\n```bash\ncrewai run                  # Run crew or flow (auto-detects from pyproject.toml)\n```\n\nOr directly via Python:\n\n```bash\npython src/my_project/main.py\n```\n\n### Testing and Training\n\n```bash\ncrewai test                           # Test crew (default: 2 iterations, gpt-4o-mini)\ncrewai test -n 5 -m gpt-4o           # Custom iterations and model\ncrewai train -n 5 -f training.json   # Train crew\n```\n\n### Debugging\n\n```bash\ncrewai log-tasks-outputs              # Show latest task outputs\ncrewai replay -t <task_id>            # Replay from specific task\n```\n\n## Best Practices\n\n### Configuration Guidelines\n\n1. **YAML-first configuration**: Define agents and tasks in YAML, keep crew classes minimal\n2. **Use structured output** (`output_pydantic`) for data that flows between tasks or crews\n3. **Use guardrails** to validate task outputs programmatically\n4. **Enable memory** for crews that benefit from cross-session learning\n\n### Process Selection\n\n| Workflow Type | Recommended Process |\n|---------------|---------------------|\n| Linear data pipeline | Sequential |\n| Research and report | Sequential |\n| Multi-agent collaboration | Hierarchical |\n| Dynamic task delegation | Hierarchical |\n| Complex multi-stage projects | Hierarchical with Flows |\n\n### Performance Considerations\n\n| Setting | Purpose |\n|---------|---------|\n| `max_rpm` | Rate limiting to avoid API throttling |\n| `respect_context_window=True` | Auto-handle token limits |\n| `verbose=False` | Reduce logging overhead in production |\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md]()\n\n## Common Patterns\n\n### Multi-Crew Orchestration with Flows\n\nFor complex pipelines involving multiple crews:\n\n```mermaid\ngraph TD\n    A[Flow Start] --> B[Crew 1]\n    B --> C{Condition?}\n    C -->|Path A| D[Crew 2]\n    C -->|Path B| E[Crew 3]\n    D --> F[Output]\n    E --> F\n```\n\nUse `@start`, `@listen`, and `@router` decorators for complex flow orchestration.\n\n### Crew with Tools\n\n```python\nfrom crewai_tools import SerperDevTool\n\n@agent\ndef researcher(self) -> Agent:\n    return Agent(\n        config=self.agents_config['researcher'],\n        tools=[SerperDevTool()]  # Attach tools to agent\n    )\n```\n\n## Summary\n\nThe Crew orchestration system in CrewAI provides a flexible framework for coordinating multiple AI agents. Key takeaways:\n\n- **Crews** are the primary unit of multi-agent collaboration\n- **Processes** (Sequential/Hierarchical) define how tasks are coordinated\n- **Agents** are specialized roles with specific goals and tools\n- **Tasks** represent units of work with dependencies and expected outputs\n- **Memory** enables context preservation across executions\n- **YAML configuration** keeps agent/task definitions separate from code\n\nThis architecture enables everything from simple sequential pipelines to complex hierarchical multi-agent systems with dynamic task delegation.\n\n---\n\n<a id='flows'></a>\n\n## Flows - Event-Driven Workflows\n\n### 相关页面\n\n相关主题：[Crews and Crew Orchestration](#crews), [Agents Architecture](#agents)\n\n<details>\n<summary>Related Source Files</summary>\n\nThe following source files and documentation were used to generate this page:\n\n- [lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n- [lib/crewai/src/crewai/flow/flow_serializer.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/flow/flow_serializer.py)\n- [lib/cli/src/crewai_cli/templates/flow/README.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/flow/README.md)\n- [lib/crewai/README.md](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/README.md)\n- [lib/crewai-tools/src/crewai_tools/tools/invoke_crewai_automation_tool/invoke_crewai_automation_tool.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai-tools/src/crewai_tools/tools/invoke_crewai_automation_tool/invoke_crewai_automation_tool.py)\n</details>\n\n# Flows - Event-Driven Workflows\n\n## Overview\n\nFlows in CrewAI provide an event-driven architecture for orchestrating complex, multi-step AI workflows. They enable precise control over execution order, conditional branching, and state management—offering a perfect balance alongside Crew-based autonomous agent orchestration.\n\nFlows are designed for scenarios requiring **sequential execution**, **conditional logic**, **state persistence**, and **event-based triggers**. Unlike Crews that operate autonomously with agents collaborating freely, Flows provide deterministic workflow patterns where execution follows explicit routing rules.\n\n资料来源：[lib/crewai/README.md](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/README.md)\n\n## Core Concepts\n\n### Flow Architecture\n\nA Flow is a Python class that extends the `Flow` base class, decorated with methods that define the workflow graph:\n\n```mermaid\ngraph TD\n    A[Start] --> B[Method A]\n    B --> C{Decision}\n    C -->|Path 1| D[Method B]\n    C -->|Path 2| E[Method C]\n    D --> F[End]\n    E --> F\n```\n\n### Key Components\n\n| Component | Purpose |\n|-----------|---------|\n| `Flow` | Base class for all flows |\n| `@start()` | Marks methods as entry points |\n| `@listen()` | Triggers method execution after another completes |\n| `@router()` | Implements conditional branching logic |\n| `@human_feedback()` | Pauses execution for user input |\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n\n## Flow Execution Model\n\n### Start Methods\n\nMethods decorated with `@start()` execute immediately when the flow begins. Multiple `@start()` decorators can be defined, causing parallel execution:\n\n```python\nfrom crewai.flow.flow import Flow, start, listen\n\nclass MyFlow(Flow):\n    @start()\n    def begin(self):\n        return \"initial data\"\n\n    @start()\n    def begin_parallel(self):\n        return \"parallel data\"\n```\n\n### Listen Decorators\n\nThe `@listen()` decorator binds a method to the completion of another method. The decorated method receives the output of the triggering method as its argument:\n\n```python\nfrom crewai.flow.flow import Flow, start, listen\n\nclass ResearchFlow(Flow):\n    @start()\n    def set_topic(self):\n        return \"AI Agents\"\n\n    @listen(set_topic)\n    def do_research(self, topic):\n        # self.state.topic is available\n        result = ResearchCrew().crew().kickoff(\n            inputs={\"topic\": topic}\n        )\n        return result.raw\n```\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n\n## State Management\n\n### Structured State with Pydantic\n\nFlows support type-safe state management using Pydantic models. Define a state class that inherits from `BaseModel`:\n\n```python\nfrom crewai.flow.flow import Flow, start, listen\nfrom pydantic import BaseModel\n\nclass ResearchState(BaseModel):\n    topic: str = \"\"\n    research: str = \"\"\n    report: str = \"\"\n\nclass ResearchFlow(Flow[ResearchState]):\n    @start()\n    def set_topic(self):\n        self.state.topic = \"AI Agents\"\n\n    @listen(set_topic)\n    def do_research(self):\n        result = ResearchCrew().crew().kickoff(\n            inputs={\"topic\": self.state.topic}\n        )\n        self.state.research = result.raw\n        return self.state.research\n\n    @listen(do_research)\n    def write_report(self, research_data):\n        self.state.report = f\"# Report on {self.state.topic}\\n\\n{research_data}\"\n        return self.state.report\n```\n\nBenefits of structured state:\n- **Type safety** across method boundaries\n- **IDE autocompletion** for state fields\n- **Validation** of state transitions\n- **Persistence** of state between executions\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n\n### State Flow Diagram\n\n```mermaid\ngraph LR\n    A[set_topic] --> B[State Update<br/>topic: \"AI Agents\"]\n    B --> C[do_research]\n    C --> D[State Update<br/>research: data]\n    D --> E[write_report]\n    E --> F[State Update<br/>report: content]\n```\n\n## Conditional Routing\n\n### Router Decorator\n\nThe `@router()` decorator enables conditional branching based on method output. Routers return string labels that determine which `@listen()` methods execute:\n\n```python\nfrom crewai.flow.flow import Flow, start, listen, router\n\nclass DocumentProcessingFlow(Flow):\n    @start()\n    def receive_document(self):\n        return {\"type\": \"image\", \"path\": \"/path/to/image.png\"}\n\n    @router(receive_document)\n    def classify_document(self, doc):\n        if doc[\"type\"] == \"image\":\n            return \"image_processing\"\n        elif doc[\"type\"] == \"text\":\n            return \"text_processing\"\n        return \"unsupported\"\n\n    @listen(\"image_processing\")\n    def process_image(self, doc):\n        return f\"Processed image: {doc['path']}\"\n\n    @listen(\"text_processing\")\n    def process_text(self, doc):\n        return f\"Processed text: {doc['path']}\"\n\n    @listen(\"unsupported\")\n    def handle_unsupported(self, doc):\n        return f\"Unsupported document type: {doc['type']}\"\n```\n\n### Routing Flow Diagram\n\n```mermaid\ngraph TD\n    A[receive_document] --> B{classify_document}\n    B -->|image_processing| C[process_image]\n    B -->|text_processing| D[process_text]\n    B -->|unsupported| E[handle_unsupported]\n```\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n\n## Event System Integration\n\n### Event-Driven Architecture\n\nFlows integrate with CrewAI's event system to enable reactive execution patterns. The `flow_serializer.py` module provides introspection capabilities for visualizing flow structures:\n\n```python\nfrom crewai.flow.flow_serializer import flow_structure\n\nstructure = flow_structure(MyFlow)\nprint(structure[\"name\"])  # Flow class name\nprint(structure[\"methods\"])  # All decorated methods\nprint(structure[\"edges\"])  # Connections between methods\n```\n\n### Event Categories\n\nFlows support integration with multiple event categories:\n\n| Category | Description |\n|----------|-------------|\n| Flow execution | Start, completion, and error events |\n| Agent execution | Individual agent state changes |\n| Task management | Task lifecycle events |\n| Tool usage | Tool invocation events |\n| Safety guardrails | Validation and compliance events |\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n\n## Flow API Reference\n\n### Flow Base Class\n\n```python\nclass Flow[StateType]:\n    \"\"\"Base class for all flows.\"\"\"\n    \n    state: StateType  # Typed state instance\n    \n    def kickoff(self, inputs: dict = None) -> Any:\n        \"\"\"Execute the flow from start methods.\"\"\"\n    \n    def kickoff_async(self, inputs: dict = None) -> Any:\n        \"\"\"Execute the flow asynchronously.\"\"\"\n```\n\n### Decorators\n\n| Decorator | Parameters | Returns | Description |\n|-----------|------------|---------|-------------|\n| `@start()` | - | None | Marks entry point method |\n| `@listen()` | method | None | Binds to method completion |\n| `@router()` | method | str | Returns routing label |\n| `@human_feedback()` | prompt | str | Requests user input |\n\n### Method Information Types\n\nThe `flow_serializer.py` module defines `MethodInfo` for introspecting flow methods:\n\n```python\nclass MethodInfo(TypedDict, total=False):\n    name: str\n    type: str  # start, listen, router, start_router\n    trigger_methods: list[str]\n    condition_type: str | None  # AND, OR\n    router_paths: list[str]\n    has_human_feedback: bool\n```\n\n资料来源：[lib/crewai/src/crewai/flow/flow_serializer.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/flow/flow_serializer.py)\n\n## Flow Structure Serialization\n\n### Introspection for UI Rendering\n\nThe `flow_structure()` function analyzes a Flow class and returns a JSON-serializable dictionary:\n\n```python\nfrom crewai.flow.flow_serializer import flow_structure\n\nclass MyFlow(Flow):\n    @start()\n    def begin(self):\n        return \"started\"\n\n    @listen(begin)\n    def process(self):\n        return \"done\"\n\nstructure = flow_structure(MyFlow)\n# Returns:\n# {\n#     \"name\": \"MyFlow\",\n#     \"methods\": [...],\n#     \"edges\": [...],\n#     \"state_schema\": {...}\n# }\n```\n\nThis serialization enables CrewAI Studio UI to render visual flow graphs.\n\n资料来源：[lib/crewai/src/crewai/flow/flow_serializer.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/flow/flow_serializer.py)\n\n## Integration with Crews\n\n### Calling Crews from Flows\n\nFlows can invoke Crews for agent-based task execution:\n\n```python\nclass ResearchFlow(Flow[ResearchState]):\n    @start()\n    def set_topic(self):\n        self.state.topic = \"AI Agents\"\n\n    @listen(set_topic)\n    def do_research(self):\n        crew = ResearchCrew().crew()\n        result = crew.kickoff(inputs={\"topic\": self.state.topic})\n        self.state.research = result.raw\n        return result.raw\n```\n\n### Flow-to-Crew Communication\n\n```mermaid\ngraph TD\n    A[Flow Start] --> B[Set Topic]\n    B --> C[Crew Kickoff]\n    C --> D[Agent 1]\n    C --> E[Agent 2]\n    D --> F[Task Complete]\n    E --> G[Task Complete]\n    F --> H[Flow Resume]\n    G --> H\n    H --> I[Process Results]\n```\n\n## Best Practices\n\n### When to Use Flows\n\n| Use Case | Recommendation |\n|----------|----------------|\n| Linear workflows with clear steps | Sequential Flow |\n| Dynamic agent delegation | Hierarchical Crew |\n| Multi-crew orchestration | Flow with Crew calls |\n| Conditional branching | Router-based Flow |\n| Human-in-the-loop | Flow with `@human_feedback()` |\n\n### Design Guidelines\n\n1. **Use structured state (Pydantic models)** over unstructured dicts for type safety\n2. **Prefer Flows for multi-crew orchestration** when complex pipelines are needed\n3. **Use `@start()` with multiple methods** only when parallel execution is required\n4. **Keep router labels descriptive** for maintainable flow graphs\n5. **Enable verbose mode during development**, disable in production\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/AGENTS.md)\n\n## Running Flows\n\n### CLI Commands\n\n```bash\n# Run crew or flow (auto-detects from pyproject.toml)\ncrewai run\n\n# Legacy flow execution\ncrewai flow kickoff\n```\n\n### Programmatic Execution\n\n```python\nfrom my_flow import ResearchFlow\n\nflow = ResearchFlow()\nresult = flow.kickoff(inputs={\"topic\": \"AI Agents\"})\nprint(result)\n```\n\n资料来源：[lib/cli/src/crewai_cli/templates/flow/README.md](https://github.com/crewAIInc/crewAI/blob/main/lib/cli/src/crewai_cli/templates/flow/README.md)\n\n## Advanced Patterns\n\n### Multi-Crew Orchestration\n\n```python\nclass OrchestrationFlow(Flow):\n    @start()\n    def initialize(self):\n        return {\"task\": \"complex_research\"}\n\n    @listen(initialize)\n    def research_crew_execution(self, task):\n        return ResearchCrew().crew().kickoff(inputs=task)\n\n    @listen(research_crew_execution)\n    def analysis_crew_execution(self, research_results):\n        return AnalysisCrew().crew().kickoff(\n            inputs={\"data\": research_results}\n        )\n\n    @listen(analysis_crew_execution)\n    def reporting(self, analysis):\n        return ReportCrew().crew().kickoff(\n            inputs={\"analysis\": analysis}\n        )\n```\n\n### Error Handling in Flows\n\n```python\nclass ResilientFlow(Flow):\n    @start()\n    def begin(self):\n        try:\n            return risky_operation()\n        except Exception as e:\n            self.state.error = str(e)\n            return \"error_state\"\n\n    @router(begin)\n    def handle_result(self, result):\n        if result == \"error_state\":\n            return \"error_handler\"\n        return \"success_path\"\n\n    @listen(\"error_handler\")\n    def handle_error(self, _):\n        return \"Recovery action completed\"\n```\n\n## Summary\n\nFlows provide a powerful event-driven workflow system for CrewAI that complements the autonomous agent orchestration of Crews. Key takeaways:\n\n- **Decorators** (`@start`, `@listen`, `@router`, `@human_feedback`) define the workflow graph\n- **Structured state** with Pydantic ensures type safety and validation\n- **Event serialization** enables visual flow editing in CrewAI Studio\n- **Crews integration** allows delegating complex tasks to agent teams\n- **Conditional routing** provides flexible decision-making capabilities\n\nFlows are ideal for precise, deterministic workflows where execution order and branching logic are critical, while Crews excel at autonomous multi-agent collaboration.\n\n---\n\n<a id='llm-providers'></a>\n\n## LLM Providers and Configuration\n\n### 相关页面\n\n相关主题：[Agents Architecture](#agents)\n\n<details>\n<summary>Relevant Source Files</summary>\n\n以下源码文件用于生成本页说明：\n\n- [lib/crewai/src/crewai/llm.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/llm.py)\n- [lib/crewai/src/crewai/llms/__init__.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/llms/__init__.py)\n- [lib/crewai/src/crewai/llms/base_llm.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/llms/base_llm.py)\n- [lib/crewai/src/crewai/llms/providers/openai/completion.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/llms/providers/openai/completion.py)\n- [lib/crewai/src/crewai/llms/providers/anthropic/completion.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/llms/providers/anthropic/completion.py)\n- [lib/crewai-tools/src/crewai_tools/tools/code_docs_search_tool/README.md](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai-tools/src/crewai_tools/tools/code_docs_search_tool/README.md)\n- [lib/crewai-tools/src/crewai_tools/tools/pdf_search_tool/README.md](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai-tools/src/crewai_tools/tools/pdf_search_tool/README.md)\n- [lib/crewai/src/crewai/tasks/hallucination_guardrail.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/tasks/hallucination_guardrail.py)\n</details>\n\n# LLM Providers and Configuration\n\n## Overview\n\nThe LLM (Large Language Model) Providers and Configuration system in CrewAI provides a flexible, extensible architecture for integrating multiple AI model providers into the agent execution pipeline. This system allows developers to configure, customize, and switch between different LLM backends while maintaining a consistent interface for agent operations.\n\nThe configuration system supports multiple providers including OpenAI, Anthropic, Google, Ollama, and Llama2, enabling both embedding and summarization capabilities through a unified config dictionary approach.\n\n资料来源：[lib/crewai-tools/src/crewai_tools/tools/code_docs_search_tool/README.md]()\n\n## Architecture\n\nThe LLM provider system follows a modular architecture with the following components:\n\n```mermaid\ngraph TD\n    A[Agent] --> B[LLM Configuration]\n    B --> C[Provider Selection]\n    C --> D[OpenAI Provider]\n    C --> E[Anthropic Provider]\n    C --> F[Google Provider]\n    C --> G[Ollama Provider]\n    C --> H[Llama2 Provider]\n    D --> I[Model Execution]\n    E --> I\n    F --> I\n    G --> I\n    H --> I\n    I --> J[Response Processing]\n    J --> K[Agent Output]\n```\n\n### Core Components\n\n| Component | Purpose | Location |\n|-----------|---------|----------|\n| `LLM` | Main LLM interface class | `lib/crewai/src/crewai/llm.py` |\n| `BaseLLM` | Abstract base for all providers | `lib/crewai/src/crewai/llms/base_llm.py` |\n| `Providers` | Provider-specific implementations | `lib/crewai/src/crewai/llms/providers/` |\n| Config Dictionary | Runtime configuration | User-defined |\n\n资料来源：[lib/crewai/src/crewai/llm.py](), [lib/crewai/src/crewai/llms/base_llm.py]()\n\n## Configuration Pattern\n\n### Standard Configuration Structure\n\nAll tools and agents using LLM configuration follow a standardized config dictionary pattern:\n\n```python\nconfig=dict(\n    llm=dict(\n        provider=\"provider_name\",\n        config=dict(\n            model=\"model_name\",\n            # Optional parameters\n            temperature=0.5,\n            top_p=1,\n            stream=True,\n        ),\n    ),\n    embedder=dict(\n        provider=\"embedder_provider\",\n        config=dict(\n            model=\"embedding_model\",\n            task_type=\"retrieval_document\",\n        ),\n    ),\n)\n```\n\n资料来源：[lib/crewai-tools/src/crewai_tools/tools/code_docs_search_tool/README.md](), [lib/crewai-tools/src/crewai_tools/tools/pdf_search_tool/README.md]()\n\n### Supported Providers\n\n| Provider | Provider ID | Example Model |\n|----------|-------------|---------------|\n| OpenAI | `openai` | `gpt-4`, `gpt-4o-mini` |\n| Anthropic | `anthropic` | `claude-3`, `claude-3.5-sonnet` |\n| Google | `google` | `models/embedding-001` |\n| Ollama | `ollama` | `llama2`, `mistral` |\n| Llama2 | `llama2` | `meta/llama2` |\n\n资料来源：[lib/crewai-tools/src/crewai_tools/tools/code_docs_search_tool/README.md]()\n\n## LLM Class Integration\n\n### Initialization Parameters\n\nThe primary `LLM` class serves as the main interface for language model operations:\n\n```python\nfrom crewai import LLM\n\nllm = LLM(\n    model=\"gpt-4\",\n    api_key=\"your-api-key\",\n    temperature=0.7,\n)\n```\n\n### Guardrail Integration\n\nLLMs are used as dependencies in guardrail implementations such as the `HallucinationGuardrail`:\n\n```python\nfrom crewai.tasks.hallucination_guardrail import HallucinationGuardrail\n\nguardrail = HallucinationGuardrail(\n    llm=agent.llm,\n    threshold=8.0,\n    context=\"Reference context for validation\",\n)\n```\n\n资料来源：[lib/crewai/src/crewai/tasks/hallucination_guardrail.py:1-70]()\n\n## Provider-Specific Configuration\n\n### OpenAI Configuration\n\n```python\ntool = SomeTool(\n    config=dict(\n        llm=dict(\n            provider=\"openai\",\n            config=dict(\n                model=\"gpt-4o-mini\",\n                temperature=0.5,\n                # streaming support available\n            ),\n        ),\n    )\n)\n```\n\n资料来源：[lib/crewai/src/crewai/llms/providers/openai/completion.py]()\n\n### Anthropic Configuration\n\n```python\ntool = SomeTool(\n    config=dict(\n        llm=dict(\n            provider=\"anthropic\",\n            config=dict(\n                model=\"claude-3-sonnet-20240229\",\n            ),\n        ),\n    )\n)\n```\n\n资料来源：[lib/crewai/src/crewai/llms/providers/anthropic/completion.py]()\n\n### Google Embeddings Configuration\n\n```python\nembedder=dict(\n    provider=\"google\",\n    config=dict(\n        model=\"models/embedding-001\",\n        task_type=\"retrieval_document\",\n    ),\n)\n```\n\n资料来源：[lib/crewai-tools/src/crewai_tools/tools/code_docs_search_tool/README.md]()\n\n### Ollama Configuration\n\n```python\nllm=dict(\n    provider=\"ollama\",\n    config=dict(\n        model=\"llama2\",\n        temperature=0.5,\n        top_p=1,\n        stream=True,\n    ),\n)\n```\n\n资料来源：[lib/crewai-tools/src/crewai_tools/tools/code_docs_search_tool/README.md]()\n\n## Embedder Configuration\n\nEmbedders handle vector embedding generation for retrieval-augmented generation (RAG) workflows:\n\n| Parameter | Type | Description | Default |\n|-----------|------|-------------|---------|\n| `provider` | string | Embedding provider name | `openai` |\n| `model` | string | Model identifier | Provider-specific |\n| `task_type` | string | Embedding use case | `retrieval_document` |\n| `title` | string | Optional title for embeddings | None |\n\n资料来源：[lib/crewai-tools/src/crewai_tools/tools/code_docs_search_tool/README.md]()\n\n## Default Behavior\n\nBy default, tools use OpenAI for both embeddings and summarization:\n\n> By default, the tool uses OpenAI for both embeddings and summarization.\n\n资料来源：[lib/crewai-tools/src/crewai_tools/tools/code_docs_search_tool/README.md](), [lib/crewai-tools/src/crewai_tools/tools/pdf_search_tool/README.md]()\n\n## Configuration Workflow\n\n```mermaid\ngraph LR\n    A[Define Config Dict] --> B[Select Provider]\n    B --> C[Specify Model]\n    C --> D[Set Optional Params]\n    D --> E[Initialize Tool/Agent]\n    E --> F[LLM Loaded at Runtime]\n    F --> G[Execution with Provider]\n```\n\n## Environment Variables\n\nAPI keys should be configured via environment variables for security:\n\n```bash\nexport OPENAI_API_KEY=\"sk-...\"\nexport ANTHROPIC_API_KEY=\"sk-ant-...\"\nexport GOOGLE_API_KEY=\"...\"\nexport LINKUP_API_KEY=\"...\"\n```\n\n资料来源：[lib/crewai-tools/src/crewai_tools/tools/linkup/README.md]()\n\n## Best Practices\n\n1. **Environment Security**: Store API keys in environment variables rather than hardcoding\n2. **Provider Selection**: Choose providers based on task requirements (cost, latency, capabilities)\n3. **Temperature Tuning**: Adjust temperature based on task creativity needs (lower for factual, higher for creative)\n4. **Model Selection**: Use smaller/faster models for simple tasks to reduce costs\n5. **Embedder Consistency**: Use compatible embedders for your vector store\n\n## Related Documentation\n\n- [CrewAI Agents Configuration](agents)\n- [CrewAI Tasks Configuration](tasks)\n- [Tools Integration Guide](tools)\n- [Guardrails System](guardrails)\n\n---\n\n<a id='agent-to-agent'></a>\n\n## Agent-to-Agent (A2A) Communication\n\n### 相关页面\n\n相关主题：[Agents Architecture](#agents), [Crews and Crew Orchestration](#crews)\n\n<details>\n<summary>Related Source Files</summary>\n\nThe following source files were used to generate this documentation:\n\n- [lib/crewai/src/crewai/a2a/__init__.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/a2a/__init__.py)\n- [lib/crewai/src/crewai/a2a/types.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/a2a/types.py)\n- [lib/crewai/src/crewai/a2a/wrapper.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/a2a/wrapper.py)\n- [lib/crewai/src/crewai/a2a/extensions/a2ui/__init__.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/a2a/extensions/a2ui/__init__.py)\n- [lib/crewai/src/crewai/a2a/utils/delegation.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/a2a/utils/delegation.py)\n- [lib/crewai/src/crewai/a2a/extensions/a2ui/schema/v0_8/server_to_client_with_standard_catalog.json](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/a2a/extensions/a2ui/schema/v0_8/server_to_client_with_standard_catalog.json)\n</details>\n\n# Agent-to-Agent (A2A) Communication\n\nAgent-to-Agent (A2A) Communication is a core architectural layer in CrewAI that enables autonomous agents to exchange messages, delegate tasks, and collaborate within multi-agent workflows. This module provides the infrastructure for agents to interact, share context, and coordinate their activities seamlessly.\n\n## Overview\n\nThe A2A subsystem in CrewAI implements a standardized communication protocol that allows agents to:\n\n- Exchange structured messages with rich content types\n- Delegate tasks to other agents with appropriate context\n- Share execution results and artifacts\n- Coordinate through hierarchical or collaborative processes\n\nThe implementation follows modern agent communication patterns and provides both a programmatic API and extension points for UI integration. 资料来源：[lib/crewai/src/crewai/a2a/__init__.py]()\n\n## Architecture\n\n### High-Level Architecture\n\n```mermaid\ngraph TD\n    subgraph \"Agent Layer\"\n        A1[Agent 1]\n        A2[Agent 2]\n        A3[Agent N]\n    end\n    \n    subgraph \"A2A Core\"\n        TW[A2A Wrapper]\n        TT[A2A Types]\n        UD[Utils: Delegation]\n    end\n    \n    subgraph \"Extension Layer\"\n        A2UI[A2UI Extensions]\n        SCH[Schema v0.8]\n    end\n    \n    A1 <--> TW\n    A2 <--> TW\n    A3 <--> TW\n    TW <--> TT\n    TW <--> UD\n    TW <--> A2UI\n    A2UI <--> SCH\n```\n\n### Component Responsibilities\n\n| Component | Purpose | Key Responsibilities |\n|-----------|---------|---------------------|\n| `wrapper.py` | A2A Communication Handler | Manages message routing, task delegation, and response handling |\n| `types.py` | Data Models | Defines message structures, content types, and protocol elements |\n| `delegation.py` | Task Delegation Utility | Provides helper functions for agent delegation patterns |\n| `a2ui/` | UI Extensions | Schema definitions for Agent-to-User Interface communication |\n| `schema/v0_8/` | Protocol Schemas | JSON schemas for message validation and serialization |\n\n资料来源：[lib/crewai/src/crewai/a2a/wrapper.py]()\n\n## Core Types and Data Models\n\nThe A2A module defines comprehensive data models for structured communication between agents. These types ensure type safety and consistent message formats across the system.\n\n### Content Types\n\nThe A2A protocol supports multiple content types for flexible message composition:\n\n```mermaid\ngraph LR\n    M[Message] --> T[TextContent]\n    M --> A[ArtifactContent]\n    M --> T2[TaskContent]\n    M --> S[StatusContent]\n    M --> P[Part]\n    \n    T --> TT[Text]\n    A --> DT[Document]\n    A --> C[Code]\n    A --> D[Data]\n```\n\n### Message Structure\n\nMessages in A2A communication follow a standardized structure defined in the schema:\n\n```json\n{\n  \"message\": {\n    \"role\": \"string\",\n    \"content\": {\n      \"parts\": []\n    },\n    \"agent\": \"string\",\n    \"taskId\": \"string\"\n  }\n}\n```\n\n资料来源：[lib/crewai/src/crewai/a2a/types.py]()\n\n## A2A Wrapper\n\nThe `A2AWrapper` class serves as the primary interface for agent communication:\n\n```python\nclass A2AWrapper:\n    \"\"\"Handles Agent-to-Agent communication and delegation.\"\"\"\n    \n    def __init__(self, config: A2AConfig):\n        self.config = config\n        \n    def send_message(self, agent_id: str, message: A2AMessage) -> A2AResponse:\n        \"\"\"Send a message to another agent.\"\"\"\n        \n    def delegate_task(self, target_agent: str, task: Task) -> DelegationResult:\n        \"\"\"Delegate a task to another agent.\"\"\"\n        \n    def receive_message(self, message: A2AMessage) -> None:\n        \"\"\"Process an incoming message from another agent.\"\"\"\n```\n\n### Key Methods\n\n| Method | Parameters | Return Type | Description |\n|--------|------------|-------------|-------------|\n| `send_message` | `agent_id`, `message` | `A2AResponse` | Send a message to a specific agent |\n| `delegate_task` | `target_agent`, `task` | `DelegationResult` | Delegate a task with full context |\n| `receive_message` | `message` | `None` | Process incoming messages |\n| `get_status` | `task_id` | `TaskStatus` | Get the status of a delegated task |\n\n资料来源：[lib/crewai/src/crewai/a2a/wrapper.py]()\n\n## Task Delegation\n\nThe delegation utility provides specialized functions for distributing work across agents:\n\n```python\ndef delegate_to_agent(\n    source_agent: str,\n    target_agent: str,\n    task: Task,\n    context: Dict[str, Any]\n) -> DelegationResult:\n    \"\"\"Delegate a task from one agent to another.\"\"\"\n    \ndef create_delegation_context(\n    source: Agent,\n    target: Agent,\n    task: Task\n) -> DelegationContext:\n    \"\"\"Create a context object for delegation.\"\"\"\n```\n\n### Delegation Flow\n\n```mermaid\ngraph TD\n    S[Source Agent] -->|Identifies Task| D1{Delegation Decision}\n    D1 -->|Can Delegate| C1[Create Context]\n    D1 -->|Cannot Delegate| R1[Reject Task]\n    C1 -->|Prepare Message| M1[Build A2A Message]\n    M1 -->|Send via Wrapper| TW[A2A Wrapper]\n    TW -->|Route Message| T[Target Agent]\n    T -->|Execute Task| TR[Task Result]\n    TR -->|Send Response| TW2[A2A Wrapper]\n    TW2 -->|Route Response| S2[Source Agent]\n```\n\n### Delegation Context\n\nThe `DelegationContext` object captures all necessary information for proper task delegation:\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `source_agent` | `str` | Identifier of the delegating agent |\n| `target_agent` | `str` | Identifier of the receiving agent |\n| `task_id` | `str` | Unique identifier for the task |\n| `priority` | `int` | Delegation priority (1-10) |\n| `timeout` | `int` | Maximum execution time in seconds |\n| `retry_count` | `int` | Number of retry attempts |\n\n资料来源：[lib/crewai/src/crewai/a2a/utils/delegation.py]()\n\n## A2UI Extensions\n\nThe A2UI (Agent-to-User Interface) module provides schema definitions for rendering agent outputs in user interfaces:\n\n```python\n# Extension initialization\nfrom crewai.a2a.extensions.a2ui import A2UIExtension\n\nextension = A2UIExtension()\nextension.register_handlers()\n```\n\n### Supported Content Rendering\n\n| Content Type | Description | Schema Reference |\n|--------------|-------------|------------------|\n| `text` | Plain text with optional hints | `server_to_client_with_standard_catalog.json` |\n| `image` | Image content with sizing options | `server_to_client_with_standard_catalog.json` |\n| `url` | Web links with metadata | `server_to_client_with_standard_catalog.json` |\n\n### Text Styling Hints\n\nThe schema supports the following text style hints for UI rendering:\n\n| Style Hint | Description | Use Case |\n|------------|-------------|----------|\n| `h1` | Largest heading | Main section titles |\n| `h2` | Second largest heading | Subsection titles |\n| `h3` | Third largest heading | Minor headings |\n| `h4` | Fourth largest heading | Component labels |\n| `h5` | Fifth largest heading | Detailed labels |\n| `caption` | Small text | Figure captions, footnotes |\n| `body` | Standard body text | Regular content |\n\n### Image Rendering Options\n\nImages in A2A messages support the following fit modes:\n\n| Fit Mode | CSS Equivalent | Description |\n|----------|----------------|-------------|\n| `contain` | `object-fit: contain` | Scale to fit within bounds |\n| `cover` | `object-fit: cover` | Scale to fill bounds, crop if needed |\n| `fill` | `object-fit: fill` | Stretch to fill bounds |\n\n资料来源：[lib/crewai/src/crewai/a2a/extensions/a2ui/__init__.py]()\n资料来源：[lib/crewai/src/crewai/a2a/extensions/a2ui/schema/v0_8/server_to_client_with_standard_catalog.json]()\n\n## Protocol Versioning\n\nThe A2A protocol uses semantic versioning with the current implementation supporting **v0.8**:\n\n```mermaid\ngraph LR\n    V08[v0.8] -->|Current| C[Current Schema]\n    V08 -->|Features| T[Text Hints]\n    V08 -->|Features| I[Image Fit Options]\n    V08 -->|Features| U[URL References]\n    \n    C -->|Evolution| F[Future Versions]\n```\n\nSchema files are organized by version in the `schema/` directory, allowing for backward compatibility and gradual migration:\n\n```\nlib/crewai/src/crewai/a2a/extensions/a2ui/schema/\n└── v0_8/\n    └── server_to_client_with_standard_catalog.json\n```\n\n## Usage Examples\n\n### Basic Agent Communication\n\n```python\nfrom crewai.a2a import A2AWrapper, A2AMessage, A2AConfig\n\n# Initialize the A2A wrapper\nconfig = A2AConfig(\n    agent_id=\"researcher_01\",\n    capabilities=[\"delegate\", \"respond\"]\n)\nwrapper = A2AWrapper(config)\n\n# Create and send a message\nmessage = A2AMessage(\n    role=\"agent\",\n    content={\n        \"parts\": [\n            {\"text\": \"Please analyze the provided data and return insights\"}\n        ]\n    },\n    agent=\"researcher_01\"\n)\n\nresponse = wrapper.send_message(\n    agent_id=\"analyst_01\",\n    message=message\n)\n```\n\n### Task Delegation Pattern\n\n```python\nfrom crewai.a2a.utils.delegation import delegate_to_agent, create_delegation_context\n\n# Create delegation context\ncontext = create_delegation_context(\n    source=researcher_agent,\n    target=analyst_agent,\n    task=analysis_task\n)\n\n# Execute delegation\nresult = delegate_to_agent(\n    source_agent=\"researcher_01\",\n    target_agent=\"analyst_01\",\n    task=analysis_task,\n    context={\"priority\": \"high\", \"deadline\": \"2024-01-15\"}\n)\n```\n\n### UI-Ready Response Structure\n\n```python\nfrom crewai.a2a.extensions.a2ui import create_ui_response\n\n# Create a response optimized for UI rendering\nui_response = create_ui_response(\n    content_type=\"text\",\n    text=\"Research findings have been compiled\",\n    style_hint=\"body\"\n)\n\n# Or include rich content\nui_response = create_ui_response(\n    content_type=\"image\",\n    url={\"literalString\": \"https://example.com/chart.png\"},\n    fit=\"contain\"\n)\n```\n\n## Integration with CrewAI\n\nThe A2A module integrates with CrewAI's core components:\n\n```mermaid\ngraph TD\n    subgraph \"CrewAI Core\"\n        C[Crew]\n        P[Process]\n        A[Agents]\n        T[Tasks]\n    end\n    \n    subgraph \"A2A Layer\"\n        W[Wrapper]\n        D[Delegation Utils]\n        U[A2UI]\n    end\n    \n    C -->|Orchestrates| A\n    A -->|Communicates via| W\n    W -->|Delegates via| D\n    W -->|Renders via| U\n    A -->|Execute| T\n    P -->|Manages Flow| C\n```\n\n### Integration Points\n\n| Component | Integration | Description |\n|-----------|-------------|-------------|\n| `Crew` | Automatic initialization | Creates A2A wrapper for each agent |\n| `Agent` | Message handling | Uses A2A for inter-agent communication |\n| `Task` | Delegation support | Can be delegated via A2A protocol |\n| `Process` | Coordination | Uses A2A for process-level messaging |\n\n## Configuration Options\n\n### A2AConfig Parameters\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `agent_id` | `str` | Required | Unique identifier for the agent |\n| `capabilities` | `List[str]` | `[]` | Supported capabilities |\n| `timeout` | `int` | `300` | Default timeout in seconds |\n| `retry_attempts` | `int` | `3` | Number of retry attempts |\n| `enable_ui_extension` | `bool` | `True` | Enable A2UI rendering |\n\n### Environment Variables\n\n| Variable | Description |\n|----------|-------------|\n| `A2A_TIMEOUT` | Global A2A operation timeout |\n| `A2A_MAX_RETRIES` | Maximum retry attempts |\n| `A2A_LOG_LEVEL` | Logging verbosity |\n\n## Best Practices\n\n1. **Message Design**: Keep messages focused and atomic for better error handling\n2. **Context Preservation**: Always include sufficient context when delegating tasks\n3. **Error Handling**: Implement proper exception handling for network failures\n4. **Schema Validation**: Validate messages against the A2UI schema before sending\n5. **Timeout Management**: Set appropriate timeouts based on task complexity\n\n## Summary\n\nThe Agent-to-Agent (A2A) Communication module in CrewAI provides a robust foundation for multi-agent collaboration. Key features include:\n\n- **Standardized messaging** with support for multiple content types\n- **Task delegation** with full context preservation\n- **UI extensions** for rich content rendering\n- **Versioned schemas** ensuring backward compatibility\n- **Deep integration** with CrewAI's agent and task systems\n\nThe modular architecture allows for flexible extension and customization while maintaining a consistent communication protocol across all agents in a crew.\n\n---\n\n<a id='knowledge'></a>\n\n## Knowledge Management\n\n### 相关页面\n\n相关主题：[Memory and Storage System](#memory)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [lib/crewai/src/crewai/knowledge/knowledge.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/knowledge/knowledge.py)\n- [lib/crewai/src/crewai/knowledge/source/pdf_knowledge_source.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/knowledge/source/pdf_knowledge_source.py)\n- [lib/crewai/src/crewai/knowledge/source/csv_knowledge_source.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/knowledge/source/csv_knowledge_source.py)\n- [lib/crewai/src/crewai/knowledge/storage/knowledge_storage.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/knowledge/storage/knowledge_storage.py)\n</details>\n\n# Knowledge Management\n\n## Overview\n\nKnowledge Management in crewAI provides a structured framework for agents to store, retrieve, and utilize contextual information during task execution. This system enables crews to maintain persistent knowledge that can be referenced across multiple agent interactions, enhancing the contextual awareness and accuracy of agent responses.\n\n## Architecture\n\nThe Knowledge Management system consists of three primary components working in coordination:\n\n```mermaid\ngraph TD\n    A[Agent] --> B[Knowledge Source]\n    B --> C[Knowledge Storage]\n    C --> D[Vector Store]\n    B --> E[PDF Files]\n    B --> F[CSV Files]\n    B --> G[Text Data]\n    C --> H[Query Engine]\n    H --> A\n```\n\n### Core Components\n\n| Component | Purpose | Location |\n|-----------|---------|----------|\n| `Knowledge` | Main class orchestrating knowledge operations | `lib/crewai/src/crewai/knowledge/knowledge.py` |\n| `KnowledgeSource` | Abstract base for data ingestion | `lib/crewai/src/crewai/knowledge/source/` |\n| `KnowledgeStorage` | Handles persistence and retrieval | `lib/crewai/src/crewai/knowledge/storage/knowledge_storage.py` |\n\n## Knowledge Sources\n\nKnowledge Sources represent the input layer where data is ingested into the system. The framework supports multiple source types to accommodate various data formats.\n\n### PDF Knowledge Source\n\nThe PDF Knowledge Source processes PDF documents and extracts textual content for vector storage. It handles multi-page documents and preserves structural information where possible.\n\n**Key Features:**\n\n- Automatic text extraction from PDF pages\n- Metadata preservation (page numbers, document titles)\n- Chunk-based processing for large documents\n\n### CSV Knowledge Source\n\nThe CSV Knowledge Source handles tabular data, converting rows and columns into searchable knowledge entries. It maintains the relationship between column headers and values during ingestion.\n\n**Key Features:**\n\n- Header-aware parsing\n- Row-level chunking\n- Delimiter detection\n\n## Storage Layer\n\nThe Knowledge Storage component manages the persistence of processed knowledge using vector embeddings. It interfaces with the underlying vector database to enable semantic search capabilities.\n\n```mermaid\nsequenceDiagram\n    participant Source as Knowledge Source\n    participant Storage as Knowledge Storage\n    participant VectorDB as Vector Database\n    participant Query as Query Engine\n    \n    Source->>Storage: Ingest document chunks\n    Storage->>Storage: Generate embeddings\n    Storage->>VectorDB: Store vectors + metadata\n    Query->>VectorDB: Semantic search\n    VectorDB->>Query: Relevant chunks\n    Query->>Storage: Format results\n```\n\n### Storage Configuration\n\n| Parameter | Type | Description | Default |\n|-----------|------|-------------|---------|\n| `chunk_size` | int | Size of text chunks in characters | 1000 |\n| `chunk_overlap` | int | Overlap between consecutive chunks | 200 |\n| `embedding_model` | str | Model used for vectorization | Configured at crew level |\n\n## Integration with Agents\n\nKnowledge Management integrates with the crewAI agent system through the Agent class. Agents can be configured to automatically query relevant knowledge during task execution.\n\n**Basic Integration Pattern:**\n\n```python\nfrom crewai import Agent, Crew\nfrom crewai.knowledge import Knowledge, PDFKnowledgeSource\n\n# Initialize knowledge base\nknowledge = Knowledge()\n\n# Add sources\nknowledge.add_source(PDFKnowledgeSource(file_path=\"document.pdf\"))\nknowledge.add_source(CSVKnowledgeSource(file_path=\"data.csv\"))\n\n# Create agent with knowledge access\nagent = Agent(\n    role=\"Research Analyst\",\n    goal=\"Answer questions using company knowledge\",\n    backstory=\"Expert at analyzing documents\",\n    knowledge=knowledge\n)\n```\n\n## Query Mechanism\n\nThe query mechanism enables agents to retrieve relevant knowledge based on semantic similarity. When an agent processes a task, the system automatically retrieves chunks that are contextually relevant to the query.\n\n| Query Parameter | Description |\n|----------------|-------------|\n| `query_text` | The search query string |\n| `top_k` | Maximum number of results to return |\n| `similarity_threshold` | Minimum similarity score for inclusion |\n\n## Data Flow\n\n```mermaid\ngraph LR\n    A[Document Files] --> B[Knowledge Sources]\n    B --> C[Text Chunking]\n    C --> D[Embedding Generation]\n    D --> E[Vector Storage]\n    F[Agent Query] --> G[Similarity Search]\n    G --> E\n    E --> H[Retrieved Chunks]\n    H --> I[Agent Context]\n```\n\n## Usage with Crews\n\nFor multi-agent crews, knowledge can be shared across all agents or restricted to specific agents:\n\n```python\nfrom crewai import Crew\nfrom crewai.knowledge import Knowledge\n\n# Shared knowledge across crew\ncrew_knowledge = Knowledge()\ncrew_knowledge.add_source(company_docs_source)\n\ncrew = Crew(\n    agents=[researcher, analyst, writer],\n    tasks=[research_task, analysis_task, report_task],\n    knowledge=crew_knowledge  # Available to all agents\n)\n```\n\n## Best Practices\n\n1. **Chunk Sizing**: Use appropriate chunk sizes based on document structure. Smaller chunks (500-1000 chars) work well for Q&A, larger chunks for document summarization.\n2. **Source Organization**: Group related documents into separate knowledge sources for more targeted retrieval.\n3. **Metadata**: Include relevant metadata with knowledge sources to improve result filtering.\n4. **Update Strategy**: Implement regular synchronization for knowledge sources that change frequently.\n\n## Related Components\n\n| Component | Purpose |\n|-----------|---------|\n| `crewai_tools` | External tool integrations including PDF search, CSV search |\n| `Agent Memory` | Short-term contextual memory for agent sessions |\n| `Task Context` | Task-specific information passing between agents |\n\n---\n\n## References\n\n- Main Knowledge class implementation: `lib/crewai/src/crewai/knowledge/knowledge.py`\n- PDF source handler: `lib/crewai/src/crewai/knowledge/source/pdf_knowledge_source.py`\n- CSV source handler: `lib/crewai/src/crewai/knowledge/source/csv_knowledge_source.py`\n- Storage implementation: `lib/crewai/src/crewai/knowledge/storage/knowledge_storage.py`\n\n---\n\n<a id='memory'></a>\n\n## Memory and Storage System\n\n### 相关页面\n\n相关主题：[Knowledge Management](#knowledge)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [lib/crewai/src/crewai/memory/unified_memory.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/memory/unified_memory.py)\n- [lib/crewai/src/crewai/memory/memory_scope.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/memory/memory_scope.py)\n- [lib/crewai/src/crewai/memory/recall_flow.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/memory/recall_flow.py)\n- [lib/crewai/src/crewai/memory/storage/lancedb_storage.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/memory/storage/lancedb_storage.py)\n- [lib/crewai/src/crewai/memory/types.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/memory/types.py)\n- [lib/crewai/src/crewai/memory/utils.py](https://github.com/crewAIInc/crewAI/blob/main/lib/crewai/src/crewai/memory/utils.py)\n</details>\n\n# Memory and Storage System\n\n## Overview\n\nThe crewAI Memory and Storage System provides persistent, searchable memory capabilities for AI agents and crews. It enables cross-session learning, semantic recall of past interactions, and structured storage of agent experiences. The system is designed to handle various types of memory including short-term, long-term, entity, and knowledge-based memories.\n\n```mermaid\ngraph TD\n    A[Agent Request] --> B[UnifiedMemory]\n    B --> C[MemoryScope]\n    C --> D{Memory Type}\n    D --> E[Short-term Memory]\n    D --> F[Long-term Memory]\n    D --> G[Entity Memory]\n    D --> H[Knowledge Memory]\n    E --> I[Vector Storage]\n    F --> I\n    G --> I\n    H --> I\n    I --> J[Recall Flow]\n    J --> K[MemoryMatch Results]\n    K --> A\n```\n\n## Memory Architecture\n\n### Core Components\n\n| Component | Purpose | Location |\n|-----------|---------|----------|\n| `UnifiedMemory` | Central interface for all memory operations | `unified_memory.py` |\n| `MemoryScope` | Defines isolation boundaries for memory contexts | `memory_scope.py` |\n| `RecallFlow` | Handles semantic search and retrieval of memories | `recall_flow.py` |\n| `LanceDBStorage` | Vector database backend for persistent storage | `lancedb_storage.py` |\n\n### Data Models\n\n#### MemoryRecord\n\nThe fundamental unit of stored information in the memory system:\n\n```python\nclass MemoryRecord(BaseModel):\n    data: Any                           # The actual memory content\n    metadata: dict[str, Any]            # Associated metadata\n    importance: float = Field(         # Relevance score 0.0-1.0\n        default=0.5, ge=0.0, le=1.0\n    )\n    created_at: datetime                # Creation timestamp\n    last_accessed: datetime             # Last retrieval timestamp\n    embedding: list[float] | None       # Vector embedding for semantic search\n    source: str | None                  # Origin tracking (user ID, session ID)\n    private: bool = Field(             # Privacy flag for access control\n        default=False\n    )\n```\n\n资料来源：[lib/crewai/src/crewai/memory/types.py:1-50]()\n\n#### MemoryMatch\n\nReturned by recall operations with relevance scoring:\n\n```python\nclass MemoryMatch(BaseModel):\n    record: MemoryRecord               # The matched memory\n    score: float                       # Combined relevance score\n    match_reasons: list[str]           # Why this matched (semantic, recency, importance)\n    evidence_gaps: list[str]          # Missing context flags\n```\n\n资料来源：[lib/crewai/src/crewai/memory/types.py:55-70]()\n\n## Memory Scoping System\n\nThe `MemoryScope` class manages hierarchical isolation of memory contexts, allowing different crews, agents, or sessions to maintain separate memory stores while supporting controlled cross-context access.\n\n### Scope Path Operations\n\n| Function | Description |\n|----------|-------------|\n| `join_scope_paths(root, inner)` | Combines two scope paths with normalization |\n| `normalize_scope_path(path)` | Standardizes scope path format |\n\n### Scope Path Format\n\nScope paths follow a hierarchical structure:\n\n```\n/crew/{crew-name}/{memory-type}\n/crew/research-crew/short-term\n/crew/research-crew/long-term\n/crew/research-crew/entity\n/crew/research-crew/knowledge\n```\n\n### Scope Path Join Behavior\n\n```python\njoin_scope_paths(\"/crew/test\", \"/market-trends\")\n# Returns: '/crew/test/market-trends'\n\njoin_scope_paths(\"/crew/test\", \"market-trends\")\n# Returns: '/crew/test/market-trends'\n\njoin_scope_paths(\"/crew/test\", \"/\")\n# Returns: '/crew/test'\n\njoin_scope_paths(\"/crew/test\", None)\n# Returns: '/crew/test'\n```\n\n资料来源：[lib/crewai/src/crewai/memory/utils.py:1-50]()\n\n```mermaid\ngraph LR\n    A[\"root: '/crew/test'\"] --> B[join_scope_paths]\n    C[\"inner: '/market-trends'\"] --> B\n    B --> D[\"Result: '/crew/test/market-trends'\"]\n    \n    E[\"root: '/crew/test'\"] --> F[normalize]\n    F --> G[\"Result: '/crew/test'\"]\n```\n\n## Storage Backends\n\n### LanceDB Storage\n\nLanceDB is the primary vector storage backend, providing efficient similarity search capabilities:\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `db_path` | str | Required | Path to the LanceDB database |\n| `table_name` | str | Required | Name of the storage table |\n| `vector_dimension` | int | Auto | Embedding vector size |\n| `reset_db` | bool | False | Whether to reset on initialization |\n\n资料来源：[lib/crewai/src/crewai/memory/storage/lancedb_storage.py]()\n\n### Storage Operations\n\n| Operation | Description |\n|-----------|-------------|\n| `write` | Store a new memory record |\n| `read` | Retrieve by ID |\n| `search` | Semantic similarity search |\n| `delete` | Remove by ID |\n| `reset` | Clear all records |\n\n## Recall and Retrieval\n\nThe `RecallFlow` manages how memories are retrieved based on queries. It combines semantic similarity with recency and importance scoring.\n\n```mermaid\nsequenceDiagram\n    participant Agent\n    participant UnifiedMemory\n    participant RecallFlow\n    participant LanceDBStorage\n    \n    Agent->>UnifiedMemory: Query with context\n    UnifiedMemory->>RecallFlow: Execute recall(query, scope)\n    RecallFlow->>LanceDBStorage: Semantic search\n    LanceDBStorage-->>RecallFlow: Candidate memories\n    RecallFlow->>RecallFlow: Score by relevance\n    RecallFlow-->>UnifiedMemory: Ranked MemoryMatch[]\n    UnifiedMemory-->>Agent: Filtered results\n```\n\n### Recall Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `query` | str | Yes | Search query text |\n| `scope` | str | Yes | Memory scope path |\n| `limit` | int | No | Max results (default: 5) |\n| `include_private` | bool | No | Include private memories |\n\n## Memory Types\n\n| Type | Purpose | Persistence |\n|------|---------|-------------|\n| **Short-term** | Current session context | Ephemeral, cleared on reset |\n| **Long-term** | Cross-session learning | Persistent until explicitly reset |\n| **Entity** | Shared entity information | Persistent, shared across agents |\n| **Knowledge** | Domain-specific grounding | Persistent, used for RAG |\n\n## Configuration Options\n\n### Crew-Level Configuration\n\n```yaml\nmemory:\n  enabled: true\n  type: \"short_term\" | \"long_term\" | \"entity\" | \"knowledge\" | \"all\"\n  scope: \"/crew/{crew_name}\"\n```\n\n### CLI Memory Management\n\n```bash\n# Reset all memories\ncrewai reset-memories -a\n\n# Reset specific memory types\ncrewai reset-memories -s    # Short-term only\ncrewai reset-memories -l    # Long-term only\ncrewai reset-memories -e    # Entity only\ncrewai reset-memories -kn   # Knowledge only\ncrewai reset-memories -akn  # Agent knowledge only\n```\n\n资料来源：[lib/cli/src/crewai_cli/templates/AGENTS.md]()\n\n## Privacy and Access Control\n\nThe memory system supports private memories that are only accessible under specific conditions:\n\n- **Private flag**: When `private=True`, a memory is only visible to recall requests from the same source\n- **include_private parameter**: Set to `True` to include private memories in cross-source queries\n- **Source tracking**: Each memory records its origin via the `source` field for provenance and filtering\n\n## Embedding Configuration\n\nMemories are stored with vector embeddings for semantic search:\n\n| Provider | Model Example | Configuration |\n|----------|---------------|---------------|\n| OpenAI | `text-embedding-3-small` | `OPENAI_API_KEY` |\n| Google | `models/embedding-001` | `GOOGLE_API_KEY` |\n| Ollama | `nomic-embed-text` | Local endpoint |\n| Azure | `text-embedding-3` | Azure OpenAI config |\n\n资料来源：[lib/crewai-tools/src/crewai_tools/tools/directory_search_tool/README.md]()\n\n## Best Practices\n\n1. **Scope Organization**: Use consistent naming conventions for scope paths to enable efficient cross-crew memory sharing\n2. **Importance Scoring**: Set appropriate importance values (0.0-1.0) to influence retrieval ranking\n3. **Privacy Handling**: Mark sensitive information with `private=True` to prevent unintended access\n4. **Memory Pruning**: Regularly reset short-term memory for clean session boundaries\n5. **Embedding Selection**: Choose embedding models appropriate for your content domain\n\n---\n\n---\n\n## Doramagic 踩坑日志\n\n项目：crewAIInc/crewAI\n\n摘要：发现 23 个潜在踩坑项，其中 4 个为 high/blocking；最高优先级：安装坑 - 来源证据：[FEATURE] Implement Process.consensual with a pluggable ConsensusEngine。\n\n## 1. 安装坑 · 来源证据：[FEATURE] Implement Process.consensual with a pluggable ConsensusEngine\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：[FEATURE] Implement Process.consensual with a pluggable ConsensusEngine\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_a7c38215ebb04a4fbc6e7c6d2fdb2469 | https://github.com/crewAIInc/crewAI/issues/5708 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 2. 运行坑 · 来源证据：[BUG] Wrong code in document\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个运行相关的待验证问题：[BUG] Wrong code in document\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_390380af45524e959d558b160597b38b | https://github.com/crewAIInc/crewAI/issues/5378 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 3. 运行坑 · 来源证据：[FEATURE] Enhance the document about @persisit\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个运行相关的待验证问题：[FEATURE] Enhance the document about @persisit\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_effef000d4cf47a892f17850aa033610 | https://github.com/crewAIInc/crewAI/issues/5372 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 4. 安全/权限坑 · 来源证据：[FEATURE] GuardrailProvider interface for pre-tool-call authorization\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：[FEATURE] GuardrailProvider interface for pre-tool-call authorization\n- 对用户的影响：可能阻塞安装或首次运行。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_858a1a8bead2456289d686ec0d2d802c | https://github.com/crewAIInc/crewAI/issues/4877 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 5. 身份坑 · 仓库名和安装名不一致\n\n- 严重度：medium\n- 证据强度：runtime_trace\n- 发现：仓库名 `crewai` 与安装入口 `skills` 不完全一致。\n- 对用户的影响：用户照着仓库名搜索包或照着包名找仓库时容易走错入口。\n- 建议检查：在 npm/PyPI/GitHub 上确认包名映射和官方 README 说明。\n- 复现命令：`npx skills`\n- 防护动作：页面必须同时展示 repo 名和真实安装入口，避免用户搜索错包。\n- 证据：identity.distribution | github_repo:710601088 | https://github.com/crewAIInc/crewAI | repo=crewai; install=skills\n\n## 6. 安装坑 · 来源证据：1.14.4\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：1.14.4\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_dcfa2a852812414a82683392c2888795 | https://github.com/crewAIInc/crewAI/releases/tag/1.14.4 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 7. 安装坑 · 来源证据：1.14.4a1\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：1.14.4a1\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_0de86b993ffa4d9298726daa189abf49 | https://github.com/crewAIInc/crewAI/releases/tag/1.14.4a1 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 8. 安装坑 · 来源证据：1.14.5a4\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：1.14.5a4\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_6db6cd94b6ef4bffa23da215458565b4 | https://github.com/crewAIInc/crewAI/releases/tag/1.14.5a4 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 9. 配置坑 · 来源证据：Scans the client database to extract existing policy details.\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Scans the client database to extract existing policy details.\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_8201c73155314e67801bd0b81ea9820d | https://github.com/crewAIInc/crewAI/issues/5760 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 10. 能力坑 · 能力判断依赖假设\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：README/documentation is current enough for a first validation pass.\n- 对用户的影响：假设不成立时，用户拿不到承诺的能力。\n- 建议检查：将假设转成下游验证清单。\n- 防护动作：假设必须转成验证项；没有验证结果前不能写成事实。\n- 证据：capability.assumptions | github_repo:710601088 | https://github.com/crewAIInc/crewAI | README/documentation is current enough for a first validation pass.\n\n## 11. 维护坑 · 来源证据：1.14.5a1\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个维护/版本相关的待验证问题：1.14.5a1\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_c4094bb55c234f1581b9879efd4994c6 | https://github.com/crewAIInc/crewAI/releases/tag/1.14.5a1 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 12. 维护坑 · 维护活跃度未知\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：未记录 last_activity_observed。\n- 对用户的影响：新项目、停更项目和活跃项目会被混在一起，推荐信任度下降。\n- 建议检查：补 GitHub 最近 commit、release、issue/PR 响应信号。\n- 防护动作：维护活跃度未知时，推荐强度不能标为高信任。\n- 证据：evidence.maintainer_signals | github_repo:710601088 | https://github.com/crewAIInc/crewAI | last_activity_observed missing\n\n## 13. 安全/权限坑 · 下游验证发现风险项\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：下游已经要求复核，不能在页面中弱化。\n- 建议检查：进入安全/权限治理复核队列。\n- 防护动作：下游风险存在时必须保持 review/recommendation 降级。\n- 证据：downstream_validation.risk_items | github_repo:710601088 | https://github.com/crewAIInc/crewAI | no_demo; severity=medium\n\n## 14. 安全/权限坑 · 存在评分风险\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：风险会影响是否适合普通用户安装。\n- 建议检查：把风险写入边界卡，并确认是否需要人工复核。\n- 防护动作：评分风险必须进入边界卡，不能只作为内部分数。\n- 证据：risks.scoring_risks | github_repo:710601088 | https://github.com/crewAIInc/crewAI | no_demo; severity=medium\n\n## 15. 安全/权限坑 · 来源证据：1.14.3\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：1.14.3\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_ff4d292bd8984a039527502ef51aed98 | https://github.com/crewAIInc/crewAI/releases/tag/1.14.3 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 16. 安全/权限坑 · 来源证据：1.14.5a2\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：1.14.5a2\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_0e5616e4bf1f47f59e10e83c1849c86a | https://github.com/crewAIInc/crewAI/releases/tag/1.14.5a2 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 17. 安全/权限坑 · 来源证据：1.14.5a3\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：1.14.5a3\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_ba25d089d674407d83a29ec4caff6284 | https://github.com/crewAIInc/crewAI/releases/tag/1.14.5a3 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 18. 安全/权限坑 · 来源证据：Question: integration path for Agent Threat Rules detection in crewai/security\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Question: integration path for Agent Threat Rules detection in crewai/security\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_05e39d8c109f4ed0a2974d448468229f | https://github.com/crewAIInc/crewAI/issues/5763 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 19. 安全/权限坑 · 来源证据：Security: OWASP Agent Memory Guard – protect CrewAI agents from memory poisoning\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Security: OWASP Agent Memory Guard – protect CrewAI agents from memory poisoning\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_028fe9ebbcc943f5a7134e08d0ed9450 | https://github.com/crewAIInc/crewAI/issues/5762 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 20. 安全/权限坑 · 来源证据：Security: Request to enable Private Vulnerability Reporting / coordinate channel\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Security: Request to enable Private Vulnerability Reporting / coordinate channel\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_e6b9a787eb544f098525817b61476c11 | https://github.com/crewAIInc/crewAI/issues/5728 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 21. 安全/权限坑 · 来源证据：[FEATURE] Tool to add input_files\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：[FEATURE] Tool to add input_files\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_5ca4885df9ee49459ce8502e94d11f50 | https://github.com/crewAIInc/crewAI/issues/5758 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 22. 维护坑 · issue/PR 响应质量未知\n\n- 严重度：low\n- 证据强度：source_linked\n- 发现：issue_or_pr_quality=unknown。\n- 对用户的影响：用户无法判断遇到问题后是否有人维护。\n- 建议检查：抽样最近 issue/PR，判断是否长期无人处理。\n- 防护动作：issue/PR 响应未知时，必须提示维护风险。\n- 证据：evidence.maintainer_signals | github_repo:710601088 | https://github.com/crewAIInc/crewAI | issue_or_pr_quality=unknown\n\n## 23. 维护坑 · 发布节奏不明确\n\n- 严重度：low\n- 证据强度：source_linked\n- 发现：release_recency=unknown。\n- 对用户的影响：安装命令和文档可能落后于代码，用户踩坑概率升高。\n- 建议检查：确认最近 release/tag 和 README 安装命令是否一致。\n- 防护动作：发布节奏未知或过期时，安装说明必须标注可能漂移。\n- 证据：evidence.maintainer_signals | github_repo:710601088 | https://github.com/crewAIInc/crewAI | release_recency=unknown\n\n<!-- canonical_name: crewAIInc/crewAI; human_manual_source: deepwiki_human_wiki -->\n",
      "summary": "DeepWiki/Human Wiki 完整输出，末尾追加 Discovery Agent 踩坑日志。",
      "title": "Human Manual / 人类版说明书"
    },
    "pitfall_log": {
      "asset_id": "pitfall_log",
      "filename": "PITFALL_LOG.md",
      "markdown": "# Pitfall Log / 踩坑日志\n\n项目：crewAIInc/crewAI\n\n摘要：发现 23 个潜在踩坑项，其中 4 个为 high/blocking；最高优先级：安装坑 - 来源证据：[FEATURE] Implement Process.consensual with a pluggable ConsensusEngine。\n\n## 1. 安装坑 · 来源证据：[FEATURE] Implement Process.consensual with a pluggable ConsensusEngine\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：[FEATURE] Implement Process.consensual with a pluggable ConsensusEngine\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_a7c38215ebb04a4fbc6e7c6d2fdb2469 | https://github.com/crewAIInc/crewAI/issues/5708 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 2. 运行坑 · 来源证据：[BUG] Wrong code in document\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个运行相关的待验证问题：[BUG] Wrong code in document\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_390380af45524e959d558b160597b38b | https://github.com/crewAIInc/crewAI/issues/5378 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 3. 运行坑 · 来源证据：[FEATURE] Enhance the document about @persisit\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个运行相关的待验证问题：[FEATURE] Enhance the document about @persisit\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_effef000d4cf47a892f17850aa033610 | https://github.com/crewAIInc/crewAI/issues/5372 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 4. 安全/权限坑 · 来源证据：[FEATURE] GuardrailProvider interface for pre-tool-call authorization\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：[FEATURE] GuardrailProvider interface for pre-tool-call authorization\n- 对用户的影响：可能阻塞安装或首次运行。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_858a1a8bead2456289d686ec0d2d802c | https://github.com/crewAIInc/crewAI/issues/4877 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 5. 身份坑 · 仓库名和安装名不一致\n\n- 严重度：medium\n- 证据强度：runtime_trace\n- 发现：仓库名 `crewai` 与安装入口 `skills` 不完全一致。\n- 对用户的影响：用户照着仓库名搜索包或照着包名找仓库时容易走错入口。\n- 建议检查：在 npm/PyPI/GitHub 上确认包名映射和官方 README 说明。\n- 复现命令：`npx skills`\n- 防护动作：页面必须同时展示 repo 名和真实安装入口，避免用户搜索错包。\n- 证据：identity.distribution | github_repo:710601088 | https://github.com/crewAIInc/crewAI | repo=crewai; install=skills\n\n## 6. 安装坑 · 来源证据：1.14.4\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：1.14.4\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_dcfa2a852812414a82683392c2888795 | https://github.com/crewAIInc/crewAI/releases/tag/1.14.4 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 7. 安装坑 · 来源证据：1.14.4a1\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：1.14.4a1\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_0de86b993ffa4d9298726daa189abf49 | https://github.com/crewAIInc/crewAI/releases/tag/1.14.4a1 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 8. 安装坑 · 来源证据：1.14.5a4\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：1.14.5a4\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_6db6cd94b6ef4bffa23da215458565b4 | https://github.com/crewAIInc/crewAI/releases/tag/1.14.5a4 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 9. 配置坑 · 来源证据：Scans the client database to extract existing policy details.\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Scans the client database to extract existing policy details.\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_8201c73155314e67801bd0b81ea9820d | https://github.com/crewAIInc/crewAI/issues/5760 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 10. 能力坑 · 能力判断依赖假设\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：README/documentation is current enough for a first validation pass.\n- 对用户的影响：假设不成立时，用户拿不到承诺的能力。\n- 建议检查：将假设转成下游验证清单。\n- 防护动作：假设必须转成验证项；没有验证结果前不能写成事实。\n- 证据：capability.assumptions | github_repo:710601088 | https://github.com/crewAIInc/crewAI | README/documentation is current enough for a first validation pass.\n\n## 11. 维护坑 · 来源证据：1.14.5a1\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个维护/版本相关的待验证问题：1.14.5a1\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_c4094bb55c234f1581b9879efd4994c6 | https://github.com/crewAIInc/crewAI/releases/tag/1.14.5a1 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 12. 维护坑 · 维护活跃度未知\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：未记录 last_activity_observed。\n- 对用户的影响：新项目、停更项目和活跃项目会被混在一起，推荐信任度下降。\n- 建议检查：补 GitHub 最近 commit、release、issue/PR 响应信号。\n- 防护动作：维护活跃度未知时，推荐强度不能标为高信任。\n- 证据：evidence.maintainer_signals | github_repo:710601088 | https://github.com/crewAIInc/crewAI | last_activity_observed missing\n\n## 13. 安全/权限坑 · 下游验证发现风险项\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：下游已经要求复核，不能在页面中弱化。\n- 建议检查：进入安全/权限治理复核队列。\n- 防护动作：下游风险存在时必须保持 review/recommendation 降级。\n- 证据：downstream_validation.risk_items | github_repo:710601088 | https://github.com/crewAIInc/crewAI | no_demo; severity=medium\n\n## 14. 安全/权限坑 · 存在评分风险\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：风险会影响是否适合普通用户安装。\n- 建议检查：把风险写入边界卡，并确认是否需要人工复核。\n- 防护动作：评分风险必须进入边界卡，不能只作为内部分数。\n- 证据：risks.scoring_risks | github_repo:710601088 | https://github.com/crewAIInc/crewAI | no_demo; severity=medium\n\n## 15. 安全/权限坑 · 来源证据：1.14.3\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：1.14.3\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_ff4d292bd8984a039527502ef51aed98 | https://github.com/crewAIInc/crewAI/releases/tag/1.14.3 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 16. 安全/权限坑 · 来源证据：1.14.5a2\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：1.14.5a2\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_0e5616e4bf1f47f59e10e83c1849c86a | https://github.com/crewAIInc/crewAI/releases/tag/1.14.5a2 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 17. 安全/权限坑 · 来源证据：1.14.5a3\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：1.14.5a3\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_ba25d089d674407d83a29ec4caff6284 | https://github.com/crewAIInc/crewAI/releases/tag/1.14.5a3 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 18. 安全/权限坑 · 来源证据：Question: integration path for Agent Threat Rules detection in crewai/security\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Question: integration path for Agent Threat Rules detection in crewai/security\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_05e39d8c109f4ed0a2974d448468229f | https://github.com/crewAIInc/crewAI/issues/5763 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 19. 安全/权限坑 · 来源证据：Security: OWASP Agent Memory Guard – protect CrewAI agents from memory poisoning\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Security: OWASP Agent Memory Guard – protect CrewAI agents from memory poisoning\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_028fe9ebbcc943f5a7134e08d0ed9450 | https://github.com/crewAIInc/crewAI/issues/5762 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 20. 安全/权限坑 · 来源证据：Security: Request to enable Private Vulnerability Reporting / coordinate channel\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Security: Request to enable Private Vulnerability Reporting / coordinate channel\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_e6b9a787eb544f098525817b61476c11 | https://github.com/crewAIInc/crewAI/issues/5728 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 21. 安全/权限坑 · 来源证据：[FEATURE] Tool to add input_files\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：[FEATURE] Tool to add input_files\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_5ca4885df9ee49459ce8502e94d11f50 | https://github.com/crewAIInc/crewAI/issues/5758 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 22. 维护坑 · issue/PR 响应质量未知\n\n- 严重度：low\n- 证据强度：source_linked\n- 发现：issue_or_pr_quality=unknown。\n- 对用户的影响：用户无法判断遇到问题后是否有人维护。\n- 建议检查：抽样最近 issue/PR，判断是否长期无人处理。\n- 防护动作：issue/PR 响应未知时，必须提示维护风险。\n- 证据：evidence.maintainer_signals | github_repo:710601088 | https://github.com/crewAIInc/crewAI | issue_or_pr_quality=unknown\n\n## 23. 维护坑 · 发布节奏不明确\n\n- 严重度：low\n- 证据强度：source_linked\n- 发现：release_recency=unknown。\n- 对用户的影响：安装命令和文档可能落后于代码，用户踩坑概率升高。\n- 建议检查：确认最近 release/tag 和 README 安装命令是否一致。\n- 防护动作：发布节奏未知或过期时，安装说明必须标注可能漂移。\n- 证据：evidence.maintainer_signals | github_repo:710601088 | https://github.com/crewAIInc/crewAI | release_recency=unknown\n",
      "summary": "用户实践前最可能遇到的身份、安装、配置、运行和安全坑。",
      "title": "Pitfall Log / 踩坑日志"
    },
    "prompt_preview": {
      "asset_id": "prompt_preview",
      "filename": "PROMPT_PREVIEW.md",
      "markdown": "# crewAI - Prompt Preview\n\n> Copy the prompt below into your AI host before installing anything.\n> Its purpose is to let you safely feel the project's workflow, not to claim the project has already run.\n\n## Copy this prompt\n\n```text\nYou are using an independent Doramagic capability pack for crewAIInc/crewAI.\n\nProject:\n- Name: crewAI\n- Repository: https://github.com/crewAIInc/crewAI\n- Summary: Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.\n- Host target: local_cli\n\nGoal:\nHelp me evaluate this project for the following task without installing it yet: Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.\n\nBefore taking action:\n1. Restate my task, success standard, and boundary.\n2. Identify whether the next step requires tools, browser access, network access, filesystem access, credentials, package installation, or host configuration.\n3. Use only the Doramagic Project Pack, the upstream repository, and the source-linked evidence listed below.\n4. If a real command, install step, API call, file write, or host integration is required, mark it as \"requires post-install verification\" and ask for approval first.\n5. If evidence is missing, say \"evidence is missing\" instead of filling the gap.\n\nPreviewable capabilities:\n- Capability 1: Use the source-backed project context to guide one small, checkable workflow step.\n\nCapabilities that require post-install verification:\n- Capability 1: Use the source-backed project context to guide one small, checkable workflow step.\n\nCore service flow:\n1. quickstart: Quick Start Guide. Produce one small intermediate artifact and wait for confirmation.\n2. agents: Agents Architecture. Produce one small intermediate artifact and wait for confirmation.\n3. tasks: Tasks and Task Management. Produce one small intermediate artifact and wait for confirmation.\n4. crews: Crews and Crew Orchestration. Produce one small intermediate artifact and wait for confirmation.\n5. flows: Flows - Event-Driven Workflows. Produce one small intermediate artifact and wait for confirmation.\n\nSource-backed evidence to keep in mind:\n- https://github.com/crewAIInc/crewAI\n- https://github.com/crewAIInc/crewAI#readme\n- lib/crewai/tests/skills/fixtures/invalid-name/SKILL.md\n- lib/crewai/tests/skills/fixtures/minimal-skill/SKILL.md\n- lib/crewai/tests/skills/fixtures/valid-skill/SKILL.md\n- lib/cli/src/crewai_cli/templates/crew/crew.py\n- lib/cli/src/crewai_cli/templates/crew/main.py\n- lib/cli/src/crewai_cli/templates/crew/config/agents.yaml\n- lib/cli/src/crewai_cli/templates/crew/config/tasks.yaml\n- lib/crewai/src/crewai/agents/agent_builder/base_agent.py\n\nFirst response rules:\n1. Start Step 1 only.\n2. Explain the one service action you will perform first.\n3. Ask exactly three questions about my target workflow, success standard, and sandbox boundary.\n4. Stop and wait for my answers.\n\nStep 1 follow-up protocol:\n- After I answer the first three questions, stay in Step 1.\n- Produce six parts only: clarified task, success standard, boundary conditions, two or three options, tradeoffs for each option, and one recommendation.\n- End by asking whether I confirm the recommendation.\n- Do not move to Step 2 until I explicitly confirm.\n\nConversation rules:\n- Advance one step at a time and wait for confirmation after each small artifact.\n- Write outputs as recommendations or planned checks, not as completed execution.\n- Do not claim tests passed, files changed, commands ran, APIs were called, or the project was installed.\n- If the user asks for execution, first provide the sandbox setup, expected output, rollback, and approval checkpoint.\n```\n",
      "summary": "不安装项目也能感受能力节奏的安全试用 Prompt。",
      "title": "Prompt Preview / 安装前试用 Prompt"
    },
    "quick_start": {
      "asset_id": "quick_start",
      "filename": "QUICK_START.md",
      "markdown": "# Quick Start / 官方入口\n\n项目：crewAIInc/crewAI\n\n## 官方安装入口\n\n### Node.js / npx · 官方安装入口\n\n```bash\nnpx skills\n```\n\n来源：https://github.com/crewAIInc/crewAI#readme\n\n## 来源\n\n- repo: https://github.com/crewAIInc/crewAI\n- docs: https://github.com/crewAIInc/crewAI#readme\n",
      "summary": "从项目官方 README 或安装文档提取的开工入口。",
      "title": "Quick Start / 官方入口"
    }
  },
  "validation_id": "dval_a860c3e6178142e3b92fd4a77029872b"
}
