[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-crewai-design-task":3,"mdc-xlw5ey-key":33,"related-org-crewai-design-task":3585,"related-repo-crewai-design-task":3628},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":29,"sourceUrl":31,"mdContent":32},"design-task","design and configure CrewAI tasks","CrewAI task design and configuration. Use when creating, configuring, or debugging crewAI tasks — writing descriptions and expected_output, setting up task dependencies with context, configuring output formats (output_pydantic, output_json, output_file), using guardrails for validation, enabling human_input, async execution, markdown formatting, or debugging task execution issues.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"crewai","CrewAI","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fcrewai.png","crewAIInc",[13,17,20],{"name":14,"slug":15,"type":16},"Automation","automation","tag",{"name":18,"slug":19,"type":16},"Agents","agents",{"name":21,"slug":22,"type":16},"Workflow Automation","workflow-automation",29,"https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002Fskills","2026-07-12T08:01:02.968248",null,9,[],{"repoUrl":24,"stars":23,"forks":27,"topics":30,"description":26},[],"https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002Fskills\u002Ftree\u002FHEAD\u002Fskills\u002Fdesign-task","---\nname: design-task\ndescription: \"CrewAI task design and configuration. Use when creating, configuring, or debugging crewAI tasks — writing descriptions and expected_output, setting up task dependencies with context, configuring output formats (output_pydantic, output_json, output_file), using guardrails for validation, enabling human_input, async execution, markdown formatting, or debugging task execution issues.\"\n---\n\n# CrewAI Task Design Guide\n\nHow to write effective tasks that produce reliable, high-quality output from your agents.\n\n---\n\n## The 80\u002F20 Rule\n\n**Spend 80% of your effort on task design, 20% on agent design.** The task is the most important lever you have. A well-designed task with a mediocre agent will outperform a poorly designed task with an excellent agent.\n\n---\n\n## 1. Anatomy of an Effective Task\n\nEvery task needs two things: a **description** (what to do and how) and an **expected_output** (what the result looks like).\n\n### Description — The Instructions\n\nA good description includes:\n1. **What** to do — the core action\n2. **How** to do it — specific steps or approach\n3. **Context** — why this matters, what it feeds into\n4. **Constraints** — scope limits, things to avoid\n5. **Inputs** — what data or context is available\n\n```yaml\nresearch_task:\n  description: >\n    Conduct thorough research about {topic} for the year {current_year}.\n\n    Your research should:\n    1. Identify the top 5 key trends and breakthroughs\n    2. For each trend, find at least 2 credible sources\n    3. Note any controversies or competing viewpoints\n    4. Assess potential industry impact (high\u002Fmedium\u002Flow)\n\n    Focus on developments from the last 6 months.\n    Do NOT include speculation or unverified claims.\n    The output will feed into a report for {target_audience}.\n  expected_output: >\n    A structured research brief with 5 sections, one per trend.\n    Each section includes: trend name, 2-3 paragraph summary,\n    source citations, impact assessment (high\u002Fmedium\u002Flow),\n    and a confidence level for your findings.\n  agent: researcher\n```\n\n### Expected Output — The Success Criteria\n\nThe `expected_output` tells the agent what \"done\" looks like. Be specific about:\n- **Format** — bullet points, paragraphs, JSON, table\n- **Structure** — sections, headings, order\n- **Length** — approximate word count or number of items\n- **Quality markers** — citations required, confidence levels, specific fields\n\n| Bad Expected Output | Good Expected Output |\n|---|---|\n| `A research report` | `A structured brief with 5 sections, each containing: trend name, 2-3 paragraph summary, source citations, and impact rating` |\n| `An analysis of the data` | `A markdown table with columns: metric name, current value, 30-day trend, and recommended action. Include at least 10 metrics.` |\n| `A blog post` | `A 1000-1500 word technical blog post with: title, introduction, 3-4 main sections with code examples, and a conclusion with next steps` |\n\n---\n\n## 2. The Single Purpose Principle\n\n**One task = one objective.** Never combine multiple operations into a single task.\n\n### Bad: \"God Task\"\n\n```yaml\n# DON'T do this — too many objectives in one task\nresearch_and_write_task:\n  description: >\n    Research {topic}, analyze the findings, write a blog post,\n    and proofread it for grammar errors.\n  expected_output: >\n    A polished blog post about {topic}.\n```\n\n### Good: Focused Tasks\n\n```yaml\nresearch_task:\n  description: >\n    Research {topic} and identify the top 5 key developments.\n  expected_output: >\n    A research brief with 5 sections covering key trends.\n  agent: researcher\n\nwriting_task:\n  description: >\n    Using the research findings, write a technical blog post about {topic}.\n  expected_output: >\n    A 1000-1500 word blog post with introduction, main sections,\n    and conclusion. Include code examples where relevant.\n  agent: writer\n\nediting_task:\n  description: >\n    Review and edit the blog post for grammar, clarity, and consistency.\n  expected_output: >\n    The final edited blog post with all corrections applied.\n    Include a brief editor's note listing what was changed.\n  agent: editor\n```\n\nEach task has one clear objective. The sequential flow passes context automatically.\n\n---\n\n## 3. Task Configuration Reference\n\n### Essential Parameters\n\n```python\nTask(\n    description=\"...\",          # Required: what to do\n    expected_output=\"...\",      # Required: what the result looks like\n    agent=researcher,           # Optional for hierarchical process; required for sequential\n)\n```\n\n### Task Dependencies with `context`\n\n```python\nanalysis_task = Task(\n    description=\"Analyze the research findings...\",\n    expected_output=\"...\",\n    agent=analyst,\n    context=[research_task],    # Receives research_task's output as context\n)\n```\n\n**In sequential process:** Each task auto-receives all prior task outputs. Use `context` only when you need non-linear dependencies.\n\n**In hierarchical process:** `context` is how you create explicit data flow between tasks.\n\n### Structured Output\n\nUse `output_pydantic` or `output_json` when downstream code needs to parse the result:\n\n```python\nfrom pydantic import BaseModel\n\nclass ResearchReport(BaseModel):\n    trends: list[str]\n    confidence: float\n    sources: list[str]\n\nresearch_task = Task(\n    description=\"...\",\n    expected_output=\"A structured report with trends, confidence score, and sources.\",\n    agent=researcher,\n    output_pydantic=ResearchReport,   # Agent's output is parsed into this model\n)\n```\n\n**Important:** `expected_output` is always a **string description** — never a class name. The Pydantic model goes in `output_pydantic`, and the `expected_output` text tells the agent what fields to include.\n\nAccess structured output:\n```python\nresult = crew.kickoff(inputs={...})\nlast_task_output = result.pydantic          # Pydantic model from the last task\nall_outputs = result.tasks_output           # List of all TaskOutput objects\nfirst_task = all_outputs[0].pydantic        # Pydantic from a specific task\n```\n\n### File Output\n\n```python\nTask(\n    ...,\n    output_file=\"output\u002Freport.md\",    # Save output to file\n    create_directory=True,             # Create directory if missing (default: True)\n)\n```\n\nFile output and structured output can be combined — the file gets the raw text, and `output_pydantic` gets the parsed model.\n\n### Async Execution\n\n```python\nTask(\n    ...,\n    async_execution=True,     # Run without blocking the next task\n)\n```\n\nUse for tasks that can run in parallel. The crew continues to the next task while this one executes. Use `context` on downstream tasks to wait for async results.\n\n### Human Review\n\n```python\nTask(\n    ...,\n    human_input=True,         # Pause for human review before finalizing\n)\n```\n\nWhen enabled, the agent presents its result and waits for human feedback before marking the task complete. Use for critical outputs that need human approval.\n\n**Do not use `human_input=True` or Flow `@human_feedback` to model normal follow-up chat.** In conversational Flows, the next user line should be another `flow.handle_turn(message, session_id=...)` call. Human review is for approving or correcting a specific task\u002Fstep output before it moves downstream.\n\n### Markdown Formatting\n\n```python\nTask(\n    ...,\n    markdown=True,            # Add markdown formatting instructions\n)\n```\n\nAutomatically instructs the agent to format output with proper markdown headers, lists, emphasis, and code blocks.\n\n### Callbacks\n\n```python\ndef log_completion(output):\n    print(f\"Task completed: {output.description[:50]}...\")\n    save_to_database(output.raw)\n\nTask(\n    ...,\n    callback=log_completion,  # Called after task completion\n)\n```\n\n---\n\n## 4. Task Guardrails — Quality Control\n\nGuardrails validate task output before it passes to the next step. If validation fails, the agent retries.\n\n### Function-Based Guardrails\n\n```python\ndef validate_word_count(output) -> tuple[bool, Any]:\n    \"\"\"Ensure output is between 500-2000 words.\"\"\"\n    word_count = len(output.raw.split())\n    if word_count \u003C 500:\n        return (False, f\"Output too short ({word_count} words). Expand to at least 500 words.\")\n    if word_count > 2000:\n        return (False, f\"Output too long ({word_count} words). Condense to under 2000 words.\")\n    return (True, output)\n\nTask(\n    ...,\n    guardrail=validate_word_count,\n    guardrail_max_retries=3,       # Max retry attempts (default: 3)\n)\n```\n\n**Return format:** `(bool, Any)` — first element is pass\u002Ffail, second is the result (on success) or error message (on failure).\n\n### LLM-Based Guardrails\n\n```python\nTask(\n    ...,\n    guardrail=\"Verify the output contains at least 3 source citations and no speculative claims.\",\n)\n```\n\nString guardrails use the agent's LLM to evaluate the output. Good for subjective quality checks.\n\n### Chaining Multiple Guardrails\n\n```python\nTask(\n    ...,\n    guardrails=[\n        validate_word_count,           # Function: check length\n        validate_no_pii,               # Function: check for PII\n        \"Ensure the tone is professional and appropriate for a business audience.\",  # LLM check\n    ],\n    guardrail_max_retries=3,\n)\n```\n\nGuardrails execute sequentially. Each receives the output of the previous guardrail. Mix function-based (deterministic) and LLM-based (subjective) checks.\n\n---\n\n## 5. YAML Configuration (Recommended)\n\n### tasks.yaml\n\n```yaml\nresearch_task:\n  description: >\n    Conduct thorough research about {topic} for {current_year}.\n    Identify key trends, breakthrough technologies,\n    and potential industry impacts.\n    Focus on the last 6 months of developments.\n  expected_output: >\n    A structured research brief with 5 sections.\n    Each section: trend name, 2-3 paragraph summary,\n    source citations, and impact assessment.\n  agent: researcher\n\nanalysis_task:\n  description: >\n    Analyze the research findings and create actionable recommendations\n    for {target_audience}.\n  expected_output: >\n    A prioritized list of 5 recommendations with:\n    rationale, estimated effort, and expected impact.\n  agent: analyst\n  context:\n    - research_task\n\nreport_task:\n  description: >\n    Compile a final report combining research and analysis for {target_audience}.\n  expected_output: >\n    A polished markdown report with executive summary,\n    detailed findings, recommendations, and appendices.\n  agent: writer\n  output_file: output\u002Freport.md\n```\n\n### Wiring in crew.py\n\n```python\n@CrewBase\nclass ResearchCrew:\n    agents_config = \"config\u002Fagents.yaml\"\n    tasks_config = \"config\u002Ftasks.yaml\"\n\n    @task\n    def research_task(self) -> Task:\n        return Task(config=self.tasks_config[\"research_task\"])\n\n    @task\n    def analysis_task(self) -> Task:\n        return Task(\n            config=self.tasks_config[\"analysis_task\"],\n            context=[self.research_task()],\n        )\n\n    @task\n    def report_task(self) -> Task:\n        return Task(\n            config=self.tasks_config[\"report_task\"],\n            output_file=\"output\u002Freport.md\",\n        )\n```\n\n**Critical:** The method name (`def research_task`) must match the YAML key (`research_task:`).\n\n---\n\n## 6. Task Dependencies and Context Flow\n\n### Sequential Process (Default)\n\nIn `Process.sequential`, tasks run in order. Each task automatically receives all prior task outputs as context.\n\n```\nresearch_task → analysis_task → report_task\n     ↓               ↓              ↓\n  output 1    output 1 + 2    output 1 + 2 + 3\n```\n\nYou don't need `context=` in sequential — it's implicit. Use it only to create non-linear dependencies:\n\n```python\n# Task C depends on A but NOT B\ntask_c = Task(\n    ...,\n    context=[task_a],  # Only receives task_a output, not task_b\n)\n```\n\n### Explicit Dependencies\n\n```python\n# Diamond dependency pattern\ntask_a = Task(...)                          # Entry point\ntask_b = Task(..., context=[task_a])        # Depends on A\ntask_c = Task(..., context=[task_a])        # Also depends on A\ntask_d = Task(..., context=[task_b, task_c])  # Depends on both B and C\n```\n\n### Conditional Tasks\n\n```python\nfrom crewai.task import ConditionalTask\n\ndef needs_more_data(output) -> bool:\n    return len(output.pydantic.items) \u003C 10\n\nextra_research = ConditionalTask(\n    description=\"Fetch additional data sources...\",\n    expected_output=\"...\",\n    agent=researcher,\n    condition=needs_more_data,  # Only runs if previous output has \u003C 10 items\n)\n```\n\n---\n\n## 7. Task Tools\n\nTasks can have their own tools that override the agent's default tools for that specific task:\n\n```python\nfrom crewai_tools import SerperDevTool, ScrapeWebsiteTool\n\nTask(\n    description=\"Search for and scrape the top 5 articles about {topic}...\",\n    expected_output=\"...\",\n    agent=researcher,\n    tools=[SerperDevTool(), ScrapeWebsiteTool()],  # Task-specific tools\n)\n```\n\n**When to use task-level tools:**\n- The task needs tools the agent doesn't normally have\n- You want to restrict an agent to specific tools for this task\n- Different tasks by the same agent need different tool sets\n\n---\n\n## 8. Variable Interpolation\n\nUse `{variable}` placeholders in YAML for reusable tasks:\n\n```yaml\nresearch_task:\n  description: >\n    Research {topic} trends for {current_year},\n    targeting {target_audience}.\n  expected_output: >\n    A report on {topic} suitable for {target_audience}.\n```\n\nVariables are replaced when you call `crew.kickoff(inputs={...})`:\n\n```python\ncrew.kickoff(inputs={\n    \"topic\": \"AI Agents\",\n    \"current_year\": \"2025\",\n    \"target_audience\": \"developers\",\n})\n```\n\n**Common mistakes:**\n- Missing variable in `inputs` → literal `{variable}` appears in the prompt\n- Using `{{ }}` Jinja2 syntax → crewAI uses single braces `{ }`\n- Unused variables in `inputs` → silently ignored (no error)\n\n---\n\n## 9. Common Task Design Mistakes\n\n| Mistake | Impact | Fix |\n|---|---|---|\n| Vague description (\"Research the topic\") | Agent produces shallow, unfocused output | Add specific steps, constraints, and context |\n| Vague expected_output (\"A report\") | Agent guesses at format and structure | Specify format, sections, length, quality markers |\n| Multiple objectives in one task | Agent does all of them poorly | Split into focused single-purpose tasks |\n| Modeling each chat turn as a Crew task | Tasks are batch\u002Fworkflow units, not the conversational session loop | Use a conversational Flow and call `handle_turn()` per user message |\n| No context between dependent tasks | Agent lacks information from prior steps | Use `context=[prior_task]` for explicit dependencies |\n| `expected_output` references a Pydantic class | Agent sees a class name string, not field names | Keep `expected_output` as a human-readable string; use `output_pydantic` for the model |\n| Missing tools for data tasks | Agent fabricates data instead of fetching it | Add tools to the task or agent |\n| No guardrails on critical output | Bad output flows downstream unchecked | Add function or LLM guardrails |\n| Overly strict expected_output | Agent loops trying to match impossible criteria | Be specific but achievable; lower `guardrail_max_retries` to fail faster |\n| Description duplicates backstory | Wasted tokens and confused agent | Description = what to do; backstory = who you are |\n\n---\n\n## 10. Task Design Checklist\n\nBefore running a task, verify:\n\n- [ ] **Description** includes what, how, context, and constraints\n- [ ] **Expected output** specifies format, structure, and quality markers\n- [ ] **Single purpose** — one clear objective per task\n- [ ] **Agent assigned** (or task is in a hierarchical crew)\n- [ ] **Dependencies** set via `context` where needed\n- [ ] **Tools** provided for any task requiring external data\n- [ ] **Structured output** configured if downstream code parses the result\n- [ ] **Guardrails** set for critical outputs\n- [ ] **Variables** in YAML match the `inputs` dict keys\n- [ ] **Expected output is achievable** — test with a simple run before adding complexity\n\n---\n\n## References\n\nFor deeper dives into specific topics, see:\n\n- [Structured Output](references\u002Fstructured-output.md) — `output_pydantic`, `output_json`, and `response_format` patterns across LLM, Agent, Task, and Crew levels\n\nFor related skills:\n\n- **getting-started** — project scaffolding, choosing the right abstraction, Flow architecture\n- **design-agent** — agent Role-Goal-Backstory framework, parameter tuning, tool assignment, memory & knowledge configuration\n- **ask-docs** — query the live CrewAI documentation MCP server for questions not covered by these skills\n",{"data":34,"body":35},{"name":4,"description":6},{"type":36,"children":37},"root",[38,47,53,57,64,75,78,84,103,110,115,170,390,396,408,452,543,546,552,562,568,650,656,916,921,924,930,936,985,997,1051,1068,1085,1091,1112,1220,1257,1262,1301,1307,1352,1364,1370,1406,1418,1424,1460,1465,1499,1505,1541,1546,1552,1619,1622,1628,1633,1639,1754,1771,1777,1813,1818,1824,1900,1905,1908,1914,1920,2274,2280,2456,2482,2485,2491,2497,2510,2520,2533,2578,2584,2631,2637,2727,2730,2736,2741,2807,2815,2833,2836,2842,2854,2926,2938,2985,2993,3047,3050,3056,3305,3308,3314,3319,3491,3494,3500,3505,3541,3546,3579],{"type":39,"tag":40,"props":41,"children":43},"element","h1",{"id":42},"crewai-task-design-guide",[44],{"type":45,"value":46},"text","CrewAI Task Design Guide",{"type":39,"tag":48,"props":49,"children":50},"p",{},[51],{"type":45,"value":52},"How to write effective tasks that produce reliable, high-quality output from your agents.",{"type":39,"tag":54,"props":55,"children":56},"hr",{},[],{"type":39,"tag":58,"props":59,"children":61},"h2",{"id":60},"the-8020-rule",[62],{"type":45,"value":63},"The 80\u002F20 Rule",{"type":39,"tag":48,"props":65,"children":66},{},[67,73],{"type":39,"tag":68,"props":69,"children":70},"strong",{},[71],{"type":45,"value":72},"Spend 80% of your effort on task design, 20% on agent design.",{"type":45,"value":74}," The task is the most important lever you have. A well-designed task with a mediocre agent will outperform a poorly designed task with an excellent agent.",{"type":39,"tag":54,"props":76,"children":77},{},[],{"type":39,"tag":58,"props":79,"children":81},{"id":80},"_1-anatomy-of-an-effective-task",[82],{"type":45,"value":83},"1. Anatomy of an Effective Task",{"type":39,"tag":48,"props":85,"children":86},{},[87,89,94,96,101],{"type":45,"value":88},"Every task needs two things: a ",{"type":39,"tag":68,"props":90,"children":91},{},[92],{"type":45,"value":93},"description",{"type":45,"value":95}," (what to do and how) and an ",{"type":39,"tag":68,"props":97,"children":98},{},[99],{"type":45,"value":100},"expected_output",{"type":45,"value":102}," (what the result looks like).",{"type":39,"tag":104,"props":105,"children":107},"h3",{"id":106},"description-the-instructions",[108],{"type":45,"value":109},"Description — The Instructions",{"type":39,"tag":48,"props":111,"children":112},{},[113],{"type":45,"value":114},"A good description includes:",{"type":39,"tag":116,"props":117,"children":118},"ol",{},[119,130,140,150,160],{"type":39,"tag":120,"props":121,"children":122},"li",{},[123,128],{"type":39,"tag":68,"props":124,"children":125},{},[126],{"type":45,"value":127},"What",{"type":45,"value":129}," to do — the core action",{"type":39,"tag":120,"props":131,"children":132},{},[133,138],{"type":39,"tag":68,"props":134,"children":135},{},[136],{"type":45,"value":137},"How",{"type":45,"value":139}," to do it — specific steps or approach",{"type":39,"tag":120,"props":141,"children":142},{},[143,148],{"type":39,"tag":68,"props":144,"children":145},{},[146],{"type":45,"value":147},"Context",{"type":45,"value":149}," — why this matters, what it feeds into",{"type":39,"tag":120,"props":151,"children":152},{},[153,158],{"type":39,"tag":68,"props":154,"children":155},{},[156],{"type":45,"value":157},"Constraints",{"type":45,"value":159}," — scope limits, things to avoid",{"type":39,"tag":120,"props":161,"children":162},{},[163,168],{"type":39,"tag":68,"props":164,"children":165},{},[166],{"type":45,"value":167},"Inputs",{"type":45,"value":169}," — what data or context is available",{"type":39,"tag":171,"props":172,"children":177},"pre",{"className":173,"code":174,"language":175,"meta":176,"style":176},"language-yaml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","research_task:\n  description: >\n    Conduct thorough research about {topic} for the year {current_year}.\n\n    Your research should:\n    1. Identify the top 5 key trends and breakthroughs\n    2. For each trend, find at least 2 credible sources\n    3. Note any controversies or competing viewpoints\n    4. Assess potential industry impact (high\u002Fmedium\u002Flow)\n\n    Focus on developments from the last 6 months.\n    Do NOT include speculation or unverified claims.\n    The output will feed into a report for {target_audience}.\n  expected_output: >\n    A structured research brief with 5 sections, one per trend.\n    Each section includes: trend name, 2-3 paragraph summary,\n    source citations, impact assessment (high\u002Fmedium\u002Flow),\n    and a confidence level for your findings.\n  agent: researcher\n","yaml","",[178],{"type":39,"tag":179,"props":180,"children":181},"code",{"__ignoreMap":176},[182,200,220,230,240,249,258,267,276,284,292,301,310,319,336,345,354,363,372],{"type":39,"tag":183,"props":184,"children":187},"span",{"class":185,"line":186},"line",1,[188,194],{"type":39,"tag":183,"props":189,"children":191},{"style":190},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[192],{"type":45,"value":193},"research_task",{"type":39,"tag":183,"props":195,"children":197},{"style":196},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[198],{"type":45,"value":199},":\n",{"type":39,"tag":183,"props":201,"children":203},{"class":185,"line":202},2,[204,209,214],{"type":39,"tag":183,"props":205,"children":206},{"style":190},[207],{"type":45,"value":208},"  description",{"type":39,"tag":183,"props":210,"children":211},{"style":196},[212],{"type":45,"value":213},":",{"type":39,"tag":183,"props":215,"children":217},{"style":216},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[218],{"type":45,"value":219}," >\n",{"type":39,"tag":183,"props":221,"children":223},{"class":185,"line":222},3,[224],{"type":39,"tag":183,"props":225,"children":227},{"style":226},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[228],{"type":45,"value":229},"    Conduct thorough research about {topic} for the year {current_year}.\n",{"type":39,"tag":183,"props":231,"children":233},{"class":185,"line":232},4,[234],{"type":39,"tag":183,"props":235,"children":237},{"emptyLinePlaceholder":236},true,[238],{"type":45,"value":239},"\n",{"type":39,"tag":183,"props":241,"children":243},{"class":185,"line":242},5,[244],{"type":39,"tag":183,"props":245,"children":246},{"style":226},[247],{"type":45,"value":248},"    Your research should:\n",{"type":39,"tag":183,"props":250,"children":252},{"class":185,"line":251},6,[253],{"type":39,"tag":183,"props":254,"children":255},{"style":226},[256],{"type":45,"value":257},"    1. Identify the top 5 key trends and breakthroughs\n",{"type":39,"tag":183,"props":259,"children":261},{"class":185,"line":260},7,[262],{"type":39,"tag":183,"props":263,"children":264},{"style":226},[265],{"type":45,"value":266},"    2. For each trend, find at least 2 credible sources\n",{"type":39,"tag":183,"props":268,"children":270},{"class":185,"line":269},8,[271],{"type":39,"tag":183,"props":272,"children":273},{"style":226},[274],{"type":45,"value":275},"    3. Note any controversies or competing viewpoints\n",{"type":39,"tag":183,"props":277,"children":278},{"class":185,"line":27},[279],{"type":39,"tag":183,"props":280,"children":281},{"style":226},[282],{"type":45,"value":283},"    4. Assess potential industry impact (high\u002Fmedium\u002Flow)\n",{"type":39,"tag":183,"props":285,"children":287},{"class":185,"line":286},10,[288],{"type":39,"tag":183,"props":289,"children":290},{"emptyLinePlaceholder":236},[291],{"type":45,"value":239},{"type":39,"tag":183,"props":293,"children":295},{"class":185,"line":294},11,[296],{"type":39,"tag":183,"props":297,"children":298},{"style":226},[299],{"type":45,"value":300},"    Focus on developments from the last 6 months.\n",{"type":39,"tag":183,"props":302,"children":304},{"class":185,"line":303},12,[305],{"type":39,"tag":183,"props":306,"children":307},{"style":226},[308],{"type":45,"value":309},"    Do NOT include speculation or unverified claims.\n",{"type":39,"tag":183,"props":311,"children":313},{"class":185,"line":312},13,[314],{"type":39,"tag":183,"props":315,"children":316},{"style":226},[317],{"type":45,"value":318},"    The output will feed into a report for {target_audience}.\n",{"type":39,"tag":183,"props":320,"children":322},{"class":185,"line":321},14,[323,328,332],{"type":39,"tag":183,"props":324,"children":325},{"style":190},[326],{"type":45,"value":327},"  expected_output",{"type":39,"tag":183,"props":329,"children":330},{"style":196},[331],{"type":45,"value":213},{"type":39,"tag":183,"props":333,"children":334},{"style":216},[335],{"type":45,"value":219},{"type":39,"tag":183,"props":337,"children":339},{"class":185,"line":338},15,[340],{"type":39,"tag":183,"props":341,"children":342},{"style":226},[343],{"type":45,"value":344},"    A structured research brief with 5 sections, one per trend.\n",{"type":39,"tag":183,"props":346,"children":348},{"class":185,"line":347},16,[349],{"type":39,"tag":183,"props":350,"children":351},{"style":226},[352],{"type":45,"value":353},"    Each section includes: trend name, 2-3 paragraph summary,\n",{"type":39,"tag":183,"props":355,"children":357},{"class":185,"line":356},17,[358],{"type":39,"tag":183,"props":359,"children":360},{"style":226},[361],{"type":45,"value":362},"    source citations, impact assessment (high\u002Fmedium\u002Flow),\n",{"type":39,"tag":183,"props":364,"children":366},{"class":185,"line":365},18,[367],{"type":39,"tag":183,"props":368,"children":369},{"style":226},[370],{"type":45,"value":371},"    and a confidence level for your findings.\n",{"type":39,"tag":183,"props":373,"children":375},{"class":185,"line":374},19,[376,381,385],{"type":39,"tag":183,"props":377,"children":378},{"style":190},[379],{"type":45,"value":380},"  agent",{"type":39,"tag":183,"props":382,"children":383},{"style":196},[384],{"type":45,"value":213},{"type":39,"tag":183,"props":386,"children":387},{"style":226},[388],{"type":45,"value":389}," researcher\n",{"type":39,"tag":104,"props":391,"children":393},{"id":392},"expected-output-the-success-criteria",[394],{"type":45,"value":395},"Expected Output — The Success Criteria",{"type":39,"tag":48,"props":397,"children":398},{},[399,401,406],{"type":45,"value":400},"The ",{"type":39,"tag":179,"props":402,"children":404},{"className":403},[],[405],{"type":45,"value":100},{"type":45,"value":407}," tells the agent what \"done\" looks like. Be specific about:",{"type":39,"tag":409,"props":410,"children":411},"ul",{},[412,422,432,442],{"type":39,"tag":120,"props":413,"children":414},{},[415,420],{"type":39,"tag":68,"props":416,"children":417},{},[418],{"type":45,"value":419},"Format",{"type":45,"value":421}," — bullet points, paragraphs, JSON, table",{"type":39,"tag":120,"props":423,"children":424},{},[425,430],{"type":39,"tag":68,"props":426,"children":427},{},[428],{"type":45,"value":429},"Structure",{"type":45,"value":431}," — sections, headings, order",{"type":39,"tag":120,"props":433,"children":434},{},[435,440],{"type":39,"tag":68,"props":436,"children":437},{},[438],{"type":45,"value":439},"Length",{"type":45,"value":441}," — approximate word count or number of items",{"type":39,"tag":120,"props":443,"children":444},{},[445,450],{"type":39,"tag":68,"props":446,"children":447},{},[448],{"type":45,"value":449},"Quality markers",{"type":45,"value":451}," — citations required, confidence levels, specific fields",{"type":39,"tag":453,"props":454,"children":455},"table",{},[456,475],{"type":39,"tag":457,"props":458,"children":459},"thead",{},[460],{"type":39,"tag":461,"props":462,"children":463},"tr",{},[464,470],{"type":39,"tag":465,"props":466,"children":467},"th",{},[468],{"type":45,"value":469},"Bad Expected Output",{"type":39,"tag":465,"props":471,"children":472},{},[473],{"type":45,"value":474},"Good Expected Output",{"type":39,"tag":476,"props":477,"children":478},"tbody",{},[479,501,522],{"type":39,"tag":461,"props":480,"children":481},{},[482,492],{"type":39,"tag":483,"props":484,"children":485},"td",{},[486],{"type":39,"tag":179,"props":487,"children":489},{"className":488},[],[490],{"type":45,"value":491},"A research report",{"type":39,"tag":483,"props":493,"children":494},{},[495],{"type":39,"tag":179,"props":496,"children":498},{"className":497},[],[499],{"type":45,"value":500},"A structured brief with 5 sections, each containing: trend name, 2-3 paragraph summary, source citations, and impact rating",{"type":39,"tag":461,"props":502,"children":503},{},[504,513],{"type":39,"tag":483,"props":505,"children":506},{},[507],{"type":39,"tag":179,"props":508,"children":510},{"className":509},[],[511],{"type":45,"value":512},"An analysis of the data",{"type":39,"tag":483,"props":514,"children":515},{},[516],{"type":39,"tag":179,"props":517,"children":519},{"className":518},[],[520],{"type":45,"value":521},"A markdown table with columns: metric name, current value, 30-day trend, and recommended action. Include at least 10 metrics.",{"type":39,"tag":461,"props":523,"children":524},{},[525,534],{"type":39,"tag":483,"props":526,"children":527},{},[528],{"type":39,"tag":179,"props":529,"children":531},{"className":530},[],[532],{"type":45,"value":533},"A blog post",{"type":39,"tag":483,"props":535,"children":536},{},[537],{"type":39,"tag":179,"props":538,"children":540},{"className":539},[],[541],{"type":45,"value":542},"A 1000-1500 word technical blog post with: title, introduction, 3-4 main sections with code examples, and a conclusion with next steps",{"type":39,"tag":54,"props":544,"children":545},{},[],{"type":39,"tag":58,"props":547,"children":549},{"id":548},"_2-the-single-purpose-principle",[550],{"type":45,"value":551},"2. The Single Purpose Principle",{"type":39,"tag":48,"props":553,"children":554},{},[555,560],{"type":39,"tag":68,"props":556,"children":557},{},[558],{"type":45,"value":559},"One task = one objective.",{"type":45,"value":561}," Never combine multiple operations into a single task.",{"type":39,"tag":104,"props":563,"children":565},{"id":564},"bad-god-task",[566],{"type":45,"value":567},"Bad: \"God Task\"",{"type":39,"tag":171,"props":569,"children":571},{"className":173,"code":570,"language":175,"meta":176,"style":176},"# DON'T do this — too many objectives in one task\nresearch_and_write_task:\n  description: >\n    Research {topic}, analyze the findings, write a blog post,\n    and proofread it for grammar errors.\n  expected_output: >\n    A polished blog post about {topic}.\n",[572],{"type":39,"tag":179,"props":573,"children":574},{"__ignoreMap":176},[575,584,596,611,619,627,642],{"type":39,"tag":183,"props":576,"children":577},{"class":185,"line":186},[578],{"type":39,"tag":183,"props":579,"children":581},{"style":580},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[582],{"type":45,"value":583},"# DON'T do this — too many objectives in one task\n",{"type":39,"tag":183,"props":585,"children":586},{"class":185,"line":202},[587,592],{"type":39,"tag":183,"props":588,"children":589},{"style":190},[590],{"type":45,"value":591},"research_and_write_task",{"type":39,"tag":183,"props":593,"children":594},{"style":196},[595],{"type":45,"value":199},{"type":39,"tag":183,"props":597,"children":598},{"class":185,"line":222},[599,603,607],{"type":39,"tag":183,"props":600,"children":601},{"style":190},[602],{"type":45,"value":208},{"type":39,"tag":183,"props":604,"children":605},{"style":196},[606],{"type":45,"value":213},{"type":39,"tag":183,"props":608,"children":609},{"style":216},[610],{"type":45,"value":219},{"type":39,"tag":183,"props":612,"children":613},{"class":185,"line":232},[614],{"type":39,"tag":183,"props":615,"children":616},{"style":226},[617],{"type":45,"value":618},"    Research {topic}, analyze the findings, write a blog post,\n",{"type":39,"tag":183,"props":620,"children":621},{"class":185,"line":242},[622],{"type":39,"tag":183,"props":623,"children":624},{"style":226},[625],{"type":45,"value":626},"    and proofread it for grammar errors.\n",{"type":39,"tag":183,"props":628,"children":629},{"class":185,"line":251},[630,634,638],{"type":39,"tag":183,"props":631,"children":632},{"style":190},[633],{"type":45,"value":327},{"type":39,"tag":183,"props":635,"children":636},{"style":196},[637],{"type":45,"value":213},{"type":39,"tag":183,"props":639,"children":640},{"style":216},[641],{"type":45,"value":219},{"type":39,"tag":183,"props":643,"children":644},{"class":185,"line":260},[645],{"type":39,"tag":183,"props":646,"children":647},{"style":226},[648],{"type":45,"value":649},"    A polished blog post about {topic}.\n",{"type":39,"tag":104,"props":651,"children":653},{"id":652},"good-focused-tasks",[654],{"type":45,"value":655},"Good: Focused Tasks",{"type":39,"tag":171,"props":657,"children":659},{"className":173,"code":658,"language":175,"meta":176,"style":176},"research_task:\n  description: >\n    Research {topic} and identify the top 5 key developments.\n  expected_output: >\n    A research brief with 5 sections covering key trends.\n  agent: researcher\n\nwriting_task:\n  description: >\n    Using the research findings, write a technical blog post about {topic}.\n  expected_output: >\n    A 1000-1500 word blog post with introduction, main sections,\n    and conclusion. Include code examples where relevant.\n  agent: writer\n\nediting_task:\n  description: >\n    Review and edit the blog post for grammar, clarity, and consistency.\n  expected_output: >\n    The final edited blog post with all corrections applied.\n    Include a brief editor's note listing what was changed.\n  agent: editor\n",[660],{"type":39,"tag":179,"props":661,"children":662},{"__ignoreMap":176},[663,674,689,697,712,720,735,742,754,769,777,792,800,808,824,831,843,858,866,881,890,899],{"type":39,"tag":183,"props":664,"children":665},{"class":185,"line":186},[666,670],{"type":39,"tag":183,"props":667,"children":668},{"style":190},[669],{"type":45,"value":193},{"type":39,"tag":183,"props":671,"children":672},{"style":196},[673],{"type":45,"value":199},{"type":39,"tag":183,"props":675,"children":676},{"class":185,"line":202},[677,681,685],{"type":39,"tag":183,"props":678,"children":679},{"style":190},[680],{"type":45,"value":208},{"type":39,"tag":183,"props":682,"children":683},{"style":196},[684],{"type":45,"value":213},{"type":39,"tag":183,"props":686,"children":687},{"style":216},[688],{"type":45,"value":219},{"type":39,"tag":183,"props":690,"children":691},{"class":185,"line":222},[692],{"type":39,"tag":183,"props":693,"children":694},{"style":226},[695],{"type":45,"value":696},"    Research {topic} and identify the top 5 key developments.\n",{"type":39,"tag":183,"props":698,"children":699},{"class":185,"line":232},[700,704,708],{"type":39,"tag":183,"props":701,"children":702},{"style":190},[703],{"type":45,"value":327},{"type":39,"tag":183,"props":705,"children":706},{"style":196},[707],{"type":45,"value":213},{"type":39,"tag":183,"props":709,"children":710},{"style":216},[711],{"type":45,"value":219},{"type":39,"tag":183,"props":713,"children":714},{"class":185,"line":242},[715],{"type":39,"tag":183,"props":716,"children":717},{"style":226},[718],{"type":45,"value":719},"    A research brief with 5 sections covering key trends.\n",{"type":39,"tag":183,"props":721,"children":722},{"class":185,"line":251},[723,727,731],{"type":39,"tag":183,"props":724,"children":725},{"style":190},[726],{"type":45,"value":380},{"type":39,"tag":183,"props":728,"children":729},{"style":196},[730],{"type":45,"value":213},{"type":39,"tag":183,"props":732,"children":733},{"style":226},[734],{"type":45,"value":389},{"type":39,"tag":183,"props":736,"children":737},{"class":185,"line":260},[738],{"type":39,"tag":183,"props":739,"children":740},{"emptyLinePlaceholder":236},[741],{"type":45,"value":239},{"type":39,"tag":183,"props":743,"children":744},{"class":185,"line":269},[745,750],{"type":39,"tag":183,"props":746,"children":747},{"style":190},[748],{"type":45,"value":749},"writing_task",{"type":39,"tag":183,"props":751,"children":752},{"style":196},[753],{"type":45,"value":199},{"type":39,"tag":183,"props":755,"children":756},{"class":185,"line":27},[757,761,765],{"type":39,"tag":183,"props":758,"children":759},{"style":190},[760],{"type":45,"value":208},{"type":39,"tag":183,"props":762,"children":763},{"style":196},[764],{"type":45,"value":213},{"type":39,"tag":183,"props":766,"children":767},{"style":216},[768],{"type":45,"value":219},{"type":39,"tag":183,"props":770,"children":771},{"class":185,"line":286},[772],{"type":39,"tag":183,"props":773,"children":774},{"style":226},[775],{"type":45,"value":776},"    Using the research findings, write a technical blog post about {topic}.\n",{"type":39,"tag":183,"props":778,"children":779},{"class":185,"line":294},[780,784,788],{"type":39,"tag":183,"props":781,"children":782},{"style":190},[783],{"type":45,"value":327},{"type":39,"tag":183,"props":785,"children":786},{"style":196},[787],{"type":45,"value":213},{"type":39,"tag":183,"props":789,"children":790},{"style":216},[791],{"type":45,"value":219},{"type":39,"tag":183,"props":793,"children":794},{"class":185,"line":303},[795],{"type":39,"tag":183,"props":796,"children":797},{"style":226},[798],{"type":45,"value":799},"    A 1000-1500 word blog post with introduction, main sections,\n",{"type":39,"tag":183,"props":801,"children":802},{"class":185,"line":312},[803],{"type":39,"tag":183,"props":804,"children":805},{"style":226},[806],{"type":45,"value":807},"    and conclusion. Include code examples where relevant.\n",{"type":39,"tag":183,"props":809,"children":810},{"class":185,"line":321},[811,815,819],{"type":39,"tag":183,"props":812,"children":813},{"style":190},[814],{"type":45,"value":380},{"type":39,"tag":183,"props":816,"children":817},{"style":196},[818],{"type":45,"value":213},{"type":39,"tag":183,"props":820,"children":821},{"style":226},[822],{"type":45,"value":823}," writer\n",{"type":39,"tag":183,"props":825,"children":826},{"class":185,"line":338},[827],{"type":39,"tag":183,"props":828,"children":829},{"emptyLinePlaceholder":236},[830],{"type":45,"value":239},{"type":39,"tag":183,"props":832,"children":833},{"class":185,"line":347},[834,839],{"type":39,"tag":183,"props":835,"children":836},{"style":190},[837],{"type":45,"value":838},"editing_task",{"type":39,"tag":183,"props":840,"children":841},{"style":196},[842],{"type":45,"value":199},{"type":39,"tag":183,"props":844,"children":845},{"class":185,"line":356},[846,850,854],{"type":39,"tag":183,"props":847,"children":848},{"style":190},[849],{"type":45,"value":208},{"type":39,"tag":183,"props":851,"children":852},{"style":196},[853],{"type":45,"value":213},{"type":39,"tag":183,"props":855,"children":856},{"style":216},[857],{"type":45,"value":219},{"type":39,"tag":183,"props":859,"children":860},{"class":185,"line":365},[861],{"type":39,"tag":183,"props":862,"children":863},{"style":226},[864],{"type":45,"value":865},"    Review and edit the blog post for grammar, clarity, and consistency.\n",{"type":39,"tag":183,"props":867,"children":868},{"class":185,"line":374},[869,873,877],{"type":39,"tag":183,"props":870,"children":871},{"style":190},[872],{"type":45,"value":327},{"type":39,"tag":183,"props":874,"children":875},{"style":196},[876],{"type":45,"value":213},{"type":39,"tag":183,"props":878,"children":879},{"style":216},[880],{"type":45,"value":219},{"type":39,"tag":183,"props":882,"children":884},{"class":185,"line":883},20,[885],{"type":39,"tag":183,"props":886,"children":887},{"style":226},[888],{"type":45,"value":889},"    The final edited blog post with all corrections applied.\n",{"type":39,"tag":183,"props":891,"children":893},{"class":185,"line":892},21,[894],{"type":39,"tag":183,"props":895,"children":896},{"style":226},[897],{"type":45,"value":898},"    Include a brief editor's note listing what was changed.\n",{"type":39,"tag":183,"props":900,"children":902},{"class":185,"line":901},22,[903,907,911],{"type":39,"tag":183,"props":904,"children":905},{"style":190},[906],{"type":45,"value":380},{"type":39,"tag":183,"props":908,"children":909},{"style":196},[910],{"type":45,"value":213},{"type":39,"tag":183,"props":912,"children":913},{"style":226},[914],{"type":45,"value":915}," editor\n",{"type":39,"tag":48,"props":917,"children":918},{},[919],{"type":45,"value":920},"Each task has one clear objective. The sequential flow passes context automatically.",{"type":39,"tag":54,"props":922,"children":923},{},[],{"type":39,"tag":58,"props":925,"children":927},{"id":926},"_3-task-configuration-reference",[928],{"type":45,"value":929},"3. Task Configuration Reference",{"type":39,"tag":104,"props":931,"children":933},{"id":932},"essential-parameters",[934],{"type":45,"value":935},"Essential Parameters",{"type":39,"tag":171,"props":937,"children":941},{"className":938,"code":939,"language":940,"meta":176,"style":176},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","Task(\n    description=\"...\",          # Required: what to do\n    expected_output=\"...\",      # Required: what the result looks like\n    agent=researcher,           # Optional for hierarchical process; required for sequential\n)\n","python",[942],{"type":39,"tag":179,"props":943,"children":944},{"__ignoreMap":176},[945,953,961,969,977],{"type":39,"tag":183,"props":946,"children":947},{"class":185,"line":186},[948],{"type":39,"tag":183,"props":949,"children":950},{},[951],{"type":45,"value":952},"Task(\n",{"type":39,"tag":183,"props":954,"children":955},{"class":185,"line":202},[956],{"type":39,"tag":183,"props":957,"children":958},{},[959],{"type":45,"value":960},"    description=\"...\",          # Required: what to do\n",{"type":39,"tag":183,"props":962,"children":963},{"class":185,"line":222},[964],{"type":39,"tag":183,"props":965,"children":966},{},[967],{"type":45,"value":968},"    expected_output=\"...\",      # Required: what the result looks like\n",{"type":39,"tag":183,"props":970,"children":971},{"class":185,"line":232},[972],{"type":39,"tag":183,"props":973,"children":974},{},[975],{"type":45,"value":976},"    agent=researcher,           # Optional for hierarchical process; required for sequential\n",{"type":39,"tag":183,"props":978,"children":979},{"class":185,"line":242},[980],{"type":39,"tag":183,"props":981,"children":982},{},[983],{"type":45,"value":984},")\n",{"type":39,"tag":104,"props":986,"children":988},{"id":987},"task-dependencies-with-context",[989,991],{"type":45,"value":990},"Task Dependencies with ",{"type":39,"tag":179,"props":992,"children":994},{"className":993},[],[995],{"type":45,"value":996},"context",{"type":39,"tag":171,"props":998,"children":1000},{"className":938,"code":999,"language":940,"meta":176,"style":176},"analysis_task = Task(\n    description=\"Analyze the research findings...\",\n    expected_output=\"...\",\n    agent=analyst,\n    context=[research_task],    # Receives research_task's output as context\n)\n",[1001],{"type":39,"tag":179,"props":1002,"children":1003},{"__ignoreMap":176},[1004,1012,1020,1028,1036,1044],{"type":39,"tag":183,"props":1005,"children":1006},{"class":185,"line":186},[1007],{"type":39,"tag":183,"props":1008,"children":1009},{},[1010],{"type":45,"value":1011},"analysis_task = Task(\n",{"type":39,"tag":183,"props":1013,"children":1014},{"class":185,"line":202},[1015],{"type":39,"tag":183,"props":1016,"children":1017},{},[1018],{"type":45,"value":1019},"    description=\"Analyze the research findings...\",\n",{"type":39,"tag":183,"props":1021,"children":1022},{"class":185,"line":222},[1023],{"type":39,"tag":183,"props":1024,"children":1025},{},[1026],{"type":45,"value":1027},"    expected_output=\"...\",\n",{"type":39,"tag":183,"props":1029,"children":1030},{"class":185,"line":232},[1031],{"type":39,"tag":183,"props":1032,"children":1033},{},[1034],{"type":45,"value":1035},"    agent=analyst,\n",{"type":39,"tag":183,"props":1037,"children":1038},{"class":185,"line":242},[1039],{"type":39,"tag":183,"props":1040,"children":1041},{},[1042],{"type":45,"value":1043},"    context=[research_task],    # Receives research_task's output as context\n",{"type":39,"tag":183,"props":1045,"children":1046},{"class":185,"line":251},[1047],{"type":39,"tag":183,"props":1048,"children":1049},{},[1050],{"type":45,"value":984},{"type":39,"tag":48,"props":1052,"children":1053},{},[1054,1059,1061,1066],{"type":39,"tag":68,"props":1055,"children":1056},{},[1057],{"type":45,"value":1058},"In sequential process:",{"type":45,"value":1060}," Each task auto-receives all prior task outputs. Use ",{"type":39,"tag":179,"props":1062,"children":1064},{"className":1063},[],[1065],{"type":45,"value":996},{"type":45,"value":1067}," only when you need non-linear dependencies.",{"type":39,"tag":48,"props":1069,"children":1070},{},[1071,1076,1078,1083],{"type":39,"tag":68,"props":1072,"children":1073},{},[1074],{"type":45,"value":1075},"In hierarchical process:",{"type":45,"value":1077}," ",{"type":39,"tag":179,"props":1079,"children":1081},{"className":1080},[],[1082],{"type":45,"value":996},{"type":45,"value":1084}," is how you create explicit data flow between tasks.",{"type":39,"tag":104,"props":1086,"children":1088},{"id":1087},"structured-output",[1089],{"type":45,"value":1090},"Structured Output",{"type":39,"tag":48,"props":1092,"children":1093},{},[1094,1096,1102,1104,1110],{"type":45,"value":1095},"Use ",{"type":39,"tag":179,"props":1097,"children":1099},{"className":1098},[],[1100],{"type":45,"value":1101},"output_pydantic",{"type":45,"value":1103}," or ",{"type":39,"tag":179,"props":1105,"children":1107},{"className":1106},[],[1108],{"type":45,"value":1109},"output_json",{"type":45,"value":1111}," when downstream code needs to parse the result:",{"type":39,"tag":171,"props":1113,"children":1115},{"className":938,"code":1114,"language":940,"meta":176,"style":176},"from pydantic import BaseModel\n\nclass ResearchReport(BaseModel):\n    trends: list[str]\n    confidence: float\n    sources: list[str]\n\nresearch_task = Task(\n    description=\"...\",\n    expected_output=\"A structured report with trends, confidence score, and sources.\",\n    agent=researcher,\n    output_pydantic=ResearchReport,   # Agent's output is parsed into this model\n)\n",[1116],{"type":39,"tag":179,"props":1117,"children":1118},{"__ignoreMap":176},[1119,1127,1134,1142,1150,1158,1166,1173,1181,1189,1197,1205,1213],{"type":39,"tag":183,"props":1120,"children":1121},{"class":185,"line":186},[1122],{"type":39,"tag":183,"props":1123,"children":1124},{},[1125],{"type":45,"value":1126},"from pydantic import BaseModel\n",{"type":39,"tag":183,"props":1128,"children":1129},{"class":185,"line":202},[1130],{"type":39,"tag":183,"props":1131,"children":1132},{"emptyLinePlaceholder":236},[1133],{"type":45,"value":239},{"type":39,"tag":183,"props":1135,"children":1136},{"class":185,"line":222},[1137],{"type":39,"tag":183,"props":1138,"children":1139},{},[1140],{"type":45,"value":1141},"class ResearchReport(BaseModel):\n",{"type":39,"tag":183,"props":1143,"children":1144},{"class":185,"line":232},[1145],{"type":39,"tag":183,"props":1146,"children":1147},{},[1148],{"type":45,"value":1149},"    trends: list[str]\n",{"type":39,"tag":183,"props":1151,"children":1152},{"class":185,"line":242},[1153],{"type":39,"tag":183,"props":1154,"children":1155},{},[1156],{"type":45,"value":1157},"    confidence: float\n",{"type":39,"tag":183,"props":1159,"children":1160},{"class":185,"line":251},[1161],{"type":39,"tag":183,"props":1162,"children":1163},{},[1164],{"type":45,"value":1165},"    sources: list[str]\n",{"type":39,"tag":183,"props":1167,"children":1168},{"class":185,"line":260},[1169],{"type":39,"tag":183,"props":1170,"children":1171},{"emptyLinePlaceholder":236},[1172],{"type":45,"value":239},{"type":39,"tag":183,"props":1174,"children":1175},{"class":185,"line":269},[1176],{"type":39,"tag":183,"props":1177,"children":1178},{},[1179],{"type":45,"value":1180},"research_task = Task(\n",{"type":39,"tag":183,"props":1182,"children":1183},{"class":185,"line":27},[1184],{"type":39,"tag":183,"props":1185,"children":1186},{},[1187],{"type":45,"value":1188},"    description=\"...\",\n",{"type":39,"tag":183,"props":1190,"children":1191},{"class":185,"line":286},[1192],{"type":39,"tag":183,"props":1193,"children":1194},{},[1195],{"type":45,"value":1196},"    expected_output=\"A structured report with trends, confidence score, and sources.\",\n",{"type":39,"tag":183,"props":1198,"children":1199},{"class":185,"line":294},[1200],{"type":39,"tag":183,"props":1201,"children":1202},{},[1203],{"type":45,"value":1204},"    agent=researcher,\n",{"type":39,"tag":183,"props":1206,"children":1207},{"class":185,"line":303},[1208],{"type":39,"tag":183,"props":1209,"children":1210},{},[1211],{"type":45,"value":1212},"    output_pydantic=ResearchReport,   # Agent's output is parsed into this model\n",{"type":39,"tag":183,"props":1214,"children":1215},{"class":185,"line":312},[1216],{"type":39,"tag":183,"props":1217,"children":1218},{},[1219],{"type":45,"value":984},{"type":39,"tag":48,"props":1221,"children":1222},{},[1223,1228,1229,1234,1236,1241,1243,1248,1250,1255],{"type":39,"tag":68,"props":1224,"children":1225},{},[1226],{"type":45,"value":1227},"Important:",{"type":45,"value":1077},{"type":39,"tag":179,"props":1230,"children":1232},{"className":1231},[],[1233],{"type":45,"value":100},{"type":45,"value":1235}," is always a ",{"type":39,"tag":68,"props":1237,"children":1238},{},[1239],{"type":45,"value":1240},"string description",{"type":45,"value":1242}," — never a class name. The Pydantic model goes in ",{"type":39,"tag":179,"props":1244,"children":1246},{"className":1245},[],[1247],{"type":45,"value":1101},{"type":45,"value":1249},", and the ",{"type":39,"tag":179,"props":1251,"children":1253},{"className":1252},[],[1254],{"type":45,"value":100},{"type":45,"value":1256}," text tells the agent what fields to include.",{"type":39,"tag":48,"props":1258,"children":1259},{},[1260],{"type":45,"value":1261},"Access structured output:",{"type":39,"tag":171,"props":1263,"children":1265},{"className":938,"code":1264,"language":940,"meta":176,"style":176},"result = crew.kickoff(inputs={...})\nlast_task_output = result.pydantic          # Pydantic model from the last task\nall_outputs = result.tasks_output           # List of all TaskOutput objects\nfirst_task = all_outputs[0].pydantic        # Pydantic from a specific task\n",[1266],{"type":39,"tag":179,"props":1267,"children":1268},{"__ignoreMap":176},[1269,1277,1285,1293],{"type":39,"tag":183,"props":1270,"children":1271},{"class":185,"line":186},[1272],{"type":39,"tag":183,"props":1273,"children":1274},{},[1275],{"type":45,"value":1276},"result = crew.kickoff(inputs={...})\n",{"type":39,"tag":183,"props":1278,"children":1279},{"class":185,"line":202},[1280],{"type":39,"tag":183,"props":1281,"children":1282},{},[1283],{"type":45,"value":1284},"last_task_output = result.pydantic          # Pydantic model from the last task\n",{"type":39,"tag":183,"props":1286,"children":1287},{"class":185,"line":222},[1288],{"type":39,"tag":183,"props":1289,"children":1290},{},[1291],{"type":45,"value":1292},"all_outputs = result.tasks_output           # List of all TaskOutput objects\n",{"type":39,"tag":183,"props":1294,"children":1295},{"class":185,"line":232},[1296],{"type":39,"tag":183,"props":1297,"children":1298},{},[1299],{"type":45,"value":1300},"first_task = all_outputs[0].pydantic        # Pydantic from a specific task\n",{"type":39,"tag":104,"props":1302,"children":1304},{"id":1303},"file-output",[1305],{"type":45,"value":1306},"File Output",{"type":39,"tag":171,"props":1308,"children":1310},{"className":938,"code":1309,"language":940,"meta":176,"style":176},"Task(\n    ...,\n    output_file=\"output\u002Freport.md\",    # Save output to file\n    create_directory=True,             # Create directory if missing (default: True)\n)\n",[1311],{"type":39,"tag":179,"props":1312,"children":1313},{"__ignoreMap":176},[1314,1321,1329,1337,1345],{"type":39,"tag":183,"props":1315,"children":1316},{"class":185,"line":186},[1317],{"type":39,"tag":183,"props":1318,"children":1319},{},[1320],{"type":45,"value":952},{"type":39,"tag":183,"props":1322,"children":1323},{"class":185,"line":202},[1324],{"type":39,"tag":183,"props":1325,"children":1326},{},[1327],{"type":45,"value":1328},"    ...,\n",{"type":39,"tag":183,"props":1330,"children":1331},{"class":185,"line":222},[1332],{"type":39,"tag":183,"props":1333,"children":1334},{},[1335],{"type":45,"value":1336},"    output_file=\"output\u002Freport.md\",    # Save output to file\n",{"type":39,"tag":183,"props":1338,"children":1339},{"class":185,"line":232},[1340],{"type":39,"tag":183,"props":1341,"children":1342},{},[1343],{"type":45,"value":1344},"    create_directory=True,             # Create directory if missing (default: True)\n",{"type":39,"tag":183,"props":1346,"children":1347},{"class":185,"line":242},[1348],{"type":39,"tag":183,"props":1349,"children":1350},{},[1351],{"type":45,"value":984},{"type":39,"tag":48,"props":1353,"children":1354},{},[1355,1357,1362],{"type":45,"value":1356},"File output and structured output can be combined — the file gets the raw text, and ",{"type":39,"tag":179,"props":1358,"children":1360},{"className":1359},[],[1361],{"type":45,"value":1101},{"type":45,"value":1363}," gets the parsed model.",{"type":39,"tag":104,"props":1365,"children":1367},{"id":1366},"async-execution",[1368],{"type":45,"value":1369},"Async Execution",{"type":39,"tag":171,"props":1371,"children":1373},{"className":938,"code":1372,"language":940,"meta":176,"style":176},"Task(\n    ...,\n    async_execution=True,     # Run without blocking the next task\n)\n",[1374],{"type":39,"tag":179,"props":1375,"children":1376},{"__ignoreMap":176},[1377,1384,1391,1399],{"type":39,"tag":183,"props":1378,"children":1379},{"class":185,"line":186},[1380],{"type":39,"tag":183,"props":1381,"children":1382},{},[1383],{"type":45,"value":952},{"type":39,"tag":183,"props":1385,"children":1386},{"class":185,"line":202},[1387],{"type":39,"tag":183,"props":1388,"children":1389},{},[1390],{"type":45,"value":1328},{"type":39,"tag":183,"props":1392,"children":1393},{"class":185,"line":222},[1394],{"type":39,"tag":183,"props":1395,"children":1396},{},[1397],{"type":45,"value":1398},"    async_execution=True,     # Run without blocking the next task\n",{"type":39,"tag":183,"props":1400,"children":1401},{"class":185,"line":232},[1402],{"type":39,"tag":183,"props":1403,"children":1404},{},[1405],{"type":45,"value":984},{"type":39,"tag":48,"props":1407,"children":1408},{},[1409,1411,1416],{"type":45,"value":1410},"Use for tasks that can run in parallel. The crew continues to the next task while this one executes. Use ",{"type":39,"tag":179,"props":1412,"children":1414},{"className":1413},[],[1415],{"type":45,"value":996},{"type":45,"value":1417}," on downstream tasks to wait for async results.",{"type":39,"tag":104,"props":1419,"children":1421},{"id":1420},"human-review",[1422],{"type":45,"value":1423},"Human Review",{"type":39,"tag":171,"props":1425,"children":1427},{"className":938,"code":1426,"language":940,"meta":176,"style":176},"Task(\n    ...,\n    human_input=True,         # Pause for human review before finalizing\n)\n",[1428],{"type":39,"tag":179,"props":1429,"children":1430},{"__ignoreMap":176},[1431,1438,1445,1453],{"type":39,"tag":183,"props":1432,"children":1433},{"class":185,"line":186},[1434],{"type":39,"tag":183,"props":1435,"children":1436},{},[1437],{"type":45,"value":952},{"type":39,"tag":183,"props":1439,"children":1440},{"class":185,"line":202},[1441],{"type":39,"tag":183,"props":1442,"children":1443},{},[1444],{"type":45,"value":1328},{"type":39,"tag":183,"props":1446,"children":1447},{"class":185,"line":222},[1448],{"type":39,"tag":183,"props":1449,"children":1450},{},[1451],{"type":45,"value":1452},"    human_input=True,         # Pause for human review before finalizing\n",{"type":39,"tag":183,"props":1454,"children":1455},{"class":185,"line":232},[1456],{"type":39,"tag":183,"props":1457,"children":1458},{},[1459],{"type":45,"value":984},{"type":39,"tag":48,"props":1461,"children":1462},{},[1463],{"type":45,"value":1464},"When enabled, the agent presents its result and waits for human feedback before marking the task complete. Use for critical outputs that need human approval.",{"type":39,"tag":48,"props":1466,"children":1467},{},[1468,1489,1491,1497],{"type":39,"tag":68,"props":1469,"children":1470},{},[1471,1473,1479,1481,1487],{"type":45,"value":1472},"Do not use ",{"type":39,"tag":179,"props":1474,"children":1476},{"className":1475},[],[1477],{"type":45,"value":1478},"human_input=True",{"type":45,"value":1480}," or Flow ",{"type":39,"tag":179,"props":1482,"children":1484},{"className":1483},[],[1485],{"type":45,"value":1486},"@human_feedback",{"type":45,"value":1488}," to model normal follow-up chat.",{"type":45,"value":1490}," In conversational Flows, the next user line should be another ",{"type":39,"tag":179,"props":1492,"children":1494},{"className":1493},[],[1495],{"type":45,"value":1496},"flow.handle_turn(message, session_id=...)",{"type":45,"value":1498}," call. Human review is for approving or correcting a specific task\u002Fstep output before it moves downstream.",{"type":39,"tag":104,"props":1500,"children":1502},{"id":1501},"markdown-formatting",[1503],{"type":45,"value":1504},"Markdown Formatting",{"type":39,"tag":171,"props":1506,"children":1508},{"className":938,"code":1507,"language":940,"meta":176,"style":176},"Task(\n    ...,\n    markdown=True,            # Add markdown formatting instructions\n)\n",[1509],{"type":39,"tag":179,"props":1510,"children":1511},{"__ignoreMap":176},[1512,1519,1526,1534],{"type":39,"tag":183,"props":1513,"children":1514},{"class":185,"line":186},[1515],{"type":39,"tag":183,"props":1516,"children":1517},{},[1518],{"type":45,"value":952},{"type":39,"tag":183,"props":1520,"children":1521},{"class":185,"line":202},[1522],{"type":39,"tag":183,"props":1523,"children":1524},{},[1525],{"type":45,"value":1328},{"type":39,"tag":183,"props":1527,"children":1528},{"class":185,"line":222},[1529],{"type":39,"tag":183,"props":1530,"children":1531},{},[1532],{"type":45,"value":1533},"    markdown=True,            # Add markdown formatting instructions\n",{"type":39,"tag":183,"props":1535,"children":1536},{"class":185,"line":232},[1537],{"type":39,"tag":183,"props":1538,"children":1539},{},[1540],{"type":45,"value":984},{"type":39,"tag":48,"props":1542,"children":1543},{},[1544],{"type":45,"value":1545},"Automatically instructs the agent to format output with proper markdown headers, lists, emphasis, and code blocks.",{"type":39,"tag":104,"props":1547,"children":1549},{"id":1548},"callbacks",[1550],{"type":45,"value":1551},"Callbacks",{"type":39,"tag":171,"props":1553,"children":1555},{"className":938,"code":1554,"language":940,"meta":176,"style":176},"def log_completion(output):\n    print(f\"Task completed: {output.description[:50]}...\")\n    save_to_database(output.raw)\n\nTask(\n    ...,\n    callback=log_completion,  # Called after task completion\n)\n",[1556],{"type":39,"tag":179,"props":1557,"children":1558},{"__ignoreMap":176},[1559,1567,1575,1583,1590,1597,1604,1612],{"type":39,"tag":183,"props":1560,"children":1561},{"class":185,"line":186},[1562],{"type":39,"tag":183,"props":1563,"children":1564},{},[1565],{"type":45,"value":1566},"def log_completion(output):\n",{"type":39,"tag":183,"props":1568,"children":1569},{"class":185,"line":202},[1570],{"type":39,"tag":183,"props":1571,"children":1572},{},[1573],{"type":45,"value":1574},"    print(f\"Task completed: {output.description[:50]}...\")\n",{"type":39,"tag":183,"props":1576,"children":1577},{"class":185,"line":222},[1578],{"type":39,"tag":183,"props":1579,"children":1580},{},[1581],{"type":45,"value":1582},"    save_to_database(output.raw)\n",{"type":39,"tag":183,"props":1584,"children":1585},{"class":185,"line":232},[1586],{"type":39,"tag":183,"props":1587,"children":1588},{"emptyLinePlaceholder":236},[1589],{"type":45,"value":239},{"type":39,"tag":183,"props":1591,"children":1592},{"class":185,"line":242},[1593],{"type":39,"tag":183,"props":1594,"children":1595},{},[1596],{"type":45,"value":952},{"type":39,"tag":183,"props":1598,"children":1599},{"class":185,"line":251},[1600],{"type":39,"tag":183,"props":1601,"children":1602},{},[1603],{"type":45,"value":1328},{"type":39,"tag":183,"props":1605,"children":1606},{"class":185,"line":260},[1607],{"type":39,"tag":183,"props":1608,"children":1609},{},[1610],{"type":45,"value":1611},"    callback=log_completion,  # Called after task completion\n",{"type":39,"tag":183,"props":1613,"children":1614},{"class":185,"line":269},[1615],{"type":39,"tag":183,"props":1616,"children":1617},{},[1618],{"type":45,"value":984},{"type":39,"tag":54,"props":1620,"children":1621},{},[],{"type":39,"tag":58,"props":1623,"children":1625},{"id":1624},"_4-task-guardrails-quality-control",[1626],{"type":45,"value":1627},"4. Task Guardrails — Quality Control",{"type":39,"tag":48,"props":1629,"children":1630},{},[1631],{"type":45,"value":1632},"Guardrails validate task output before it passes to the next step. If validation fails, the agent retries.",{"type":39,"tag":104,"props":1634,"children":1636},{"id":1635},"function-based-guardrails",[1637],{"type":45,"value":1638},"Function-Based Guardrails",{"type":39,"tag":171,"props":1640,"children":1642},{"className":938,"code":1641,"language":940,"meta":176,"style":176},"def validate_word_count(output) -> tuple[bool, Any]:\n    \"\"\"Ensure output is between 500-2000 words.\"\"\"\n    word_count = len(output.raw.split())\n    if word_count \u003C 500:\n        return (False, f\"Output too short ({word_count} words). Expand to at least 500 words.\")\n    if word_count > 2000:\n        return (False, f\"Output too long ({word_count} words). Condense to under 2000 words.\")\n    return (True, output)\n\nTask(\n    ...,\n    guardrail=validate_word_count,\n    guardrail_max_retries=3,       # Max retry attempts (default: 3)\n)\n",[1643],{"type":39,"tag":179,"props":1644,"children":1645},{"__ignoreMap":176},[1646,1654,1662,1670,1678,1686,1694,1702,1710,1717,1724,1731,1739,1747],{"type":39,"tag":183,"props":1647,"children":1648},{"class":185,"line":186},[1649],{"type":39,"tag":183,"props":1650,"children":1651},{},[1652],{"type":45,"value":1653},"def validate_word_count(output) -> tuple[bool, Any]:\n",{"type":39,"tag":183,"props":1655,"children":1656},{"class":185,"line":202},[1657],{"type":39,"tag":183,"props":1658,"children":1659},{},[1660],{"type":45,"value":1661},"    \"\"\"Ensure output is between 500-2000 words.\"\"\"\n",{"type":39,"tag":183,"props":1663,"children":1664},{"class":185,"line":222},[1665],{"type":39,"tag":183,"props":1666,"children":1667},{},[1668],{"type":45,"value":1669},"    word_count = len(output.raw.split())\n",{"type":39,"tag":183,"props":1671,"children":1672},{"class":185,"line":232},[1673],{"type":39,"tag":183,"props":1674,"children":1675},{},[1676],{"type":45,"value":1677},"    if word_count \u003C 500:\n",{"type":39,"tag":183,"props":1679,"children":1680},{"class":185,"line":242},[1681],{"type":39,"tag":183,"props":1682,"children":1683},{},[1684],{"type":45,"value":1685},"        return (False, f\"Output too short ({word_count} words). Expand to at least 500 words.\")\n",{"type":39,"tag":183,"props":1687,"children":1688},{"class":185,"line":251},[1689],{"type":39,"tag":183,"props":1690,"children":1691},{},[1692],{"type":45,"value":1693},"    if word_count > 2000:\n",{"type":39,"tag":183,"props":1695,"children":1696},{"class":185,"line":260},[1697],{"type":39,"tag":183,"props":1698,"children":1699},{},[1700],{"type":45,"value":1701},"        return (False, f\"Output too long ({word_count} words). Condense to under 2000 words.\")\n",{"type":39,"tag":183,"props":1703,"children":1704},{"class":185,"line":269},[1705],{"type":39,"tag":183,"props":1706,"children":1707},{},[1708],{"type":45,"value":1709},"    return (True, output)\n",{"type":39,"tag":183,"props":1711,"children":1712},{"class":185,"line":27},[1713],{"type":39,"tag":183,"props":1714,"children":1715},{"emptyLinePlaceholder":236},[1716],{"type":45,"value":239},{"type":39,"tag":183,"props":1718,"children":1719},{"class":185,"line":286},[1720],{"type":39,"tag":183,"props":1721,"children":1722},{},[1723],{"type":45,"value":952},{"type":39,"tag":183,"props":1725,"children":1726},{"class":185,"line":294},[1727],{"type":39,"tag":183,"props":1728,"children":1729},{},[1730],{"type":45,"value":1328},{"type":39,"tag":183,"props":1732,"children":1733},{"class":185,"line":303},[1734],{"type":39,"tag":183,"props":1735,"children":1736},{},[1737],{"type":45,"value":1738},"    guardrail=validate_word_count,\n",{"type":39,"tag":183,"props":1740,"children":1741},{"class":185,"line":312},[1742],{"type":39,"tag":183,"props":1743,"children":1744},{},[1745],{"type":45,"value":1746},"    guardrail_max_retries=3,       # Max retry attempts (default: 3)\n",{"type":39,"tag":183,"props":1748,"children":1749},{"class":185,"line":321},[1750],{"type":39,"tag":183,"props":1751,"children":1752},{},[1753],{"type":45,"value":984},{"type":39,"tag":48,"props":1755,"children":1756},{},[1757,1762,1763,1769],{"type":39,"tag":68,"props":1758,"children":1759},{},[1760],{"type":45,"value":1761},"Return format:",{"type":45,"value":1077},{"type":39,"tag":179,"props":1764,"children":1766},{"className":1765},[],[1767],{"type":45,"value":1768},"(bool, Any)",{"type":45,"value":1770}," — first element is pass\u002Ffail, second is the result (on success) or error message (on failure).",{"type":39,"tag":104,"props":1772,"children":1774},{"id":1773},"llm-based-guardrails",[1775],{"type":45,"value":1776},"LLM-Based Guardrails",{"type":39,"tag":171,"props":1778,"children":1780},{"className":938,"code":1779,"language":940,"meta":176,"style":176},"Task(\n    ...,\n    guardrail=\"Verify the output contains at least 3 source citations and no speculative claims.\",\n)\n",[1781],{"type":39,"tag":179,"props":1782,"children":1783},{"__ignoreMap":176},[1784,1791,1798,1806],{"type":39,"tag":183,"props":1785,"children":1786},{"class":185,"line":186},[1787],{"type":39,"tag":183,"props":1788,"children":1789},{},[1790],{"type":45,"value":952},{"type":39,"tag":183,"props":1792,"children":1793},{"class":185,"line":202},[1794],{"type":39,"tag":183,"props":1795,"children":1796},{},[1797],{"type":45,"value":1328},{"type":39,"tag":183,"props":1799,"children":1800},{"class":185,"line":222},[1801],{"type":39,"tag":183,"props":1802,"children":1803},{},[1804],{"type":45,"value":1805},"    guardrail=\"Verify the output contains at least 3 source citations and no speculative claims.\",\n",{"type":39,"tag":183,"props":1807,"children":1808},{"class":185,"line":232},[1809],{"type":39,"tag":183,"props":1810,"children":1811},{},[1812],{"type":45,"value":984},{"type":39,"tag":48,"props":1814,"children":1815},{},[1816],{"type":45,"value":1817},"String guardrails use the agent's LLM to evaluate the output. Good for subjective quality checks.",{"type":39,"tag":104,"props":1819,"children":1821},{"id":1820},"chaining-multiple-guardrails",[1822],{"type":45,"value":1823},"Chaining Multiple Guardrails",{"type":39,"tag":171,"props":1825,"children":1827},{"className":938,"code":1826,"language":940,"meta":176,"style":176},"Task(\n    ...,\n    guardrails=[\n        validate_word_count,           # Function: check length\n        validate_no_pii,               # Function: check for PII\n        \"Ensure the tone is professional and appropriate for a business audience.\",  # LLM check\n    ],\n    guardrail_max_retries=3,\n)\n",[1828],{"type":39,"tag":179,"props":1829,"children":1830},{"__ignoreMap":176},[1831,1838,1845,1853,1861,1869,1877,1885,1893],{"type":39,"tag":183,"props":1832,"children":1833},{"class":185,"line":186},[1834],{"type":39,"tag":183,"props":1835,"children":1836},{},[1837],{"type":45,"value":952},{"type":39,"tag":183,"props":1839,"children":1840},{"class":185,"line":202},[1841],{"type":39,"tag":183,"props":1842,"children":1843},{},[1844],{"type":45,"value":1328},{"type":39,"tag":183,"props":1846,"children":1847},{"class":185,"line":222},[1848],{"type":39,"tag":183,"props":1849,"children":1850},{},[1851],{"type":45,"value":1852},"    guardrails=[\n",{"type":39,"tag":183,"props":1854,"children":1855},{"class":185,"line":232},[1856],{"type":39,"tag":183,"props":1857,"children":1858},{},[1859],{"type":45,"value":1860},"        validate_word_count,           # Function: check length\n",{"type":39,"tag":183,"props":1862,"children":1863},{"class":185,"line":242},[1864],{"type":39,"tag":183,"props":1865,"children":1866},{},[1867],{"type":45,"value":1868},"        validate_no_pii,               # Function: check for PII\n",{"type":39,"tag":183,"props":1870,"children":1871},{"class":185,"line":251},[1872],{"type":39,"tag":183,"props":1873,"children":1874},{},[1875],{"type":45,"value":1876},"        \"Ensure the tone is professional and appropriate for a business audience.\",  # LLM check\n",{"type":39,"tag":183,"props":1878,"children":1879},{"class":185,"line":260},[1880],{"type":39,"tag":183,"props":1881,"children":1882},{},[1883],{"type":45,"value":1884},"    ],\n",{"type":39,"tag":183,"props":1886,"children":1887},{"class":185,"line":269},[1888],{"type":39,"tag":183,"props":1889,"children":1890},{},[1891],{"type":45,"value":1892},"    guardrail_max_retries=3,\n",{"type":39,"tag":183,"props":1894,"children":1895},{"class":185,"line":27},[1896],{"type":39,"tag":183,"props":1897,"children":1898},{},[1899],{"type":45,"value":984},{"type":39,"tag":48,"props":1901,"children":1902},{},[1903],{"type":45,"value":1904},"Guardrails execute sequentially. Each receives the output of the previous guardrail. Mix function-based (deterministic) and LLM-based (subjective) checks.",{"type":39,"tag":54,"props":1906,"children":1907},{},[],{"type":39,"tag":58,"props":1909,"children":1911},{"id":1910},"_5-yaml-configuration-recommended",[1912],{"type":45,"value":1913},"5. YAML Configuration (Recommended)",{"type":39,"tag":104,"props":1915,"children":1917},{"id":1916},"tasksyaml",[1918],{"type":45,"value":1919},"tasks.yaml",{"type":39,"tag":171,"props":1921,"children":1923},{"className":173,"code":1922,"language":175,"meta":176,"style":176},"research_task:\n  description: >\n    Conduct thorough research about {topic} for {current_year}.\n    Identify key trends, breakthrough technologies,\n    and potential industry impacts.\n    Focus on the last 6 months of developments.\n  expected_output: >\n    A structured research brief with 5 sections.\n    Each section: trend name, 2-3 paragraph summary,\n    source citations, and impact assessment.\n  agent: researcher\n\nanalysis_task:\n  description: >\n    Analyze the research findings and create actionable recommendations\n    for {target_audience}.\n  expected_output: >\n    A prioritized list of 5 recommendations with:\n    rationale, estimated effort, and expected impact.\n  agent: analyst\n  context:\n    - research_task\n\nreport_task:\n  description: >\n    Compile a final report combining research and analysis for {target_audience}.\n  expected_output: >\n    A polished markdown report with executive summary,\n    detailed findings, recommendations, and appendices.\n  agent: writer\n  output_file: output\u002Freport.md\n",[1924],{"type":39,"tag":179,"props":1925,"children":1926},{"__ignoreMap":176},[1927,1938,1953,1961,1969,1977,1985,2000,2008,2016,2024,2039,2046,2058,2073,2081,2089,2104,2112,2120,2136,2148,2161,2169,2182,2198,2207,2223,2232,2240,2256],{"type":39,"tag":183,"props":1928,"children":1929},{"class":185,"line":186},[1930,1934],{"type":39,"tag":183,"props":1931,"children":1932},{"style":190},[1933],{"type":45,"value":193},{"type":39,"tag":183,"props":1935,"children":1936},{"style":196},[1937],{"type":45,"value":199},{"type":39,"tag":183,"props":1939,"children":1940},{"class":185,"line":202},[1941,1945,1949],{"type":39,"tag":183,"props":1942,"children":1943},{"style":190},[1944],{"type":45,"value":208},{"type":39,"tag":183,"props":1946,"children":1947},{"style":196},[1948],{"type":45,"value":213},{"type":39,"tag":183,"props":1950,"children":1951},{"style":216},[1952],{"type":45,"value":219},{"type":39,"tag":183,"props":1954,"children":1955},{"class":185,"line":222},[1956],{"type":39,"tag":183,"props":1957,"children":1958},{"style":226},[1959],{"type":45,"value":1960},"    Conduct thorough research about {topic} for {current_year}.\n",{"type":39,"tag":183,"props":1962,"children":1963},{"class":185,"line":232},[1964],{"type":39,"tag":183,"props":1965,"children":1966},{"style":226},[1967],{"type":45,"value":1968},"    Identify key trends, breakthrough technologies,\n",{"type":39,"tag":183,"props":1970,"children":1971},{"class":185,"line":242},[1972],{"type":39,"tag":183,"props":1973,"children":1974},{"style":226},[1975],{"type":45,"value":1976},"    and potential industry impacts.\n",{"type":39,"tag":183,"props":1978,"children":1979},{"class":185,"line":251},[1980],{"type":39,"tag":183,"props":1981,"children":1982},{"style":226},[1983],{"type":45,"value":1984},"    Focus on the last 6 months of developments.\n",{"type":39,"tag":183,"props":1986,"children":1987},{"class":185,"line":260},[1988,1992,1996],{"type":39,"tag":183,"props":1989,"children":1990},{"style":190},[1991],{"type":45,"value":327},{"type":39,"tag":183,"props":1993,"children":1994},{"style":196},[1995],{"type":45,"value":213},{"type":39,"tag":183,"props":1997,"children":1998},{"style":216},[1999],{"type":45,"value":219},{"type":39,"tag":183,"props":2001,"children":2002},{"class":185,"line":269},[2003],{"type":39,"tag":183,"props":2004,"children":2005},{"style":226},[2006],{"type":45,"value":2007},"    A structured research brief with 5 sections.\n",{"type":39,"tag":183,"props":2009,"children":2010},{"class":185,"line":27},[2011],{"type":39,"tag":183,"props":2012,"children":2013},{"style":226},[2014],{"type":45,"value":2015},"    Each section: trend name, 2-3 paragraph summary,\n",{"type":39,"tag":183,"props":2017,"children":2018},{"class":185,"line":286},[2019],{"type":39,"tag":183,"props":2020,"children":2021},{"style":226},[2022],{"type":45,"value":2023},"    source citations, and impact assessment.\n",{"type":39,"tag":183,"props":2025,"children":2026},{"class":185,"line":294},[2027,2031,2035],{"type":39,"tag":183,"props":2028,"children":2029},{"style":190},[2030],{"type":45,"value":380},{"type":39,"tag":183,"props":2032,"children":2033},{"style":196},[2034],{"type":45,"value":213},{"type":39,"tag":183,"props":2036,"children":2037},{"style":226},[2038],{"type":45,"value":389},{"type":39,"tag":183,"props":2040,"children":2041},{"class":185,"line":303},[2042],{"type":39,"tag":183,"props":2043,"children":2044},{"emptyLinePlaceholder":236},[2045],{"type":45,"value":239},{"type":39,"tag":183,"props":2047,"children":2048},{"class":185,"line":312},[2049,2054],{"type":39,"tag":183,"props":2050,"children":2051},{"style":190},[2052],{"type":45,"value":2053},"analysis_task",{"type":39,"tag":183,"props":2055,"children":2056},{"style":196},[2057],{"type":45,"value":199},{"type":39,"tag":183,"props":2059,"children":2060},{"class":185,"line":321},[2061,2065,2069],{"type":39,"tag":183,"props":2062,"children":2063},{"style":190},[2064],{"type":45,"value":208},{"type":39,"tag":183,"props":2066,"children":2067},{"style":196},[2068],{"type":45,"value":213},{"type":39,"tag":183,"props":2070,"children":2071},{"style":216},[2072],{"type":45,"value":219},{"type":39,"tag":183,"props":2074,"children":2075},{"class":185,"line":338},[2076],{"type":39,"tag":183,"props":2077,"children":2078},{"style":226},[2079],{"type":45,"value":2080},"    Analyze the research findings and create actionable recommendations\n",{"type":39,"tag":183,"props":2082,"children":2083},{"class":185,"line":347},[2084],{"type":39,"tag":183,"props":2085,"children":2086},{"style":226},[2087],{"type":45,"value":2088},"    for {target_audience}.\n",{"type":39,"tag":183,"props":2090,"children":2091},{"class":185,"line":356},[2092,2096,2100],{"type":39,"tag":183,"props":2093,"children":2094},{"style":190},[2095],{"type":45,"value":327},{"type":39,"tag":183,"props":2097,"children":2098},{"style":196},[2099],{"type":45,"value":213},{"type":39,"tag":183,"props":2101,"children":2102},{"style":216},[2103],{"type":45,"value":219},{"type":39,"tag":183,"props":2105,"children":2106},{"class":185,"line":365},[2107],{"type":39,"tag":183,"props":2108,"children":2109},{"style":226},[2110],{"type":45,"value":2111},"    A prioritized list of 5 recommendations with:\n",{"type":39,"tag":183,"props":2113,"children":2114},{"class":185,"line":374},[2115],{"type":39,"tag":183,"props":2116,"children":2117},{"style":226},[2118],{"type":45,"value":2119},"    rationale, estimated effort, and expected impact.\n",{"type":39,"tag":183,"props":2121,"children":2122},{"class":185,"line":883},[2123,2127,2131],{"type":39,"tag":183,"props":2124,"children":2125},{"style":190},[2126],{"type":45,"value":380},{"type":39,"tag":183,"props":2128,"children":2129},{"style":196},[2130],{"type":45,"value":213},{"type":39,"tag":183,"props":2132,"children":2133},{"style":226},[2134],{"type":45,"value":2135}," analyst\n",{"type":39,"tag":183,"props":2137,"children":2138},{"class":185,"line":892},[2139,2144],{"type":39,"tag":183,"props":2140,"children":2141},{"style":190},[2142],{"type":45,"value":2143},"  context",{"type":39,"tag":183,"props":2145,"children":2146},{"style":196},[2147],{"type":45,"value":199},{"type":39,"tag":183,"props":2149,"children":2150},{"class":185,"line":901},[2151,2156],{"type":39,"tag":183,"props":2152,"children":2153},{"style":196},[2154],{"type":45,"value":2155},"    -",{"type":39,"tag":183,"props":2157,"children":2158},{"style":226},[2159],{"type":45,"value":2160}," research_task\n",{"type":39,"tag":183,"props":2162,"children":2164},{"class":185,"line":2163},23,[2165],{"type":39,"tag":183,"props":2166,"children":2167},{"emptyLinePlaceholder":236},[2168],{"type":45,"value":239},{"type":39,"tag":183,"props":2170,"children":2172},{"class":185,"line":2171},24,[2173,2178],{"type":39,"tag":183,"props":2174,"children":2175},{"style":190},[2176],{"type":45,"value":2177},"report_task",{"type":39,"tag":183,"props":2179,"children":2180},{"style":196},[2181],{"type":45,"value":199},{"type":39,"tag":183,"props":2183,"children":2185},{"class":185,"line":2184},25,[2186,2190,2194],{"type":39,"tag":183,"props":2187,"children":2188},{"style":190},[2189],{"type":45,"value":208},{"type":39,"tag":183,"props":2191,"children":2192},{"style":196},[2193],{"type":45,"value":213},{"type":39,"tag":183,"props":2195,"children":2196},{"style":216},[2197],{"type":45,"value":219},{"type":39,"tag":183,"props":2199,"children":2201},{"class":185,"line":2200},26,[2202],{"type":39,"tag":183,"props":2203,"children":2204},{"style":226},[2205],{"type":45,"value":2206},"    Compile a final report combining research and analysis for {target_audience}.\n",{"type":39,"tag":183,"props":2208,"children":2210},{"class":185,"line":2209},27,[2211,2215,2219],{"type":39,"tag":183,"props":2212,"children":2213},{"style":190},[2214],{"type":45,"value":327},{"type":39,"tag":183,"props":2216,"children":2217},{"style":196},[2218],{"type":45,"value":213},{"type":39,"tag":183,"props":2220,"children":2221},{"style":216},[2222],{"type":45,"value":219},{"type":39,"tag":183,"props":2224,"children":2226},{"class":185,"line":2225},28,[2227],{"type":39,"tag":183,"props":2228,"children":2229},{"style":226},[2230],{"type":45,"value":2231},"    A polished markdown report with executive summary,\n",{"type":39,"tag":183,"props":2233,"children":2234},{"class":185,"line":23},[2235],{"type":39,"tag":183,"props":2236,"children":2237},{"style":226},[2238],{"type":45,"value":2239},"    detailed findings, recommendations, and appendices.\n",{"type":39,"tag":183,"props":2241,"children":2243},{"class":185,"line":2242},30,[2244,2248,2252],{"type":39,"tag":183,"props":2245,"children":2246},{"style":190},[2247],{"type":45,"value":380},{"type":39,"tag":183,"props":2249,"children":2250},{"style":196},[2251],{"type":45,"value":213},{"type":39,"tag":183,"props":2253,"children":2254},{"style":226},[2255],{"type":45,"value":823},{"type":39,"tag":183,"props":2257,"children":2259},{"class":185,"line":2258},31,[2260,2265,2269],{"type":39,"tag":183,"props":2261,"children":2262},{"style":190},[2263],{"type":45,"value":2264},"  output_file",{"type":39,"tag":183,"props":2266,"children":2267},{"style":196},[2268],{"type":45,"value":213},{"type":39,"tag":183,"props":2270,"children":2271},{"style":226},[2272],{"type":45,"value":2273}," output\u002Freport.md\n",{"type":39,"tag":104,"props":2275,"children":2277},{"id":2276},"wiring-in-crewpy",[2278],{"type":45,"value":2279},"Wiring in crew.py",{"type":39,"tag":171,"props":2281,"children":2283},{"className":938,"code":2282,"language":940,"meta":176,"style":176},"@CrewBase\nclass ResearchCrew:\n    agents_config = \"config\u002Fagents.yaml\"\n    tasks_config = \"config\u002Ftasks.yaml\"\n\n    @task\n    def research_task(self) -> Task:\n        return Task(config=self.tasks_config[\"research_task\"])\n\n    @task\n    def analysis_task(self) -> Task:\n        return Task(\n            config=self.tasks_config[\"analysis_task\"],\n            context=[self.research_task()],\n        )\n\n    @task\n    def report_task(self) -> Task:\n        return Task(\n            config=self.tasks_config[\"report_task\"],\n            output_file=\"output\u002Freport.md\",\n        )\n",[2284],{"type":39,"tag":179,"props":2285,"children":2286},{"__ignoreMap":176},[2287,2295,2303,2311,2319,2326,2334,2342,2350,2357,2364,2372,2380,2388,2396,2404,2411,2418,2426,2433,2441,2449],{"type":39,"tag":183,"props":2288,"children":2289},{"class":185,"line":186},[2290],{"type":39,"tag":183,"props":2291,"children":2292},{},[2293],{"type":45,"value":2294},"@CrewBase\n",{"type":39,"tag":183,"props":2296,"children":2297},{"class":185,"line":202},[2298],{"type":39,"tag":183,"props":2299,"children":2300},{},[2301],{"type":45,"value":2302},"class ResearchCrew:\n",{"type":39,"tag":183,"props":2304,"children":2305},{"class":185,"line":222},[2306],{"type":39,"tag":183,"props":2307,"children":2308},{},[2309],{"type":45,"value":2310},"    agents_config = \"config\u002Fagents.yaml\"\n",{"type":39,"tag":183,"props":2312,"children":2313},{"class":185,"line":232},[2314],{"type":39,"tag":183,"props":2315,"children":2316},{},[2317],{"type":45,"value":2318},"    tasks_config = \"config\u002Ftasks.yaml\"\n",{"type":39,"tag":183,"props":2320,"children":2321},{"class":185,"line":242},[2322],{"type":39,"tag":183,"props":2323,"children":2324},{"emptyLinePlaceholder":236},[2325],{"type":45,"value":239},{"type":39,"tag":183,"props":2327,"children":2328},{"class":185,"line":251},[2329],{"type":39,"tag":183,"props":2330,"children":2331},{},[2332],{"type":45,"value":2333},"    @task\n",{"type":39,"tag":183,"props":2335,"children":2336},{"class":185,"line":260},[2337],{"type":39,"tag":183,"props":2338,"children":2339},{},[2340],{"type":45,"value":2341},"    def research_task(self) -> Task:\n",{"type":39,"tag":183,"props":2343,"children":2344},{"class":185,"line":269},[2345],{"type":39,"tag":183,"props":2346,"children":2347},{},[2348],{"type":45,"value":2349},"        return Task(config=self.tasks_config[\"research_task\"])\n",{"type":39,"tag":183,"props":2351,"children":2352},{"class":185,"line":27},[2353],{"type":39,"tag":183,"props":2354,"children":2355},{"emptyLinePlaceholder":236},[2356],{"type":45,"value":239},{"type":39,"tag":183,"props":2358,"children":2359},{"class":185,"line":286},[2360],{"type":39,"tag":183,"props":2361,"children":2362},{},[2363],{"type":45,"value":2333},{"type":39,"tag":183,"props":2365,"children":2366},{"class":185,"line":294},[2367],{"type":39,"tag":183,"props":2368,"children":2369},{},[2370],{"type":45,"value":2371},"    def analysis_task(self) -> Task:\n",{"type":39,"tag":183,"props":2373,"children":2374},{"class":185,"line":303},[2375],{"type":39,"tag":183,"props":2376,"children":2377},{},[2378],{"type":45,"value":2379},"        return Task(\n",{"type":39,"tag":183,"props":2381,"children":2382},{"class":185,"line":312},[2383],{"type":39,"tag":183,"props":2384,"children":2385},{},[2386],{"type":45,"value":2387},"            config=self.tasks_config[\"analysis_task\"],\n",{"type":39,"tag":183,"props":2389,"children":2390},{"class":185,"line":321},[2391],{"type":39,"tag":183,"props":2392,"children":2393},{},[2394],{"type":45,"value":2395},"            context=[self.research_task()],\n",{"type":39,"tag":183,"props":2397,"children":2398},{"class":185,"line":338},[2399],{"type":39,"tag":183,"props":2400,"children":2401},{},[2402],{"type":45,"value":2403},"        )\n",{"type":39,"tag":183,"props":2405,"children":2406},{"class":185,"line":347},[2407],{"type":39,"tag":183,"props":2408,"children":2409},{"emptyLinePlaceholder":236},[2410],{"type":45,"value":239},{"type":39,"tag":183,"props":2412,"children":2413},{"class":185,"line":356},[2414],{"type":39,"tag":183,"props":2415,"children":2416},{},[2417],{"type":45,"value":2333},{"type":39,"tag":183,"props":2419,"children":2420},{"class":185,"line":365},[2421],{"type":39,"tag":183,"props":2422,"children":2423},{},[2424],{"type":45,"value":2425},"    def report_task(self) -> Task:\n",{"type":39,"tag":183,"props":2427,"children":2428},{"class":185,"line":374},[2429],{"type":39,"tag":183,"props":2430,"children":2431},{},[2432],{"type":45,"value":2379},{"type":39,"tag":183,"props":2434,"children":2435},{"class":185,"line":883},[2436],{"type":39,"tag":183,"props":2437,"children":2438},{},[2439],{"type":45,"value":2440},"            config=self.tasks_config[\"report_task\"],\n",{"type":39,"tag":183,"props":2442,"children":2443},{"class":185,"line":892},[2444],{"type":39,"tag":183,"props":2445,"children":2446},{},[2447],{"type":45,"value":2448},"            output_file=\"output\u002Freport.md\",\n",{"type":39,"tag":183,"props":2450,"children":2451},{"class":185,"line":901},[2452],{"type":39,"tag":183,"props":2453,"children":2454},{},[2455],{"type":45,"value":2403},{"type":39,"tag":48,"props":2457,"children":2458},{},[2459,2464,2466,2472,2474,2480],{"type":39,"tag":68,"props":2460,"children":2461},{},[2462],{"type":45,"value":2463},"Critical:",{"type":45,"value":2465}," The method name (",{"type":39,"tag":179,"props":2467,"children":2469},{"className":2468},[],[2470],{"type":45,"value":2471},"def research_task",{"type":45,"value":2473},") must match the YAML key (",{"type":39,"tag":179,"props":2475,"children":2477},{"className":2476},[],[2478],{"type":45,"value":2479},"research_task:",{"type":45,"value":2481},").",{"type":39,"tag":54,"props":2483,"children":2484},{},[],{"type":39,"tag":58,"props":2486,"children":2488},{"id":2487},"_6-task-dependencies-and-context-flow",[2489],{"type":45,"value":2490},"6. Task Dependencies and Context Flow",{"type":39,"tag":104,"props":2492,"children":2494},{"id":2493},"sequential-process-default",[2495],{"type":45,"value":2496},"Sequential Process (Default)",{"type":39,"tag":48,"props":2498,"children":2499},{},[2500,2502,2508],{"type":45,"value":2501},"In ",{"type":39,"tag":179,"props":2503,"children":2505},{"className":2504},[],[2506],{"type":45,"value":2507},"Process.sequential",{"type":45,"value":2509},", tasks run in order. Each task automatically receives all prior task outputs as context.",{"type":39,"tag":171,"props":2511,"children":2515},{"className":2512,"code":2514,"language":45},[2513],"language-text","research_task → analysis_task → report_task\n     ↓               ↓              ↓\n  output 1    output 1 + 2    output 1 + 2 + 3\n",[2516],{"type":39,"tag":179,"props":2517,"children":2518},{"__ignoreMap":176},[2519],{"type":45,"value":2514},{"type":39,"tag":48,"props":2521,"children":2522},{},[2523,2525,2531],{"type":45,"value":2524},"You don't need ",{"type":39,"tag":179,"props":2526,"children":2528},{"className":2527},[],[2529],{"type":45,"value":2530},"context=",{"type":45,"value":2532}," in sequential — it's implicit. Use it only to create non-linear dependencies:",{"type":39,"tag":171,"props":2534,"children":2536},{"className":938,"code":2535,"language":940,"meta":176,"style":176},"# Task C depends on A but NOT B\ntask_c = Task(\n    ...,\n    context=[task_a],  # Only receives task_a output, not task_b\n)\n",[2537],{"type":39,"tag":179,"props":2538,"children":2539},{"__ignoreMap":176},[2540,2548,2556,2563,2571],{"type":39,"tag":183,"props":2541,"children":2542},{"class":185,"line":186},[2543],{"type":39,"tag":183,"props":2544,"children":2545},{},[2546],{"type":45,"value":2547},"# Task C depends on A but NOT B\n",{"type":39,"tag":183,"props":2549,"children":2550},{"class":185,"line":202},[2551],{"type":39,"tag":183,"props":2552,"children":2553},{},[2554],{"type":45,"value":2555},"task_c = Task(\n",{"type":39,"tag":183,"props":2557,"children":2558},{"class":185,"line":222},[2559],{"type":39,"tag":183,"props":2560,"children":2561},{},[2562],{"type":45,"value":1328},{"type":39,"tag":183,"props":2564,"children":2565},{"class":185,"line":232},[2566],{"type":39,"tag":183,"props":2567,"children":2568},{},[2569],{"type":45,"value":2570},"    context=[task_a],  # Only receives task_a output, not task_b\n",{"type":39,"tag":183,"props":2572,"children":2573},{"class":185,"line":242},[2574],{"type":39,"tag":183,"props":2575,"children":2576},{},[2577],{"type":45,"value":984},{"type":39,"tag":104,"props":2579,"children":2581},{"id":2580},"explicit-dependencies",[2582],{"type":45,"value":2583},"Explicit Dependencies",{"type":39,"tag":171,"props":2585,"children":2587},{"className":938,"code":2586,"language":940,"meta":176,"style":176},"# Diamond dependency pattern\ntask_a = Task(...)                          # Entry point\ntask_b = Task(..., context=[task_a])        # Depends on A\ntask_c = Task(..., context=[task_a])        # Also depends on A\ntask_d = Task(..., context=[task_b, task_c])  # Depends on both B and C\n",[2588],{"type":39,"tag":179,"props":2589,"children":2590},{"__ignoreMap":176},[2591,2599,2607,2615,2623],{"type":39,"tag":183,"props":2592,"children":2593},{"class":185,"line":186},[2594],{"type":39,"tag":183,"props":2595,"children":2596},{},[2597],{"type":45,"value":2598},"# Diamond dependency pattern\n",{"type":39,"tag":183,"props":2600,"children":2601},{"class":185,"line":202},[2602],{"type":39,"tag":183,"props":2603,"children":2604},{},[2605],{"type":45,"value":2606},"task_a = Task(...)                          # Entry point\n",{"type":39,"tag":183,"props":2608,"children":2609},{"class":185,"line":222},[2610],{"type":39,"tag":183,"props":2611,"children":2612},{},[2613],{"type":45,"value":2614},"task_b = Task(..., context=[task_a])        # Depends on A\n",{"type":39,"tag":183,"props":2616,"children":2617},{"class":185,"line":232},[2618],{"type":39,"tag":183,"props":2619,"children":2620},{},[2621],{"type":45,"value":2622},"task_c = Task(..., context=[task_a])        # Also depends on A\n",{"type":39,"tag":183,"props":2624,"children":2625},{"class":185,"line":242},[2626],{"type":39,"tag":183,"props":2627,"children":2628},{},[2629],{"type":45,"value":2630},"task_d = Task(..., context=[task_b, task_c])  # Depends on both B and C\n",{"type":39,"tag":104,"props":2632,"children":2634},{"id":2633},"conditional-tasks",[2635],{"type":45,"value":2636},"Conditional Tasks",{"type":39,"tag":171,"props":2638,"children":2640},{"className":938,"code":2639,"language":940,"meta":176,"style":176},"from crewai.task import ConditionalTask\n\ndef needs_more_data(output) -> bool:\n    return len(output.pydantic.items) \u003C 10\n\nextra_research = ConditionalTask(\n    description=\"Fetch additional data sources...\",\n    expected_output=\"...\",\n    agent=researcher,\n    condition=needs_more_data,  # Only runs if previous output has \u003C 10 items\n)\n",[2641],{"type":39,"tag":179,"props":2642,"children":2643},{"__ignoreMap":176},[2644,2652,2659,2667,2675,2682,2690,2698,2705,2712,2720],{"type":39,"tag":183,"props":2645,"children":2646},{"class":185,"line":186},[2647],{"type":39,"tag":183,"props":2648,"children":2649},{},[2650],{"type":45,"value":2651},"from crewai.task import ConditionalTask\n",{"type":39,"tag":183,"props":2653,"children":2654},{"class":185,"line":202},[2655],{"type":39,"tag":183,"props":2656,"children":2657},{"emptyLinePlaceholder":236},[2658],{"type":45,"value":239},{"type":39,"tag":183,"props":2660,"children":2661},{"class":185,"line":222},[2662],{"type":39,"tag":183,"props":2663,"children":2664},{},[2665],{"type":45,"value":2666},"def needs_more_data(output) -> bool:\n",{"type":39,"tag":183,"props":2668,"children":2669},{"class":185,"line":232},[2670],{"type":39,"tag":183,"props":2671,"children":2672},{},[2673],{"type":45,"value":2674},"    return len(output.pydantic.items) \u003C 10\n",{"type":39,"tag":183,"props":2676,"children":2677},{"class":185,"line":242},[2678],{"type":39,"tag":183,"props":2679,"children":2680},{"emptyLinePlaceholder":236},[2681],{"type":45,"value":239},{"type":39,"tag":183,"props":2683,"children":2684},{"class":185,"line":251},[2685],{"type":39,"tag":183,"props":2686,"children":2687},{},[2688],{"type":45,"value":2689},"extra_research = ConditionalTask(\n",{"type":39,"tag":183,"props":2691,"children":2692},{"class":185,"line":260},[2693],{"type":39,"tag":183,"props":2694,"children":2695},{},[2696],{"type":45,"value":2697},"    description=\"Fetch additional data sources...\",\n",{"type":39,"tag":183,"props":2699,"children":2700},{"class":185,"line":269},[2701],{"type":39,"tag":183,"props":2702,"children":2703},{},[2704],{"type":45,"value":1027},{"type":39,"tag":183,"props":2706,"children":2707},{"class":185,"line":27},[2708],{"type":39,"tag":183,"props":2709,"children":2710},{},[2711],{"type":45,"value":1204},{"type":39,"tag":183,"props":2713,"children":2714},{"class":185,"line":286},[2715],{"type":39,"tag":183,"props":2716,"children":2717},{},[2718],{"type":45,"value":2719},"    condition=needs_more_data,  # Only runs if previous output has \u003C 10 items\n",{"type":39,"tag":183,"props":2721,"children":2722},{"class":185,"line":294},[2723],{"type":39,"tag":183,"props":2724,"children":2725},{},[2726],{"type":45,"value":984},{"type":39,"tag":54,"props":2728,"children":2729},{},[],{"type":39,"tag":58,"props":2731,"children":2733},{"id":2732},"_7-task-tools",[2734],{"type":45,"value":2735},"7. Task Tools",{"type":39,"tag":48,"props":2737,"children":2738},{},[2739],{"type":45,"value":2740},"Tasks can have their own tools that override the agent's default tools for that specific task:",{"type":39,"tag":171,"props":2742,"children":2744},{"className":938,"code":2743,"language":940,"meta":176,"style":176},"from crewai_tools import SerperDevTool, ScrapeWebsiteTool\n\nTask(\n    description=\"Search for and scrape the top 5 articles about {topic}...\",\n    expected_output=\"...\",\n    agent=researcher,\n    tools=[SerperDevTool(), ScrapeWebsiteTool()],  # Task-specific tools\n)\n",[2745],{"type":39,"tag":179,"props":2746,"children":2747},{"__ignoreMap":176},[2748,2756,2763,2770,2778,2785,2792,2800],{"type":39,"tag":183,"props":2749,"children":2750},{"class":185,"line":186},[2751],{"type":39,"tag":183,"props":2752,"children":2753},{},[2754],{"type":45,"value":2755},"from crewai_tools import SerperDevTool, ScrapeWebsiteTool\n",{"type":39,"tag":183,"props":2757,"children":2758},{"class":185,"line":202},[2759],{"type":39,"tag":183,"props":2760,"children":2761},{"emptyLinePlaceholder":236},[2762],{"type":45,"value":239},{"type":39,"tag":183,"props":2764,"children":2765},{"class":185,"line":222},[2766],{"type":39,"tag":183,"props":2767,"children":2768},{},[2769],{"type":45,"value":952},{"type":39,"tag":183,"props":2771,"children":2772},{"class":185,"line":232},[2773],{"type":39,"tag":183,"props":2774,"children":2775},{},[2776],{"type":45,"value":2777},"    description=\"Search for and scrape the top 5 articles about {topic}...\",\n",{"type":39,"tag":183,"props":2779,"children":2780},{"class":185,"line":242},[2781],{"type":39,"tag":183,"props":2782,"children":2783},{},[2784],{"type":45,"value":1027},{"type":39,"tag":183,"props":2786,"children":2787},{"class":185,"line":251},[2788],{"type":39,"tag":183,"props":2789,"children":2790},{},[2791],{"type":45,"value":1204},{"type":39,"tag":183,"props":2793,"children":2794},{"class":185,"line":260},[2795],{"type":39,"tag":183,"props":2796,"children":2797},{},[2798],{"type":45,"value":2799},"    tools=[SerperDevTool(), ScrapeWebsiteTool()],  # Task-specific tools\n",{"type":39,"tag":183,"props":2801,"children":2802},{"class":185,"line":269},[2803],{"type":39,"tag":183,"props":2804,"children":2805},{},[2806],{"type":45,"value":984},{"type":39,"tag":48,"props":2808,"children":2809},{},[2810],{"type":39,"tag":68,"props":2811,"children":2812},{},[2813],{"type":45,"value":2814},"When to use task-level tools:",{"type":39,"tag":409,"props":2816,"children":2817},{},[2818,2823,2828],{"type":39,"tag":120,"props":2819,"children":2820},{},[2821],{"type":45,"value":2822},"The task needs tools the agent doesn't normally have",{"type":39,"tag":120,"props":2824,"children":2825},{},[2826],{"type":45,"value":2827},"You want to restrict an agent to specific tools for this task",{"type":39,"tag":120,"props":2829,"children":2830},{},[2831],{"type":45,"value":2832},"Different tasks by the same agent need different tool sets",{"type":39,"tag":54,"props":2834,"children":2835},{},[],{"type":39,"tag":58,"props":2837,"children":2839},{"id":2838},"_8-variable-interpolation",[2840],{"type":45,"value":2841},"8. Variable Interpolation",{"type":39,"tag":48,"props":2843,"children":2844},{},[2845,2846,2852],{"type":45,"value":1095},{"type":39,"tag":179,"props":2847,"children":2849},{"className":2848},[],[2850],{"type":45,"value":2851},"{variable}",{"type":45,"value":2853}," placeholders in YAML for reusable tasks:",{"type":39,"tag":171,"props":2855,"children":2857},{"className":173,"code":2856,"language":175,"meta":176,"style":176},"research_task:\n  description: >\n    Research {topic} trends for {current_year},\n    targeting {target_audience}.\n  expected_output: >\n    A report on {topic} suitable for {target_audience}.\n",[2858],{"type":39,"tag":179,"props":2859,"children":2860},{"__ignoreMap":176},[2861,2872,2887,2895,2903,2918],{"type":39,"tag":183,"props":2862,"children":2863},{"class":185,"line":186},[2864,2868],{"type":39,"tag":183,"props":2865,"children":2866},{"style":190},[2867],{"type":45,"value":193},{"type":39,"tag":183,"props":2869,"children":2870},{"style":196},[2871],{"type":45,"value":199},{"type":39,"tag":183,"props":2873,"children":2874},{"class":185,"line":202},[2875,2879,2883],{"type":39,"tag":183,"props":2876,"children":2877},{"style":190},[2878],{"type":45,"value":208},{"type":39,"tag":183,"props":2880,"children":2881},{"style":196},[2882],{"type":45,"value":213},{"type":39,"tag":183,"props":2884,"children":2885},{"style":216},[2886],{"type":45,"value":219},{"type":39,"tag":183,"props":2888,"children":2889},{"class":185,"line":222},[2890],{"type":39,"tag":183,"props":2891,"children":2892},{"style":226},[2893],{"type":45,"value":2894},"    Research {topic} trends for {current_year},\n",{"type":39,"tag":183,"props":2896,"children":2897},{"class":185,"line":232},[2898],{"type":39,"tag":183,"props":2899,"children":2900},{"style":226},[2901],{"type":45,"value":2902},"    targeting {target_audience}.\n",{"type":39,"tag":183,"props":2904,"children":2905},{"class":185,"line":242},[2906,2910,2914],{"type":39,"tag":183,"props":2907,"children":2908},{"style":190},[2909],{"type":45,"value":327},{"type":39,"tag":183,"props":2911,"children":2912},{"style":196},[2913],{"type":45,"value":213},{"type":39,"tag":183,"props":2915,"children":2916},{"style":216},[2917],{"type":45,"value":219},{"type":39,"tag":183,"props":2919,"children":2920},{"class":185,"line":251},[2921],{"type":39,"tag":183,"props":2922,"children":2923},{"style":226},[2924],{"type":45,"value":2925},"    A report on {topic} suitable for {target_audience}.\n",{"type":39,"tag":48,"props":2927,"children":2928},{},[2929,2931,2937],{"type":45,"value":2930},"Variables are replaced when you call ",{"type":39,"tag":179,"props":2932,"children":2934},{"className":2933},[],[2935],{"type":45,"value":2936},"crew.kickoff(inputs={...})",{"type":45,"value":213},{"type":39,"tag":171,"props":2939,"children":2941},{"className":938,"code":2940,"language":940,"meta":176,"style":176},"crew.kickoff(inputs={\n    \"topic\": \"AI Agents\",\n    \"current_year\": \"2025\",\n    \"target_audience\": \"developers\",\n})\n",[2942],{"type":39,"tag":179,"props":2943,"children":2944},{"__ignoreMap":176},[2945,2953,2961,2969,2977],{"type":39,"tag":183,"props":2946,"children":2947},{"class":185,"line":186},[2948],{"type":39,"tag":183,"props":2949,"children":2950},{},[2951],{"type":45,"value":2952},"crew.kickoff(inputs={\n",{"type":39,"tag":183,"props":2954,"children":2955},{"class":185,"line":202},[2956],{"type":39,"tag":183,"props":2957,"children":2958},{},[2959],{"type":45,"value":2960},"    \"topic\": \"AI Agents\",\n",{"type":39,"tag":183,"props":2962,"children":2963},{"class":185,"line":222},[2964],{"type":39,"tag":183,"props":2965,"children":2966},{},[2967],{"type":45,"value":2968},"    \"current_year\": \"2025\",\n",{"type":39,"tag":183,"props":2970,"children":2971},{"class":185,"line":232},[2972],{"type":39,"tag":183,"props":2973,"children":2974},{},[2975],{"type":45,"value":2976},"    \"target_audience\": \"developers\",\n",{"type":39,"tag":183,"props":2978,"children":2979},{"class":185,"line":242},[2980],{"type":39,"tag":183,"props":2981,"children":2982},{},[2983],{"type":45,"value":2984},"})\n",{"type":39,"tag":48,"props":2986,"children":2987},{},[2988],{"type":39,"tag":68,"props":2989,"children":2990},{},[2991],{"type":45,"value":2992},"Common mistakes:",{"type":39,"tag":409,"props":2994,"children":2995},{},[2996,3016,3035],{"type":39,"tag":120,"props":2997,"children":2998},{},[2999,3001,3007,3009,3014],{"type":45,"value":3000},"Missing variable in ",{"type":39,"tag":179,"props":3002,"children":3004},{"className":3003},[],[3005],{"type":45,"value":3006},"inputs",{"type":45,"value":3008}," → literal ",{"type":39,"tag":179,"props":3010,"children":3012},{"className":3011},[],[3013],{"type":45,"value":2851},{"type":45,"value":3015}," appears in the prompt",{"type":39,"tag":120,"props":3017,"children":3018},{},[3019,3021,3027,3029],{"type":45,"value":3020},"Using ",{"type":39,"tag":179,"props":3022,"children":3024},{"className":3023},[],[3025],{"type":45,"value":3026},"{{ }}",{"type":45,"value":3028}," Jinja2 syntax → crewAI uses single braces ",{"type":39,"tag":179,"props":3030,"children":3032},{"className":3031},[],[3033],{"type":45,"value":3034},"{ }",{"type":39,"tag":120,"props":3036,"children":3037},{},[3038,3040,3045],{"type":45,"value":3039},"Unused variables in ",{"type":39,"tag":179,"props":3041,"children":3043},{"className":3042},[],[3044],{"type":45,"value":3006},{"type":45,"value":3046}," → silently ignored (no error)",{"type":39,"tag":54,"props":3048,"children":3049},{},[],{"type":39,"tag":58,"props":3051,"children":3053},{"id":3052},"_9-common-task-design-mistakes",[3054],{"type":45,"value":3055},"9. Common Task Design Mistakes",{"type":39,"tag":453,"props":3057,"children":3058},{},[3059,3080],{"type":39,"tag":457,"props":3060,"children":3061},{},[3062],{"type":39,"tag":461,"props":3063,"children":3064},{},[3065,3070,3075],{"type":39,"tag":465,"props":3066,"children":3067},{},[3068],{"type":45,"value":3069},"Mistake",{"type":39,"tag":465,"props":3071,"children":3072},{},[3073],{"type":45,"value":3074},"Impact",{"type":39,"tag":465,"props":3076,"children":3077},{},[3078],{"type":45,"value":3079},"Fix",{"type":39,"tag":476,"props":3081,"children":3082},{},[3083,3101,3119,3137,3163,3188,3225,3243,3261,3287],{"type":39,"tag":461,"props":3084,"children":3085},{},[3086,3091,3096],{"type":39,"tag":483,"props":3087,"children":3088},{},[3089],{"type":45,"value":3090},"Vague description (\"Research the topic\")",{"type":39,"tag":483,"props":3092,"children":3093},{},[3094],{"type":45,"value":3095},"Agent produces shallow, unfocused output",{"type":39,"tag":483,"props":3097,"children":3098},{},[3099],{"type":45,"value":3100},"Add specific steps, constraints, and context",{"type":39,"tag":461,"props":3102,"children":3103},{},[3104,3109,3114],{"type":39,"tag":483,"props":3105,"children":3106},{},[3107],{"type":45,"value":3108},"Vague expected_output (\"A report\")",{"type":39,"tag":483,"props":3110,"children":3111},{},[3112],{"type":45,"value":3113},"Agent guesses at format and structure",{"type":39,"tag":483,"props":3115,"children":3116},{},[3117],{"type":45,"value":3118},"Specify format, sections, length, quality markers",{"type":39,"tag":461,"props":3120,"children":3121},{},[3122,3127,3132],{"type":39,"tag":483,"props":3123,"children":3124},{},[3125],{"type":45,"value":3126},"Multiple objectives in one task",{"type":39,"tag":483,"props":3128,"children":3129},{},[3130],{"type":45,"value":3131},"Agent does all of them poorly",{"type":39,"tag":483,"props":3133,"children":3134},{},[3135],{"type":45,"value":3136},"Split into focused single-purpose tasks",{"type":39,"tag":461,"props":3138,"children":3139},{},[3140,3145,3150],{"type":39,"tag":483,"props":3141,"children":3142},{},[3143],{"type":45,"value":3144},"Modeling each chat turn as a Crew task",{"type":39,"tag":483,"props":3146,"children":3147},{},[3148],{"type":45,"value":3149},"Tasks are batch\u002Fworkflow units, not the conversational session loop",{"type":39,"tag":483,"props":3151,"children":3152},{},[3153,3155,3161],{"type":45,"value":3154},"Use a conversational Flow and call ",{"type":39,"tag":179,"props":3156,"children":3158},{"className":3157},[],[3159],{"type":45,"value":3160},"handle_turn()",{"type":45,"value":3162}," per user message",{"type":39,"tag":461,"props":3164,"children":3165},{},[3166,3171,3176],{"type":39,"tag":483,"props":3167,"children":3168},{},[3169],{"type":45,"value":3170},"No context between dependent tasks",{"type":39,"tag":483,"props":3172,"children":3173},{},[3174],{"type":45,"value":3175},"Agent lacks information from prior steps",{"type":39,"tag":483,"props":3177,"children":3178},{},[3179,3180,3186],{"type":45,"value":1095},{"type":39,"tag":179,"props":3181,"children":3183},{"className":3182},[],[3184],{"type":45,"value":3185},"context=[prior_task]",{"type":45,"value":3187}," for explicit dependencies",{"type":39,"tag":461,"props":3189,"children":3190},{},[3191,3201,3206],{"type":39,"tag":483,"props":3192,"children":3193},{},[3194,3199],{"type":39,"tag":179,"props":3195,"children":3197},{"className":3196},[],[3198],{"type":45,"value":100},{"type":45,"value":3200}," references a Pydantic class",{"type":39,"tag":483,"props":3202,"children":3203},{},[3204],{"type":45,"value":3205},"Agent sees a class name string, not field names",{"type":39,"tag":483,"props":3207,"children":3208},{},[3209,3211,3216,3218,3223],{"type":45,"value":3210},"Keep ",{"type":39,"tag":179,"props":3212,"children":3214},{"className":3213},[],[3215],{"type":45,"value":100},{"type":45,"value":3217}," as a human-readable string; use ",{"type":39,"tag":179,"props":3219,"children":3221},{"className":3220},[],[3222],{"type":45,"value":1101},{"type":45,"value":3224}," for the model",{"type":39,"tag":461,"props":3226,"children":3227},{},[3228,3233,3238],{"type":39,"tag":483,"props":3229,"children":3230},{},[3231],{"type":45,"value":3232},"Missing tools for data tasks",{"type":39,"tag":483,"props":3234,"children":3235},{},[3236],{"type":45,"value":3237},"Agent fabricates data instead of fetching it",{"type":39,"tag":483,"props":3239,"children":3240},{},[3241],{"type":45,"value":3242},"Add tools to the task or agent",{"type":39,"tag":461,"props":3244,"children":3245},{},[3246,3251,3256],{"type":39,"tag":483,"props":3247,"children":3248},{},[3249],{"type":45,"value":3250},"No guardrails on critical output",{"type":39,"tag":483,"props":3252,"children":3253},{},[3254],{"type":45,"value":3255},"Bad output flows downstream unchecked",{"type":39,"tag":483,"props":3257,"children":3258},{},[3259],{"type":45,"value":3260},"Add function or LLM guardrails",{"type":39,"tag":461,"props":3262,"children":3263},{},[3264,3269,3274],{"type":39,"tag":483,"props":3265,"children":3266},{},[3267],{"type":45,"value":3268},"Overly strict expected_output",{"type":39,"tag":483,"props":3270,"children":3271},{},[3272],{"type":45,"value":3273},"Agent loops trying to match impossible criteria",{"type":39,"tag":483,"props":3275,"children":3276},{},[3277,3279,3285],{"type":45,"value":3278},"Be specific but achievable; lower ",{"type":39,"tag":179,"props":3280,"children":3282},{"className":3281},[],[3283],{"type":45,"value":3284},"guardrail_max_retries",{"type":45,"value":3286}," to fail faster",{"type":39,"tag":461,"props":3288,"children":3289},{},[3290,3295,3300],{"type":39,"tag":483,"props":3291,"children":3292},{},[3293],{"type":45,"value":3294},"Description duplicates backstory",{"type":39,"tag":483,"props":3296,"children":3297},{},[3298],{"type":45,"value":3299},"Wasted tokens and confused agent",{"type":39,"tag":483,"props":3301,"children":3302},{},[3303],{"type":45,"value":3304},"Description = what to do; backstory = who you are",{"type":39,"tag":54,"props":3306,"children":3307},{},[],{"type":39,"tag":58,"props":3309,"children":3311},{"id":3310},"_10-task-design-checklist",[3312],{"type":45,"value":3313},"10. Task Design Checklist",{"type":39,"tag":48,"props":3315,"children":3316},{},[3317],{"type":45,"value":3318},"Before running a task, verify:",{"type":39,"tag":409,"props":3320,"children":3323},{"className":3321},[3322],"contains-task-list",[3324,3342,3357,3372,3387,3409,3424,3439,3454,3476],{"type":39,"tag":120,"props":3325,"children":3328},{"className":3326},[3327],"task-list-item",[3329,3334,3335,3340],{"type":39,"tag":3330,"props":3331,"children":3333},"input",{"disabled":236,"type":3332},"checkbox",[],{"type":45,"value":1077},{"type":39,"tag":68,"props":3336,"children":3337},{},[3338],{"type":45,"value":3339},"Description",{"type":45,"value":3341}," includes what, how, context, and constraints",{"type":39,"tag":120,"props":3343,"children":3345},{"className":3344},[3327],[3346,3349,3350,3355],{"type":39,"tag":3330,"props":3347,"children":3348},{"disabled":236,"type":3332},[],{"type":45,"value":1077},{"type":39,"tag":68,"props":3351,"children":3352},{},[3353],{"type":45,"value":3354},"Expected output",{"type":45,"value":3356}," specifies format, structure, and quality markers",{"type":39,"tag":120,"props":3358,"children":3360},{"className":3359},[3327],[3361,3364,3365,3370],{"type":39,"tag":3330,"props":3362,"children":3363},{"disabled":236,"type":3332},[],{"type":45,"value":1077},{"type":39,"tag":68,"props":3366,"children":3367},{},[3368],{"type":45,"value":3369},"Single purpose",{"type":45,"value":3371}," — one clear objective per task",{"type":39,"tag":120,"props":3373,"children":3375},{"className":3374},[3327],[3376,3379,3380,3385],{"type":39,"tag":3330,"props":3377,"children":3378},{"disabled":236,"type":3332},[],{"type":45,"value":1077},{"type":39,"tag":68,"props":3381,"children":3382},{},[3383],{"type":45,"value":3384},"Agent assigned",{"type":45,"value":3386}," (or task is in a hierarchical crew)",{"type":39,"tag":120,"props":3388,"children":3390},{"className":3389},[3327],[3391,3394,3395,3400,3402,3407],{"type":39,"tag":3330,"props":3392,"children":3393},{"disabled":236,"type":3332},[],{"type":45,"value":1077},{"type":39,"tag":68,"props":3396,"children":3397},{},[3398],{"type":45,"value":3399},"Dependencies",{"type":45,"value":3401}," set via ",{"type":39,"tag":179,"props":3403,"children":3405},{"className":3404},[],[3406],{"type":45,"value":996},{"type":45,"value":3408}," where needed",{"type":39,"tag":120,"props":3410,"children":3412},{"className":3411},[3327],[3413,3416,3417,3422],{"type":39,"tag":3330,"props":3414,"children":3415},{"disabled":236,"type":3332},[],{"type":45,"value":1077},{"type":39,"tag":68,"props":3418,"children":3419},{},[3420],{"type":45,"value":3421},"Tools",{"type":45,"value":3423}," provided for any task requiring external data",{"type":39,"tag":120,"props":3425,"children":3427},{"className":3426},[3327],[3428,3431,3432,3437],{"type":39,"tag":3330,"props":3429,"children":3430},{"disabled":236,"type":3332},[],{"type":45,"value":1077},{"type":39,"tag":68,"props":3433,"children":3434},{},[3435],{"type":45,"value":3436},"Structured output",{"type":45,"value":3438}," configured if downstream code parses the result",{"type":39,"tag":120,"props":3440,"children":3442},{"className":3441},[3327],[3443,3446,3447,3452],{"type":39,"tag":3330,"props":3444,"children":3445},{"disabled":236,"type":3332},[],{"type":45,"value":1077},{"type":39,"tag":68,"props":3448,"children":3449},{},[3450],{"type":45,"value":3451},"Guardrails",{"type":45,"value":3453}," set for critical outputs",{"type":39,"tag":120,"props":3455,"children":3457},{"className":3456},[3327],[3458,3461,3462,3467,3469,3474],{"type":39,"tag":3330,"props":3459,"children":3460},{"disabled":236,"type":3332},[],{"type":45,"value":1077},{"type":39,"tag":68,"props":3463,"children":3464},{},[3465],{"type":45,"value":3466},"Variables",{"type":45,"value":3468}," in YAML match the ",{"type":39,"tag":179,"props":3470,"children":3472},{"className":3471},[],[3473],{"type":45,"value":3006},{"type":45,"value":3475}," dict keys",{"type":39,"tag":120,"props":3477,"children":3479},{"className":3478},[3327],[3480,3483,3484,3489],{"type":39,"tag":3330,"props":3481,"children":3482},{"disabled":236,"type":3332},[],{"type":45,"value":1077},{"type":39,"tag":68,"props":3485,"children":3486},{},[3487],{"type":45,"value":3488},"Expected output is achievable",{"type":45,"value":3490}," — test with a simple run before adding complexity",{"type":39,"tag":54,"props":3492,"children":3493},{},[],{"type":39,"tag":58,"props":3495,"children":3497},{"id":3496},"references",[3498],{"type":45,"value":3499},"References",{"type":39,"tag":48,"props":3501,"children":3502},{},[3503],{"type":45,"value":3504},"For deeper dives into specific topics, see:",{"type":39,"tag":409,"props":3506,"children":3507},{},[3508],{"type":39,"tag":120,"props":3509,"children":3510},{},[3511,3517,3519,3524,3526,3531,3533,3539],{"type":39,"tag":3512,"props":3513,"children":3515},"a",{"href":3514},"references\u002Fstructured-output.md",[3516],{"type":45,"value":1090},{"type":45,"value":3518}," — ",{"type":39,"tag":179,"props":3520,"children":3522},{"className":3521},[],[3523],{"type":45,"value":1101},{"type":45,"value":3525},", ",{"type":39,"tag":179,"props":3527,"children":3529},{"className":3528},[],[3530],{"type":45,"value":1109},{"type":45,"value":3532},", and ",{"type":39,"tag":179,"props":3534,"children":3536},{"className":3535},[],[3537],{"type":45,"value":3538},"response_format",{"type":45,"value":3540}," patterns across LLM, Agent, Task, and Crew levels",{"type":39,"tag":48,"props":3542,"children":3543},{},[3544],{"type":45,"value":3545},"For related skills:",{"type":39,"tag":409,"props":3547,"children":3548},{},[3549,3559,3569],{"type":39,"tag":120,"props":3550,"children":3551},{},[3552,3557],{"type":39,"tag":68,"props":3553,"children":3554},{},[3555],{"type":45,"value":3556},"getting-started",{"type":45,"value":3558}," — project scaffolding, choosing the right abstraction, Flow architecture",{"type":39,"tag":120,"props":3560,"children":3561},{},[3562,3567],{"type":39,"tag":68,"props":3563,"children":3564},{},[3565],{"type":45,"value":3566},"design-agent",{"type":45,"value":3568}," — agent Role-Goal-Backstory framework, parameter tuning, tool assignment, memory & knowledge configuration",{"type":39,"tag":120,"props":3570,"children":3571},{},[3572,3577],{"type":39,"tag":68,"props":3573,"children":3574},{},[3575],{"type":45,"value":3576},"ask-docs",{"type":45,"value":3578}," — query the live CrewAI documentation MCP server for questions not covered by these skills",{"type":39,"tag":3580,"props":3581,"children":3582},"style",{},[3583],{"type":45,"value":3584},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":3586,"total":232},[3587,3602,3611,3617],{"slug":3576,"name":3576,"fn":3588,"description":3589,"org":3590,"tags":3591,"stars":23,"repoUrl":24,"updatedAt":3601},"retrieve CrewAI documentation","Query the official CrewAI documentation for answers. Use when the user has a CrewAI question that isn't fully covered by the getting-started, design-agent, design-task skills — e.g., specific API details, configuration options, advanced features, troubleshooting errors, enterprise features, tool references, or anything where the latest docs are the best source of truth.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3592,3595,3598],{"name":3593,"slug":3594,"type":16},"Documentation","documentation",{"name":3596,"slug":3597,"type":16},"Reference","reference",{"name":3599,"slug":3600,"type":16},"Research","research","2026-07-12T08:01:01.496655",{"slug":3566,"name":3566,"fn":3603,"description":3604,"org":3605,"tags":3606,"stars":23,"repoUrl":24,"updatedAt":3610},"design and configure CrewAI agents","CrewAI agent design and configuration. Use when creating, configuring, or debugging crewAI agents — choosing role\u002Fgoal\u002Fbackstory, selecting LLMs, assigning tools, tuning max_iter\u002Fmax_rpm\u002Fmax_execution_time, enabling planning\u002Fcode execution\u002Fdelegation, setting up knowledge sources, using guardrails, or configuring agents in YAML vs code.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3607,3608,3609],{"name":18,"slug":19,"type":16},{"name":14,"slug":15,"type":16},{"name":21,"slug":22,"type":16},"2026-07-12T08:01:04.232165",{"slug":4,"name":4,"fn":5,"description":6,"org":3612,"tags":3613,"stars":23,"repoUrl":24,"updatedAt":25},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3614,3615,3616],{"name":18,"slug":19,"type":16},{"name":14,"slug":15,"type":16},{"name":21,"slug":22,"type":16},{"slug":3556,"name":3556,"fn":3618,"description":3619,"org":3620,"tags":3621,"stars":23,"repoUrl":24,"updatedAt":3627},"scaffold and architect CrewAI projects","CrewAI architecture decisions and project scaffolding. Use when starting a new crewAI project, choosing between LLM.call() vs Agent.kickoff() vs Crew.kickoff() vs Flow, scaffolding with 'crewai create flow', setting up YAML config (agents.yaml, tasks.yaml), wiring @CrewBase crew.py, writing Flow main.py with @start\u002F@listen, building experimental conversational Flows with handle_turn()\u002Fchat(), or using {variable} interpolation.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3622,3623,3626],{"name":18,"slug":19,"type":16},{"name":3624,"slug":3625,"type":16},"Architecture","architecture",{"name":14,"slug":15,"type":16},"2026-07-12T08:01:05.536802",{"items":3629,"total":232},[3630,3636,3642,3648],{"slug":3576,"name":3576,"fn":3588,"description":3589,"org":3631,"tags":3632,"stars":23,"repoUrl":24,"updatedAt":3601},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3633,3634,3635],{"name":3593,"slug":3594,"type":16},{"name":3596,"slug":3597,"type":16},{"name":3599,"slug":3600,"type":16},{"slug":3566,"name":3566,"fn":3603,"description":3604,"org":3637,"tags":3638,"stars":23,"repoUrl":24,"updatedAt":3610},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3639,3640,3641],{"name":18,"slug":19,"type":16},{"name":14,"slug":15,"type":16},{"name":21,"slug":22,"type":16},{"slug":4,"name":4,"fn":5,"description":6,"org":3643,"tags":3644,"stars":23,"repoUrl":24,"updatedAt":25},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3645,3646,3647],{"name":18,"slug":19,"type":16},{"name":14,"slug":15,"type":16},{"name":21,"slug":22,"type":16},{"slug":3556,"name":3556,"fn":3618,"description":3619,"org":3649,"tags":3650,"stars":23,"repoUrl":24,"updatedAt":3627},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3651,3652,3653],{"name":18,"slug":19,"type":16},{"name":3624,"slug":3625,"type":16},{"name":14,"slug":15,"type":16}]